|
Defines |
| #define | CANGW_API __declspec(dllimport) |
| #define | CANGW_ERRBUF 128 |
| #define | CANGW_NOERR (0) |
| #define | CANGW_ERR (-1) |
| #define | CANGW_TIMEOUT (-2) |
Typedefs |
| typedef int | CANGW_CONN_T |
Functions |
| CANGW_API CANGW_CONN_T | CanGwConnect (const char *host, unsigned short port, const char *user, const char *pwd, char *errbuf) |
| | Used to esteblish connection to Eth2CAN gateway. It will not bind/configure no port, only authentication, and retreiving server information.
|
| CANGW_API const char * | CanGwGetServerName (CANGW_CONN_T conn_id, char *errbuf) |
| | Used to get server name(description).
|
| CANGW_API unsigned long | CanGwGetPortsNum (CANGW_CONN_T conn_id, char *errbuf) |
| | Used to get number of (HW) can port on CAN Gateway.
|
| CANGW_API const char * | CanGwGetPortName (CANGW_CONN_T conn_id, unsigned long port, char *errbuf) |
| | Used to get CAN Gateway's port name(description).
|
| CANGW_API int | CanGwSetMode (CANGW_CONN_T conn_id, unsigned short port, unsigned char id_len, unsigned short baud, char *errbuf) |
| | Used to set CAN port mode. Can be called only on non-attached port. This mean, if someone have attached port, we can't change it's mode.
|
| CANGW_API int | CanGwGetMode (CANGW_CONN_T conn_id, unsigned short port, unsigned char *id_len, unsigned short *baud, char *errbuf) |
| | Used to get CAN port mode.
|
| CANGW_API int | CanGwBindPort (CANGW_CONN_T conn_id, unsigned long port, unsigned long addr, unsigned long mask, char *errbuf) |
| | Bind specified CAN hardware port with TCP connecton.
|
| CANGW_API int | CanGwSend (CANGW_CONN_T conn_id, const cangw_msg_t *msg, unsigned short number, unsigned long to_usec, char *errbuf) |
| CANGW_API int | CanGwRecv (CANGW_CONN_T conn_id, cangw_msg_t *msg_buf, unsigned short number, long to_usec, char *errbuf) |
| CANGW_API int | CanGwFreePort (CANGW_CONN_T conn_id, char *errbuf) |
| CANGW_API int | CanGwDisconnect (CANGW_CONN_T conn_id, char *errbuf) |