Template Class URProducer
Defined in File producer.h
Inheritance Relationships
Base Type
public urcl::comm::IProducer< T >
(Template Class IProducer)
Class Documentation
-
template<typename T>
class URProducer : public urcl::comm::IProducer<T> A general producer for URPackages. Implements funcionality to produce packages by reading and parsing from a byte stream.
- Template Parameters:
HeaderT – Header type of packages to produce.
Public Functions
-
inline URProducer(URStream<T> &stream, Parser<T> &parser)
Creates a URProducer object, registering a stream and a parser.
- Parameters:
stream – The stream to read from
parser – The parser to use to interpret received byte information
-
inline virtual void setupProducer(const size_t max_num_tries = 0, const std::chrono::milliseconds reconnection_time = std::chrono::seconds(10)) override
Triggers the stream to connect to the robot.
- Parameters:
max_num_tries – Maximum number of connection attempts before counting the connection as failed. Unlimited number of attempts when set to 0.
reconnection_time – time in between connection attempts to the server
-
inline virtual void teardownProducer() override
Tears down the producer. Currently no special handling needed.
-
inline virtual void stopProducer() override
Stops the producer. Currently no functionality needed.
-
inline virtual void startProducer() override