[openrtm-commit:02868] r3055 - trunk/OpenRTM-aist/examples/Throughput
openrtm @ openrtm.org
openrtm @ openrtm.org
2017年 10月 15日 (日) 01:51:14 JST
Author: miyamoto
Date: 2017-10-15 01:51:14 +0900 (Sun, 15 Oct 2017)
New Revision: 3055
Modified:
trunk/OpenRTM-aist/examples/Throughput/Throughput.cpp
trunk/OpenRTM-aist/examples/Throughput/Throughput.h
Log:
[compat, example] #4266
Modified: trunk/OpenRTM-aist/examples/Throughput/Throughput.cpp
===================================================================
--- trunk/OpenRTM-aist/examples/Throughput/Throughput.cpp 2017-10-13 04:14:59 UTC (rev 3054)
+++ trunk/OpenRTM-aist/examples/Throughput/Throughput.cpp 2017-10-14 16:51:14 UTC (rev 3055)
@@ -214,8 +214,15 @@
m_sendcount = 0;
m_logmulcnt = 0;
- coil::Async* async(coil::AsyncInvoker(this, std::mem_fun(&Throughput::exit)));
- async->invoke();
+
+
+
+
+ if (getInPortConnectorSize() == 0)
+ {
+ coil::Async* async(coil::AsyncInvoker(this, std::mem_fun(&Throughput::exit)));
+ async->invoke();
+ }
return RTC::RTC_OK;
}
@@ -504,7 +511,34 @@
}
+CORBA::ULong Throughput::getInPortConnectorSize()
+{
+ CORBA::ULong count = 0;
+ std::string datatype = coil::normalize(m_datatype);
+ if (datatype == "octet")
+ {
+ count = m_inOctetIn.get_connector_profiles()->length();
+ }
+ else if (datatype == "short")
+ {
+ count = m_inShortIn.get_connector_profiles()->length();
+ }
+ else if (datatype == "long")
+ {
+ count = m_inLongIn.get_connector_profiles()->length();
+ }
+ else if (datatype == "float")
+ {
+ count = m_inFloatIn.get_connector_profiles()->length();
+ }
+ else if (datatype == "double")
+ {
+ count = m_inDoubleIn.get_connector_profiles()->length();
+ }
+ return count;
+}
+
extern "C"
{
Modified: trunk/OpenRTM-aist/examples/Throughput/Throughput.h
===================================================================
--- trunk/OpenRTM-aist/examples/Throughput/Throughput.h 2017-10-13 04:14:59 UTC (rev 3054)
+++ trunk/OpenRTM-aist/examples/Throughput/Throughput.h 2017-10-14 16:51:14 UTC (rev 3055)
@@ -280,6 +280,7 @@
void writeData();
void setDataSize(CORBA::ULong size);
CORBA::ULong getDataSize();
+ CORBA::ULong getInPortConnectorSize();
void receiveData(const RTC::Time &tm, const CORBA::ULong seq_length);
void setConnectorProfile(const RTC::ConnectorInfo& info);
More information about the openrtm-commit
mailing list