24#ifndef GOBY_MIDDLEWARE_APPLICATION_SIMPLE_THREAD_H
25#define GOBY_MIDDLEWARE_APPLICATION_SIMPLE_THREAD_H
44template <
typename Config,
typename ImplementationTag =
void>
46 :
public Thread<Config, InterVehicleForwarder<
47 InterProcessForwarder<InterThreadTransporter, ImplementationTag>>>,
72 SimpleThread(
const Config&
cfg, boost::units::quantity<boost::units::si::frequency> loop_freq,
89 InterVehicleForwarder<InterProcessForwarder<InterThreadTransporter, ImplementationTag>>&
105 std::unique_ptr<InterThreadTransporter> interthread_;
106 std::unique_ptr<InterProcessForwarder<InterThreadTransporter, ImplementationTag>> interprocess_;
123template <
typename Config>
125 :
public SimpleThread<Config, zeromq::detail::InterProcessTag>
128 using Base = SimpleThread<Config, zeromq::detail::InterProcessTag>;
130 [[deprecated(
"Use goby::zeromq::SimpleThread or goby::udpm::SimpleThread instead of "
131 "goby::middleware::SimpleThread")]]
137 [[deprecated(
"Use goby::zeromq::SimpleThread or goby::udpm::SimpleThread instead of "
138 "goby::middleware::SimpleThread")]]
139 SimpleThread(
const Config&
cfg, boost::units::quantity<boost::units::si::frequency> loop_freq,
InnerTransporter & inner()
Implements the forwarder concept for the interprocess layer.
A transporter for the interthread layer.
Implements the forwarder concept for the intervehicle layer.
Implements Thread for a three layer middleware setup ([ intervehicle [ interprocess [ interthread ] ]...
InterVehicleForwarder< InterProcessForwarder< InterThreadTransporter, ImplementationTag > > & intervehicle()
Access the transporter on the intervehicle layer (which wraps interprocess and interthread)
SimpleThread(const Config &cfg, double loop_freq_hertz=0, int index=-1)
Construct a thread with a given configuration, optionally a loop frequency and/or index.
InterThreadTransporter & interthread()
Access the transporter on the interthread layer (this is the innermost transporter)
SimpleThread(const Config &cfg, boost::units::quantity< boost::units::si::frequency > loop_freq, int index=-1)
Construct a thread with a given configuration, a loop frequency (using boost::units) and optionally a...
InterProcessForwarder< InterThreadTransporter, ImplementationTag > & interprocess()
Access the transporter on the interprocess layer (which wraps interthread)
Represents a thread of execution within the Goby middleware, interleaving periodic events (loop()) wi...
void set_transporter(TransporterType *transporter)
TransporterType & transporter() const
const Config & cfg() const
middleware::SimpleThread< Config, detail::InterProcessTag > SimpleThread
UDPM-backed SimpleThread. Derives from middleware::SimpleThread using InterProcessTag.
The global namespace for the Goby project.