Real-Time API Revision2025.1-3
Loading...
Searching...
No Matches
EB5100 board access API
Collaboration diagram for EB5100 board access API:

Functions

int ccurEB5100_outputQueueMap (int init)
int ccurEB5100_outputQPut (EB5100OutQElement *e, int nElements, void *str, int length)
int ccurEB5100_outputQGet (EB5100OutQElement *e, int *nElements, void *str, int *length)
int ccurEB5100_startCommunication (int boardNum)
int ccurEB5100_stopCommunication (int boardNum)
int ccurEB5100_commitFrame (int boardNum, int frameIndex)
int ccurEB5100_enableSendFrame (int boardNum, int frameIndex)
int ccurEB5100_disableSendFrame (int boardNum, int frameIndex, int frameType, int nRepetitions)
int ccurEB5100_getLastError (int boardNum)

Detailed Description

This API is used by program running on the Real-Time host to access th EB5100 board output queue and start and stop FlexRay communication on the board.
Programs wishing to use this library must link agains the libccur_IOUtil.a library.
Before using any of the routines described here, the program must first map the output queue by calling ccurEB5100_outputQueueMap(0).

Function Documentation

◆ ccurEB5100_outputQueueMap()

int ccurEB5100_outputQueueMap ( int init)

Map the EB5100 output queue into the user process.

Parameters
initSet to 1 to initialize the queue. Use 0 just to map the queue without initializing it.
The EB5100 output process initializes the queue, so user processes should never call this function with init == 1 .
Return values
0on Success < 0 if there was an error mapping the queue.

◆ ccurEB5100_outputQPut()

int ccurEB5100_outputQPut ( EB5100OutQElement * e,
int nElements,
void * str,
int length )

Place an element in the output queue.
The put and get routines are used internally by the eb5100 I/O processes and should not be used by user programs.

Parameters
eAn array of EB5100OutQElement to place in the queue.
nElementsThe number of elements in the array.
strIf the value to put in the queue is a string variable, str points to the string variable value. For scalar variable, the value is placed in the qElement.doubleValue and str should be NULL.
lengthThe length of the string variable if str is present. The EB5100 output process initializes the queue, so user processes should never call this function with init == 1 .
Return values
0on Success < 0 if the queue was full .

◆ ccurEB5100_outputQGet()

int ccurEB5100_outputQGet ( EB5100OutQElement * e,
int * nElements,
void * str,
int * length )

Get the top element from the output queue.
The put and get routines are used internally by the eb5100 I/O processes and should not be used by user programs.

Parameters
eAn array of EB5100OutQElement to place in the queue.
nElementsThe number of elements in the array.
strIf the value in the queue is a string variable, str points to the string variable value where the data is stored. For scalar variable, the value is placed in the qElement.doubleValue and str should be NULL.
lengthPointer to an integer where the number of bytes of data in the string variables is placed. The EB5100 output process initializes the queue, so user processes should never call this function with init == 1 .
Return values
0if the queue is empty. 1 if the element corresponds to a scalar value. 2 if the element corresponds to a string variable. In this case str is filled with the data and len is updated with the number of bytes returned in str. < 0 if the queue was full .

◆ ccurEB5100_startCommunication()

int ccurEB5100_startCommunication ( int boardNum)

Start the FlexRay communication on the specified eb5100 board.

Parameters
boardNumthe board number on which to start the communication. The first board in the system is board number 1.
Return values
0on Success < 0 if the EB5100 asynchronous output queueis full.

◆ ccurEB5100_stopCommunication()

int ccurEB5100_stopCommunication ( int boardNum)

Stop the FlexRay communication on the specified eb5100 board.

Parameters
boardNumthe board number on which to start the communication. The first board in the system is board number 1.
Return values
0on Success < 0 if the EB5100 asynchronous output queue is full.

◆ ccurEB5100_commitFrame()

int ccurEB5100_commitFrame ( int boardNum,
int frameIndex )

Commit the Flexray frame whose index is given.

Parameters
boardNumThe board number on which to commit the frame . The first board in the system is board number 1.
frameIndexThe index of the frame to commit.
Return values
0on Success < 0 if the EB5100 asynchronous output queue is full.

◆ ccurEB5100_enableSendFrame()

int ccurEB5100_enableSendFrame ( int boardNum,
int frameIndex )

Enable sending of the Flexray frame whose index is given.

Parameters
boardNumThe board number on which to commit the frame . The first board in the system is board number 1.
frameIndexThe index of the frame to enable.
Return values
0on Success < 0 if the EB5100 asynchronous output queue is full.

◆ ccurEB5100_disableSendFrame()

int ccurEB5100_disableSendFrame ( int boardNum,
int frameIndex,
int frameType,
int nRepetitions )

Disable sending of the Flexray frame whose index is given and for a number of repetitions.

Parameters
boardNumThe board number on which to commit the frame . The first board in the system is board number 1.
frameIndexThe index of the frame to enable.
frameTypeThe type of frame so send: 0 to send a NULL frame instead , 1 to remove the frame from the bus altogether.
nRepetitionsThe number of cycles to disable the frame. A value of 0 means repeat forever.
Return values
0on Success < 0 if the EB5100 asynchronous output queue is full.

◆ ccurEB5100_getLastError()

int ccurEB5100_getLastError ( int boardNum)

Retrieve last error from EB5100 firmware. The error string is place in the RTDB _EB_ErrorString variable

Parameters
boardNumThe board number on which to commit the frame . The first board in the system is board number 1.
Return values
0on Success < 0 if the EB5100 asynchronous output queue is full.