18#ifndef RTC_EVENTINPORT_H
19#define RTC_EVENTINPORT_H
43 template <
class FSM,
class TOP,
class R>
47 USE_CONNLISTENER_STATUS;
50 const char* event_name,
58 ByteData& ,
const std::string& )
override
82 template <
class FSM,
class TOP,
class R,
class P0>
86 USE_CONNLISTENER_STATUS;
89 const char* event_name,
90 R (TOP::*handler)(P0),
107 void run(P0& data)
override
121 USE_CONNLISTENER_STATUS;
129 coil::Properties prop;
130 prop[
"write.full_policy"] =
"do_nothing";
131 prop[
"read.empty_policy"] =
"do_nothing";
134 coil::Properties prop_(info.
properties.getNode(
"dataport.buffer"));
135 prop_ << info.
properties.getNode(
"inport.buffer");
193 template <
class FsmType>
224 m_name(
name), m_fsm(fsm), m_buffer(fsm.getBuffer())
266 return m_name.c_str();
269 void init(coil::Properties& prop)
override
277 template <
class TOP,
class R,
class P0>
279 R (TOP::*handler)(P0))
285 template <
typename TOP,
class R>
293 bool read(std::string =
"")
override {
return true; }
307 template <
class FsmType>
RTC::Port implementation for InPort
InPortConnector base class
Static FSM framework based on Macho
BufferBase 抽象クラス
Definition BufferBase.h:106
virtual void init(const coil::Properties &prop)=0
バッファの設定
シリアライズ後のバイト列を操作するクラス
Definition ByteData.h:30
ConnectorDataListenerT クラス
Definition ConnectorListener.h:515
ConnectorDataListener クラス
Definition ConnectorListener.h:408
ConnectorInfo クラス
Definition ConnectorBase.h:50
coil::Properties properties
プロパティ
Definition ConnectorBase.h:178
std::string name
接続名前
Definition ConnectorBase.h:154
@ NO_CHANGE
Definition ConnectorListener.h:71
ConnectorListener クラス
Definition ConnectorListener.h:884
Definition EventBase.h:49
Definition EventBase.h:66
Definition EventBase.h:41
Definition EventPort.h:46
EventBinder0(FSM &fsm, const char *event_name, R(TOP::*handler)(), RingBuffer< EventBase * > &buffer)
Definition EventPort.h:49
std::string m_eventName
Definition EventPort.h:76
ReturnCode operator()(ConnectorInfo &info, ByteData &, const std::string &) override
仮想コールバックメソッド
Definition EventPort.h:57
~EventBinder0() override=default
R(TOP::* m_handler)()
Definition EventPort.h:77
RingBuffer< EventBase * > & m_buffer
Definition EventPort.h:78
void run() override
Definition EventPort.h:69
FSM & m_fsm
Definition EventPort.h:75
Definition EventPort.h:85
~EventBinder1() override=default
ReturnCode operator()(ConnectorInfo &info, P0 &data) override
仮想コールバックメソッド
Definition EventPort.h:96
R(TOP::* m_handler)(P0)
Definition EventPort.h:114
EventBinder1(FSM &fsm, const char *event_name, R(TOP::*handler)(P0), RingBuffer< EventBase * > &buffer)
Definition EventPort.h:88
RingBuffer< EventBase * > & m_buffer
Definition EventPort.h:115
std::string m_eventName
Definition EventPort.h:113
FSM & m_fsm
Definition EventPort.h:112
void run(P0 &data) override
Definition EventPort.h:107
Definition EventBase.h:26
Definition EventBase.h:33
Definition EventPort.h:120
ReturnCode operator()(ConnectorInfo &info) override
仮想コールバックメソッド
Definition EventPort.h:127
RingBuffer< EventBase * > & m_buffer
Definition EventPort.h:142
CdrBufferBase * m_thebuffer
Definition EventPort.h:143
EventConnListener(RingBuffer< EventBase * > &buffer, CdrBufferBase *m_thebuffer)
Definition EventPort.h:123
~EventConnListener() override=default
EventInPort テンプレートクラス
Definition EventPort.h:196
virtual const char * name()
ポート名称を取得する。
Definition EventPort.h:264
bool read(std::string="") override
RTObject_impl::readAll()から呼ばれる仮想関数
Definition EventPort.h:293
void init(coil::Properties &prop) override
プロパティの初期化
Definition EventPort.h:269
void bindEvent(const char *name, R(TOP::*handler)())
Definition EventPort.h:286
void bindEvent(const char *name, R(TOP::*handler)(P0))
Definition EventPort.h:278
EventInPort(const char *name, FsmType &fsm)
コンストラクタ
Definition EventPort.h:222
~EventInPort() override
デストラクタ
InPort 用 Port
Definition InPortBase.h:70
virtual void init(coil::Properties &prop)
プロパティの初期化
void addConnectorListener(ConnectorListenerType type, ConnectorListener *listener, bool autoclean=true)
ConnectorListener リスナを追加する
CdrBufferBase * m_thebuffer
バッファ
Definition InPortBase.h:860
void addConnectorDataListener(ConnectorDataListenerType type, ConnectorDataListener *listener, bool autoclean=true)
ConnectorDataListener リスナを追加する
リングバッファ実装クラス
Definition RingBuffer.h:90
IEvent< TOP > * Event(R(TOP::*handler)(P1, P2, P3, P4, P5, P6), const P1 &p1, const P2 &p2, const P3 &p3, const P4 &p4, const P5 &p5, const P6 &p6)
Definition Macho.h:1042