comproxy.c

routing and proxy code for communication ports

Author

Marcel Sondaar

License

Public Domain

Summary
comproxy.crouting and proxy code for communication ports
Functions
drv_peekmessageanyChecks if any message is waiting, including messages to others
drv_peeksenderChecks the sender of the message currently at the front of the queue
drv_readmessageanyReads a message from the queue, independent of target
drv_sendmessageanysends a message over communication port

Functions

drv_peekmessageany

int drv_peekmessageany(int *target)

Checks if any message is waiting, including messages to others

in

targetpointer to a variable to hold the destination address

out

returnsize of the waiting message, 0 if none present
targetif not null, set to the destination address

drv_peeksender

int drv_peeksender()

Checks the sender of the message currently at the front of the queue

in

none

out

returnsender of the waiting message, 0 if none present

drv_readmessageany

int drv_readmessageany(char *dest)

Reads a message from the queue, independent of target

in

destpointer to buffer to hold a copy

out

returnaddress of the sending object

drv_sendmessageany

void drv_sendmessageany(unsigned int dest,
unsigned int src,
unsigned int size,
char *buffer)

sends a message over communication port

in

destaddress of the receiving object
srcsender address to attach to the message
sizesize of the data to send
bufferpointer to the data to send
int drv_peekmessageany(int *target)
Checks if any message is waiting, including messages to others
int drv_peeksender()
Checks the sender of the message currently at the front of the queue
int drv_readmessageany(char *dest)
Reads a message from the queue, independent of target
void drv_sendmessageany(unsigned int dest,
unsigned int src,
unsigned int size,
char *buffer)
sends a message over communication port