Real-Time API Revision2025.2-0
Loading...
Searching...
No Matches
canutils.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 <limits.h>
#include <dlfcn.h>
#include "simrtdb.h"
#include "canutils.h"
#include "dirconfig.h"
#include "ccurutils.h"
#include "rtdbutils.h"
#include "tscutils.h"
#include "simerrors.h"
Include dependency graph for canutils.c:

Functions

void * ccurCAN_outGetNextMessageAddress ()
int ccurCAN_outputQueueMap (int init, int qType)
int ccurCAN_outputQPut (unsigned char boardNum, unsigned char operation, unsigned int canId, unsigned int netNumber, int msgLen)
int ccurCAN_outputQGet (CANOutQElement *e, unsigned char **buffer)
int ccurCAN_getShutdownState ()
void ccurCAN_setShutdownState (int state)
int ccurCAN_readBoardConfig (int boardId, int boardNum, int *netBaud, int *fdBaud, int *nonISO, int *linNetBaud, int *isLin, int *linMaster, int *linVersion)
int ccurCAN_readBoardUserHooks (int boardId, int boardNum, CANIdUserHooksDefn **userHooks, int *nRecords, CANIdUserHooksDefn **linUserHooks, int *nLINRecords)

Function Documentation

◆ ccurCAN_outGetNextMessageAddress()

void * ccurCAN_outGetNextMessageAddress ( )

Return the address of the next available CAN message buffer in the output queue.
The caller must fill the buffer with the CAN 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.

◆ ccurCAN_outputQueueMap()

int ccurCAN_outputQueueMap ( int init,
int qType )

◆ ccurCAN_outputQPut()

int ccurCAN_outputQPut ( unsigned char boardNum,
unsigned char operation,
unsigned int canId,
unsigned int netNumber,
int msgLen )

◆ ccurCAN_outputQGet()

int ccurCAN_outputQGet ( CANOutQElement * e,
unsigned char ** buffer )

◆ ccurCAN_getShutdownState()

int ccurCAN_getShutdownState ( )

◆ ccurCAN_setShutdownState()

void ccurCAN_setShutdownState ( int state)

◆ ccurCAN_readBoardConfig()

int ccurCAN_readBoardConfig ( int boardId,
int boardNum,
int * netBaud,
int * fdBaud,
int * nonISO,
int * linNetBaud,
int * isLin,
int * linMaster,
int * linVersion )

◆ ccurCAN_readBoardUserHooks()

int ccurCAN_readBoardUserHooks ( int boardId,
int boardNum,
CANIdUserHooksDefn ** userHooks,
int * nRecords,
CANIdUserHooksDefn ** linUserHooks,
int * nLINRecords )