A channel of data to be sent to the debug board.
More...
#include <protocol.h>
|
| | Channel (T &data, ChannelID id) |
| | Constructs a channel of data to be sent to the debug board.
|
|
ChannelID | get_id () const |
| | Gets the channel's id.
|
|
T & | get_data () |
| | Gets the data stored inside the channel.
|
| bool | apply_update (VDP::PacketSpan data_packet) |
| | Applies an update from a received packet of data to the data held by the channel.
|
| VDP::Packet | serialize (PacketType pac_type) |
| | Serializes the channel as a packet to be sent over a wire to the debug board.
|
|
std::string | schema_to_string () const |
| | Gets the channel's schema as a string.
|
|
std::string | data_to_string () const |
| | Gets the channel's data as a string.
|
template<typename T>
requires
IsField<std::remove_cvref_t<T>>::value
class VDP::Channel< T >
A channel of data to be sent to the debug board.
◆ Channel()
Constructs a channel of data to be sent to the debug board.
- Parameters
-
| data | a field of data to be sent through this channel |
| id | a byte designating the channel |
◆ apply_update()
template<typename T>
| bool VDP::Channel< T >::apply_update |
( |
VDP::PacketSpan | data_packet | ) |
|
|
inline |
Applies an update from a received packet of data to the data held by the channel.
- Parameters
-
| data_packet | the received packet of data |
- Returns
- whether or not the update was successful
◆ serialize()
template<typename T>
| VDP::Packet VDP::Channel< T >::serialize |
( |
PacketType | pac_type | ) |
|
|
inline |
Serializes the channel as a packet to be sent over a wire to the debug board.
- Parameters
-
| pac_type | the type of packet to create, schema or data |
The documentation for this class was generated from the following file: