|
Thunderbots Project
|
#include <backend.h>


Public Member Functions | |
| void | receiveRobotStatus (TbotsProto::RobotStatus msg) |
| void | receiveSSLWrapperPacket (SSLProto::SSL_WrapperPacket msg) |
| void | receiveSSLReferee (SSLProto::Referee msg) |
| void | receiveSensorProto (SensorProto sensor_msg) |
Public Member Functions inherited from Subject< SensorProto > | |
| void | registerObserver (std::shared_ptr< Observer< SensorProto > > observer) |
Public Member Functions inherited from FirstInFirstOutThreadedObserver< World > | |
| FirstInFirstOutThreadedObserver (size_t buffer_size, bool log_buffer_full=true) | |
| std::optional< World > | getNextValue (const Duration &max_wait_time) final override |
Public Member Functions inherited from ThreadedObserver< T > | |
| ThreadedObserver (size_t buffer_size=Observer< T >::DEFAULT_BUFFER_SIZE, bool log_buffer_full=true) | |
| ThreadedObserver & | operator= (const ThreadedObserver &)=delete |
| ThreadedObserver (const ThreadedObserver &)=delete | |
Public Member Functions inherited from Observer< T, Clock > | |
| Observer (size_t buffer_size=DEFAULT_BUFFER_SIZE, bool log_buffer_full=true) | |
| virtual void | receiveValue (T val) |
| virtual double | getDataReceivedPerSecond () final |
Public Member Functions inherited from FirstInFirstOutThreadedObserver< TbotsProto::PrimitiveSet > | |
| FirstInFirstOutThreadedObserver (size_t buffer_size, bool log_buffer_full=true) | |
| std::optional< TbotsProto::PrimitiveSet > | getNextValue (const Duration &max_wait_time) final override |
Additional Inherited Members | |
Static Public Attributes inherited from Observer< T, Clock > | |
| static constexpr size_t | TIME_BUFFER_SIZE = 5 |
Protected Member Functions inherited from Subject< SensorProto > | |
| virtual void | sendValueToObservers (SensorProto val) final |
Protected Member Functions inherited from Observer< T, Clock > | |
| virtual std::optional< T > | popMostRecentlyReceivedValue (Duration max_wait_time) final |
| virtual std::optional< T > | popLeastRecentlyReceivedValue (Duration max_wait_time) final |
Static Protected Attributes inherited from Observer< T, Clock > | |
| static constexpr size_t | DEFAULT_BUFFER_SIZE = 1 |
A Backend is an abstraction around communication with robots, vision, and the gamecontroller (Referee). It produces SensorProtos, and consumes primitives that can be sent to the robots.
This produce/consume pattern is performed by extending both "Observer" and "Subject". Please see the implementation of those classes for details.
| void receiveRobotStatus | ( | TbotsProto::RobotStatus | msg | ) |
Callback function to send components of SensorProto via Subject<SensorProto> Immediately makes a SensorProto from msg and sends it to Observers
| msg | The component of SensorProto |