Skip to content

Pci Struct

Parsed ISO 15765-2 Protocol-Control-Information (PCI) view produced by TryParsePci(ReadOnlySpan<byte>, IsoTpEndpoint, bool, Pci). Only the fields relevant to the parsed PciType are populated; all other fields are default-valued.

public readonly struct Pci : System.IEquatable<CanKit.Pro.IsoTp.Pci>

Implements IEquatable<Pci>

Properties

Pci.BlockSize Property

Block size (BS) for FlowControl; otherwise 0.

public byte BlockSize { get; }

Property Value

Byte

Pci.DataOffset Property

Byte offset (within the CAN payload span passed to TryParsePci(ReadOnlySpan<byte>, IsoTpEndpoint, bool, Pci)) at which user data starts. For SF/FF this is the first data byte; for CF this is the first data byte; for FC there are no user data bytes and the value points one past the FC PCI.

public int DataOffset { get; }

Property Value

Int32

Pci.FlowStatus Property

Flow status for FlowControl; otherwise ClearToSend.

public CanKit.Pro.IsoTp.FlowStatus FlowStatus { get; }

Property Value

FlowStatus

Pci.Length Property

Length field. For SingleFrame this is the number of user data bytes (1..7 for classic-CAN, 1..62 for CAN-FD escape form). For FirstFrame this is the total PDU length (up to 4095 for the classic form and up to MaxFdFirstFrameLength for the CAN-FD escape form). Otherwise zero.

public int Length { get; }

Property Value

Int32

Pci.SequenceNumber Property

Sequence number (0..15) for ConsecutiveFrame; otherwise 0.

public byte SequenceNumber { get; }

Property Value

Byte

Pci.StMin Property

STmin converted to a TimeSpan via DecodeStMin(byte). Only meaningful for FlowControl; TimeSpan.Zero otherwise.

public System.TimeSpan StMin { get; }

Property Value

TimeSpan

Pci.StMinRaw Property

Raw STmin byte for FlowControl; otherwise 0. Use DecodeStMin(byte) to convert to TimeSpan.

public byte StMinRaw { get; }

Property Value

Byte

Pci.Type Property

PCI type (nibble of the first PCI byte).

public CanKit.Pro.IsoTp.PciType Type { get; }

Property Value

PciType

Operators

Pci.operator ==(Pci, Pci) Operator

Equality operator.

public static bool operator ==(CanKit.Pro.IsoTp.Pci left, CanKit.Pro.IsoTp.Pci right);

Parameters

left Pci

right Pci

Returns

Boolean

Pci.operator !=(Pci, Pci) Operator

Inequality operator.

public static bool operator !=(CanKit.Pro.IsoTp.Pci left, CanKit.Pro.IsoTp.Pci right);

Parameters

left Pci

right Pci

Returns

Boolean