|
RIT VEXU Core API
|
#include <types.hpp>
Public Types | |
| using | FetchFunc = std::function<NumberType()> |
Public Member Functions | |
| Number (std::string field_name, FetchFunc fetcher=[]() { return(NumberType) 0;}) | |
| void | fetch () override |
| void | set_value (NumberType val) |
| NumberType | get_value () |
| void | pprint (std::stringstream &ss, size_t indent) const override |
| void | pprint_data (std::stringstream &ss, size_t indent) const 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 |
A number conveyed as a part
| using VDP::Number< NumT, schemaType >::FetchFunc = std::function<NumberType()> |
Function to run when fetching this number
|
inlineexplicit |
creates a number with a name and fetcher
| field | name for the number part |
| fetcher | the function to run when fetching this number |
|
inlineoverridevirtual |
sets the value of the number stored to the value returned by its fetcher
Implements VDP::Part.
|
inline |
|
inlineoverridevirtual |
|
inlineoverridevirtual |
prints the data the number holds with the format "[indent]name: value"
| ss | the stream of strings to print to |
| indent | the amount of indents to use |
Implements VDP::Part.
|
inlineoverridevirtual |
sets the value of the number stored to the value read by a PacketReader
| reader | the packet reader to get the number from |
Implements VDP::Part.
|
inline |
sets the value of the number stored
| val | the value to store |
|
inlineoverrideprotectedvirtual |
writes the number's data to a packet
| sofar | the packet writer to write with |
Implements VDP::Part.
|
inlineoverrideprotectedvirtual |
writes the number's schematic to a packet
| sofar | the packet writer to write with |
Implements VDP::Part.