/** * @brief 状態遷移処理スレッド * @param[in] void * @return void */ void ThreadFunction() { string txtBox2Text = string.Empty; string eventStr = string.Empty; while (true) { // EventQueue待ち eventStr = myEvQ.GetEvent(); // Logger(textBox2)へ情報出力 txtBox2Text = "CurrentState = " + currentStateCls.getStateName() + "\tRecvEvent = " + eventStr + "\n"; AddTextBox2(txtBox2Text); // Event処理 if (string.Compare(eventStr, "BTN1_EVENT") == 0) { currentStateCls.btn1EventProc(this); } else if (string.Compare(eventStr, "BTN2_EVENT") == 0) { currentStateCls.btn2EventProc(this); } else if (string.Compare(eventStr, "TOUT_EVENT") == 0) { currentStateCls.ToutEventProc(this); } else if (string.Compare(eventStr, "ABT_EVENT") == 0) { currentStateCls.AbtEventProc(this); } else if (string.Compare(eventStr, "END_EVENT") == 0) { currentStateCls.EndEventProc(this); break; // スレッド終了 } else { ;// none } } }