defer codes
struct transition_table : mpl::vector<
// Start Event Next Action Guard
msmf::Row<Init, Event1, State1, PerformEvent1Action, ExecutionInformation>,
msmf::Row<State1, msmf::none, SubMsmSubToMaster::SubSm,
PerformNoneEventAction, ExecutionInformation>,
msmf::Row<State2, UeContextReleaseCommand, msmf::none, msmf::Defer, ExecutionInformation>,
msmf::Row<State2, Timeout, msmf::none, msmf::Defer, ExecutionInformation>,
//E1F1Exit
msmf::Row<E1F1Exit, msmf::none, HoCompletion, msmf::none, ExecutionInformation>,
//complete:
msmf::Row<HoCompletion, UeContextReleaseCommand, HoExit, msmf::none, ExecutionInformation>,
msmf::Row<HoCompletion, Timeout, HoExit, msmf::none, ExecutionInformation>,
msmf::Row<Working, Abort, msmf::none, msmf::none, ExecutionInformation>
>{};
void MsmDeferTest()
{
SubMsmTransferMasterMsm::Sm1 sm1;
sm1.start();
sm1.process_event(Event1{});
sm1.process_event(UeContextReleaseCommand{});
sm1.process_event(Timeout{});
sm1.process_event(Event1{});
sm1.process_event(Abort{});
return;
}
defer logs
SubSm::State1::on_entry()
received message: UeContextReleaseCommand .
sourceState is: SubMsmTransferMasterMsm::Sm1_::State2 .
targetState is: SubMsmTransferMasterMsm::Sm1_::State2 .
received message: Timeout .
sourceState is: SubMsmTransferMasterMsm::Sm1_::State2 .
targetState is: SubMsmTransferMasterMsm::Sm1_::State2 .
received message: Abort .
sourceState is: SubMsmSubToMaster::Sm1_::State1 .
targetState is: boost::msm::back::state_machine<SubMsmSubToMaster::Sm1_, boost::parameter::void_, boost::parameter::void_, boost::parameter::void_, boost::parameter::void_>::exit_pt<SubMsmSubToMaster::Sm1_::ExitState> .
SubSm::State1::on_exit()
PerformAbortAction
SubSm::ExitState::on_entry()
received message: Abort .
sourceState is: SubMsmTransferMasterMsm::Sm1_::Working .
targetState is: SubMsmTransferMasterMsm::Sm1_::Working .
received message: boost::msm::front::none .
sourceState is: boost::msm::back::state_machine<SubMsmSubToMaster::Sm1_, boost::parameter::void_, boost::parameter::void_, boost::parameter::void_, boost::parameter::void_> .
targetState is: SubMsmTransferMasterMsm::Sm1_::HoCompletion .
SubSm::ExitState::on_exit()
HoCompletion::on_entry()
received message: UeContextReleaseCommand .
sourceState is: SubMsmTransferMasterMsm::Sm1_::HoCompletion .
targetState is: SubMsmTransferMasterMsm::Sm1_::HoExit .
HoCompletion::on_exit()
HoExit::on_entry()
received message: UeContextReleaseCommand .
sourceState is: SubMsmTransferMasterMsm::Sm1_::State2 .
targetState is: SubMsmTransferMasterMsm::Sm1_::State2 .
received message: Timeout .
sourceState is: SubMsmTransferMasterMsm::Sm1_::State2 .
targetState is: SubMsmTransferMasterMsm::Sm1_::State2 .
网友评论