CAN API for proconX CAN-ETH gateway. More...
Defines | |
| #define | MAX_CAN_GATEWAYS 32 |
| Number of gateways supported. | |
Functions | |
| int | canEthInit () |
| Initialises the CAN-ETH Ethernet interface. | |
| void | canEthShutdown () |
| Shutdown the CAN-ETH Ethernet interface. | |
| CanHandle | canEthOpen (const char *const hostName) |
| Open a CAN channel to a remote CAN-ETH gateway. | |
| void | canEthClose (CanHandle handle) |
| Close a CAN receive channel. | |
| int | canEthSendMsg (CanHandle handle, const CANFRAME *const msg) |
| Send a CAN message. | |
| int | canEthRecv (CanHandle handle, CANFRAME *msg) |
| Retrieves a CAN message from the receive buffer. | |
CAN API for proconX CAN-ETH gateway.
| int canEthInit | ( | void | ) |
Initialises the CAN-ETH Ethernet interface.
A background receive thread is created and started.
| void canEthShutdown | ( | void | ) |
Shutdown the CAN-ETH Ethernet interface.
The background receive thread is terminated.
| CanHandle canEthOpen | ( | const char *const | hostName | ) |
Open a CAN channel to a remote CAN-ETH gateway.
| hostName | String with IP address or host name of the remote CAN-ETH gateway. |
| void canEthClose | ( | CanHandle | handle | ) |
Close a CAN receive channel.
| handle | Handle to identify CAN channel. |
References MAX_CAN_GATEWAYS.
Send a CAN message.
| handle | Handle to identify CAN channel. | |
| msg | Pointer to CAN message to be sent |
References MAX_CAN_GATEWAYS.
Retrieves a CAN message from the receive buffer.
If no messages if available, CANETH_NO_MSG is returned.
| handle | Handle to identify CAN channel. | |
| msg | Pointer to container for received CAN message |
References MAX_CAN_GATEWAYS.