Go to the documentation of this file.00001
00020 #include <rtm/RTC.h>
00021 #include <rtm/InPortProvider.h>
00022
00023 namespace RTC
00024 {
00032 InPortProvider::InPortProvider()
00033 : rtclog("InPortProvier")
00034 {
00035 }
00036
00044 InPortProvider::~InPortProvider()
00045 {
00046 }
00047
00055 void InPortProvider::publishInterfaceProfile(SDOPackage::NVList& prop)
00056 {
00057 RTC_TRACE(("publishInterfaceProfile()"));
00058
00059 #ifdef ORB_IS_RTORB
00060 NVUtil::appendStringValue(*prop.cobj(), "dataport.interface_type",
00061 m_interfaceType.c_str());
00062 #else // ORB_IS_RTORB
00063 NVUtil::appendStringValue(prop, "dataport.interface_type",
00064 m_interfaceType.c_str());
00065 #endif // ORB_IS_RTORB
00066 NVUtil::append(prop, m_properties);
00067 }
00068
00076 bool InPortProvider::publishInterface(SDOPackage::NVList& prop)
00077 {
00078 RTC_TRACE(("publishInterface()"));
00079 RTC_DEBUG_STR((NVUtil::toString(prop)));
00080 if (!NVUtil::isStringValue(prop,
00081 "dataport.interface_type",
00082 m_interfaceType.c_str()))
00083 {
00084 return false;
00085 }
00086
00087 NVUtil::append(prop, m_properties);
00088
00089 return true;
00090 }
00091
00092
00093
00094
00102 void InPortProvider::setInterfaceType(const char* interface_type)
00103 {
00104 RTC_TRACE(("setInterfaceType(%s)", interface_type));
00105 m_interfaceType = interface_type;
00106 }
00107
00115 void InPortProvider::setDataFlowType(const char* dataflow_type)
00116 {
00117 RTC_TRACE(("setDataFlowType(%s)", dataflow_type));
00118 m_dataflowType = dataflow_type;
00119 }
00120
00128 void InPortProvider::setSubscriptionType(const char* subs_type)
00129 {
00130 RTC_TRACE(("setSubscriptionType(%s)", subs_type));
00131 m_subscriptionType = subs_type;
00132 }
00133 };