LIN Middleware
Enumerated Types

General Description

This section describes the enumeration types defined by the LIN Slave.

Enumerations

enum  mtb_lin_status_t {
  MTB_LIN_STATUS_SUCCESS,
  MTB_LIN_STATUS_BAD_PARAM,
  MTB_LIN_STATUS_SIGNAL_HANDLE,
  MTB_LIN_STATUS_SIGNAL_FRAME_ID,
  MTB_LIN_STATUS_SIGNAL_BIT_OFFSET,
  MTB_LIN_STATUS_SIGNAL_SIZE,
  MTB_LIN_STATUS_SIGNAL_PLACING,
  MTB_LIN_STATUS_IFC_IOCTL_WAKEUP,
  MTB_LIN_STATUS_AUTO_BAUD_RATE_SYNC_DISABLED,
  MTB_LIN_STATUS_IFC_IOCTL_UNSUPPORTED_COMMAND,
  MTB_LIN_STATUS_INVALID_NAD,
  MTB_LIN_STATUS_INVALID_PID_INDEX,
  MTB_LIN_STATUS_INVALID_MESSAGE_ID,
  MTB_LIN_STATUS_TOO_LOW_FREQUENCY,
  MTB_LIN_STATUS_BAD_TOLERANCE,
  MTB_LIN_STATUS_BAD_BAUDRATE,
  MTB_LIN_STATUS_PROTOCOL_SPECIFICATION
}
 The status of initialization of LIN middleware. More...
 
enum  mtb_stc_lin_node_state_t {
  MTB_LIN_NODE_STATE_IDLE = 0U,
  MTB_LIN_NODE_STATE_RX_PHY_REQUEST = 1U,
  MTB_LIN_NODE_STATE_TX_PHY_RESPONSE = 2U
}
 Slave Node states as defined in LIN 2.2a, section 5.5. More...
 
enum  mtb_stc_lin_spec_t { MTB_LIN_SPEC_2_2 = 0U }
 The protocol specification. More...
 
enum  mtb_stc_lin_frame_direction_t {
  MTB_LIN_FRAME_DIR_SUBSCRIBE = 0U,
  MTB_LIN_FRAME_DIR_PUBLISH = 1U
}
 The frame direction. More...
 
enum  mtb_stc_lin_frame_type_t {
  MTB_LIN_FRAME_TYPE_UNCONDITIONAL = 0U,
  MTB_LIN_FRAME_TYPE_EVENT_TRIGGERED = 1U
}
 The type of the LIN frame. More...
 
enum  mtb_stc_lin_signal_type_t {
  MTB_LIN_SIGNAL_TYPE_SCALAR_BOOL = 0U,
  MTB_LIN_SIGNAL_TYPE_SCALAR_U8 = 1U,
  MTB_LIN_SIGNAL_TYPE_SCALAR_U16 = 2U,
  MTB_LIN_SIGNAL_TYPE_BYTE_ARRAY = 3U
}
 The type of the signal. More...
 
enum  mtb_stc_lin_tl_format_t {
  MTB_LIN_TL_FORMAT_COOKED = 0U,
  MTB_LIN_TL_FORMAT_RAW = 1U
}
 The transport layer API format. More...
 
enum  mtb_stc_lin_file_version_source_t {
  MTB_LIN_FILE_VERSION_SOURCE_LDF = 1U,
  MTB_LIN_FILE_VERSION_SOURCE_NCF = 2U
}
 The type of import file for LIN Slave Node configuration. More...
 
enum  mtb_stc_lin_node_state_stimulus_t {
  MTB_LIN_NODE_STIMULUS_MRF_ALIEN_NAD = 1U,
  MTB_LIN_NODE_STIMULUS_MRF_OWN_NAD = 2U,
  MTB_LIN_NODE_STIMULUS_MRF_FUNC_NAD = 3U,
  MTB_LIN_NODE_STIMULUS_RX_TIMEOUT = 4U,
  MTB_LIN_NODE_STIMULUS_TX_TIMEOUT = 5U,
  MTB_LIN_NODE_STIMULUS_SRF = 6U
}
 Slave Node states as defined in LIN 2.2a, section 5.5. More...
 

Enumeration Type Documentation

◆ mtb_lin_status_t

The status of initialization of LIN middleware.

Enumerator
MTB_LIN_STATUS_SUCCESS 

Operation completed successfully.

MTB_LIN_STATUS_BAD_PARAM 

One or more input parameters are invalid.

MTB_LIN_STATUS_SIGNAL_HANDLE 

The size of the signals with the same handle ID is not equal.

MTB_LIN_STATUS_SIGNAL_FRAME_ID 

The value of frame_index field in signals array is greater or equal to number of frames.

MTB_LIN_STATUS_SIGNAL_BIT_OFFSET 

The value of the bit_offset field in signals array is above 64.

MTB_LIN_STATUS_SIGNAL_SIZE 

The value of the size field in the signals array is incorrect for corresponding signal type: for MTB_LIN_SIGNAL_TYPE_SCALAR_BOOL must be 1 bit; for MTB_LIN_SIGNAL_TYPE_SCALAR_U8: must be 2 - 8 bits; for MTB_LIN_SIGNAL_TYPE_SCALAR_BOOL: must be 9 - 16 bits; for MTB_LIN_SIGNAL_TYPE_SCALAR_BOOL: must be 1 - 8 bytes.

MTB_LIN_STATUS_SIGNAL_PLACING 

