Port BUSACCESS - CAN¶
Access to CAN
Stimulation¶
A prerequisite for a bus signal to be stimulated is enabling cyclic writing of the signal group containing the signal to be stimulated.
Specifics¶
This port type allows you to read and manipulate the bus quantities (frames and signals) provided by the FMU in accordance with the Layered Standard for Network Communication.
Detailed configuration instructions can be found in the section Layered Standard for Network Communication (FMI-LS-BUS).
Properties 🛈¶
Name |
Available if |
Default value |
Valid values |
Type |
Description |
|---|---|---|---|---|---|
Bus terminal name |
string |
Name of the bus terminal to be assigned to this port (as defined in terminalsAndIcons.xml). |
|||
Bit rate |
‘500KB’ |
[‘10KB’, ‘20KB’, ‘50KB’, ‘83.333KB’, ‘100KB’, ‘125KB’, ‘250KB’, ‘500KB’, ‘666.667KB’, ‘800KB’, ‘1000KB’] |
string |
Bit rate |
|
Trace format |
ASC |
[ASC, MDF4, PCAPNG] |
string |
Default file format for bus recordings. PCAPNG for bus is not supported by trace analysis |
|
Bus-DB |
string |
Jobs 🛈¶
ClearFrame¶
Erases the receiving buffer of given frame
Parameterization
Parameter
Name |
Available if |
Default value |
Valid values |
Type |
Description |
|---|---|---|---|---|---|
FrameId |
int |
Frame ID |
|||
isExtended |
None |
[False, True] |
bool |
Address format: True for 29 bit, False for 11 bit, None uses the setting “Mode” from the test bench configuration |
Return value
Name |
Available if |
Default value |
Valid values |
Type |
Description |
|---|---|---|---|---|---|
result |
ByteStream |
ByteStream |
CloseIsoTpSession¶
Closes the ISO TP session.
Parameterization
Return value
Name |
Available if |
Default value |
Valid values |
Type |
Description |
|---|---|---|---|---|---|
Return |
[False, True] |
bool |
Session successfully closed |
DeregisterFrameForInbox¶
Deregisters a frame that is streamed to the inbox
Parameterization
Parameter
Name |
Available if |
Default value |
Valid values |
Type |
Description |
|---|---|---|---|---|---|
FrameId |
int |
Frame ID |
|||
Inbox |
object |
Existing inbox |
|||
isExtended |
None |
[False, True] |
bool |
Address format: True for 29 bit, False for 11 bit, None uses the setting “Mode” from the test bench configuration |
DeregisterStreamForInbox¶
Deregisters an ISO TP session.
Parameterization
Parameter
Name |
Available if |
Default value |
Valid values |
Type |
Description |
|---|---|---|---|---|---|
conId |
int |
Connection ID |
DisableSendFrameCyclic¶
Deactivate cyclic transmission of a message with given id
Parameterization
Parameter
Name |
Available if |
Default value |
Valid values |
Type |
Description |
|---|---|---|---|---|---|
FrameId |
int |
Frame ID |
|||
isExtended |
None |
[False, True] |
bool |
Address format: True for 29 bit, False for 11 bit, None uses the setting “Mode” from the test bench configuration |
GetFirstValue¶
Returns the first value of the signal received since the test case started.
Parameterization
Parameter
Name |
Available if |
Default value |
Valid values |
Type |
Description |
|---|---|---|---|---|---|
FrameName |
string |
Frame name |
|||
NodeName |
string |
Name of the electronic control unit |
|||
RawValue |
False |
[False, True] |
bool |
If ‘True’, the Raw value is returned. |
|
Reset |
False |
[False, True] |
bool |
If ‘True’ the first received value will be deleted after it has been read |
|
SignalName |
string |
Signal name |
GetLastReceptionTimestamp¶
Get the last reception timestamp in seconds
InitFrame¶
Registers the message ID for later use, e.g. ReadFrame
Parameterization
Parameter
Name |
Available if |
Default value |
Valid values |
Type |
Description |
|---|---|---|---|---|---|
FrameId |
int |
Frame ID |
|||
isExtended |
None |
[False, True] |
bool |
Address format: True for 29 bit, False for 11 bit, None uses the setting “Mode” from the test bench configuration |
OpenIsoTpSession¶
Opens an ISO TP session.
Parameterization
Parameter
Name |
Available if |
Default value |
Valid values |
Type |
Description |
|---|---|---|---|---|---|
addressByte |
ByteStream |
Network target address or address extension (only relevant for extended or mixed addressing) - ByteStream of length 1 |
|||
addressMode |
0 |
int |
Code of addressing mode - Integer (0: Standard Addressing | 1: Extended Addressing) |
||
blockSize |
0 |
int |
Number (0 - 255) of consecutive frames that can be received without an intermediate flow control - Integer |
||
fillByte |
ByteStream |
Byte to fill messages (optional) - ByteStream of length 1 |
|||
flowControlAddressByte |
ByteStream |
Different network destination address or address extension for FlowControl (only relevant for extended and mixed addressing) - ByteStream of length 1 |
|||
flowControlId |
int |
Message ID for flow control messages (optional) - Hex (optional Integer) |
|||
isExtended |
-1 |
int |
Use Extended CAN-ID format? (1=yes / 29 Bits; 0=no / 11 Bits; -1 = Use setting from TBC) |
||
maxFrameLength |
0 |
int |
Maximum length of a frame in bytes (applies to both start, consecutive and last frames); if this value is set to 0, the maximum value described in ISO 10681-2 is used - Integer |
||
requestId |
int |
Message ID for ECU requests - Hex (optional Integer) |
|||
responseId |
int |
Message ID for ECU responses - Hex (optional Integer) |
|||
separationTime |
0 |
int |
Minimal time separation between successive fragments 0x00..0x7F => 0..127ms, 0x80..0xf0 => reserved, 0xf1..0xf9 => 100.900µs, 0xfa..0xff => reserved - Integer |
Return value
Name |
Available if |
Default value |
Valid values |
Type |
Description |
|---|---|---|---|---|---|
Return |
int |
Connection ID |
ReadFrame¶
Reads the given frame ID (use InitFrame before!)
Parameterization
Parameter
Name |
Available if |
Default value |
Valid values |
Type |
Description |
|---|---|---|---|---|---|
doDelete |
False |
[False, True] |
bool |
Deletes the Frame after reading if “True” |
|
FrameId |
int |
Frame ID |
|||
isExtended |
None |
[False, True] |
bool |
Address format: True for 29 bit, False for 11 bit, None uses the setting “Mode” from the test bench configuration |
Return value
Name |
Available if |
Default value |
Valid values |
Type |
Description |
|---|---|---|---|---|---|
result |
ByteStream |
ByteStream |
ReadFrameEx¶
Reads the given frame ID (use InitFrame before!)
Parameterization
Parameter
Name |
Available if |
Default value |
Valid values |
Type |
Description |
|---|---|---|---|---|---|
doDelete |
False |
[False, True] |
bool |
Deletes the Frame after reading if “True” |
|
FrameId |
int |
Frame ID |
|||
isExtended |
None |
[False, True] |
bool |
Address format: True for 29 bit, False for 11 bit, None uses the setting “Mode” from the test bench configuration |
Return value
Name |
Available if |
Default value |
Valid values |
Type |
Description |
|---|---|---|---|---|---|
result |
object |
CanFrame |
RegisterFrameForInbox¶
Registers a frame to be streamed to an inbox.
Parameterization
Parameter
Name |
Available if |
Default value |
Valid values |
Type |
Description |
|---|---|---|---|---|---|
FrameId |
int |
Frame ID |
|||
Inbox |
object |
Existing inbox |
|||
isExtended |
None |
[False, True] |
bool |
Address format: True for 29 bit, False for 11 bit, None uses the setting “Mode” from the test bench configuration |
|
saveAsCanFrame |
False |
[False, True] |
bool |
If True, the frame is saved as a CanFrame object, else as a ByteStream |
RegisterStreamForInbox¶
Registers an ISO TP session to be streamed into an Inbox.
Parameterization
Parameter
Name |
Available if |
Default value |
Valid values |
Type |
Description |
|---|---|---|---|---|---|
conId |
int |
Connection ID |
|||
inbox |
object |
Existing inbox |
ResetFirstValue¶
Erases the first received value of the given signal
Parameterization
Parameter
Name |
Available if |
Default value |
Valid values |
Type |
Description |
|---|---|---|---|---|---|
FrameName |
string |
Frame name |
|||
NodeName |
string |
Name of the electronic control unit |
|||
SignalName |
string |
Signal name |
SendFrame¶
Sends message with given ID and data. Message ID must be registered in advance via the job “InitFrame”.
Parameterization
Parameter
Name |
Available if |
Default value |
Valid values |
Type |
Description |
|---|---|---|---|---|---|
DataByteStream |
ByteStream |
data to be send |
|||
FrameId |
int |
Frame ID |
|||
isExtended |
None |
[False, True] |
bool |
Address format: True for 29 bit, False for 11 bit, None uses the setting “Mode” from the test bench configuration |
SendFrameCyclic¶
Cyclic transmission of a message with given ID and data. Message ID must be registered in advance via the job “InitFrame”.
Parameterization
Parameter
Name |
Available if |
Default value |
Valid values |
Type |
Description |
|---|---|---|---|---|---|
Count |
int |
Number of sending repetitions |
|||
DataByteStream |
ByteStream |
data to be send |
|||
FrameId |
int |
Frame ID |
|||
Interval |
int |
Cycle time in ms |
|||
isExtended |
None |
[False, True] |
bool |
Address format: True for 29 bit, False for 11 bit, None uses the setting “Mode” from the test bench configuration |
SendStream¶
Send a data stream via ISO-TP.
Parameterization
Parameter
Name |
Available if |
Default value |
Valid values |
Type |
Description |
|---|---|---|---|---|---|
conId |
int |
Connection ID |
|||
data |
object |
Payload to be sent via ISO-TP |
|||
timeout |
int |
Timeout for sending the message in milliseconds |
SetFlowControlCTS¶
Activates to always send a Flow Control “ContinueToSend” message in response to a segmented request. Also new values can be assigned to the internal parameters BlockSize and SeparationTime.
Parameterization
Parameter
Name |
Available if |
Default value |
Valid values |
Type |
Description |
|---|---|---|---|---|---|
BlockSize |
int |
Number (0 - 255) of consecutive frames that can be received without an intermediate flow control - Integer If None the most recent setting from the test configuration, the OpenDiagSession job or the previous SetFlowControlCTS call is kept. |
|||
SeparationTime |
int |
Minimal time separation between successive fragments 0x00..0x7F => 0..127ms, 0x80..0xf0 => reserved, 0xf1..0xf9 => 100.900µs, 0xfa..0xff => reserved - Integer If None the most recent setting from the test configuration, the OpenDiagSession job or the previous SetFlowControlCTS call is kept. |
|||
SessionId |
object |
Handle of the diagnostic session. This can be either the name of the SUT specified in the TCF, the handle returned by the OpenDiagSession job or None (can only be used if there is one SUT specified). |
SetFlowControlWait¶
Activates to always send a Flow Control “Wait” messages in response to a segmented request. Note: While activated no segmented message can be received. Use the Job SetFlowControlCTS to reset this behaviour.
Parameterization
Parameter
Name |
Available if |
Default value |
Valid values |
Type |
Description |
|---|---|---|---|---|---|
SessionId |
object |
Handle of the diagnostic session. This can be either the name of the SUT specified in the TCF, the handle returned by the OpenDiagSession job or None (can only be used if there is one SUT specified). |
|||
WaitTimeInterval |
0 |
int |
Wait time interval in ms. If set to 0, Flow Control “Wait” messages are only sent once, to respond to a segmented request. If set to a value greater than 0, Flow Control “Wait” messages will be sent periodically with the given interval in between. |
StartPlayback¶
Start playback of a recording
Parameterization
Parameter
Name |
Available if |
Default value |
Valid values |
Type |
Description |
|---|---|---|---|---|---|
AscFile |
uri |
ASC file |
Return value
Name |
Available if |
Default value |
Valid values |
Type |
Description |
|---|---|---|---|---|---|
handle |
int |
A handle that can be used to stop the playback |
StopPlayback¶
Stop a running playback
Parameterization
Parameter
Name |
Available if |
Default value |
Valid values |
Type |
Description |
|---|---|---|---|---|---|
handle |
int |
A handle obtained from StartPlayback |