58#define FROM_WHITEBOARD_CC_
64#include "guudpbridge/guudpManager.h"
74static inline bool udp_pid_fail(
const pid_t pid)
81static void *monitor_bridge(
void *local_whiteboard)
88 if (udp_pid_fail(pid))
90 fprintf(stderr,
"Attempt UDP Bridge start . . . \n");
91 setup_udp_with_id(-1);
98 protected_usleep(1000000);
104 if(local_whiteboard == NULL)
108 local_wb = local_whiteboard;
113 pthread_create(&child, NULL, monitor_bridge, local_wb);
117 for (i = 0; i < timeout; i++)
120 if (udp_pid_fail(pid))
125 fprintf(stderr,
" *** Warning: UDP bridge failed to start, pid = %d\n", pid);
132 if (local_wb_needs_free && local_wb)
delete local_wb;
143 std::vector<std::string> known_types;
164 protected_usleep(30000);
Base class for WBFunctor.
Old WB class for storing shared data.
int getIntValue() const
getIntValue.
void addReplicationType(const std::string &type)
virtual ~RemoteWhiteboard()
Destructor.
virtual void subscribeToMessage(const std::string &type, WBFunctorBase *func, WBResult &result)
Subscribe To Message Subscribes to a message type on a whiteboard or whiteboards.
std::vector< std::string > getKnownTypesForMachine()
Get Known Types For Machine Gets all the currently known types for a machine.
compatibility API for accessing the whiteboard
WBMsg getMessage(gsw_hash_info *hashinfo, WBResult *result=NULLPTR)
Get Message Gets a message from a simple whiteboard.
gu_simple_whiteboard_descriptor * _wbd
underlying whiteboard
virtual void subscribeToMessage(gsw_hash_info *hashinfo, WBFunctorBase *func, WBResult &result)
Subscribe To Message Subscribes to a message type on a whiteboard or whiteboards.
Whiteboard(const char *sharedMemoryObjectName=gsw_global_whiteboard_name, bool checkVersion=true, int number=0)
API Constructor This sets up the API and the callback soap server.
void addMessage(gsw_hash_info *hashinfo, const WBMsg &msg, bool nonatomic=false, bool notifySubscribers=true)
Add Message Adds a message to the whiteboard that the API is connected to.
enum guWhiteboard::Whiteboard::wb_method_result WBResult
Return Type Enum.
int gsw_procure(gsw_sema_t sem, enum gsw_semaphores s)
grab a whiteboard semaphore
int gsw_vacate(gsw_sema_t sem, enum gsw_semaphores s)
release a whiteboard semaphore
#define WHITEBOARD_SIGNAL
#define GSW_TOTAL_MESSAGE_TYPES
message types (max)
@ GSW_SEM_MSGTYPE
semaphore for message type registration
enum guWhiteboard::remote_wb_id RWBMachine
Remote WB enum.
gu_simple_message typenames[512]
message types for numbers
uint16_t num_types
total number of current, registered types
gsw_sema_t sem
semaphore to use
gu_simple_whiteboard * wb
the actual whiteboard in shared mem
char string[128]
string type
struct gsw_simple_message::@3 hash
whiteboard hash type