Functions | |
J1587Status | j1587Close (J1587Handle h) |
J1587Status | j1587GetFirmwareVersion (J1587Handle h, unsigned char *bootVerMajor, unsigned char *bootVerMinor, unsigned char *bootVerBuild, unsigned char *appVerMajor, unsigned char *appVerMinor, unsigned char *appVerBuild) |
J1587Status | j1587SetBitrate (J1587Handle h, unsigned int bps) |
J1587Status | j1587BusOn (J1587Handle h) |
J1587Status | j1587BusOff (J1587Handle h) |
unsigned long | j1587ReadTimer (J1587Handle h) |
J1587Status | j1587WriteMessageWait (J1587Handle h, const void *msg, unsigned int length, unsigned int priority, DWORD timeout) |
J1587Status | j1587ReadMessageWait (J1587Handle h, void *msg, unsigned int *msgLength, J1587MessageInfo *msgInfo, DWORD timeout) |
J1587Status | j1587WriteSync (J1587Handle h, J1587MessageInfo *msgInfo, DWORD timeout) |
J1587Status | j1587Configure (J1587Handle h, unsigned int flags) |
J1587Status | j1587GetCanHandle (J1587Handle h, unsigned int *canHandle) |
J1587MessageInfo | |
In certain J1587 bus API calls, the following structure is used to provide more information about the J1587 messages. | |
void | j1587InitializeLibrary (void) |
J1587Handle | j1587OpenChannel (int channel, int flags) |
J1587Status j1587BusOff | ( | J1587Handle | h | ) |
This function deactivates the J1587 interface. It will be reset clearing any settings such as J1587 data buffers active.
[in] | h | A handle to an open J1587 channel. |
J1587Status j1587BusOn | ( | J1587Handle | h | ) |
This function activates the J1587 interface.
[in] | h | A handle to an open J1587 channel. |
J1587Status j1587Close | ( | J1587Handle | h | ) |
Closes an open handle to a J1587 channel. The handle becomes invalid and can not be used in subsequent calls to the J1587 functions.
[in] | h | A handle to an open J1587 channel. |
J1587Status j1587Configure | ( | J1587Handle | h, |
unsigned int | flags | ||
) |
With this function, it is possible to change settings on a J1587 Interface that is on-bus. When going on-bus, the bitrate and the flag values J1587_REPORT_xxx are set to the default value (either as hard-coded in the firmware, or as stored in the non-volatile memory of the J1587 Interface).
[in] | h | A handle to an open J1587 channel. |
[in] | flags | Flags, see J1587_REPORT_xxx |
J1587Status j1587GetCanHandle | ( | J1587Handle | h, |
unsigned int * | canHandle | ||
) |
Return the CAN handle given an open J1587 handle
[in] | h | A handle to an open J1587 channel. |
[out] | canHandle | A pointer to an integer where the CAN handle will be stored. |
J1587Status j1587GetFirmwareVersion | ( | J1587Handle | h, |
unsigned char * | bootVerMajor, | ||
unsigned char * | bootVerMinor, | ||
unsigned char * | bootVerBuild, | ||
unsigned char * | appVerMajor, | ||
unsigned char * | appVerMinor, | ||
unsigned char * | appVerBuild | ||
) |
This function retrieves the firmware version from the J1587 interface.
[in] | h | A handle to an open J1587 channel. |
[out] | bootVerMajor | A pointer to a byte where the major version number of the boot code is stored. |
[out] | bootVerMinor | A pointer to a byte where the minor version number of the boot code is stored. |
[out] | bootVerBuild | A pointer to a byte where the build number of the boot code is stored. |
[out] | appVerMajor | A pointer to a byte where the major version number of the application code is stored. |
[out] | appVerMinor | A pointer to a byte where the minor version number of the application code is stored. |
[out] | appVerBuild | A pointer to a byte where the build number of the application is stored. |
void j1587InitializeLibrary | ( | void | ) |
To be called before the library is used.
J1587Handle j1587OpenChannel | ( | int | channel, |
int | flags | ||
) |
Open a channel to a J1587 interface.
The channel number is the same that is used by canOpenChannel() to access the LAPcan channel.
[in] | channel | The number of the channel. This is the same as used by canOpenChannel() to access the LAPcan channel. |
[in] | flags | Flags of type J1587_xxx |
J1587Status j1587ReadMessageWait | ( | J1587Handle | h, |
void * | msg, | ||
unsigned int * | msgLength, | ||
J1587MessageInfo * | msgInfo, | ||
DWORD | timeout | ||
) |
Read a J1587 message.
[in] | h | A handle to an open J1587 channel. |
[out] | msg | A pointer to a buffer where the J1587 message will be stored. |
[out] | msgLength | A pointer to an integer where the length of the received J1587 message will be stored. |
[out] | msgInfo | A pointer a J1587MessageInfo structure where the message information will be stored. |
[in] | timeout | Times out after timeout milliseconds |
unsigned long j1587ReadTimer | ( | J1587Handle | h | ) |
Return the current timer value (used for timestamps)
[in] | h | A handle to an open J1587 channel. |
J1587Status j1587SetBitrate | ( | J1587Handle | h, |
unsigned int | bps | ||
) |
This function sets the bit rate
[in] | h | A handle to an open J1587 channel. |
[in] | bps | Bit rate in bits per second. |
J1587Status j1587WriteMessageWait | ( | J1587Handle | h, |
const void * | msg, | ||
unsigned int | length, | ||
unsigned int | priority, | ||
DWORD | timeout | ||
) |
Write a J1587 message. Times out after timeout ms.
[in] | h | A handle to an open J1587 channel. |
[in] | msg | A pointer to a buffer containing the J1587 message. |
[in] | length | Length of message, max 0xFFF |
[in] | priority | Priority of message, max 0xFF |
[in] | timeout | Times out after timeout milliseconds |
J1587Status j1587WriteSync | ( | J1587Handle | h, |
J1587MessageInfo * | msgInfo, | ||
DWORD | timeout | ||
) |
Call this function to make sure all messages transmitted to the J1587 Interface have been received by it.
When messages are transmitted to the J1587 Interface, they are queued by Windows before appearing on the CAN bus.
[in] | h | A handle to an open J1587 channel. |
[out] | msgInfo | A pointer a J1587MessageInfo structure where the message information will be stored. |
[in] | timeout | Times out after timeout milliseconds |