CanDragonDevice.Read
Prototype
EmSACANMessage? Read(byte channel);
Description
Non-blocking read of one CAN message.
Parameters
| Parameter | Direction | Type | Description |
|---|---|---|---|
channel | in | byte | Channel filter (message channel must match). |
Return value
Message, or null if RX queue is empty.
Example
device.Write(0, 0x123, new byte[] { 1, 2, 3, 4 });
EmSACANMessage? msg = device.Read(0);
if (msg.HasValue)
Console.WriteLine(Helpers.FormatCANMessage(msg.Value));