ACU6 Device API
Data Structures | Enumerations | Enumerator | Functions
ipc_can

CAN Service. More...

Data Structures

struct  a_ipc_dyn_array_enum_can_result
 Dynamic-length array of a_ipc_enum_can_result. More...
 
struct  a_ipc_dyn_array_enum_can_type
 Dynamic-length array of a_ipc_enum_can_type. More...
 
struct  a_ipc_dyn_array_enum_can_nominal_bitrate
 Dynamic-length array of a_ipc_enum_can_nominal_bitrate. More...
 
struct  a_ipc_dyn_array_enum_can_data_bitrate
 Dynamic-length array of a_ipc_enum_can_data_bitrate. More...
 
struct  a_ipc_dyn_array_enum_can_state
 Dynamic-length array of a_ipc_enum_can_state. More...
 
struct  a_ipc_msg_can_request_req
 Request a CAN interface. More...
 
struct  a_ipc_msg_can_request_rsp
 CAN interface request result. More...
 
struct  a_ipc_msg_can_release_req
 Release a CAN interface. More...
 
struct  a_ipc_msg_can_release_rsp
 CAN interface release result. More...
 
struct  a_ipc_msg_can_configure_req
 Request to configure a CAN interface. More...
 
struct  a_ipc_msg_can_configure_rsp
 Sent in response to can_configure_req message. More...
 
struct  a_ipc_msg_can_status_req
 Check the state of the CAN interface. More...
 
struct  a_ipc_msg_can_status_rsp
 CAN interface state. More...
 
struct  a_ipc_msg_can_set_wakeup_req
 CAN wakeup configuration. More...
 
struct  a_ipc_msg_can_set_wakeup_rsp
 Sent in response to can_set_wakeup_req message. More...
 
struct  a_ipc_msg_can_reset_req
 CAN reset request. More...
 
struct  a_ipc_msg_can_reset_rsp
 Sent in response to can_reset_req message. More...
 

Enumerations

enum  a_ipc_enum_can_result {
  A_IPC_ENUM_CAN_RESULT_OK , A_IPC_ENUM_CAN_RESULT_INVALID_INTERFACE , A_IPC_ENUM_CAN_RESULT_UNSUPPORTED_NOMINAL_BITRATE , A_IPC_ENUM_CAN_RESULT_UNSUPPORTED_DATA_BITRATE ,
  A_IPC_ENUM_CAN_RESULT_UNSUPPORTED_TYPE , A_IPC_ENUM_CAN_RESULT_INTERFACE_NOT_PROCURED , A_IPC_ENUM_CAN_RESULT_UNSUPPORTED_WAKEUP_SOURCE , A_IPC_ENUM_CAN_RESULT_UNKNOWN_ERROR
}
 Result codes. More...
 
enum  a_ipc_enum_can_type { A_IPC_ENUM_CAN_TYPE_CAN_2_0_B , A_IPC_ENUM_CAN_TYPE_CAN_FD }
 CAN types. More...
 
enum  a_ipc_enum_can_nominal_bitrate { A_IPC_ENUM_CAN_NOMINAL_BITRATE_RATE_125000 , A_IPC_ENUM_CAN_NOMINAL_BITRATE_RATE_250000 , A_IPC_ENUM_CAN_NOMINAL_BITRATE_RATE_500000 , A_IPC_ENUM_CAN_NOMINAL_BITRATE_RATE_1000000 }
 CAN nominal bitrates. More...
 
enum  a_ipc_enum_can_data_bitrate {
  A_IPC_ENUM_CAN_DATA_BITRATE_RATE_1000000 , A_IPC_ENUM_CAN_DATA_BITRATE_RATE_2000000 , A_IPC_ENUM_CAN_DATA_BITRATE_RATE_3000000 , A_IPC_ENUM_CAN_DATA_BITRATE_RATE_4000000 ,
  A_IPC_ENUM_CAN_DATA_BITRATE_RATE_5000000
}
 CAN data bitrates. More...
 
