Skip to content

LoopbackFaults ​

Struct

Source: LoopbackTransport.h

Description ​

Injectable link faults for deterministic native testing.

Percentages are applied per destination in a fixed order: loss, then duplication, then reordering. All time comes from the owning bus, never from the system clock, so a test script is reproducible on any machine.

Properties ​

NameTypeDescription
lossPercentuint8_t0..100 chance a frame is dropped.
duplicatePercentuint8_t0..100 chance a frame is enqueued twice.
reorderPercentuint8_t0..100 chance a frame jumps the previous one.
delayMsuint16_tDelivery delay added to the bus clock.
sendBusyboolMakes every send return NetResult::Busy.
seeduint32_tSeed of the xorshift32 decision generator.

Released under the MIT License.