Communication primitives for external platforms, used to emulate the native event train.
Marcel Sondaar
Public Domain
hosted_comm.c | Communication primitives for external platforms, used to emulate the native event train. |
Functions | |
drv_sendmessage | sends a message over communication port |
drv_setname | |
drv_peekmessage | Checks if a message is waiting |
drv_readmessage | Reads the message from the queue |
drv_peekmessageany | Checks if any message is waiting, including messages to others |
drv_peeksender | Checks the sender of the message currently at the front of the queue |
drv_readmessageany | Reads a message from the queue, independent of target |
drv_sendmessageany | sends a message over communication port |
void drv_sendmessage( unsigned int dest, unsigned int size, char * buffer )
sends a message over communication port
dest | address of the receiving object |
size | size of the data to be send |
buffer | pointer to the data to send |
int drv_peekmessage( void )
Checks if a message is waiting
nothing
return | size of the waiting message, 0 if none present |
int drv_readmessage( char * dest )
Reads the message from the queue
dest | pointer to buffer to hold a copy |
return | address of the sending object |
int drv_peekmessageany( int * target )
Checks if any message is waiting, including messages to others
target | pointer to a variable to hold the destination address |
return | size of the waiting message, 0 if none present |
target | if not null, set to the destination address |
int drv_peeksender()
Checks the sender of the message currently at the front of the queue
none
return | sender of the waiting message, 0 if none present |
sends a message over communication port
void drv_sendmessage( unsigned int dest, unsigned int size, char * buffer )
void drv_setname( int service, int index )
Checks if a message is waiting
int drv_peekmessage( void )
Reads the message from the queue
int drv_readmessage( char * dest )
Checks if any message is waiting, including messages to others
int drv_peekmessageany( int * target )
Checks the sender of the message currently at the front of the queue
int drv_peeksender()
Reads a message from the queue, independent of target
int drv_readmessageany( char * dest )
sends a message over communication port
void drv_sendmessageany( unsigned int dest, unsigned int src, unsigned int size, char * buffer )