enum  a_ipc_enum_can_state {
  A_IPC_ENUM_CAN_STATE_ERROR_ACTIVE , A_IPC_ENUM_CAN_STATE_ERROR_WARNING , A_IPC_ENUM_CAN_STATE_ERROR_PASSIVE , A_IPC_ENUM_CAN_STATE_BUS_OFF ,
  A_IPC_ENUM_CAN_STATE_STOPPED , A_IPC_ENUM_CAN_STATE_SLEEPING
}
 CAN interface states.
 

Functions

A_IPC_RESULT a_ipc_init_can_request_req (a_ipc_msg *msg, uint32_t user_maxlength)
 Initialize the message buffer to contain a_ipc_msg_can_request_req. More...
 
A_IPC_RESULT a_ipc_init_can_request_rsp (a_ipc_msg *msg)
 Initialize the message buffer to contain a_ipc_msg_can_request_rsp. More...
 
A_IPC_RESULT a_ipc_init_can_release_req (a_ipc_msg *msg, uint32_t user_maxlength)
 Initialize the message buffer to contain a_ipc_msg_can_release_req. More...
 
A_IPC_RESULT a_ipc_init_can_release_rsp (a_ipc_msg *msg)
 Initialize the message buffer to contain a_ipc_msg_can_release_rsp. More...
 
A_IPC_RESULT a_ipc_init_can_configure_req (a_ipc_msg *msg)
 Initialize the message buffer to contain a_ipc_msg_can_configure_req. More...
 
A_IPC_RESULT a_ipc_init_can_configure_rsp (a_ipc_msg *msg)
 Initialize the message buffer to contain a_ipc_msg_can_configure_rsp. More...
 
A_IPC_RESULT a_ipc_init_can_status_req (a_ipc_msg *msg)
 Initialize the message buffer to contain a_ipc_msg_can_status_req. More...
 
A_IPC_RESULT a_ipc_init_can_status_rsp (a_ipc_msg *msg)
 Initialize the message buffer to contain a_ipc_msg_can_status_rsp. More...
 
A_IPC_RESULT a_ipc_init_can_set_wakeup_req (a_ipc_msg *msg)
 Initialize the message buffer to contain a_ipc_msg_can_set_wakeup_req. More...
 
A_IPC_RESULT a_ipc_init_can_set_wakeup_rsp (a_ipc_msg *msg)
 Initialize the message buffer to contain a_ipc_msg_can_set_wakeup_rsp. More...
 
A_IPC_RESULT a_ipc_init_can_reset_req (a_ipc_msg *msg)
 Initialize the message buffer to contain a_ipc_msg_can_reset_req. More...
 
A_IPC_RESULT a_ipc_init_can_reset_rsp (a_ipc_msg *msg)
 Initialize the message buffer to contain a_ipc_msg_can_reset_rsp. More...
 

Detailed Description

CAN Service.

This page contains documentation of the CAN Service API.

The IPC API controls the physical interfaces. Data is sent using SocketCAN interfaces (canX).


Data Structure Documentation

◆ a_ipc_dyn_array_enum_can_result

struct a_ipc_dyn_array_enum_can_result

Dynamic-length array of a_ipc_enum_can_result.

Data Fields
uint32_t length Length of the array (number of elements)
a_ipc_enum_can_result * value The contents of the array.

◆ a_ipc_dyn_array_enum_can_type

struct a_ipc_dyn_array_enum_can_type

Dynamic-length array of a_ipc_enum_can_type.

Data Fields
uint32_t length Length of the array (number of elements)
a_ipc_enum_can_type * value The contents of the array.

◆ a_ipc_dyn_array_enum_can_nominal_bitrate

struct a_ipc_dyn_array_enum_can_nominal_bitrate

Dynamic-length array of a_ipc_enum_can_nominal_bitrate.

Data Fields
uint32_t length Length of the array (number of elements)
a_ipc_enum_can_nominal_bitrate * value The contents of the array.

◆ a_ipc_dyn_array_enum_can_data_bitrate

struct a_ipc_dyn_array_enum_can_data_bitrate

Dynamic-length array of a_ipc_enum_can_data_bitrate.

