Boost logo

Boost :

From: Chris Knight (cknite_at_[hidden])
Date: 2008-08-05 18:12:42


After a little more thought, I believe I can explain what the semantics might be. The following is the state machine for the finance exchange protocol. You will notice the "selfSyncWait"
and "peerSyncWait" states. These states exist only to express the further restriction of matching events while protocol level message syncing is executed immediately following session
authentication.

Syntactic sugar to more cleanly express that sort of "synthetic" state would be nice. Instead of giving the states names, they would simply be expressed as anonymous sub-states
within the layout of the transition table.

    typedef boost::mpl::list25<
     transition<any, events::MessageRecv, disconnected, &Machine::handle_message_unexpected>,
     transition<any, events::SessionRejectRecv, disconnected, &Machine::handle_session_reject>,
     transition<any, events::SeqNumLow, disconnected, &Machine::handle_seqnum_low>,
     transition<any, events::SeqNumHigh, disconnected, &Machine::handle_seqnum_high>,
     transition<any, events::LogoutRecv, disconnected, &Machine::handle_logout_unexpected>,
     transition<any, events::LogoutSend, logoutSent, &Machine::handle_logout_initiate>,
     transition<any, events::TimeoutSend, disconnected, &Machine::handle_timeout_send>,
     transition<any, events::TimeoutRecv, disconnected, &Machine::handle_timeout_recv>,
     transition<any, events::ErrorRecv, disconnected, &Machine::handle_error_recv>,
     transition<any, events::ErrorSend, disconnected, &Machine::handle_error_send>,
     transition<any, events::ErrorHandle, disconnected, &Machine::handle_error_handle>,

     transition<active, events::MessageRecv, active, &Machine::handle_message_recv>,
     transition<active, events::MessageSend, active, &Machine::handle_message_send>,
     transition<active, events::SessionRejectRecv, active, &Machine::handle_session_reject>,
     transition<active, events::TimeoutSend, active, &Machine::handle_heartbeat_send>,
     transition<active, events::LogoutRecv, disconnecting, &Machine::handle_logout_accept>,

     transition<connected, events::LogonSend, logonSent, &Machine::handle_logon_initiate>,
     transition<accepted, events::LogonRecv, logonAckWait, &Machine::handle_logon_accept>,
     transition<logonSent, events::LogonRecv, peerSyncWait, &Machine::handle_logon_reply>,
     transition<logonAckWait, events::LogonAck, peerSyncWait, &Machine::handle_logon_ack>,
     transition<logonAckWait, events::LogonNack, disconnected, &Machine::handle_logon_nack>,
     transition<logoutSent, events::LogoutRecv, disconnected, &Machine::handle_logout_complete>,

     transition<peerSyncWait, events::MessageRecv, active, &Machine::handle_logon_peerSyncing>,
     transition<peerSyncWait, events::SeqNumHigh, selfSyncWait, &Machine::handle_seqnum_gap>,
     transition<selfSyncWait, events::MessageRecv, active, &Machine::handle_logon_selfSyncing>
>::type transition_table;

Chris


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk