MotoHawk Get CAN Over SPI Status Info

This MotoHawk™ block allows various status attributes to be queried on a named link.

Block ID

Get CAN Over SPI Status Info

Library

motohawk_SPI_lib

Description

Overview

Recovers the specified information from the named CAN Over SPI link. A drop down menu is used to specify what information is to be read. Multiple instances of the block can be used within a model, each of which can select the same or different data.

Max TX queue depth

Recovers the maximum depth observed by the transmission queue. Each execution of a block like the send block queues a transmission.

Max RX queue depth

Recovers the maximum depth observed by the reception queue.

TX overrun count

Recovers the number of times a transmission request failed because of insufficient queue space. Each execution of a block like the send block will attempt to queue a transmission. If this action is not successful then this metric increments.

RX overrun count

Recovers the number of times a received message had to be discarded because of insufficient queue space. A received message remains queued until all slots that request that message have consumed it.

Number of TX messages discarded because of timeout

It is expected that a message that has been scheduled for transmission will be sent within a finite time and acknowledged by the recipient. A scheduled transmission is discarded (freeing up that entry in the queue) if the transmission timeouts and this metric is incremented. The most common cause for message timeouts occur when only one side of the link has been instantiated.

Number of RX messages discarded because invalid

A message that does not conform to the expected format is discarded and this metric incremented to capture that this occurred.

Link Status

Summarises the status of the link. Enumerated by the M-script motohawk_canoverspi_linkstatus_enum.

OK (0) indicates that the link is currently operating without issue.

Not Created (1) indicates that the resource was not created. The most common cause for this is to define a CAN Over SPI block with a Resource of '(None)'.

Incompatible Peer (2) indicates that the peer connection has been defined to support a different message size. Each definition must implement the same message size before the link can function as intended.

Not Connected (3) indicates that the peer connection has experienced a timeout.

Block Parameters

Parameter Field Values Comments/Description
Name Alpha-numeric text, single quote enclosed The name of CAN Over SPI Defn that is to be queried.
Data Dropdown Data selected from:
Max TX queue depth
Max RX queue depth
TX overrun count
RX overrun count
Number of TX messages discarded because of timeout
Number of RX messages discarded because invalid
Link Status