OctopOS
0.6.0
Data communication bus for SPACE HAUC
|
#include <publisher.h>
Public Member Functions | |
publisher (std::string _name, key_t message_key) | |
bool | publish (T data) |
Public Member Functions inherited from tentacle | |
tentacle (key_t msg_key) | |
bool | write (long type, std::string data) |
bool | write (std::pair< long, std::string > pair) |
Additional Inherited Members | |
Static Public Member Functions inherited from tentacle | |
static std::pair< long, std::string > | read (long type, bool block=true, bool under=false) |
Protected Types inherited from tentacle | |
enum | role_t { SUBSCRIBER, PUBLISHER } |
Static Protected Member Functions inherited from tentacle | |
static long | getTempId (role_t role) |
Static Protected Attributes inherited from tentacle | |
static int | message_que |
static intptr_t * | shared_data = NULL |
This class is used to publish data to a topic specified on construction. The template parameter is the data type of the topic. Inherites from tentacle for IPC communication.
creates a publisher object and registers it with octopOS.
_name | The name of the topic to publish to. |
message_key | The key for the message bus to create a tentacle on. |
|
inline |
Updates data in shared memory segment, then tells octopOS to notify subscribers of the newly published data.
data | The data to be published |