58 RTC_TRACE((
"OutPortCorbaCdrConsumer::init()"));
70 RTC_TRACE((
"OutPortCorbaCdrConsumer::setBuffer()"));
84 RTC_TRACE((
"OutPortCorbaCdrConsumer::setListener()"));
99 RTC_TRACE((
"OutPortCorbaCdrConsumer::get()"));
100 ::OpenRTM::CdrData_var cdr_data;
104 ::OpenRTM::PortStatus
ret(
_ptr()->
get(cdr_data.out()));
106 if (ret == ::OpenRTM::PORT_OK)
109 data.put_octet_array(&(cdr_data[0]), (
int)cdr_data->length());
110 RTC_PARANOID((
"CDR data length: %d", cdr_data->length()));
117 RTC_INFO((
"InPort buffer is full."));
131 RTC_WARN((
"Exception caought from OutPort::get()."));
134 RTC_ERROR((
"OutPortCorbaCdrConsumer::get(): Never comes here."));
148 RTC_TRACE((
"OutPortCorbaCdrConsumer::subscribeInterface()"));
151 "dataport.corba_cdr.outport_ior");
154 RTC_DEBUG((
"dataport.corba_cdr.outport_ior not found."));
159 "dataport.corba_cdr.outport_ior"))
161 RTC_DEBUG((
"dataport.corba_cdr.outport_ior found."));
166 CORBA::Object_var var = orb->string_to_object(ior);
170 RTC_DEBUG((
"CorbaConsumer was set successfully."));
192 RTC_TRACE((
"OutPortCorbaCdrConsumer::unsubscribeInterface()"));
195 "dataport.corba_cdr.outport_ior");
198 RTC_DEBUG((
"dataport.corba_cdr.outport_ior not found."));
203 if (properties[index].value >>= ior)
205 RTC_DEBUG((
"dataport.corba_cdr.outport_ior found."));
207 CORBA::Object_var var = orb->string_to_object(ior);
208 if (
_ptr()->_is_equivalent(var))
211 RTC_DEBUG((
"CorbaConsumer's reference was released."));
214 RTC_ERROR((
"hmm. Inconsistent object reference."));
227 const cdrMemoryStream&
data)
231 case ::OpenRTM::PORT_OK:
236 case ::OpenRTM::PORT_ERROR:
241 case ::OpenRTM::BUFFER_FULL:
246 case ::OpenRTM::BUFFER_EMPTY:
251 case ::OpenRTM::BUFFER_TIMEOUT:
256 case ::OpenRTM::UNKNOWN_ERROR:
ConnectorListeners class.
#define RTC_ERROR(fmt)
Error log output macro.
virtual void releaseObject()
Clear CORBA object setting.
virtual ReturnCode advanceWptr(long int n=1)=0
Forward n writing pointers.
bool isString(const SDOPackage::NVList &nv, const char *name)
Validate whether value type specified by name is string type.
OutPortConsumer::ReturnCode convertReturn(::OpenRTM::PortStatus status, const cdrMemoryStream &data)
Return codes conversion.
virtual ReturnCode get(cdrMemoryStream &data)
Read data.
void onSenderEmpty()
Notify an ON_SENDER_EMPTY event to listeners.
AbstractClass * Creator()
Creator template.
std::vector< std::pair< std::string, std::string > > NVList
void onBufferFull(const cdrMemoryStream &data)
Notify an ON_BUFFER_FULL event to listeners.
RTC::ReturnCode_t ret(RTC::Local::ReturnCode_t r)
virtual ReturnCode put(const DataType &value)=0
Write data into the buffer.
ReturnCode addFactory(const Identifier &id, Creator creator, Destructor destructor)
Add factory.
void setName(const char *name)
Set suffix of date/time string of header.
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.
virtual void unsubscribeInterface(const SDOPackage::NVList &properties)
Unsubscribe the data receive notification.
OutPortCorbaCdrConsumer class.
#define RTC_WARN(fmt)
Warning log output macro.
RTComponent manager class.
#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.
DATAPORTSTATUS_ENUM OutPortCorbaCdrConsumer()
Constructor.
#define RTC_DEBUG(fmt)
Debug level log output macro.
void OutPortCorbaCdrConsumerInit(void)
Module initialization.
void onReceived(const cdrMemoryStream &data)
Notify an ON_RECEIVED event to listeners.
virtual bool full(void) const =0
Check on whether the buffer is full.
NameValue and NVList utility functions.
virtual ~OutPortCorbaCdrConsumer(void)
Destructor.
Logger rtclog
Logger stream.
typename::OpenRTM::OutPortCdr::_ptr_type _ptr()
Get Object reference narrowed as ObjectType.
OutPortCorbaCdrConsumer class.
::RTC::BufferStatus::Enum ReturnCode
prop
Organization::get_organization_property ();.
void onBufferWrite(const cdrMemoryStream &data)
Notify an ON_BUFFER_WRITE event to listeners.
void onReceiverFull(const cdrMemoryStream &data)
Notify an ON_RECEIVER_FULL event to listeners.
virtual bool subscribeInterface(const SDOPackage::NVList &properties)
Subscribe the data receive notification.
void Destructor(AbstractClass *&obj)
Destructor template.
Class represents a set of properties.
virtual ReturnCode advanceRptr(long int n=1)=0
Forward n reading pointers.
void onSenderTimeout()
Notify an ON_SENDER_TIMEOUT event to listeners.
#define RTC_INFO(fmt)
Information level log output macro.
OutPortConsumer abstract class.
virtual void setListener(ConnectorInfo &info, ConnectorListeners *listeners)
Set the listener.
virtual void setBuffer(CdrBufferBase *buffer)
Setting outside buffer's pointer.
BufferBase abstract class.
ConnectorListeners * m_listeners
virtual void init(coil::Properties &prop)
Initializing configuration.