[openrtm-commit:03153] r3211 - trunk/OpenRTM-aist/src/lib/rtm
openrtm @ openrtm.org
openrtm @ openrtm.org
2018年 1月 28日 (日) 22:40:56 JST
Author: miyamoto
Date: 2018-01-28 22:40:56 +0900 (Sun, 28 Jan 2018)
New Revision: 3211
Modified:
trunk/OpenRTM-aist/src/lib/rtm/InPortCorbaCdrUDPProvider.cpp
trunk/OpenRTM-aist/src/lib/rtm/InPortCorbaCdrUDPProvider.h
Log:
[compat, bugfix, TAO] fixed bug.
Modified: trunk/OpenRTM-aist/src/lib/rtm/InPortCorbaCdrUDPProvider.cpp
===================================================================
--- trunk/OpenRTM-aist/src/lib/rtm/InPortCorbaCdrUDPProvider.cpp 2018-01-28 13:19:34 UTC (rev 3210)
+++ trunk/OpenRTM-aist/src/lib/rtm/InPortCorbaCdrUDPProvider.cpp 2018-01-28 13:40:56 UTC (rev 3211)
@@ -192,12 +192,56 @@
onReceived(cdr);
- m_buffer->write(cdr);
+ BufferStatus::Enum ret = m_buffer->write(cdr);
-
+ convertReturn(ret, cdr);
}
+ /*!
+ * @if jp
+ * @brief リターンコード変換
+ * @else
+ * @brief Return codes conversion
+ * @endif
+ */
+ void
+ InPortCorbaCdrUDPProvider::convertReturn(BufferStatus::Enum status,
+ cdrMemoryStream& data)
+ {
+ switch (status)
+ {
+ case BufferStatus::BUFFER_OK:
+ onBufferWrite(data);
+ break;
+ case BufferStatus::BUFFER_ERROR:
+ onReceiverError(data);
+ break;
+
+ case BufferStatus::BUFFER_FULL:
+ onBufferFull(data);
+ onReceiverFull(data);
+ break;
+
+ case BufferStatus::BUFFER_EMPTY:
+ // never come here
+ break;
+
+ case BufferStatus::PRECONDITION_NOT_MET:
+ onReceiverError(data);
+ break;
+
+ case BufferStatus::TIMEOUT:
+ onBufferWriteTimeout(data);
+ onReceiverTimeout(data);
+ break;
+
+ }
+
+ onReceiverError(data);
+ }
+
+
}; // namespace RTC
Modified: trunk/OpenRTM-aist/src/lib/rtm/InPortCorbaCdrUDPProvider.h
===================================================================
--- trunk/OpenRTM-aist/src/lib/rtm/InPortCorbaCdrUDPProvider.h 2018-01-28 13:19:34 UTC (rev 3210)
+++ trunk/OpenRTM-aist/src/lib/rtm/InPortCorbaCdrUDPProvider.h 2018-01-28 13:40:56 UTC (rev 3211)
@@ -367,6 +367,15 @@
}
private:
+ /*!
+ * @if jp
+ * @brief リターンコード変換
+ * @else
+ * @brief Return codes conversion
+ * @endif
+ */
+ void convertReturn(BufferStatus::Enum status, cdrMemoryStream& data);
+
CdrBufferBase* m_buffer;
::OpenRTM::InPortCdrUDP_var m_objref;
ConnectorListeners* m_listeners;
More information about the openrtm-commit
mailing list