#include <protocol.hpp>
Defines a PacketWriter, it writes packets
◆ PacketWriter()
| VDP::PacketWriter::PacketWriter |
( |
VDP::Packet & | scratch | ) |
|
|
explicit |
creates a packet writer
- Parameters
-
| scratch_space | the packet for the writer to write to |
◆ clear()
| void VDP::PacketWriter::clear |
( |
| ) |
|
clears the packet the writer is writing to
◆ get_packet()
| const Packet & VDP::PacketWriter::get_packet |
( |
| ) |
const |
- Returns
- the packet the writer is writing to
◆ size()
| size_t VDP::PacketWriter::size |
( |
| ) |
|
- Returns
- the size of the packet
◆ write_byte()
| void VDP::PacketWriter::write_byte |
( |
uint8_t | b | ) |
|
writes a byte to the end of the packet
- Parameters
-
◆ write_channel_acknowledge()
| void VDP::PacketWriter::write_channel_acknowledge |
( |
const Channel & | chan | ) |
|
writes a broadcast acknowledgement of a channel to the packet
- Parameters
-
| chan | the channel to write the acknowledgement for |
◆ write_channel_broadcast()
| void VDP::PacketWriter::write_channel_broadcast |
( |
const Channel & | chan | ) |
|
writes a broadcast of a channel schematic to the packet
- Parameters
-
| chan | the channel to write the schematic from |
◆ write_data_message()
| void VDP::PacketWriter::write_data_message |
( |
const Channel & | chan | ) |
|
writes the data from a channel to the packet
- Parameters
-
| chan | the Channel to write the data from |
◆ write_number()
| void VDP::PacketWriter::write_number |
( |
const Number & | num | ) |
|
|
inline |
writes a number to the end of the packet
◆ write_request()
| void VDP::PacketWriter::write_request |
( |
| ) |
|
writes a request for a channel schematic to the packets
- Parameters
-
| chan | the Channel to write the data from |
writes a request for a channel schematic to the packet
- Parameters
-
| chan | the channel to request |
◆ write_response()
| void VDP::PacketWriter::write_response |
( |
std::deque< Channel > & | response_queue | ) |
|
writes a response packet to the packets
- Parameters
-
| chan | the Channel to write the data from |
writes a response packet to the brain
- Parameters
-
| response_queue | the queue of channels to respond with |
◆ write_string()
| void VDP::PacketWriter::write_string |
( |
const std::string & | str | ) |
|
writes a string to the packet
- Parameters
-
| str | the string to write to the packet |
◆ write_type()
| void VDP::PacketWriter::write_type |
( |
Type | t | ) |
|
writes a VDP type to the packet in the form of a byte
- Parameters
-
| t | the VDP type to write to the packet |
The documentation for this class was generated from the following files: