RIT VEXU Core API
Loading...
Searching...
No Matches
VDP::Record Class Reference

#include <types.hpp>

Inheritance diagram for VDP::Record:
VDP::Part VDP::MotorDataRecord VDP::OdometryControlRecord VDP::OdometryDataRecord VDP::PIDControlRecord VDP::PIDDataRecord VDP::TestRecord VDP::TimestampedRecord

Public Member Functions

 Record (std::string name)
 
 Record (std::string name, const std::vector< Part * > &parts)
 
 Record (std::string name, std::vector< PartPtr > parts)
 
 Record (std::string name, PacketReader &reader)
 
void set_fields (std::vector< PartPtr > fields)
 
void fetch () override
 
void read_data_from_message (PacketReader &reader) override
 
- Public Member Functions inherited from VDP::Part
 Part (std::string name)
 
std::string pretty_print () const
 
std::string pretty_print_data () const
 

Protected Member Functions

void write_schema (PacketWriter &sofar) const override
 
void write_message (PacketWriter &sofar) const override
 

Detailed Description

Defines a Part that contains another Part essentially an array of parts that is formatted so that it can be sent to the debug board

Constructor & Destructor Documentation

◆ Record() [1/4]

VDP::Record::Record ( std::string name)
explicit

Creates a Record with just a name a Record is essentially an array of parts that is formatted so that it can be sent to the debug board

Parameters
namethe name for the part

◆ Record() [2/4]

VDP::Record::Record ( std::string name,
const std::vector< Part * > & parts )

Creates a Record with a name that contains the Parts inside a vector of Parts a Record is essentially an array of parts that is formatted so that it can be sent to the debug board

Parameters
namethe name for the part
partsthe vector of Parts for the record to hold

◆ Record() [3/4]

VDP::Record::Record ( std::string name,
std::vector< PartPtr > parts )

Creates a Record with a name that contains the Parts inside a vector of Part Pointers a Record is essentially an array of parts that is formatted so that it can be sent to the debug board

Parameters
namethe name for the part
partsthe vector of Part Pointers for the record to hold

Creates a Record with a name that contains the Parts inside a vector of Part Pointers a Record is essentially an array of parts that is formatted so that it can be sent to the debug board

Parameters
namethe name for the Record
partsthe vector of Part Pointers for the record to hold

◆ Record() [4/4]

VDP::Record::Record ( std::string name,
PacketReader & reader )

Creates a record with a name based off of a packet read by a PacketReader a Record is essentially an array of parts that is formatted so that it can be sent to the debug board

Parameters
name
reader

Member Function Documentation

◆ fetch()

void VDP::Record::fetch ( )
overridevirtual

sets the values of each Part the Record contains

Implements VDP::Part.

Reimplemented in VDP::TimestampedRecord.

◆ read_data_from_message()

void VDP::Record::read_data_from_message ( PacketReader & reader)
overridevirtual

writes a message to the packet containing part record

Parameters
sofarthe PacketWriter to write with

Implements VDP::Part.

◆ set_fields()

void VDP::Record::set_fields ( std::vector< PartPtr > fs)

sets the Record to contain Parts from a part Pointer

Parameters
fsthe vector of Part Pointers for the record to hold

◆ write_message()

void VDP::Record::write_message ( PacketWriter & sofar) const
overrideprotectedvirtual

writes a message to the packet containing part record

Parameters
sofarthe PacketWriter to write with

Implements VDP::Part.

◆ write_schema()

void VDP::Record::write_schema ( PacketWriter & sofar) const
overrideprotectedvirtual

writes the Record as the

Implements VDP::Part.


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