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();
RTT_DEPRECATED void setInput(const ChannelElementBase::shared_ptr &input)
void RTT_API intrusive_ptr_add_ref(ChannelElementBase *e)
boost::intrusive_ptr< MultipleOutputsChannelElementBase > shared_ptr
static ChannelElement< T > * narrow(ChannelElementBase *e)
virtual void disconnect(bool forward)
ChannelElementBase::shared_ptr channel
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 ...
static bool operator==(const ConnPolicy &, const ConnPolicy &)
boost::intrusive_ptr< ChannelElementBase > shared_ptr
std::list< Output > Outputs
void RTT_API intrusive_ptr_release(ChannelElementBase *e)
ChannelElement< T > * narrow()
Contains TaskContext, Activity, OperationCaller, Operation, Property, InputPort, OutputPort, Attribute.
RTT::os::SharedMutex output_lock
RTT::os::SharedMutex outputs_lock
RTT::os::SharedMutex input_lock
virtual bool signalFrom(ChannelElementBase *)