--- nono/host/hostcom.cpp 2026/04/29 17:05:34 1.1.1.5 +++ nono/host/hostcom.cpp 2026/04/29 17:05:39 1.1.1.6 @@ -12,14 +12,12 @@ // // VM thread : Host thread // -// 各シリアルデバイス::Tx() : -// | -// SerialDevice::Tx() : +// 各デバイス::Tx() : // | // HostCOMDevice::Tx() : HostDevice::ThreadRun // | -// +-------------->| queue |----+ -// +-------------->| pipe |----+ +// +-------------->| queue |----+ … 送信キューに追加し +// +-------------->| pipe |----+ … パイプでホストスレッドに通知 // | | // <-+ : v // --- kevent @@ -43,12 +41,17 @@ // : | // HostCOMDevice::Read() // | -// +---------------| queue |<---+ -// +---------------| event |<---+ +// | queue |<---+ … 受信キューに追加 +// ‖ +// ‖ HostCOMDevice::*(rx_func)() +// | +// +-------------| Message |<---+ … メッセージで VM スレッドに通知 // v -// SerialDevice::Callback() -// | -// 各シリアルデバイス::Rx() +// 各デバイス::RxMessage() ‖ … メッセージコールバック +// | ‖ +// 各デバイス::Rx() ‖ … イベントコールバック +// | ‖ +// HostCOMDevice::Rx() <==++ … ここで queue から読み出す // ログ名 // MPSCC HostDevice COMDriver @@ -113,11 +116,11 @@ HostCOMDevice::SetLogLevel(int loglevel_ } } -// 初期化 +// 動的コンストラクションその2 bool -HostCOMDevice::Init() +HostCOMDevice::Create2() { - if (inherited::Init() == false) { + if (inherited::Create2() == false) { return false; }