34 : rtclog(
"InPortCorbaCdrConsumer")
75 ::OpenRTM::CdrData tmp(data.bufSize(), data.bufSize(),
76 static_cast<CORBA::Octet*
>(data.bufPtr()), 0);
78 OpenRTM_CdrData *cdrdata_tmp =
new OpenRTM_CdrData();
79 cdrdata_tmp->_buffer =
80 (CORBA_octet *)RtORB_alloc(data.bufSize(),
"InPortCorbaCdrComsumer::put");
81 memcpy(cdrdata_tmp->_buffer, data.bufPtr(), data.bufSize());
82 cdrdata_tmp->_length = cdrdata_tmp->_maximum= data.bufSize();
83 ::OpenRTM::CdrData tmp(cdrdata_tmp);
84 #endif // ORB_IS_RTORB 167 "dataport.corba_cdr.inport_ior");
175 if (!(properties[index].value >>= ior))
182 CORBA::Object_var obj = orb->string_to_object(ior);
184 if (CORBA::is_nil(obj))
186 RTC_ERROR((
"invalid IOR string has been passed"));
192 RTC_WARN((
"Setting object to consumer failed."));
211 "dataport.corba_cdr.inport_ref");
218 CORBA::Object_var obj;
219 if (!(properties[index].value >>= CORBA::Any::to_object(obj.out())))
221 RTC_ERROR((
"prop[inport_ref] is not objref"));
225 if (CORBA::is_nil(obj))
227 RTC_ERROR((
"prop[inport_ref] is not objref"));
233 RTC_ERROR((
"Setting object to consumer failed."));
252 "dataport.corba_cdr.inport_ior");
260 if (!(properties[index].value >>= ior))
262 RTC_ERROR((
"prop[inport_ior] is not string"));
267 CORBA::Object_var var = orb->string_to_object(ior);
268 if (!(
_ptr()->_is_equivalent(var)))
270 RTC_ERROR((
"connector property inconsistency"));
291 "dataport.corba_cdr.inport_ref");
292 if (index < 0) {
return false; }
294 CORBA::Object_var obj;
295 if (!(properties[index].value >>= CORBA::Any::to_object(obj.out())))
300 if (!(
_ptr()->_is_equivalent(obj.in()))) {
return false; }
318 case OpenRTM::PORT_OK:
321 case OpenRTM::PORT_ERROR:
324 case OpenRTM::BUFFER_FULL:
327 case OpenRTM::BUFFER_TIMEOUT:
330 case OpenRTM::UNKNOWN_ERROR:
virtual bool subscribeInterface(const SDOPackage::NVList &properties)
Subscribe to the data sending notification.
InPortConsumer abstract class.
#define RTC_ERROR(fmt)
Error log output macro.
virtual void releaseObject()
Clear CORBA object setting.
InPortCorbaCdrConsumer class.
AbstractClass * Creator()
Creator template.
std::vector< std::pair< std::string, std::string > > NVList
RTC::ReturnCode_t ret(RTC::Local::ReturnCode_t r)
ReturnCode addFactory(const Identifier &id, Creator creator, Destructor destructor)
Add factory.
virtual void unsubscribeInterface(const SDOPackage::NVList &properties)
Unsubscribe the data send notification.
virtual ReturnCode put(const cdrMemoryStream &data)
Send data to the destination port.
void InPortCorbaCdrConsumerInit(void)
Module initialization.
CORBA::ORB_ptr getORB()
Get the pointer to ORB.
static GlobalFactory< AbstractClass, Identifier, Compare, Creator, Destructor > & instance()
Create instance.
static Manager & instance()
Get instance of the manager.
GlobalFactory template class.
#define RTC_WARN(fmt)
Warning log output macro.
bool unsubscribeFromRef(const SDOPackage::NVList &properties)
ubsubscribing (Object reference version)
#define RTC_DEBUG_STR(str)
#define RTC_PARANOID(fmt)
Paranoid level log output macro.
const CORBA::Long find_index(const SDOPackage::NVList &nv, const char *name)
Return the index of element specified by name from NVList.
virtual bool setObject(CORBA::Object_ptr obj)
Set Object.
std::string toString(const SDOPackage::NVList &nv, const char *name)
Get NVList of specifid name as string.
NameValue and NVList utility functions.
typename::OpenRTM::InPortCdr::_ptr_type _ptr()
Get Object reference narrowed as ObjectType.
coil::Properties m_properties
bool unsubscribeFromIor(const SDOPackage::NVList &properties)
ubsubscribing (IOR version)
::RTC::BufferStatus::Enum ReturnCode
prop
Organization::get_organization_property ();.
bool subscribeFromIor(const SDOPackage::NVList &properties)
Getting object reference fromn IOR string.
void Destructor(AbstractClass *&obj)
Destructor template.
Class represents a set of properties.
InPortCorbaCdrConsumer class.
bool subscribeFromRef(const SDOPackage::NVList &properties)
Getting object reference fromn Any directry.
virtual ~InPortCorbaCdrConsumer(void)
Destructor.
InPortConsumer::ReturnCode convertReturnCode(OpenRTM::PortStatus ret)
Return codes conversion.
DATAPORTSTATUS_ENUM InPortCorbaCdrConsumer(void)
Constructor.
virtual void init(coil::Properties &prop)
Initializing configuration.
virtual void publishInterfaceProfile(SDOPackage::NVList &properties)
Publish InterfaceProfile information.