EasyManua.ls Logo

Acrosser Technology AR-V6002FL - Can Message Format

Default Icon
84 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Revision: 1.23
52
4. If the driver is no longer needed, execute the script ‘uninstall’ to unload the driver.
On Windows platform:
1. In the driver directory, execute the ‘setup.exe’ program.
The CAN bus APIs
Before executing the applications which invoke the CAN bus APIs, users should make sure that
the Linux device driver or the Windows device driver of CAN bus has been installed.
On Linux platform, after successfully installing the device driver, a character device node
named “/dev/can0” will be created automatically. The APIs open the device node “/dev/can0”
implicitly so acquiring a file descriptor of “/dev/can0” by users is not necessary. In order not to
degrade the performance of the CAN bus subsystem, the device node “/dev/can0” is limited to be
opened at most once at any moment, i.e., if application A accesses CAN bus via the APIs, the
application B which either tries to open ‘/dev/can0’ or uses CAN bus API will result in failure.
On Windows platform, after successfully installing the device driver, there is a device which
shows ‘CAN Bus Driver in the ‘Device Manager’. The APIs on Windows platform open this
device implicitly. User can call the APIs directly without opening the CAN Bus subsystem device.
CAN Message Format
// TPE DEFINE
typedef char i8;
typedef unsigned char u8;
typedef short i16;
typedef unsigned short u16;
typedef unsigned long u32;
typedef int i32;
typedef struct {
i32 flags;
i32 cob;
u32 id;
struct timeval timestamp;
i16 length;
u8 data[8];
} canmsg_t;