29 gu_strlcpy(m->
string, msg.c_str(), msg.length()+1);
54 memcpy(m->
ivec, &msg[0], msg.size()*
sizeof(
int));
82 for(
size_t i = 0; i < msg.size(); i++)
83 m->
bvec[i] = msg.at(i);
110 return std::vector<int> (msg->
ivec, msg->
ivec +
sizeof msg->
ivec /
sizeof msg->
ivec[0]);
121 return std::vector<bool> (msg->
bvec, msg->
bvec +
sizeof msg->
bvec /
sizeof msg->
bvec[0]);
This class allows you to set and get data directly into or out of the local whiteboard in shared memo...
void set(const object_type &msg)
designated setter for posting whiteboard messages
object_type get_from(gu_simple_message *msg)
access method to get data from an existing, low-level message
gu_simple_message * gsw_next_message(gu_simple_whiteboard *wb, int i)
get the next shared memory location for the given whiteboard message type i
void gsw_increment(gu_simple_whiteboard *wb, int i)
get the next shared memory location for the given whiteboard message type i
void gsw_increment_event_counter(gu_simple_whiteboard *wb, int i)
add to a messages event counter on the wb
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
void gsw_signal_subscribers(gu_simple_whiteboard *wb)
signal all subscribing processes
@ GSW_SEM_PUTMSG
semaphore for adding to the whiteboard
#define GU_SIMPLE_WHITEBOARD_BUFSIZE
message len (max)
the actual whiteboard in shared mem
uint16_t subscribed
subscribed processes
union type that is used to store data in shared memory
char string[128]
string type
bool bvec[128/sizeof(bool)]
bool array
int ivec[128/sizeof(int)]
int array