
The UpdateNewCANMessage is a callback function defined in the ICANMonitorClient interface. This method is being called when new data frames arrive (that works) but then I want to notify the state machine to proceed to its next state effectively by sending an EvNewFrame event but nothing happens.
I tried this->post_event( EvNewFrame() ); // no effect and this->post_event( boost::intrusive_ptr<EvNewFrame>( new EvNewFrame( ) ) ); // no effect
First of all, before calling post_event, you can try and print-out current states info (see StateChart tutorial). Besides, you can step into post_event in order to see what happens to that event. Just one little doubt: don't you try to post_event asynchronously to a regular state_machine? I.e. isn't UpdateNewCANMessage called from another thread? If so, it's not safe, as you can't be sure what exactly happens to the state_machine in that moment.