Documentation Home Page HYPERSIM Home Page
Pour la documentation en FRANÇAIS, utilisez l'outil de traduction de votre navigateur Chrome, Edge ou Safari. Voir un exemple.

CAN | Connections

Once configured, the CAN I/O interface offers different data points to be connected with the model.

The driver's connectable points depend on its configuration (number of channels, number of messages in each channel, if a message is to be transmitted or received, etc.).

The following lists the driver connectable points for channels, transmission messages, and reception messages.

Channel Connectable Points

Connection Point

Direction

Description

Connection Point

Direction

Description

Empty Transmit Buffer

From model to driver

If set to 1, software transmission buffer of the channel is emptied.

Empty Receive Buffer

From model to driver

If set to 1, software reception buffer of the channel is emptied.

Status

Connection Point

Direction

Description

Connection Point

Direction

Description

API Fail

From driver to model

1 is displayed if a hardware API error is related to the channel.

Tx Buffer Overflow

From driver to model

1 is displayed if there is an overflow of the hardware transmission buffer of the channel.

Flags

Connection Point

Direction

Description

Connection Point

Direction

Description

STAT_ERROR_PASSIVE

From driver to model

1 is displayed if the bus is in a passive state (at least one bus error counter has passed a threshold).

The channel will now transmit Passive Error Flags on the bus.

STAT_BUS_OFF

From driver to model

1 is displayed if the bus is off (the Tx errors counter value has passed a threshold).

The channel will not be able to send messages anymore.

STAT_ERROR_WARNING

From driver to model

1 is displayed if at least one bus error counter has passed a certain threshold.

STAT_ERROR_ACTIVE

From driver to model

1 is displayed if the bus is in an active error state.

The channel will now transmit Active Error Flags on the bus.

STAT_TX_PENDING

From driver to model

1 is displayed if there are messages pending transmission.

STAT_RX_PENDING

From driver to model

1 is displayed if there are messages in the receive buffer.

STAT_TXERR

From driver to model

1 is displayed if there is at least one Tx error.

STAT_RXERR

From driver to model

1 is displayed if there is at least one Rx error.

STAT_HW_OVERRUN

From driver to model

1 is displayed if there is at least one hardware buffer overflow.

STAT_SW_OVERRUN

From driver to model

1 is displayed if there is at least one software buffer overflow.

The thresholds are determined by the platform used.

  • Software buffers refer to temporary buffers that hold data going to or from the hardware.

  • Hardware buffers are the buffers present in the hardware.

Error Counters

Connection Point

Direction

Description

Connection Point

Direction

Description

Tx Errors

From driver to model

Value of the transmission errors counter.

Rx Errors

From driver to model

Value of the reception errors counter.

Overflow Errors

From driver to model

Value of the overflow errors counter.

Transmission Message Connectable Points

Connection Point

Direction

Description

Connection Point

Direction

Description

Enable Message

From model to driver

If set to 1, the transmission of the message is enabled. Only available for non-cyclical messages.

Total Sent

From driver to model

Number of frames sent.

ID

From model to driver

CAN identifier of the message to transmit. Only available if the message is configured with a dynamic ID.

Queue Count

From driver to model

Utilization of the transmission buffer, shown as a percentage.

Status

Connection Point

Direction

Description

Connection Point

Direction

Description

FIFO Full

From driver to model

1 is displayed if software transmission buffer of the message is full.

API Fail

From driver to model

1 is displayed if a hardware API error related to the message is detected.

Tx Buffer Overflow

From driver to model

1 is displayed if overflow of the hardware transmission buffer of the message is detected.

Flags

Connection Point

Direction

Description

Connection Point

Direction

Description

MSG_RTR

From model to driver

If set to 1, the transmitted message is a Remote Transmission Request.

MSG_STD

From model to driver

If set to 1, the message ID can be forced to be standard ID.

Data

The number and names of signal connectable points of a message to be transmitted depend on the message configuration.

Reception Message Connectable Points

Connection Point

Direction

Description

Connection Point

Direction

Description

Enable Message

From model to driver

If set to 1, the reception of the message is enabled.

Valid Frame Count

From driver to model

Number of valid frames of this message received in one time step.

Total Received

From driver to model

Number of frames received.

Queue Count

From driver to model

Utilization of the reception buffer, shown as a percentage.

Status

Connection Point

Direction

Description

Connection Point

Direction

Description

FIFO Full

From driver to model

1 is displayed if the software reception buffer of the message is full.

API Fail

From driver to model

1 is displayed if a hardware API error related to the message is detected.

No Message

From driver to model

1 is displayed if no message has been received.

 

The following connectable points are available for each buffered frame:

Connection Point

Direction

Description

Connection Point

Direction

Description

ID

From driver to model

CAN identifier of the received message.

Number of Bytes Received

From driver to model

Number of bytes of the received message.

Timestamp

From driver to model

Timestamp of the received message, in microseconds. It can be used to know the time difference between two consecutive messages.

Flags

Connection Point

Direction

Description
If set to 1 ...

Connection Point

Direction

Description
If set to 1 ...

MSG_RTR

From driver to model

The received message is a Remote Transmission Request.

MSG_STD

From driver to model

The received message has a standard ID.

MSG_EXT

From driver to model

The received message has an extended ID.

MSG_WAKEUP

From driver to model

This message is received in Wakeup mode.

MSG_NERR

From driver to model

A wire fault on the bus occurred (CANL / CANH interrupted wire, CANL / CANL short-circuited).

MSG_ERROR_FRAME

From driver to model

This message is an error frame.

MSG_TXACK

From driver to model

This message is a Tx Acknowledge.

MSG_TXRQ

From driver to model

This message is a Tx Request.

MSG_DELAY_MSG

From driver to model

Message is NOT sent on the bus. The transmission of messages is delayed.

MSGERR_HW_OVERRUN

From driver to model

Hardware buffer overflow detected.

MSGERR_SW_OVERRUN

From driver to model

Software buffer overflow detected.

MSGERR_STUFF

From driver to model

Bit stuffing error detected.

MSGERR_FORM

From driver to model

Frame format error detected.

MSGERR_CRC

From driver to model

CRC calculation error detected.

MSGERR_BIT0

From driver to model

Dominant bit is not properly sent.

MSGERR_BIT1

From driver to model

Recessive bit is not properly sent.

Data

The number and names of signal connectable points of a message to be received depend on the message configuration.

 

Example

Here is an example of how sensors can be configured to exchange CAN information between the driver and the model.

Please note that unused columns have been collapsed.

 

OPAL-RT TECHNOLOGIES, Inc. | 1751, rue Richardson, bureau 1060 | Montréal, Québec Canada H3K 1G6 | opal-rt.com | +1 514-935-2323
Follow OPAL-RT: LinkedIn | Facebook | YouTube | X/Twitter