[openrtm-commit:02274] r2878 - branches/FSM4RTC/OpenRTM-aist/src/lib/rtm
openrtm @ openrtm.org
openrtm @ openrtm.org
2017年 1月 19日 (木) 17:31:44 JST
Author: n-ando
Date: 2017-01-19 17:31:44 +0900 (Thu, 19 Jan 2017)
New Revision: 2878
Modified:
branches/FSM4RTC/OpenRTM-aist/src/lib/rtm/InPortPushConnector.cpp
branches/FSM4RTC/OpenRTM-aist/src/lib/rtm/InPortPushConnector.h
Log:
[FSM4RTC,incompat] Some callback points have been added. refs #3871
Modified: branches/FSM4RTC/OpenRTM-aist/src/lib/rtm/InPortPushConnector.cpp
===================================================================
--- branches/FSM4RTC/OpenRTM-aist/src/lib/rtm/InPortPushConnector.cpp 2017-01-19 08:29:58 UTC (rev 2877)
+++ branches/FSM4RTC/OpenRTM-aist/src/lib/rtm/InPortPushConnector.cpp 2017-01-19 08:31:44 UTC (rev 2878)
@@ -93,12 +93,15 @@
switch (ret)
{
case BufferStatus::BUFFER_OK:
+ onBufferRead(data);
return PORT_OK;
break;
case BufferStatus::BUFFER_EMPTY:
+ onBufferEmpty(data);
return BUFFER_EMPTY;
break;
case BufferStatus::TIMEOUT:
+ onBufferReadTimeout(data);
return BUFFER_TIMEOUT;
break;
case BufferStatus::PRECONDITION_NOT_MET:
Modified: branches/FSM4RTC/OpenRTM-aist/src/lib/rtm/InPortPushConnector.h
===================================================================
--- branches/FSM4RTC/OpenRTM-aist/src/lib/rtm/InPortPushConnector.h 2017-01-19 08:29:58 UTC (rev 2877)
+++ branches/FSM4RTC/OpenRTM-aist/src/lib/rtm/InPortPushConnector.h 2017-01-19 08:31:44 UTC (rev 2878)
@@ -271,7 +271,25 @@
* @endif
*/
void onDisconnect();
+
+ inline void onBufferRead(cdrMemoryStream& data)
+ {
+ m_listeners.
+ connectorData_[ON_BUFFER_READ].notify(m_profile, data);
+ }
+ void onBufferEmpty(cdrMemoryStream& data)
+ {
+ m_listeners.
+ connectorData_[ON_BUFFER_EMPTY].notify(m_profile, data);
+
+ }
+ void onBufferReadTimeout(cdrMemoryStream& data)
+ {
+ m_listeners.
+ connectorData_[ON_BUFFER_READ_TIMEOUT].notify(m_profile, data);
+ }
+
private:
/*!
* @if jp
More information about the openrtm-commit
mailing list