Data Fields
uint32_t length Length of the array (number of elements)
a_ipc_enum_can_data_bitrate * value The contents of the array.

◆ a_ipc_dyn_array_enum_can_state

struct a_ipc_dyn_array_enum_can_state

Dynamic-length array of a_ipc_enum_can_state.

Data Fields
uint32_t length Length of the array (number of elements)
a_ipc_enum_can_state * value The contents of the array.

◆ a_ipc_msg_can_request_req

struct a_ipc_msg_can_request_req

Request a CAN interface.

The interface will not be turned on if it's not configured.

Response is delivered in a_ipc_msg_can_request_rsp.

Create using a_ipc_init_can_request_req().

Message type is A_IPC_MSG_CAN_REQUEST_REQ.

Data Fields
uint8_t index Index of the requested interface.
a_ipc_dyn_string user User identifier, max 15 characters long.

◆ a_ipc_msg_can_request_rsp

struct a_ipc_msg_can_request_rsp

CAN interface request result.

Sent in response to a_ipc_msg_can_request_req.

Create using a_ipc_init_can_request_rsp().

Message type is A_IPC_MSG_CAN_REQUEST_RSP.

Data Fields
uint8_t index Index of the requested interface.
a_ipc_enum_can_result result Result of the operation.

◆ a_ipc_msg_can_release_req

struct a_ipc_msg_can_release_req

Release a CAN interface.

Response is delivered in a_ipc_msg_can_release_rsp.

Create using a_ipc_init_can_release_req().

Message type is A_IPC_MSG_CAN_RELEASE_REQ.

Data Fields
uint8_t index Index of the requested interface.
a_ipc_dyn_string user User identifier, max 15 characters long.

◆ a_ipc_msg_can_release_rsp

struct a_ipc_msg_can_release_rsp

CAN interface release result.

Sent in response to a_ipc_msg_can_release_req.

Create using a_ipc_init_can_release_rsp().

Message type is A_IPC_MSG_CAN_RELEASE_RSP.

Data Fields
uint8_t index Index of the requested interface.
a_ipc_enum_can_result result Result of the operation.

◆ a_ipc_msg_can_configure_req

struct a_ipc_msg_can_configure_req

Request to configure a CAN interface.

If any user has requested the interface prior to configuration, this call will also turn it on. The result is received in a can_configure_rsp message.

Response is delivered in a_ipc_msg_can_configure_rsp.

Create using a_ipc_init_can_configure_req().

Message type is A_IPC_MSG_CAN_CONFIGURE_REQ.

Data Fields
a_ipc_enum_can_data_bitrate data_bitrate Data bitrate The data bitrate is only used when the CAN type is CAN_FD.
uint8_t index Index of the requested interface.
a_ipc_enum_can_nominal_bitrate nominal_bitrate Nominal bitrate.
a_ipc_enum_can_type type Interface type.

◆ a_ipc_msg_can_configure_rsp

struct a_ipc_msg_can_configure_rsp

Sent in response to can_configure_req message.

Sent in response to a_ipc_msg_can_configure_req.

Create using a_ipc_init_can_configure_rsp().

Message type is A_IPC_MSG_CAN_CONFIGURE_RSP.

Data Fields
uint8_t index Index of the requested interface.
a_ipc_enum_can_result result Result of the operation.

◆ a_ipc_msg_can_status_req

struct a_ipc_msg_can_status_req

Check the state of the CAN interface.

Response is delivered in a_ipc_msg_can_status_rsp.

Create using a_ipc_init_can_status_req().

Message type is A_IPC_MSG_CAN_STATUS_REQ.

Data Fields
uint8_t index Index of the requested interface.

◆ a_ipc_msg_can_status_rsp

struct a_ipc_msg_can_status_rsp

CAN interface state.

Sent in response to a_ipc_msg_can_status_req.

Create using a_ipc_init_can_status_rsp().

Message type is A_IPC_MSG_CAN_STATUS_RSP.

Data Fields
uint8_t index Index of the requested interface.
a_ipc_enum_can_result result Result of the operation.
a_ipc_enum_can_state state Current state of the interface.

