OpenRTM
1.0.0
Main Page
Namespaces
Classes
Files
File List
File Members
tmp
buildd
ros-hydro-openrtm-aist-1.1.0-13raring-20150213-1342
src
lib
rtm
OutPortConnector.h
Go to the documentation of this file.
1
// -*- C++ -*-
20
#ifndef RTC_OUTPORTCONNECTOR_H
21
#define RTC_OUTPORTCONNECTOR_H
22
23
#include <
rtm/SystemLogger.h
>
24
#include <
rtm/ConnectorBase.h
>
25
26
namespace
RTC
27
{
48
class
OutPortConnector
49
:
public
ConnectorBase
50
{
51
public
:
52
DATAPORTSTATUS_ENUM
53
61
OutPortConnector
(
ConnectorInfo
& info);
62
70
virtual
~OutPortConnector
();
84
const
ConnectorInfo
&
profile
();
85
99
const
char
*
id
();
100
114
const
char
*
name
();
115
129
virtual
ReturnCode
disconnect
() = 0;
130
144
virtual
CdrBufferBase
*
getBuffer
() = 0;
145
159
virtual
ReturnCode
write
(
const
cdrMemoryStream& data) = 0;
160
174
virtual
void
setEndian
(
const
bool
endian_type);
175
193
virtual
bool
isLittleEndian
();
194
208
template
<
class
DataType>
209
ReturnCode
write
(
const
DataType& data)
210
{
211
m_cdr
.rewindPtrs();
212
RTC_TRACE
((
"connector endian: %s"
,
isLittleEndian
() ?
"little"
:
"big"
));
213
m_cdr
.setByteSwapFlag(
isLittleEndian
());
214
data >>=
m_cdr
;
215
return
write
(
m_cdr
);
216
}
217
218
protected
:
226
Logger
rtclog
;
234
ConnectorInfo
m_profile
;
242
bool
m_littleEndian
;
250
cdrMemoryStream
m_cdr
;
251
252
};
253
};
// namespace RTC
254
255
#endif // RTC_CONNECTORBASE_H
Generated on Fri Feb 13 2015 13:50:45 for OpenRTM by
1.8.3.1