39 #ifndef ORO_CHANNEL_BASE_HPP 40 #define ORO_CHANNEL_BASE_HPP 42 #include "../os/oro_arch.h" 44 #include <boost/intrusive_ptr.hpp> 45 #include <boost/call_traits.hpp> 47 #include "../rtt-fwd.hpp" 49 #include "../internal/rtt-internal-fwd.hpp" 50 #include "../BufferPolicy.hpp" 51 #include "../os/Mutex.hpp" 56 namespace RTT {
namespace base {
68 typedef boost::intrusive_ptr<ChannelElementBase>
shared_ptr;
121 shared_ptr getInput();
129 virtual shared_ptr getInputEndPoint();
135 shared_ptr getOutput();
143 virtual shared_ptr getOutputEndPoint();
161 virtual bool connected();
168 virtual bool signal();
203 virtual void clear();
209 virtual void disconnect(
bool forward);
236 virtual const ConnPolicy* getConnPolicy()
const;
240 assert(
false &&
"ChannelElementBase::setOutput() is deprecated! You should use ChannelElementBase::connectTo() instead.");
241 (void) connectTo(output);
246 assert(
false &&
"ChannelElementBase::setInput() is deprecated! You should use ChannelElementBase::addInput() instead.");
247 (void) addInput(input);
258 virtual bool isRemoteElement()
const;
270 virtual std::string getRemoteURI()
const;
277 virtual std::string getLocalURI()
const;
286 virtual std::string getElementName()
const;
298 virtual bool addOutput(shared_ptr
const& output,
bool mandatory =
true);
304 virtual void removeOutput(shared_ptr
const& output);
311 virtual bool addInput(shared_ptr
const& input);
317 virtual void removeInput(shared_ptr
const& input);
325 virtual bool inputReady();
334 typedef boost::intrusive_ptr<MultipleInputsChannelElementBase>
shared_ptr;
335 typedef std::list<ChannelElementBase::shared_ptr>
Inputs;
348 virtual bool connected();
360 virtual void clear();
395 typedef boost::intrusive_ptr<MultipleOutputsChannelElementBase>
shared_ptr;
416 virtual bool connected();
422 virtual bool signal();
456 void removeDisconnectedOutputs();
465 typedef boost::intrusive_ptr<MultipleInputsMultipleOutputsChannelElementBase>
shared_ptr;
470 virtual bool connected();
ChannelElementBase variant with multiple output channels.
RTT_DEPRECATED void setInput(const ChannelElementBase::shared_ptr &input)
void RTT_API intrusive_ptr_add_ref(ChannelElementBase *e)
A connection policy object describes how a given connection should behave.
boost::intrusive_ptr< MultipleOutputsChannelElementBase > shared_ptr
static ChannelElement< T > * narrow(ChannelElementBase *e)
Return a pointer to the typed instance of a ChannelElementBase.
virtual void disconnect(bool forward)
Performs a disconnection of this channel's endpoints.
ChannelElementBase::shared_ptr channel
A typed version of ChannelElementBase.
RTT_DEPRECATED void setOutput(const ChannelElementBase::shared_ptr &output)
An object oriented wrapper around a shared mutex (multiple readers allowed, but only one writer with ...
boost::intrusive_ptr< ChannelElementBase > shared_ptr
std::list< Output > Outputs
void RTT_API intrusive_ptr_release(ChannelElementBase *e)
ChannelElement< T > * narrow()
Return a pointer to the typed variant of this ChannelElementBase.
bool operator==(const TiXmlString &a, const TiXmlString &b)
This class is used in places where a permanent representation of a reference to a connection is neede...
Contains TaskContext, Activity, OperationCaller, Operation, Property, InputPort, OutputPort, Attribute.
In the data flow implementation, a channel is created by chaining ChannelElementBase objects...
The base class of every data flow port.
RTT::os::SharedMutex output_lock
RTT::os::SharedMutex outputs_lock
RTT::os::SharedMutex input_lock
Structure that contains an int for atomic operations.
virtual bool signalFrom(ChannelElementBase *)
Signals that there is new data available on this channel Forwards to signal() unless overwritten in a...