26 #include <coil/TimeValue.h> 27 #include <coil/Time.h> 28 #include <coil/TimeMeasure.h> 59 template <
class DataType>
64 data.tm.sec = tm.
sec();
65 data.tm.nsec = tm.
usec() * 1000;
105 template <
class DataType>
134 #if defined(__GNUC__) && (__GNUC__ <= 3 && __GNUC_MINOR__ <= 3) 135 :
OutPortBase(name, ::CORBA_Util::toRepositoryIdOfStruct<DataType>()),
137 :
OutPortBase(name, ::CORBA_Util::toRepositoryId<DataType>()),
214 std::vector<const char *> disconnect_ids;
219 if (!(conn_size > 0)) {
return false; }
223 for (
size_t i(0), len(conn_size); i < len; ++i)
228 RTC_DEBUG((
"m_connectors.OnWriteConvert called"));
233 RTC_DEBUG((
"m_connectors.write called"));
237 if (ret ==
PORT_OK) {
continue; }
245 RTC_WARN((
"connection_lost id: %s",
id));
248 (*m_onConnectionLost)(prof);
250 disconnect_ids.push_back(
id);
496 #endif // RTC_OUTPORT_H
std::vector< OutPortConnector * > m_connectors
Connection list.
long int sec() const
Get value of second time scale.
OnWrite< DataType > * m_onWrite
Pointer to OnWrite callback functor.
void setOnWriteConvert(OnWriteConvert< DataType > *on_wconvert)
Set OnWriteConvert callback.
Data convert callback abstract class on write()
coil::Mutex m_connectorsMutex
virtual ~OutPort(void)
Destructor.
RTC::ReturnCode_t ret(RTC::Local::ReturnCode_t r)
DataPortStatusList getStatusList()
Getting specified connector's writing status list.
Enum
DataPortStatus return codes.
#define RTC_WARN(fmt)
Warning log output macro.
std::vector< DataPortStatus::Enum > DataPortStatusList
int gettimeofday(struct timeval *tv, struct timezone *tz)
Get the time and timezone.
virtual ReturnCode_t disconnect(const char *connector_id)
[CORBA interface] Disconnect the Port
#define RTC_DEBUG(fmt)
Debug level log output macro.
bool operator<<(DataType &value)
Write data.
coil::TimeMeasure m_cdrtime
Callback abstract class on write()
OutPortBase(const char *name, const char *data_type)
Constructor.
void setTimestamp(DataType &data)
Setting timestamp to data.
DataPortStatusList m_status
OnWriteConvert< DataType > * m_onWriteConvert
Pointer to OnWriteConvert callback functor.
DataPortStatus::Enum getStatus(int index)
Getting specified connector's writing status.
OutPort(const char *name, DataType &value)
Constructor.
virtual bool write(DataType &value)
Write data.
void setOnWrite(OnWrite< DataType > *on_write)
Set OnWrite callback.
ConnectionCallback * m_onConnectionLost
Callback functor objects.
long int usec() const
Get value of micro second time scale.
Enum
DataPortStatus return codes.
ConnectorProfile findConnProfile(const char *id)
Find ConnectorProfile with id.
Functor for_each(CorbaSequence &seq, Functor f)
Apply the functor to all CORBA sequence elements.
DataType & m_value
The reference to type-T variable that is bound.