DataPortStatus.h
Go to the documentation of this file.
1 // -*- C++ -*-
20 #ifndef RTC_DATAPORTSTATUS_H
21 #define RTC_DATAPORTSTATUS_H
22 
23 #include <vector>
24 
25 namespace RTC
26 {
55  {
56  public:
143  enum Enum
144  {
145  PORT_OK = 0,
159  };
160 
184  static const char* toString(DataPortStatus::Enum status)
185  {
186  const char* str[] = {
187  "PORT_OK",
188  "PORT_ERROR",
189  "BUFFER_ERROR",
190  "BUFFER_FULL",
191  "BUFFER_EMPTY",
192  "BUFFER_TIMEOUT",
193  "SEND_FULL",
194  "SEND_TIMEOUT",
195  "RECV_EMPTY",
196  "RECV_TIMEOUT",
197  "INVALID_ARGS",
198  "PRECONDITION_NOT_MET",
199  "CONNECTION_LOST",
200  "UNKNOWN_ERROR"
201  };
202  return str[status];
203  }
204  };
205 
206  typedef std::vector<DataPortStatus::Enum> DataPortStatusList;
207 
208 };
209 
233 #define DATAPORTSTATUS_ENUM \
234  typedef ::RTC::DataPortStatus::Enum ReturnCode; \
235  using ::RTC::DataPortStatus::PORT_OK; \
236  using ::RTC::DataPortStatus::PORT_ERROR; \
237  using ::RTC::DataPortStatus::BUFFER_FULL; \
238  using ::RTC::DataPortStatus::BUFFER_EMPTY; \
239  using ::RTC::DataPortStatus::BUFFER_TIMEOUT; \
240  using ::RTC::DataPortStatus::SEND_FULL; \
241  using ::RTC::DataPortStatus::SEND_TIMEOUT; \
242  using ::RTC::DataPortStatus::RECV_EMPTY; \
243  using ::RTC::DataPortStatus::RECV_TIMEOUT; \
244  using ::RTC::DataPortStatus::INVALID_ARGS; \
245  using ::RTC::DataPortStatus::PRECONDITION_NOT_MET; \
246  using ::RTC::DataPortStatus::CONNECTION_LOST; \
247  using ::RTC::DataPortStatus::UNKNOWN_ERROR;
248 
249 #endif // RTC_DATAPORTSTATUS_H
RT-Component.
std::vector< DataPortStatus::Enum > DataPortStatusList
DataPortStatus mixin class.
Enum
DataPortStatus return codes.
static const char * toString(DataPortStatus::Enum status)
Convert DataPortStatus into the string.


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