Skip to content

Commit

Permalink
Extend AutomotiveBus.Stream.Frame to support CAN FD.
Browse files Browse the repository at this point in the history
  • Loading branch information
timrulebosch authored Feb 2, 2024
1 parent de03536 commit 8476b16
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions schemas/stream/frame.fbs
Original file line number Diff line number Diff line change
Expand Up @@ -31,22 +31,25 @@ table Timing {
}

enum CanFrameType:byte{
StandardFrame = 0, // Classical CAN:
// payload up to 8 bytes
StandardFrame = 0, // Depreciated.
BaseFrame = 0, // CAN Base Format (Classical):
// frame_id is 11-bits
ExtendedFrame = 1 // CAN FD:
// payload up to 64 bytes
ExtendedFrame = 1, // CAN Extended Format:
// frame_id is 29-bits
FdBaseFrame = 2, // CAN FD Base Format:
// frame_id is 11-bits
FdExtendedFrame = 3 // CAN FD Extended Format:
// frame_id is 29-bits
}

table CanFrame {
frame_id:uint; // CAN Message ID.
payload:[ubyte]; // Payload of the CAN frame, covered by DLC. The length
// of payload content should match values as defined by
// CAN DLC spec:
// Standard frame: 0...8
// CAN DLC spec (for example):
// Standard/Base frame: 0...8
// Extended frame: 0...8,12,16,20,24,32,48,64
frame_type:CanFrameType = StandardFrame;
frame_type:CanFrameType = BaseFrame;

// CAN Frame Metadata
bus_id:ubyte; // CAN Bus ID (logical identifier).
Expand Down

0 comments on commit 8476b16

Please sign in to comment.