Class CanFrame
Represents a CAN frame (message)
public class CanFrame
- Inheritance
-
CanFrame
- Derived
- Inherited Members
Constructors
CanFrame()
Creates a new CAN frame
public CanFrame()
CanFrame(uint, byte[], bool)
Creates a new CAN frame with specified ID and data
public CanFrame(uint id, byte[] data, bool isExtended = false)
Parameters
Properties
Data
Frame data (0-8 bytes for CAN, 0-64 bytes for CANFD)
public byte[] Data { get; set; }
Property Value
- byte[]
DataLength
Data length code (number of valid data bytes)
public byte DataLength { get; }
Property Value
Id
CAN identifier (11-bit for standard, 29-bit for extended)
public uint Id { get; set; }
Property Value
IsError
Whether this is an error frame
public bool IsError { get; set; }
Property Value
IsExtended
Whether this is an extended frame (29-bit ID)
public bool IsExtended { get; set; }
Property Value
IsRemote
Whether this is a remote frame (RTR)
public bool IsRemote { get; set; }
Property Value
IsTxEcho
Whether this frame was transmitted by this device (echo)
public bool IsTxEcho { get; set; }
Property Value
Timestamp
Timestamp in microseconds (for received frames)
public ulong Timestamp { get; set; }
Property Value
Methods
ToString()
Returns a string representation of this frame
public override string ToString()