18#define WIN32_LEAN_AND_MEAN
20#define KVJ1939_API __declspec(dllimport)
21#define KVJ1939_CALL WINAPI
126 uint32_t buffer_len, int32_t timeout_ms);
J1939Result j1939_remove_address_claim(J1939ChannelHandle hnd, uint8_t address)
Stop claiming a J1939 address on the bus.
J1939Result j1939_write(J1939ChannelHandle hnd, const J1939WriteParams message)
Send a J1939 message.
J1939Result j1939_claim_address(J1939ChannelHandle hnd, uint8_t address, uint64_t name)
Claim a J1939 address on the bus.
J1939ChannelOptionResult j1939_get_channel_option(J1939ChannelHandle hnd, J1939ChannelOption option)
Get the value of a J1939 channel option.
J1939ReadResult j1939_read(J1939ChannelHandle hnd, uint8_t *buffer, uint32_t buffer_len, int32_t timeout_ms)
Read a J1939 message.
J1939ChannelResult j1939_create_channel(const J1939ChannelParams params)
Create a J1939 channel.
J1939Result j1939_destroy_channel(J1939ChannelHandle hnd)
Destroy a J1939 channel.
J1939Result j1939_set_channel_option(J1939ChannelHandle hnd, J1939ChannelOption option, uint32_t value)
Set a J1939 channel option.
J1939Result j1939_register_callbacks(J1939ChannelHandle hnd, void *context, J1939RxCallback rx_callback, J1939TxCallback tx_callback, J1939AcCallback ac_callback)
Set callbacks for a J1939 channel.
J1939Result j1939_close_channel(J1939ChannelHandle hnd)
Close a J1939 channel and go off bus.
J1939Result j1939_configure_shared_address_table()
Configure shared address table size.
J1939Result j1939_open_channel(J1939ChannelHandle hnd)
Open a J1939 channel and go on bus.
J1939Result j1939_start_log()
Start logging to stdout and file "kvj1939lib.log".
Type definitions for the KVJ1939 Library.
uint32_t J1939ChannelHandle
A handle to a J1939 channel.
Definition: kvj1939lib_types.h:72
void(* J1939AcCallback)(J1939ChannelHandle hnd, void *context, uint8_t address, bool valid)
Callback prototype for notifying the upper layers that a source address claim has been either complet...
Definition: kvj1939lib_types.h:192
J1939Result
Return status codes, indicating the result of an operation.
Definition: kvj1939lib_types.h:16
J1939ChannelOption
Properties that can be configured on a J1939 channel.
Definition: kvj1939lib_types.h:42
void(* J1939TxCallback)(J1939ChannelHandle hnd, void *context, uint32_t request_handle, J1939Identifier id, uint64_t timestamp, bool error)
Callback prototype for notifying the upper layers that a J1939 message has been sent on the CAN bus,...
Definition: kvj1939lib_types.h:180
void(* J1939RxCallback)(J1939ChannelHandle hnd, void *context, J1939Identifier id, uint64_t timestamp, const uint8_t *payload, uint32_t payload_length, bool error)
Callback prototype for notifying the upper layers that a complete message has been received,...
Definition: kvj1939lib_types.h:165
A struct that holds the result and value for a J1939 channel option.
Definition: kvj1939lib_types.h:146
A struct that holds the parameters for creating a j1939 channel.
Definition: kvj1939lib_types.h:77
A struct that holds the result and handle for creating a j1939 channel.
Definition: kvj1939lib_types.h:91
A struct that holds the result and header information for a J1939 read operation.
Definition: kvj1939lib_types.h:131
A struct that holds the parameters for a J1939 write request.
Definition: kvj1939lib_types.h:115