InPortProvider.cpp
Go to the documentation of this file.
1 // -*- C++ -*-
20 #include <rtm/RTC.h>
21 #include <rtm/InPortProvider.h>
22 
23 namespace RTC
24 {
33  : rtclog("InPortProvier")
34  {
35  }
36 
45  {
46  }
47 
56  {
57  RTC_TRACE(("publishInterfaceProfile()"));
58 
59 #ifdef ORB_IS_RTORB
60  NVUtil::appendStringValue(*prop.cobj(), "dataport.interface_type",
61  m_interfaceType.c_str());
62 #else // ORB_IS_RTORB
63  NVUtil::appendStringValue(prop, "dataport.interface_type",
64  m_interfaceType.c_str());
65 #endif // ORB_IS_RTORB
67  }
68 
77  {
78  RTC_TRACE(("publishInterface()"));
80  if (!NVUtil::isStringValue(prop,
81  "dataport.interface_type",
82  m_interfaceType.c_str()))
83  {
84  return false;
85  }
86 
88  // NVUtil::dump(m_properties);
89  return true;
90  }
91 
92  //----------------------------------------------------------------------
93  // protected functions
94 
102  void InPortProvider::setInterfaceType(const char* interface_type)
103  {
104  RTC_TRACE(("setInterfaceType(%s)", interface_type));
105  m_interfaceType = interface_type;
106  }
107 
115  void InPortProvider::setDataFlowType(const char* dataflow_type)
116  {
117  RTC_TRACE(("setDataFlowType(%s)", dataflow_type));
118  m_dataflowType = dataflow_type;
119  }
120 
128  void InPortProvider::setSubscriptionType(const char* subs_type)
129  {
130  RTC_TRACE(("setSubscriptionType(%s)", subs_type));
131  m_subscriptionType = subs_type;
132  }
133 }; // namespace RTC
InPortProvider class.
virtual ~InPortProvider(void)
Destructor.
RT-Component.
SDOPackage::NVList m_properties
Properties to hold port profile.
bool appendStringValue(SDOPackage::NVList &nv, const char *name, const char *value)
Append the specified string to element of NVList.
Definition: NVUtil.cpp:313
std::vector< std::pair< std::string, std::string > > NVList
Definition: IRTC.h:67
std::string m_dataflowType
std::string m_interfaceType
#define RTC_DEBUG_STR(str)
Definition: SystemLogger.h:489
std::string m_subscriptionType
std::string toString(const SDOPackage::NVList &nv, const char *name)
Get NVList of specifid name as string.
Definition: NVUtil.cpp:282
#define RTC_TRACE(fmt)
void setDataFlowType(const char *dataflow_type)
Set the dataflow type.
void append(SDOPackage::NVList &dest, const SDOPackage::NVList &src)
Append an element to NVList.
Definition: NVUtil.cpp:354
virtual void publishInterfaceProfile(SDOPackage::NVList &properties)
Publish InterfaceProfile information.
prop
Organization::get_organization_property ();.
void setInterfaceType(const char *interface_type)
Set the interface type.
virtual bool publishInterface(SDOPackage::NVList &properties)
Publish interface information.
bool isStringValue(const SDOPackage::NVList &nv, const char *name, const char *value)
Check whether the value of specified name specified matches the specified string. ...
Definition: NVUtil.cpp:262
RTComponent header.
DATAPORTSTATUS_ENUM InPortProvider()
Constructor.
void setSubscriptionType(const char *subs_type)
Set the subscription type.


openrtm_aist
Author(s): Noriaki Ando
autogenerated on Thu Jun 6 2019 19:25:58