Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | Private Member Functions | Friends | List of all members
vesc_driver::VescFrame Class Reference

#include <vesc_packet.h>

Inheritance diagram for vesc_driver::VescFrame:
Inheritance graph
[legend]

Public Member Functions

virtual const Bufferframe () const
 
virtual ~VescFrame ()
 

Static Public Attributes

static constexpr CRC::Parameters< crcpp_uint16, 16 > CRC_TYPE = { 0x1021, 0x0000, 0x0000, false, false }
 
static const unsigned int VESC_EOF_VAL = 3
 VESC end-of-frame value. More...
 
static const int VESC_MAX_FRAME_SIZE = 6 + VESC_MAX_PAYLOAD_SIZE
 Largest VESC frame size, in bytes. More...
 
static const int VESC_MAX_PAYLOAD_SIZE = 1024
 Maximum VESC payload size, in bytes. More...
 
static const int VESC_MIN_FRAME_SIZE = 5
 Smallest VESC frame size, in bytes. More...
 
static const unsigned int VESC_SOF_VAL_LARGE_FRAME = 3
 VESC start of "large" frame value. More...
 
static const unsigned int VESC_SOF_VAL_SMALL_FRAME = 2
 VESC start of "small" frame value. More...
 

Protected Member Functions

 VescFrame (int payload_size)
 

Protected Attributes

std::shared_ptr< Bufferframe_
 Stores frame data, shared_ptr for shallow copy. More...
 
BufferRange payload_
 View into frame's payload section. More...
 

Private Member Functions

 VescFrame (const BufferRangeConst &frame, const BufferRangeConst &payload)
 

Friends

class VescPacketFactory
 

Detailed Description

The raw frame for communicating with the VESC

Definition at line 48 of file vesc_packet.h.

Constructor & Destructor Documentation

virtual vesc_driver::VescFrame::~VescFrame ( )
inlinevirtual

Definition at line 51 of file vesc_packet.h.

vesc_driver::VescFrame::VescFrame ( int  payload_size)
explicitprotected

Construct frame with specified payload size.

Definition at line 43 of file vesc_packet.cpp.

vesc_driver::VescFrame::VescFrame ( const BufferRangeConst frame,
const BufferRangeConst payload 
)
private

Construct from buffer. Used by VescPacketFactory factory.

Definition at line 69 of file vesc_packet.cpp.

Member Function Documentation

virtual const Buffer& vesc_driver::VescFrame::frame ( ) const
inlinevirtual

Definition at line 54 of file vesc_packet.h.

Friends And Related Function Documentation

friend class VescPacketFactory
friend

Give VescPacketFactory access to private constructor.

Definition at line 82 of file vesc_packet.h.

Member Data Documentation

constexpr CRC::Parameters< crcpp_uint16, 16 > vesc_driver::VescFrame::CRC_TYPE = { 0x1021, 0x0000, 0x0000, false, false }
static

CRC parameters for the VESC

Definition at line 68 of file vesc_packet.h.

std::shared_ptr<Buffer> vesc_driver::VescFrame::frame_
protected

Stores frame data, shared_ptr for shallow copy.

Definition at line 74 of file vesc_packet.h.

BufferRange vesc_driver::VescFrame::payload_
protected

View into frame's payload section.

Definition at line 75 of file vesc_packet.h.

const unsigned int vesc_driver::VescFrame::VESC_EOF_VAL = 3
static

VESC end-of-frame value.

Definition at line 65 of file vesc_packet.h.

const int vesc_driver::VescFrame::VESC_MAX_FRAME_SIZE = 6 + VESC_MAX_PAYLOAD_SIZE
static

Largest VESC frame size, in bytes.

Definition at line 62 of file vesc_packet.h.

const int vesc_driver::VescFrame::VESC_MAX_PAYLOAD_SIZE = 1024
static

Maximum VESC payload size, in bytes.

Definition at line 60 of file vesc_packet.h.

const int vesc_driver::VescFrame::VESC_MIN_FRAME_SIZE = 5
static

Smallest VESC frame size, in bytes.

Definition at line 61 of file vesc_packet.h.

const unsigned int vesc_driver::VescFrame::VESC_SOF_VAL_LARGE_FRAME = 3
static

VESC start of "large" frame value.

Definition at line 64 of file vesc_packet.h.

const unsigned int vesc_driver::VescFrame::VESC_SOF_VAL_SMALL_FRAME = 2
static

VESC start of "small" frame value.

Definition at line 63 of file vesc_packet.h.


The documentation for this class was generated from the following files:


vesc_driver
Author(s): Michael T. Boulet , Joshua Whitley
autogenerated on Sun Apr 18 2021 02:48:01