◆ a_ipc_msg_can_set_wakeup_req

struct a_ipc_msg_can_set_wakeup_req

CAN wakeup configuration.

Response is delivered in a_ipc_msg_can_set_wakeup_rsp.

Create using a_ipc_init_can_set_wakeup_req().

Message type is A_IPC_MSG_CAN_SET_WAKEUP_REQ.

Data Fields
uint8_t index Index of the requested interface.
uint8_t state 0: Disable, 1: Enable

◆ a_ipc_msg_can_set_wakeup_rsp

struct a_ipc_msg_can_set_wakeup_rsp

Sent in response to can_set_wakeup_req message.

Sent in response to a_ipc_msg_can_set_wakeup_req.

Create using a_ipc_init_can_set_wakeup_rsp().

Message type is A_IPC_MSG_CAN_SET_WAKEUP_RSP.

Data Fields
uint8_t index Index of the requested interface.
a_ipc_enum_can_result result Result of the operation.

◆ a_ipc_msg_can_reset_req

struct a_ipc_msg_can_reset_req

CAN reset request.

Resets the CAN interface from e.g. BUS OFF.

Response is delivered in a_ipc_msg_can_reset_rsp.

Create using a_ipc_init_can_reset_req().

Message type is A_IPC_MSG_CAN_RESET_REQ.

Data Fields
uint8_t index Index of the requested interface.

◆ a_ipc_msg_can_reset_rsp

struct a_ipc_msg_can_reset_rsp

Sent in response to can_reset_req message.

Sent in response to a_ipc_msg_can_reset_req.

Create using a_ipc_init_can_reset_rsp().

Message type is A_IPC_MSG_CAN_RESET_RSP.

Data Fields
a_ipc_enum_can_result result Result of the operation.

Enumeration Type Documentation

◆ a_ipc_enum_can_data_bitrate

CAN data bitrates.

Enumerator
A_IPC_ENUM_CAN_DATA_BITRATE_RATE_1000000 

1000000

A_IPC_ENUM_CAN_DATA_BITRATE_RATE_2000000 

2000000

A_IPC_ENUM_CAN_DATA_BITRATE_RATE_3000000 

3000000

A_IPC_ENUM_CAN_DATA_BITRATE_RATE_4000000 

4000000

A_IPC_ENUM_CAN_DATA_BITRATE_RATE_5000000 

5000000

◆ a_ipc_enum_can_nominal_bitrate

CAN nominal bitrates.

Enumerator
A_IPC_ENUM_CAN_NOMINAL_BITRATE_RATE_125000 

125000

A_IPC_ENUM_CAN_NOMINAL_BITRATE_RATE_250000 

250000

A_IPC_ENUM_CAN_NOMINAL_BITRATE_RATE_500000 

500000

A_IPC_ENUM_CAN_NOMINAL_BITRATE_RATE_1000000 

1000000

◆ a_ipc_enum_can_result

Result codes.

Enumerator
A_IPC_ENUM_CAN_RESULT_OK 

No error.

A_IPC_ENUM_CAN_RESULT_INVALID_INTERFACE 

The specified interface does not exist.

A_IPC_ENUM_CAN_RESULT_UNSUPPORTED_NOMINAL_BITRATE 

The specified nominal bitrate is not supported.

A_IPC_ENUM_CAN_RESULT_UNSUPPORTED_DATA_BITRATE 

The specified data bitrate is not supported.

A_IPC_ENUM_CAN_RESULT_UNSUPPORTED_TYPE 

The specified type is not supported.

A_IPC_ENUM_CAN_RESULT_INTERFACE_NOT_PROCURED 

The interface was not connected with the supplied user.

A_IPC_ENUM_CAN_RESULT_UNSUPPORTED_WAKEUP_SOURCE 

The specified interface does not support wakeup.

A_IPC_ENUM_CAN_RESULT_UNKNOWN_ERROR 

Unknown error.

◆ a_ipc_enum_can_type

CAN types.

Enumerator
A_IPC_ENUM_CAN_TYPE_CAN_2_0_B 

