RIT VEXU Core API
|
#include <registry-listener.hpp>
Public Member Functions | |
RegistryListener (AbstractDevice *device) | |
void | take_packet (const Packet &pac) |
Call this if you are a device who has a packet for the protocol to decode. | |
bool | submit_response (PacketType type, ChannelID id, PartPtr data) |
Submits a channel to respond to the board with. | |
void | install_broadcast_callback (CallbackFn on_broadcastf) |
void | install_data_callback (CallbackFn on_dataf) |
bool | send_data (ChannelID id, PartPtr data) |
defines a device registry for sending data or listening to data over a device
|
inline |
creates a device registry for sending data or listening to data over the device
device | the device to send data to |
reg_type | the type of registry it is (Listener or Controller) |
|
inline |
installs a callback to a function that is called when the registry broadcasts the data schematic
on_broadcastf | the callback to run when the registry broadcasts the schematic |
|
inline |
installs a callback to a function that is called when the registry broadbasts data
on_dataf | the callback to run when the registry broadcasts data |
|
inline |
|
inline |
Submits a channel to respond to the board with.
id | the channel id to respond with |
|
inline |
Call this if you are a device who has a packet for the protocol to decode.
pac | the packet to take. |