Personal Services: State Machine

Submitted by code_admin on Mon, 07/23/2018 - 11:26

State Sets
- Default State (used when Node is booted)

States
- Stable (Normal)
- Duration Based (Counter is reset every time machine enters the state then it swithes to next state)
- Time Based (States have an end time and follow on state)

Logs
State changes are logged in a table so we can see when a state changes.

Field Meanings

Stable:

Duration AND TIme:
FollowOnState: State to move to
m_UnstableExpireTime: Memory only - time at to stay in current state until

Duration:
Duration: Number of seconds to stay in state before moving to follow-on state.

Time:
Repetition Interval: Used to work out next unstable expire time. e.g. 1 Day, etc.

State Change process

Node A and Node B both have copies of linked states. When an unstable (time based) state change occurs both nodes reflect this change internally. When an externally actioned state change occurs then the Node receiving the action will transmit that action to all subscribed nodes.

Tags

RJM Article Type
Work Notes