|
RIT VEXU Core API
|
#include <protocol.hpp>
Public Member Functions | |
| PacketWriter (Packet &scratch_space) | |
| void | clear () |
| size_t | size () |
| void | write_byte (uint8_t b) |
| void | write_type (Type t) |
| void | write_string (const std::string &str) |
| void | write_channel_acknowledge (const Channel &chan) |
| void | write_channel_broadcast (const Channel &chan) |
| void | write_response (std::deque< Channel > &channels) |
| void | write_data_message (const Channel &part) |
| void | write_request () |
| const Packet & | get_packet () const |
| template<typename Number> | |
| void | write_number (const Number &num) |
Defines a PacketWriter, it writes packets
|
explicit |
creates a packet writer
| scratch_space | the packet for the writer to write to |
| void VDP::PacketWriter::clear | ( | ) |
clears the packet the writer is writing to
| const Packet & VDP::PacketWriter::get_packet | ( | ) | const |
| size_t VDP::PacketWriter::size | ( | ) |
| void VDP::PacketWriter::write_byte | ( | uint8_t | b | ) |
writes a byte to the end of the packet
| b | the byte to write |
| void VDP::PacketWriter::write_channel_acknowledge | ( | const Channel & | chan | ) |
writes a broadcast acknowledgement of a channel to the packet
| chan | the channel to write the acknowledgement for |
| void VDP::PacketWriter::write_channel_broadcast | ( | const Channel & | chan | ) |
writes a broadcast of a channel schematic to the packet
| chan | the channel to write the schematic from |
| void VDP::PacketWriter::write_data_message | ( | const Channel & | chan | ) |
writes the data from a channel to the packet
| chan | the Channel to write the data from |
|
inline |
writes a number to the end of the packet
| void VDP::PacketWriter::write_request | ( | ) |
writes a request for a channel schematic to the packets
| chan | the Channel to write the data from |
writes a request for a channel schematic to the packet
| chan | the channel to request |
| void VDP::PacketWriter::write_response | ( | std::deque< Channel > & | response_queue | ) |
writes a response packet to the packets
| chan | the Channel to write the data from |
writes a response packet to the brain
| response_queue | the queue of channels to respond with |
| void VDP::PacketWriter::write_string | ( | const std::string & | str | ) |
writes a string to the packet
| str | the string to write to the packet |
| void VDP::PacketWriter::write_type | ( | Type | t | ) |
writes a VDP type to the packet in the form of a byte
| t | the VDP type to write to the packet |