Skip to content

Timer and thread support #60

Closed Answered by andrew-gresyk
andzsinszan asked this question in Q&A
Discussion options

You must be logged in to vote

My pleasure, glad you like it!

Timers

In general, HFSM2 and FFSM2 focus only on state transitions, and provide the tools for the user to implement the supporting infrastructure, be those timers or threads.

For examples of event handling please see:

It boils down to adding react(const TimerEvent&, FullControl&) method to the state, that's expected to handle it:

struct TimerEvent {}; // can be any type, even bool / char / int / etc.

struct ConcreteHandler
	: FSM::State
{
	// handle two event types - P…

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@andrew-gresyk
Comment options

@andzsinszan
Comment options

@andrew-gresyk
Comment options

@andzsinszan
Comment options

@andrew-gresyk
Comment options

Answer selected by andrew-gresyk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants