#include <connectionHub.h>


Public Member Functions | |
| ConnectionHub (ConnectionDevice &a, ConnectionDevice &b) | |
| 接続済みオブジェクトを用いるコンストラクタ | |
| ConnectionHub (int port, const char *device, long baudrate) | |
| 接続待ちポート指定のコンストラクタ | |
| bool | update (void) |
| データの相互交換を行う | |
Protected Member Functions | |
| void | disconnect (void) |
| 接続を切断 | |
| bool | preUpdate (bool &ret_value) |
| 接続待ちの処理 | |
Protected Attributes | |
| ConnectionDevice * | port_a |
| ConnectionDevice * | port_b |
Definition at line 20 of file connectionHub.h.
| ConnectionHub::ConnectionHub | ( | ConnectionDevice & | a, | |
| ConnectionDevice & | b | |||
| ) |
接続済みオブジェクトを用いるコンストラクタ
| a | [i] 接続済み ConnectionDevice オブジェクト | |
| b | [i] 接続済み ConnectionDevice オブジェクト |
Definition at line 12 of file connectionHub.cpp.
| ConnectionHub::ConnectionHub | ( | int | port, | |
| const char * | device, | |||
| long | baudrate | |||
| ) |
接続待ちポート指定のコンストラクタ
接続が行われると、device, baudrate へのシリアル接続が行われる
| port | [i] 接続待ちポート | |
| device | [i] 接続デバイス | |
| baudrate | [i] 接続ボーレート |
Definition at line 17 of file connectionHub.cpp.
References TcpipServer::activate().
| bool ConnectionHub::preUpdate | ( | bool & | ret_value | ) | [protected] |
接続待ちの処理
| ret_value | [o] 戻り値が true のときに呼出し元に返すべき値 |
Definition at line 44 of file connectionHub.cpp.
References TcpipServer::accept(), ConnectionDevice::connect(), disconnect(), port_a, and port_b.
Referenced by update(), and RunCtrlHub::update().
| bool ConnectionHub::update | ( | void | ) |
データの相互交換を行う
| true | 切断前状態 | |
| false | 切断済み |
Reimplemented in RunCtrlHub.
Definition at line 69 of file connectionHub.cpp.
References disconnect(), ConnectionDevice::isConnected(), port_a, port_b, preUpdate(), ConnectionDevice::recv(), ConnectionDevice::send(), and ConnectionDevice::size().
ConnectionDevice* ConnectionHub::port_a [protected] |
TCP/IP 側の接続
Definition at line 29 of file connectionHub.h.
Referenced by disconnect(), preUpdate(), update(), and RunCtrlHub::update().
ConnectionDevice* ConnectionHub::port_b [protected] |
デバイス側の接続
Definition at line 30 of file connectionHub.h.
Referenced by disconnect(), preUpdate(), update(), and RunCtrlHub::update().
1.5.7.1