SIMulation Workbench Documentation SIMulation Workbench Documentation

rs232utils.c File Reference

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <fcntl.h>
#include <errno.h>
#include <unistd.h>
#include <pthread.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <sys/types.h>
#include "simrtdb.h"
#include "rs232utils.h"
#include "dirconfig.h"
#include "ccurutils.h"
#include "rtdbutils.h"
Include dependency graph for rs232utils.c:

Functions

void * ccurRS232_outGetNextMessageAddress ()
int ccurRS232_outputQueueMap (int init)
int ccurRS232_outputQPut (unsigned char boardNum, unsigned char operation, unsigned short channelNumber, char *msgName, int msgLen)
int ccurRS232_outputQGet (RS232OutQElement *e, RS232MessageBuffer **buffer)
int ccurRS232_readMessages (int boardNum, int type, IORS232Message **rs232Messages, int *nMessages)

Function Documentation

void* ccurRS232_outGetNextMessageAddress (  ) 

Return the address of the next available RS232 message buffer in the output queue.
The caller must fill the buffer with the RS232 data and then call ccurFADX_outputQPut to place the element int the queue.

Returns:
The address of the next available message buffer. NULL if the queue is full . The queue can fill up if the consumer processes data slower that the producer places element in the queue.
int ccurRS232_outputQueueMap ( int  init  ) 
int ccurRS232_outputQPut ( unsigned char  boardNum,
unsigned char  operation,
unsigned short  channelNumber,
char *  msgName,
int  msgLen 
)
int ccurRS232_outputQGet ( RS232OutQElement *  e,
RS232MessageBuffer **  buffer 
)
int ccurRS232_readMessages ( int  boardNum,
int  type,
IORS232Message **  rs232Messages,
int *  nMessages 
)