CAN 2.0B.

A_IPC_ENUM_CAN_TYPE_CAN_FD 

CAN FD.

Function Documentation

◆ a_ipc_init_can_configure_req()

A_IPC_RESULT a_ipc_init_can_configure_req ( a_ipc_msg msg)

Initialize the message buffer to contain a_ipc_msg_can_configure_req.

msg->info.type will be A_IPC_MSG_CAN_CONFIGURE_REQ.

This function can be called on an already initialized message to change its type.

Parameters
msgThe message buffer to initialize

◆ a_ipc_init_can_configure_rsp()

A_IPC_RESULT a_ipc_init_can_configure_rsp ( a_ipc_msg msg)

Initialize the message buffer to contain a_ipc_msg_can_configure_rsp.

msg->info.type will be A_IPC_MSG_CAN_CONFIGURE_RSP.

This function can be called on an already initialized message to change its type.

Parameters
msgThe message buffer to initialize

◆ a_ipc_init_can_release_req()

A_IPC_RESULT a_ipc_init_can_release_req ( a_ipc_msg msg,
uint32_t  user_maxlength 
)

Initialize the message buffer to contain a_ipc_msg_can_release_req.

msg->info.type will be A_IPC_MSG_CAN_RELEASE_REQ.

This function can be called on an already initialized message to change its type.

Parameters
msgThe message buffer to initialize
user_maxlengthThe maximum string length for user in the message.

◆ a_ipc_init_can_release_rsp()

A_IPC_RESULT a_ipc_init_can_release_rsp ( a_ipc_msg msg)

Initialize the message buffer to contain a_ipc_msg_can_release_rsp.

msg->info.type will be A_IPC_MSG_CAN_RELEASE_RSP.

This function can be called on an already initialized message to change its type.

Parameters
msgThe message buffer to initialize

◆ a_ipc_init_can_request_req()

A_IPC_RESULT a_ipc_init_can_request_req ( a_ipc_msg msg,
uint32_t  user_maxlength 
)

Initialize the message buffer to contain a_ipc_msg_can_request_req.

msg->info.type will be A_IPC_MSG_CAN_REQUEST_REQ.

This function can be called on an already initialized message to change its type.

Parameters
msgThe message buffer to initialize
user_maxlengthThe maximum string length for user in the message.

◆ a_ipc_init_can_request_rsp()

A_IPC_RESULT a_ipc_init_can_request_rsp ( a_ipc_msg msg)

Initialize the message buffer to contain a_ipc_msg_can_request_rsp.

msg->info.type will be A_IPC_MSG_CAN_REQUEST_RSP.

This function can be called on an already initialized message to change its type.

Parameters
msgThe message buffer to initialize

◆ a_ipc_init_can_reset_req()

A_IPC_RESULT a_ipc_init_can_reset_req ( a_ipc_msg msg)

Initialize the message buffer to contain a_ipc_msg_can_reset_req.

msg->info.type will be A_IPC_MSG_CAN_RESET_REQ.

This function can be called on an already initialized message to change its type.

Parameters
msgThe message buffer to initialize

◆ a_ipc_init_can_reset_rsp()

A_IPC_RESULT a_ipc_init_can_reset_rsp ( a_ipc_msg msg)

Initialize the message buffer to contain a_ipc_msg_can_reset_rsp.

msg->info.type will be A_IPC_MSG_CAN_RESET_RSP.

This function can be called on an already initialized message to change its type.

Parameters
msgThe message buffer to initialize

◆ a_ipc_init_can_set_wakeup_req()

A_IPC_RESULT a_ipc_init_can_set_wakeup_req ( a_ipc_msg msg)

Initialize the message buffer to contain a_ipc_msg_can_set_wakeup_req.

msg->info.type will be A_IPC_MSG_CAN_SET_WAKEUP_REQ.

This function can be called on an already initialized message to change its type.

Parameters
msgThe message buffer to initialize

◆ a_ipc_init_can_set_wakeup_rsp()

A_IPC_RESULT a_ipc_init_can_set_wakeup_rsp ( a_ipc_msg msg)

