Kvaser Linux CANLIB
|
Functions | |
canStatus | canObjBufFreeAll (const CanHandle hnd) |
canStatus | canObjBufAllocate (const CanHandle hnd, int type) |
canStatus | canObjBufFree (const CanHandle hnd, int idx) |
canStatus | canObjBufWrite (const CanHandle hnd, int idx, int id, void *msg, unsigned int dlc, unsigned int flags) |
canStatus | canObjBufSetFilter (const CanHandle hnd, int idx, unsigned int code, unsigned int mask) |
canStatus | canObjBufSetFlags (const CanHandle hnd, int idx, unsigned int flags) |
canStatus | canObjBufSetPeriod (const CanHandle hnd, int idx, unsigned int period) |
canStatus | canObjBufSetMsgCount (const CanHandle hnd, int idx, unsigned int count) |
canStatus | canObjBufEnable (const CanHandle hnd, int idx) |
canStatus | canObjBufDisable (const CanHandle hnd, int idx) |
canStatus | canObjBufSendBurst (const CanHandle hnd, int idx, unsigned int burstlen) |
Allocates an object buffer associated with a handle to a CAN circuit.
[in] | hnd | An open handle to a CAN circuit. |
[in] | type | The type of the buffer. Must be one of canOBJBUF_TYPE_xxx |
Disables the object buffer with the specified index.
[in] | hnd | An open handle to a CAN circuit. |
[in] | idx | The index of the buffer. |
Enables the object buffer with the specified index.
[in] | hnd | An open handle to a CAN circuit. |
[in] | idx | The index of the object buffer to enable. |
Deallocates the object buffer with the specified index. The buffer can not be referenced after this operation.
[in] | hnd | An open handle to a CAN circuit. |
[in] | idx | The object buffer to deallocate. |
Deallocates all object buffers on the specified handle. The buffers cannot be referenced after this operation.
[in] | hnd | An open handle to a CAN circuit. |
The canObjBufSendBurst function sends a burst of CAN messages. You have to set up an object buffer first with the message to send. The messages will be sent as fast as possible from the hardware.
This function is inteneded for certain diagnostic applications.
[in] | hnd | An open handle to a CAN channel. |
[in] | idx | The index of a CAN object buffer. |
[in] | burstlen | The number of messages to send. |
Defines a message reception filter on the specified object buffer. Messages not matching the filter are discarded.
[in] | hnd | An open handle to a CAN circuit. |
[in] | idx | The index of the object buffer on which the filter is to be set. |
[in] | code | The acceptance code in the filter. |
[in] | mask | The acceptance mask in the filter. |
Sets object buffer flags on a specified object buffer.
[in] | hnd | An open handle to a CAN circuit. |
[in] | idx | The buffer on which the flags are to be set. |
[in] | flags | Specifies a combination of zero or more of the canOBJBUF_AUTO_RESPONSE_xxx flag values |
The canObjBufSetMsgCount function sets the message count for an auto transmit object buffer.
[in] | hnd | An open handle to a CAN channel. |
[in] | idx | The index of a CAN object buffer. |
[in] | count | The message count. |
The canObjBufSetPeriod function sets the transmission period for an auto transmission object buffer.
[in] | hnd | An open handle to a CAN channel. |
[in] | idx | The index of a CAN object buffer. |
[in] | period | The transmission interval, in microseconds. |
canStatus canObjBufWrite | ( | const CanHandle | hnd, |
int | idx, | ||
int | id, | ||
void * | msg, | ||
unsigned int | dlc, | ||
unsigned int | flags | ||
) |
Defines the contents of a specific object buffer.
[in] | hnd | An open handle to a CAN circuit. |
[in] | idx | The index of the object buffer whose contents is to be defined. |
[in] | id | The CAN identifier of the message. |
[in] | msg | Points to the contents of the message. |
[in] | dlc | The length of the message. Must be at least 0 and at most 8 bytes. |
[in] | flags | Message flags; a combination of the canMSG_xxx flags. |