39 #ifndef CORBA_REMOTE_CHANNEL_ELEMENT_H 40 #define CORBA_REMOTE_CHANNEL_ELEMENT_H 72 PortableServer::ObjectId_var
oid;
96 oid =
mpoa->activate_object(
this);
119 CORBA::SystemException
146 #ifndef RTT_CORBA_PORTS_DISABLE_SIGNAL 150 #ifdef CORBA_IS_OMNIORB 151 catch(CORBA::SystemException& e)
153 log(
Error) <<
"caught CORBA exception while signalling our remote endpoint: " << e._name() <<
" " << e.NP_minorString() <<
endlog();
157 catch(CORBA::Exception& e)
159 log(
Error) <<
"caught CORBA exception while signalling our remote endpoint: " << e._name() <<
endlog();
167 while ( this->
read(sample,
false) ==
NewData && valid) {
185 catch(CORBA::Exception&) {}
188 catch(CORBA::Exception&) {}
195 CORBA::SystemException
208 mpoa->deactivate_object(oid);
210 catch(CORBA::Exception&) {}
215 bool success =
false;
223 catch(CORBA::Exception&) {}
234 mpoa->deactivate_object(oid);
236 catch(CORBA::Exception&) {}
259 CORBA::Any_var remote_value;
264 if (cfs == CNewData || (cfs == COldData && copy_old_data)) {
266 ref_data_source.
ref();
274 #ifdef CORBA_IS_OMNIORB 275 catch(CORBA::SystemException& e)
277 log(
Error) <<
"caught CORBA exception while reading a remote channel: " << e._name() <<
" " << e.NP_minorString() <<
endlog();
282 catch(CORBA::Exception& e)
284 log(
Error) <<
"caught CORBA exception while reading a remote channel: " << e._name() <<
endlog();
294 CORBA::SystemException
300 value_data_source.
ref();
305 return (CFlowStatus)fs;
308 log(
Error) <<
"CORBA Transport failed to create Any for " << value_data_source.
getTypeName() <<
" while it should have!" <<
endlog();
311 sample =
new CORBA::Any();
312 return (CFlowStatus)fs;
330 assert(
remote_side.in() != 0 &&
"Got write() without remote side. Need buffer OR remote side but neither was present.");
335 CORBA::Any write_any;
340 const_ref_data_source.
ref();
346 #ifndef RTT_CORBA_PORTS_WRITE_ONEWAY 354 #ifdef CORBA_IS_OMNIORB 355 catch(CORBA::SystemException& e)
357 log(
Error) <<
"caught CORBA exception while marshalling: " << e._name() <<
" " << e.NP_minorString() <<
endlog();
361 catch(CORBA::Exception& e)
363 log(
Error) <<
"caught CORBA exception while marshalling: " << e._name() <<
endlog();
372 CORBA::SystemException
376 value_data_source.
ref();
378 return CWriteFailure;
381 return (CWriteStatus)fs;
388 CORBA::SystemException
391 (void)
write(sample);
409 if ( CORBA::is_nil(
remote_side.in()) )
return true;
412 assert(
remote_side.in() != 0 &&
"Got inputReady() without remote side.");
416 #ifdef CORBA_IS_OMNIORB 417 catch(CORBA::SystemException& e)
419 log(
Error) <<
"caught CORBA exception while checking a remote channel: " << e._name() <<
" " << e.NP_minorString() <<
endlog();
423 catch(CORBA::Exception& e)
425 log(
Error) <<
"caught CORBA exception while checking a remote channel: " << e._name() <<
endlog();
453 assert(
remote_side.in() != 0 &&
"Got channelReady() request without remote side.");
459 #ifdef CORBA_IS_OMNIORB 460 catch(CORBA::SystemException& e)
462 log(
Error) <<
"caught CORBA exception while marshalling: " << e._name() <<
" " << e.NP_minorString() <<
endlog();
466 catch(CORBA::Exception& e)
468 log(
Error) <<
"caught CORBA exception while marshalling: " << e._name() <<
endlog();
477 CORBA::SystemException
512 return "CorbaRemoteChannelElement";
virtual std::string getRemoteURI() const
virtual std::string getLocalURI() const
boost::call_traits< T >::param_type param_t
boost::intrusive_ptr< ChannelElement< T > > shared_ptr
DataFlowInterface * msender
virtual bool channelReady(ChannelElementBase::shared_ptr const &caller, ConnPolicy const &policy, internal::ConnID *conn_id=0)
virtual bool isRemoteElement() const
virtual bool channelReady(const CConnPolicy &cp) ACE_THROW_SPEC((CORBA
virtual bool channelReady(base::ChannelElementBase::shared_ptr const &caller, ConnPolicy const &policy, internal::ConnID *conn_id)
void deregisterChannel(CChannelElement_ptr channel)
virtual CORBA::Any_ptr createAny(base::DataSourceBase::shared_ptr source) const =0
virtual WriteStatus data_sample(typename base::ChannelElement< T >::param_t sample)
CWriteStatus write(const ::CORBA::Any &sample) ACE_THROW_SPEC((CORBA
CFlowStatus read(::CORBA::Any_out sample, bool copy_old_data) ACE_THROW_SPEC((CORBA
RTT::corba::CorbaTypeTransporter const & transport
static CorbaDispatcher * Instance(DataFlowInterface *iface)
void set(typename AssignableDataSource< T >::param_t t)
RTT::ConnPolicy toRTT(RTT::corba::CConnPolicy const &corba_policy)
virtual std::string getRemoteURI() const
PortableServer::ObjectId_var oid
virtual void disconnect(bool forward)
virtual bool inputReady(base::ChannelElementBase::shared_ptr const &caller)
#define ACE_THROW_SPEC(x)
void remoteSignal() ACE_THROW_SPEC((CORBA
void dispatchChannel(base::ChannelElementBase::shared_ptr chan)
bool disconnect(const base::ChannelElementBase::shared_ptr &channel, bool forward)
virtual std::string getLocalURI() const
RemoteChannelElement(CorbaTypeTransporter const &transport, DataFlowInterface *sender, PortableServer::POA_ptr poa, const ConnPolicy &policy)
virtual bool inputReady()
virtual FlowStatus read(reference_t sample, bool copy_old_data=true)
CDataFlowInterface_i * mdataflow
void writeOneway(const ::CORBA::Any &sample) ACE_THROW_SPEC((CORBA
boost::call_traits< T >::reference reference_t
virtual value_t data_sample()
boost::intrusive_ptr< ChannelElementBase > shared_ptr
RTT::corba::CConnPolicy toCORBA(RTT::ConnPolicy const &policy)
virtual std::string getElementName() const
FlowStatus read(typename base::ChannelElement< T >::reference_t sample, bool copy_old_data)
CRemoteChannelElement_var remote_side
virtual void transferSamples()
virtual std::string getTypeName() const
virtual bool inputReady()
virtual bool updateFromAny(const CORBA::Any *blob, base::DataSourceBase::shared_ptr target) const =0
virtual WriteStatus write(param_t sample)
Contains TaskContext, Activity, OperationCaller, Operation, Property, InputPort, OutputPort, Attribute.
AssignableDataSource< T >::const_reference_t rvalue() const
virtual bool updateAny(base::DataSourceBase::shared_ptr source, CORBA::Any &any) const =0
static Logger::LogFunction endlog()
PortableServer::POA_var mpoa
void remoteDisconnect(bool forward) ACE_THROW_SPEC((CORBA
static CORBA::ORB_var orb
WriteStatus write(typename base::ChannelElement< T >::param_t sample)