Initialize the message buffer to contain a_ipc_msg_can_set_wakeup_rsp.

msg->info.type will be A_IPC_MSG_CAN_SET_WAKEUP_RSP.

This function can be called on an already initialized message to change its type.

Parameters
msgThe message buffer to initialize

◆ a_ipc_init_can_status_req()

A_IPC_RESULT a_ipc_init_can_status_req ( a_ipc_msg msg)

Initialize the message buffer to contain a_ipc_msg_can_status_req.

msg->info.type will be A_IPC_MSG_CAN_STATUS_REQ.

This function can be called on an already initialized message to change its type.

Parameters
msgThe message buffer to initialize

◆ a_ipc_init_can_status_rsp()

A_IPC_RESULT a_ipc_init_can_status_rsp ( a_ipc_msg msg)

Initialize the message buffer to contain a_ipc_msg_can_status_rsp.

msg->info.type will be A_IPC_MSG_CAN_STATUS_RSP.

This function can be called on an already initialized message to change its type.

Parameters
msgThe message buffer to initialize

Variable Documentation

◆ data_bitrate

a_ipc_enum_can_data_bitrate a_ipc_msg_can_configure_req::data_bitrate

Data bitrate The data bitrate is only used when the CAN type is CAN_FD.

◆ index [1/11]

uint8_t a_ipc_msg_can_request_req::index

Index of the requested interface.

◆ index [2/11]

uint8_t a_ipc_msg_can_request_rsp::index

Index of the requested interface.

◆ index [3/11]

uint8_t a_ipc_msg_can_release_req::index

Index of the requested interface.

◆ index [4/11]

uint8_t a_ipc_msg_can_release_rsp::index

Index of the requested interface.

◆ index [5/11]

uint8_t a_ipc_msg_can_configure_req::index

Index of the requested interface.

◆ index [6/11]

uint8_t a_ipc_msg_can_configure_rsp::index

Index of the requested interface.

◆ index [7/11]

uint8_t a_ipc_msg_can_status_req::index

Index of the requested interface.

◆ index [8/11]

uint8_t a_ipc_msg_can_status_rsp::index

Index of the requested interface.

◆ index [9/11]

uint8_t a_ipc_msg_can_set_wakeup_req::index

Index of the requested interface.

◆ index [10/11]

uint8_t a_ipc_msg_can_set_wakeup_rsp::index

Index of the requested interface.

◆ index [11/11]

uint8_t a_ipc_msg_can_reset_req::index

Index of the requested interface.

◆ nominal_bitrate

a_ipc_enum_can_nominal_bitrate a_ipc_msg_can_configure_req::nominal_bitrate

Nominal bitrate.

◆ result [1/6]

a_ipc_enum_can_result a_ipc_msg_can_request_rsp::result

Result of the operation.

◆ result [2/6]

a_ipc_enum_can_result a_ipc_msg_can_release_rsp::result

Result of the operation.

◆ result [3/6]

a_ipc_enum_can_result a_ipc_msg_can_configure_rsp::result

Result of the operation.

◆ result [4/6]

a_ipc_enum_can_result a_ipc_msg_can_status_rsp::result

Result of the operation.

◆ result [5/6]

a_ipc_enum_can_result a_ipc_msg_can_set_wakeup_rsp::result

Result of the operation.

◆ result [6/6]

a_ipc_enum_can_result a_ipc_msg_can_reset_rsp::result

Result of the operation.

◆ state [1/2]

a_ipc_enum_can_state a_ipc_msg_can_status_rsp::state

Current state of the interface.

◆ state [2/2]

uint8_t a_ipc_msg_can_set_wakeup_req::state

0: Disable, 1: Enable

◆ type

a_ipc_enum_can_type a_ipc_msg_can_configure_req::type

Interface type.

◆ user [1/2]

a_ipc_dyn_string a_ipc_msg_can_request_req::user

User identifier, max 15 characters long.

◆ user [2/2]

a_ipc_dyn_string a_ipc_msg_can_release_req::user

User identifier, max 15 characters long.