OpenRTM-aist  2.1.0
DataPortStatus.h
[詳解]
1 // -*- C++ -*-
20 #ifndef RTC_DATAPORTSTATUS_H
21 #define RTC_DATAPORTSTATUS_H
22 
23 #include <vector>
24 
25 namespace RTC
26 {
113  enum class DataPortStatus : uint8_t
114  {
115  PORT_OK = 0,
116  PORT_ERROR,
117  BUFFER_ERROR,
118  BUFFER_FULL,
119  BUFFER_EMPTY,
121  SEND_FULL,
122  SEND_TIMEOUT,
123  RECV_EMPTY,
124  RECV_TIMEOUT,
125  INVALID_ARGS,
129  };
130 
154  inline const char* toString(DataPortStatus status)
155  {
156  static char const* const data_port_status[] = {
157  "PORT_OK",
158  "PORT_ERROR",
159  "BUFFER_ERROR",
160  "BUFFER_FULL",
161  "BUFFER_EMPTY",
162  "BUFFER_TIMEOUT",
163  "SEND_FULL",
164  "SEND_TIMEOUT",
165  "RECV_EMPTY",
166  "RECV_TIMEOUT",
167  "INVALID_ARGS",
168  "PRECONDITION_NOT_MET",
169  "CONNECTION_LOST",
170  "UNKNOWN_ERROR"
171  };
172  return data_port_status[static_cast<std::size_t>(status)];
173  }
174 
175  using DataPortStatusList = std::vector<DataPortStatus>;
176 
177 } // namespace RTC
178 
179 #endif // RTC_DATAPORTSTATUS_H
RTコンポーネント
std::vector< DataPortStatus > DataPortStatusList
Definition: DataPortStatus.h:175
DataPortStatus
Definition: DataPortStatus.h:114
char const * toString(BufferStatus status)
BufferStatus リターンコードを文字列に変換
Definition: BufferStatus.h:90