File Information
Library: IoT/CAN
Package: CANFrame
Header: IoT/CAN/CANFDFrame.h
Description
Member Summary
Member Functions: assign, flags, id, length, operator =, payload, swap
Types
Flags
typedef Poco::UInt8 Flags;
ID
typedef Poco::UInt32 ID;
Length
typedef Poco::UInt8 Length;
Payload
typedef std::vector < char > Payload;
Enumerations
Anonymous
MAX_PAYLOAD_SIZE = 64
Flag
CAN_FLAG_NONE = 0x00
No flags set
CAN_FLAG_IDE = 0x01
CAN Identifier Extension bit (signalling extended frame format)
CAN_FLAG_RTR = 0x02
CAN Remote Transmission Request bit
CAN_FLAG_SRR = 0x04
CAN Substitute Remote Request bit (extended frame only, currently unused)
CAN_FLAG_ERR = 0x08
Error frame indicator
CAN_FLAG_FD = 0x80
CAN-FD frame indicator (receive only)
Constructors
CANFDFrame
CANFDFrame();
Creates and empty CANFDFrame.
CANFDFrame
CANFDFrame(
const CANFDFrame & frame
);
Creates a CANFDFrame by copying another one.
CANFDFrame
CANFDFrame(
ID id,
Flags flags,
const Payload & payload
);
Creates a CANFDFrame with the given data. Maximum data length is 64 bytes.
CANFDFrame
CANFDFrame(
ID id,
Flags flags,
Length length,
const char * payload
);
Creates a CANFDFrame with the given data. Maximum data length is 64 bytes.
Destructor
~CANFDFrame
~CANFDFrame();
Destroys the CANFDFrame.
Member Functions
assign
void assign(
const CANFDFrame & frame
);
Copies data and flags over from another CANFDFrame.
assign
void assign(
ID id,
Flags flags,
Length length,
const char * payload
);
Changes the frame's data to the given.
assign
void assign(
ID id,
Flags flags,
const Payload & payload
);
Changes the frame's data to the given.
flags
Flags flags() const;
Returns the flags of the frame.
flags
void flags(
Flags f
);
Sets the flags.
id
ID id() const;
Returns the ID of the frame.
id
void id(
ID n
);
Sets the ID of the frame.
length
Length length() const;
Returns the length of the data (Data Length Code).
operator =
CANFDFrame & operator = (
const CANFDFrame & frame
);
Copies data and flags over from another CANFDFrame.
payload
const Payload & payload() const;
Returns a pointer to the internal buffer containing the data.
payload
Payload & payload();
Returns a pointer to the internal buffer containing the data.
payload
void payload(
const Payload & p
);
Sets the payload.
swap
void swap(
CANFDFrame & frame
);
Swaps the contents of the frame with those of another.