The mapping of the signals into the frame is incorrect, please check the frame size or signals overlap conditions.

MTB_LIN_STATUS_IFC_IOCTL_WAKEUP 

The MTB_LIN_IOCTL_SLEEP command of the l_ifc_ioctl() fails.

MTB_LIN_STATUS_AUTO_BAUD_RATE_SYNC_DISABLED 

The auto baud rate sync is disabled.

MTB_LIN_STATUS_IFC_IOCTL_UNSUPPORTED_COMMAND 

The specified l_ifc_ioctl()'s command is not supported within current configuration.

MTB_LIN_STATUS_INVALID_NAD 

The invalid NAD was specified.

MTB_LIN_STATUS_INVALID_PID_INDEX 

The invalid PID index was specified to the MTB_LIN_IOCTL_GET_FRAME_PID command of the l_ifc_ioctl() function.

MTB_LIN_STATUS_INVALID_MESSAGE_ID 

The invalid message ID was specified.

MTB_LIN_STATUS_TOO_LOW_FREQUENCY 

The frequency of the high-frequency clock for LIN operation is too low.

Returns the status of l_sys_init().

MTB_LIN_STATUS_BAD_TOLERANCE 

A combination of frequency of the high-frequency clock and LIN baud rate does not allow achieving acceptable tolerance of the baudrate.

Returns the status of l_sys_init().

MTB_LIN_STATUS_BAD_BAUDRATE 

The specified baud rate is out of range.

MTB_LIN_STATUS_PROTOCOL_SPECIFICATION 

An incorrect combination of protocol specifications.

◆ mtb_stc_lin_node_state_t

Slave Node states as defined in LIN 2.2a, section 5.5.

Enumerator
MTB_LIN_NODE_STATE_IDLE 

In this state, Slave node neither receives nor transmits any messages in the cluster.

It is consequently available for any incoming request from Master node. It will not respond to Slave response frames.

MTB_LIN_NODE_STATE_RX_PHY_REQUEST 

In this state, Slave node receives a transmission from Master node.

It receives and processes the transport layer frames as received from Master node. Slave node will ignore any interleaved functional addressed transmission from Master node.

MTB_LIN_NODE_STATE_TX_PHY_RESPONSE 

In this state, Slave node is currently still processing the previously received request, is ready to transmit a physical response or is actually transmitting the response to the previously received request.

Slave node will not receive nor process interleaved functional addressed (NAD 0x7E) transmissions from Master node. Physical transmissions will be received and will make Slave node discard the current request data or response data. If the request is addressed to Slave node the request will be received and processed.

◆ mtb_stc_lin_spec_t

The protocol specification.

Enumerator
MTB_LIN_SPEC_2_2 

LIN 2.2 Compatibility.

◆ mtb_stc_lin_frame_direction_t

The frame direction.

Enumerator
MTB_LIN_FRAME_DIR_SUBSCRIBE 

Subscribe direction.

MTB_LIN_FRAME_DIR_PUBLISH 

Publish direction.

◆ mtb_stc_lin_frame_type_t

The type of the LIN frame.

Enumerator
MTB_LIN_FRAME_TYPE_UNCONDITIONAL 

Unconditional frame.

MTB_LIN_FRAME_TYPE_EVENT_TRIGGERED 

Event-Triggered frame.

◆ mtb_stc_lin_signal_type_t

The type of the signal.

Enumerator
MTB_LIN_SIGNAL_TYPE_SCALAR_BOOL 

One-bit signal.

MTB_LIN_SIGNAL_TYPE_SCALAR_U8 

Scalar signal with length 2 - 8 bits.

MTB_LIN_SIGNAL_TYPE_SCALAR_U16 

Scalar signal with length 9 - 16 bits.

MTB_LIN_SIGNAL_TYPE_BYTE_ARRAY 

ByteArray signal with length 1-8 bytes.

◆ mtb_stc_lin_tl_format_t

The transport layer API format.

Enumerator
MTB_LIN_TL_FORMAT_COOKED 

Cooked Transport Layer API.

MTB_LIN_TL_FORMAT_RAW 

Raw Transport Layer API.

◆ mtb_stc_lin_file_version_source_t

The type of import file for LIN Slave Node configuration.

Enumerator
MTB_LIN_FILE_VERSION_SOURCE_LDF 

LIN Description File.

MTB_LIN_FILE_VERSION_SOURCE_NCF 

Node Capability File.

◆ mtb_stc_lin_node_state_stimulus_t

Slave Node states as defined in LIN 2.2a, section 5.5.

Enumerator
MTB_LIN_NODE_STIMULUS_MRF_ALIEN_NAD 

A transport layer error occurred or a master request frame with an NAD different from Slave node's own NAD was received.

MTB_LIN_NODE_STIMULUS_MRF_OWN_NAD 

A master request frame has been received with the NAD matching the lave node's own NAD.

MTB_LIN_NODE_STIMULUS_MRF_FUNC_NAD 

A master request frame with the NAD parameter set to the functional NAD has been received.

MTB_LIN_NODE_STIMULUS_RX_TIMEOUT 

The time until reception of the next Consecutive Frame (CF) (N_CR) timeout expired.

MTB_LIN_NODE_STIMULUS_TX_TIMEOUT 

The time for transmission of the LIN frame (MRF or SRF) on the transmitter side (N_AS) timeout expired.

MTB_LIN_NODE_STIMULUS_SRF 

A slave response frame was received.