![]() |
Kvaser J1939 Library
|
Type definitions for the KVJ1939 Library. More...
#include <stdbool.h>#include <stdint.h>Go to the source code of this file.
Data Structures | |
| struct | J1939ChannelParams |
| A struct that holds the parameters for creating a j1939 channel. More... | |
| struct | J1939ChannelResult |
| A struct that holds the result and handle for creating a j1939 channel. More... | |
| struct | J1939Identifier |
| A struct that represents a J1939 identifier. More... | |
| struct | J1939WriteParams |
| A struct that holds the parameters for a J1939 write request. More... | |
| struct | J1939ReadResult |
| A struct that holds the result and header information for a J1939 read operation. More... | |
| struct | J1939ChannelOptionResult |
| A struct that holds the result and value for a J1939 channel option. More... | |
Typedefs | |
| typedef enum J1939Result | J1939Result |
| Return status codes, indicating the result of an operation. | |
| typedef enum J1939ChannelOption | J1939ChannelOption |
| Properties that can be configured on a J1939 channel. | |
| typedef uint32_t | J1939ChannelHandle |
| A handle to a J1939 channel. | |
| typedef struct J1939ChannelParams | J1939ChannelParams |
| A struct that holds the parameters for creating a j1939 channel. | |
| typedef struct J1939ChannelResult | J1939ChannelResult |
| A struct that holds the result and handle for creating a j1939 channel. More... | |
| typedef struct J1939Identifier | J1939Identifier |
| A struct that represents a J1939 identifier. | |
| typedef struct J1939WriteParams | J1939WriteParams |
| A struct that holds the parameters for a J1939 write request. | |
| typedef struct J1939ReadResult | J1939ReadResult |
| A struct that holds the result and header information for a J1939 read operation. More... | |
| typedef struct J1939ChannelOptionResult | J1939ChannelOptionResult |
| A struct that holds the result and value for a J1939 channel option. More... | |
| typedef 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, either a single frame message or a segmented message. More... | |
| typedef 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, either a single frame message or a segmented message. More... | |
| typedef 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 completed or lost. More... | |
Enumerations | |
| enum | J1939Result { J1939_STATUS_OK = 0 , J1939_STATUS_ERROR = -1 , J1939_STATUS_INVALID_CHANNEL = -2 , J1939_STATUS_INVALID_PARAMS = -3 , J1939_STATUS_NOT_SUPPORTED = -4 , J1939_STATUS_TIMEOUT = -5 , J1939_STATUS_TX_BUFFER_FULL = -6 , J1939_STATUS_ADDRESS_CLAIM_LOST = -7 , J1939_STATUS_BUFFER_TOO_SMALL = -8 , J1939_STATUS_ERROR_FRAME = -9 } |
| Return status codes, indicating the result of an operation. More... | |
| enum | J1939ChannelOption { J1939_OPTION_TX_ECHO , J1939_OPTION_TP_PASSTHROUGH_MODE , J1939_OPTION_TP_BAM_INTERPACKET_TIME , J1939_OPTION_TP_MAX_PACKETS_IN_RTS , J1939_OPTION_TP_MAX_PACKETS_IN_CTS , J1939_OPTION_TP_T1_TIMEOUT , J1939_OPTION_TP_T2_TIMEOUT , J1939_OPTION_TP_T3_TIMEOUT , J1939_OPTION_TP_T4_TIMEOUT } |
| Properties that can be configured on a J1939 channel. More... | |
Type definitions for the KVJ1939 Library.
| typedef 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 completed or lost.
| hnd | Handle to the channel. |
| context | User-defined context pointer. |
| address | The source address being claimed. |
| valid | True if the address claim was successful, false if it failed or was lost. |
| typedef struct J1939ChannelOptionResult J1939ChannelOptionResult |
A struct that holds the result and value for a J1939 channel option.
If the result is not J1939_STATUS_OK, then the value will be invalid.
| typedef struct J1939ChannelResult J1939ChannelResult |
A struct that holds the result and handle for creating a j1939 channel.
If the result is not J1939_STATUS_OK, then the handle will be invalid.
| typedef struct J1939ReadResult J1939ReadResult |
A struct that holds the result and header information for a J1939 read operation.
If the result is not J1939_STATUS_OK, then the other fields will be invalid.
| typedef 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, either a single frame message or a segmented message.
| hnd | Handle to the channel. |
| context | User-defined context pointer. |
| id | The J1939 identifier. |
| timestamp | The timestamp (in microseconds) of the last frame of the message. |
| payload | The data payload of the message. |
| payload_length | The length of the data payload. |
| error | Whether the message was received with errors (error frame). |
| typedef 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, either a single frame message or a segmented message.
| hnd | Handle to the channel. |
| context | User-defined context pointer. |
| request_handle | The J1939 identifier. |
| id | The J1939 identifier. |
| timestamp | The timestamp (in microseconds) of the last frame of the message. |
| error | Whether the message transmission failed. |
| enum J1939ChannelOption |
Properties that can be configured on a J1939 channel.
| enum J1939Result |
Return status codes, indicating the result of an operation.