Vuo  2.0.0
Functions
VuoTelemetry.c File Reference

Description

VuoTelemetry implementation.

Definition in file VuoTelemetry.c.

Go to the source code of this file.

Functions

char * vuoCopyStringFromMessage (zmq_msg_t *message)
 Copies the message data into a newly allocated string. More...
 
void vuoInitMessageWithString (zmq_msg_t *message, const char *string)
 Copies the string (including null terminator) into the message data. More...
 
void vuoInitMessageWithInt (zmq_msg_t *message, int value)
 Copies the int value into the message data. More...
 
void vuoInitMessageWithBool (zmq_msg_t *message, bool value)
 Copies the bool value into the message data. More...
 
bool VuoTelemetry_hasMoreToReceive (void *socket)
 Returns true if there are more messages to receive on the socket currently. More...
 
char * vuoReceiveAndCopyString (void *socket, char **error)
 Receives the next message on the socket and copies it into a newly allocated string. More...
 
void vuoReceiveBlocking (void *socket, void *data, size_t dataSize, char **error)
 Helper function for vuoReceive functions for numerical types. More...
 
unsigned long vuoReceiveUnsignedInt64 (void *socket, char **error)
 Receives the next message on the socket and copies it into an unsigned long. More...
 
int vuoReceiveInt (void *socket, char **error)
 Receives the next message on the socket and copies it into an int. More...
 
bool vuoReceiveBool (void *socket, char **error)
 Receives the next message on the socket and copies it into a bool. More...
 
void vuoSend (const char *name, void *socket, int type, zmq_msg_t *messages, unsigned int messageCount, bool isNonBlocking, char **error)
 Sends the multipart message messages on ZMQ socket socket. More...
 
void vuoMemoryBarrier (void)
 "Individual ØMQ sockets are not thread safe except in the case where full memory barriers are issued when migrating a socket from one thread to another. More...
 

Function Documentation

◆ vuoCopyStringFromMessage()

char* vuoCopyStringFromMessage ( zmq_msg_t *  message)

Copies the message data into a newly allocated string.

Assumes the message data includes a null terminator.

If the message is zero-length, returns NULL.

Definition at line 22 of file VuoTelemetry.c.

◆ vuoInitMessageWithBool()

void vuoInitMessageWithBool ( zmq_msg_t *  message,
bool  value 
)

Copies the bool value into the message data.

Definition at line 55 of file VuoTelemetry.c.

◆ vuoInitMessageWithInt()

void vuoInitMessageWithInt ( zmq_msg_t *  message,
int  value 
)

Copies the int value into the message data.

Definition at line 45 of file VuoTelemetry.c.

◆ vuoInitMessageWithString()

void vuoInitMessageWithString ( zmq_msg_t *  message,
const char *  string 
)

Copies the string (including null terminator) into the message data.

Definition at line 35 of file VuoTelemetry.c.

◆ vuoMemoryBarrier()

void vuoMemoryBarrier ( void  )

"Individual ØMQ sockets are not thread safe except in the case where full memory barriers are issued when migrating a socket from one thread to another.

"

http://api.zeromq.org/2-2:zmq https://stackoverflow.com/questions/5841896/0mq-how-to-use-zeromq-in-a-threadsafe-manner https://b33p.net/kosada/node/4226

Definition at line 268 of file VuoTelemetry.c.

◆ vuoReceiveAndCopyString()

char* vuoReceiveAndCopyString ( void *  socket,
char **  error 
)

Receives the next message on the socket and copies it into a newly allocated string.

Definition at line 76 of file VuoTelemetry.c.

◆ vuoReceiveBlocking()

void vuoReceiveBlocking ( void *  socket,
void *  data,
size_t  dataSize,
char **  error 
)

Helper function for vuoReceive functions for numerical types.

Definition at line 114 of file VuoTelemetry.c.

◆ vuoReceiveBool()

bool vuoReceiveBool ( void *  socket,
char **  error 
)

Receives the next message on the socket and copies it into a bool.

Definition at line 194 of file VuoTelemetry.c.

◆ vuoReceiveInt()

int vuoReceiveInt ( void *  socket,
char **  error 
)

Receives the next message on the socket and copies it into an int.

Definition at line 184 of file VuoTelemetry.c.

◆ vuoReceiveUnsignedInt64()

unsigned long vuoReceiveUnsignedInt64 ( void *  socket,
char **  error 
)

Receives the next message on the socket and copies it into an unsigned long.

Definition at line 174 of file VuoTelemetry.c.

◆ vuoSend()

void vuoSend ( const char *  name,
void *  socket,
int  type,
zmq_msg_t *  messages,
unsigned int  messageCount,
bool  isNonBlocking,
char **  error 
)

Sends the multipart message messages on ZMQ socket socket.

name is just used for printing error messages.

Definition at line 205 of file VuoTelemetry.c.

◆ VuoTelemetry_hasMoreToReceive()

bool VuoTelemetry_hasMoreToReceive ( void *  socket)

Returns true if there are more messages to receive on the socket currently.

Definition at line 65 of file VuoTelemetry.c.