Namespace test_multi_frame

Namespace List > test_multi_frame

Public Functions

Type Name
test_multi_frame_boundary_sizes (size size)
Verify multi-frame behavior around boundary sizes.
test_multi_frame_bs_one_stmin ()
Verify block size 1 with STmin pacing.
test_multi_frame_bs_unlimited_stmin ()
Verify unlimited block size with STmin pacing.
test_multi_frame_max_payload ()
Verify maximum payload size roundtrip.
test_multi_frame_roundtrip ()
Verify multi-frame roundtrip delivery.
test_multi_frame_timeout_n_bs ()
Verify N_Bs timeout during multi-frame send.
test_multi_frame_timeout_n_cr ()
Verify N_Cr timeout during multi-frame receive.
test_multi_frame_unexpected_cf ()
Verify unexpected CF is reported.
test_multi_frame_wrong_sn ()
Verify wrong sequence number is reported.

Protected Functions

Type Name
_cf_frame (sn sn, payload payload)
Build a Consecutive Frame (CF) with a given sequence number.
_ff_frame (payload_size payload_size, payload payload)
Build a First Frame (FF) for an ISO-TP transfer.
_make_payload (size size)
Build a deterministic payload of a given size.
_poll_until_receive (link link, payload_size payload_size, steps steps, advance_ms advance_ms=0)
Poll the link until a response is received or steps are exhausted.

Public Functions Documentation

function test_multi_frame_boundary_sizes

Verify multi-frame behavior around boundary sizes.

test_multi_frame::test_multi_frame_boundary_sizes (
    size size
) 

Parameters:

  • size Payload size under test.

Exercises sizes near the SF/FF boundary.


function test_multi_frame_bs_one_stmin

Verify block size 1 with STmin pacing.

test_multi_frame::test_multi_frame_bs_one_stmin () 

Advances time between frames to satisfy STmin.


function test_multi_frame_bs_unlimited_stmin

Verify unlimited block size with STmin pacing.

test_multi_frame::test_multi_frame_bs_unlimited_stmin () 

Exercises BS=0 with STmin delay.


function test_multi_frame_max_payload

Verify maximum payload size roundtrip.

test_multi_frame::test_multi_frame_max_payload () 

Uses a large payload to stress segmentation and reassembly.


function test_multi_frame_roundtrip

Verify multi-frame roundtrip delivery.

test_multi_frame::test_multi_frame_roundtrip () 

Ensures payload integrity across segmented transfer.


function test_multi_frame_timeout_n_bs

Verify N_Bs timeout during multi-frame send.

test_multi_frame::test_multi_frame_timeout_n_bs () 

Disables FC to force sender block-size timeout.


function test_multi_frame_timeout_n_cr

Verify N_Cr timeout during multi-frame receive.

test_multi_frame::test_multi_frame_timeout_n_cr () 

Drops incoming frames to force receiver timeout.


function test_multi_frame_unexpected_cf

Verify unexpected CF is reported.

test_multi_frame::test_multi_frame_unexpected_cf () 

Injects a CF when receiver is idle.


function test_multi_frame_wrong_sn

Verify wrong sequence number is reported.

test_multi_frame::test_multi_frame_wrong_sn () 

Injects a CF with unexpected SN after FF.


Protected Functions Documentation

function _cf_frame

Build a Consecutive Frame (CF) with a given sequence number.

test_multi_frame::_cf_frame (
    sn sn,
    payload payload
) 

Parameters:

  • sn Sequence number (0-15).
  • payload Payload bytes to embed in CF.

Returns:

CAN frame bytes representing the CF.

Encodes the 0x20 PCI with SN.


function _ff_frame

Build a First Frame (FF) for an ISO-TP transfer.

test_multi_frame::_ff_frame (
    payload_size payload_size,
    payload payload
) 

Parameters:

  • payload_size Total payload size.
  • payload Payload bytes to embed in FF.

Returns:

CAN frame bytes representing the FF.

Encodes the 0x10 PCI with 12-bit length.


function _make_payload

Build a deterministic payload of a given size.

test_multi_frame::_make_payload (
    size size
) 

Parameters:

  • size Number of bytes to generate.

Returns:

Payload bytes.

Uses a simple modulo pattern for repeatability.


function _poll_until_receive

Poll the link until a response is received or steps are exhausted.

test_multi_frame::_poll_until_receive (
    link link,
    payload_size payload_size,
    steps steps,
    advance_ms advance_ms=0
) 

Parameters:

  • link ISO-TP link handle.
  • payload_size Expected payload size for receive.
  • steps Maximum number of poll iterations.
  • advance_ms Optional time advance per step in milliseconds.

Returns:

Received payload bytes or None when nothing is received.

Optionally advances the mock time between polls.



The documentation for this class was generated from the following file tests/integration/test_multi_frame.py