Fawkes API Fawkes Development Version
|
CLIPS protobuf integration class. More...
#include <>>
Public Member Functions | |
ClipsProtobufCommunicator (CLIPS::Environment *env, fawkes::Mutex &env_mutex, fawkes::Logger *logger=NULL) | |
Constructor. More... | |
ClipsProtobufCommunicator (CLIPS::Environment *env, fawkes::Mutex &env_mutex, std::vector< std::string > &proto_path, fawkes::Logger *logger=NULL) | |
Constructor. More... | |
~ClipsProtobufCommunicator () | |
Destructor. More... | |
void | enable_server (int port) |
Enable protobuf stream server. More... | |
void | disable_server () |
Disable protobu stream server. More... | |
protobuf_comm::ProtobufStreamServer * | server () const |
Get Protobuf server. More... | |
const std::map< long int, protobuf_comm::ProtobufBroadcastPeer * > & | peers () const |
Get protobuf_comm peers. More... | |
protobuf_comm::MessageRegister & | message_register () |
Get the communicator's message register. More... | |
boost::signals2::signal< void(protobuf_comm::ProtobufStreamServer::ClientID, std::shared_ptr< google::protobuf::Message >)> & | signal_server_sent () |
Signal invoked for a message that has been sent to a server client. More... | |
boost::signals2::signal< void(std::string, unsigned short, std::shared_ptr< google::protobuf::Message >)> & | signal_client_sent () |
Signal invoked for a message that has been sent to a client. More... | |
boost::signals2::signal< void(long, std::shared_ptr< google::protobuf::Message >)> & | signal_peer_sent () |
Signal invoked for a message that has been sent via broadcast. More... | |
CLIPS protobuf integration class.
This class adds functionality related to protobuf to a given CLIPS environment. It supports the creation of communication channels through protobuf_comm. An instance maintains its own message register shared among server, peer, and clients.
Definition at line 58 of file communicator.h.
protobuf_clips::ClipsProtobufCommunicator::ClipsProtobufCommunicator | ( | CLIPS::Environment * | env, |
fawkes::Mutex & | env_mutex, | ||
fawkes::Logger * | logger = NULL |
||
) |
Constructor.
env | CLIPS environment to which to provide the protobuf functionality |
env_mutex | mutex to lock when operating on the CLIPS environment. |
logger | optional logger for informational output |
Definition at line 67 of file communicator.cpp.
protobuf_clips::ClipsProtobufCommunicator::ClipsProtobufCommunicator | ( | CLIPS::Environment * | env, |
fawkes::Mutex & | env_mutex, | ||
std::vector< std::string > & | proto_path, | ||
fawkes::Logger * | logger = NULL |
||
) |
Constructor.
env | CLIPS environment to which to provide the protobuf functionality |
env_mutex | mutex to lock when operating on the CLIPS environment. |
proto_path | proto path passed to a newly instantiated message register |
logger | optional logger for informational output |
Definition at line 82 of file communicator.cpp.
protobuf_clips::ClipsProtobufCommunicator::~ClipsProtobufCommunicator | ( | ) |
Destructor.
Definition at line 93 of file communicator.cpp.
void protobuf_clips::ClipsProtobufCommunicator::disable_server | ( | ) |
Disable protobu stream server.
Definition at line 225 of file communicator.cpp.
void protobuf_clips::ClipsProtobufCommunicator::enable_server | ( | int | port | ) |
Enable protobuf stream server.
port | TCP port to listen on for connections |
Definition at line 207 of file communicator.cpp.
|
inline |
Get the communicator's message register.
Definition at line 92 of file communicator.h.
|
inline |
|
inline |
|
inline |
Signal invoked for a message that has been sent to a client.
Definition at line 112 of file communicator.h.
|
inline |
Signal invoked for a message that has been sent via broadcast.
Definition at line 121 of file communicator.h.
|
inline |
Signal invoked for a message that has been sent to a server client.
Definition at line 102 of file communicator.h.