DiaDes
0.1
DIAgnosis of Discrete-Event System
|
A control pattern is a mapping between the set of Events of a StateMachine and a Boolean. More...
#include <ControlPattern.hh>
Public Types | |
using | Event = typename Fsm::EventPropertyId |
using | Events = std::unordered_set< Event > |
using | EventIterator = typename Events::const_iterator |
Public Member Functions | |
ControlPattern (const Fsm &fsm) | |
Default constructor (every event is enabled) More... | |
bool | enabled (const Event &e) const |
Check whether the event is currently enabled. More... | |
bool | disabled (const Event &e) const |
Check whether the event is currently disabled. More... | |
bool | unknown (const Event &e) const |
Check whether the event is currently unknown. More... | |
bool | enable (const Event &e) |
Enable an event of the StateMachine. More... | |
bool | disable (const Event &e) |
Disable an event of the StateMachine. More... | |
EventIterator | enabledEventBegin () const |
start iterator over the range of enabled events More... | |
EventIterator | enabledEventEnd () const |
end iterator over the range of enabled events More... | |
EventIterator | disabledEventBegin () const |
start iterator over the range of disabled events More... | |
EventIterator | disabledEventEnd () const |
end iterator over the range of disabled events More... | |
Private Attributes | |
const Fsm & | _fsm |
Events | _enabled |
Events | _disabled |
A control pattern is a mapping between the set of Events of a StateMachine and a Boolean.
This data structure is exactly the one that is defined in the Ramadge and Wonham paper: "Supervisory Control of a Class of Discrete Event Processes, SIAM Journal on Control and Optimization, 1987" An Event might be enabled or disabled. If an Event is enabled in a state of the machine, it means that a controller allows for the trigger of it in the State. If an Event is disabled in that state, it means that a controller does allow the StateMachine to trigger the Event in that state. In Ramadge and Wonham's paper, there are notions of controllable ans uncontrollable events. And only controllable events can be disabled (uncontrollable events cannot be disabled). The notion of controllable/uncontrollable events is NOT managed in a ControlPattern. A ControlPattern only manages the set of enabled/disabled events (extended ControlPattern). Typically a ControlPattern is a element of the Gamma set in the RW's paper extended with the uncontrollable events.
Definition at line 37 of file ControlPattern.hh.
using Diades::Automata::Experimental::ControlPattern< Fsm >::Event = typename Fsm::EventPropertyId |
Definition at line 40 of file ControlPattern.hh.
using Diades::Automata::Experimental::ControlPattern< Fsm >::EventIterator = typename Events::const_iterator |
Definition at line 42 of file ControlPattern.hh.
using Diades::Automata::Experimental::ControlPattern< Fsm >::Events = std::unordered_set<Event> |
Definition at line 41 of file ControlPattern.hh.
|
inline |
Default constructor (every event is enabled)
[in] | fsm | the StateMachine associated with this new ControlPattern |
By default, any event type of the StateMachine is enabled
Definition at line 56 of file ControlPattern.hh.
|
inline |
Disable an event of the StateMachine.
Only accept events from the associated StateMachine
[in] | e | an Event of the StateMachine |
Definition at line 135 of file ControlPattern.hh.
References Diades::Automata::Experimental::ControlPattern< Fsm >::disabled().
Referenced by trimDdAutStates2().
|
inline |
Check whether the event is currently disabled.
[in] | e | Event of the StateMachine |
Definition at line 80 of file ControlPattern.hh.
Referenced by Diades::Automata::Experimental::ControlPattern< Fsm >::disable(), and Diades::Automata::Experimental::ControlPattern< Fsm >::unknown().
|
inline |
start iterator over the range of disabled events
Definition at line 170 of file ControlPattern.hh.
|
inline |
end iterator over the range of disabled events
Definition at line 178 of file ControlPattern.hh.
|
inline |
Enable an event of the StateMachine.
Only accept events from the associated StateMachine
[in] | e | an Event of the StateMachine |
Definition at line 110 of file ControlPattern.hh.
References Diades::Automata::Experimental::ControlPattern< Fsm >::enabled().
|
inline |
Check whether the event is currently enabled.
[in] | e | Event of the StateMachine |
Definition at line 68 of file ControlPattern.hh.
Referenced by Diades::Automata::Experimental::controlledTrimmingDeadlockState(), Diades::Automata::Experimental::ControlPattern< Fsm >::enable(), and Diades::Automata::Experimental::ControlPattern< Fsm >::unknown().
|
inline |
start iterator over the range of enabled events
Definition at line 154 of file ControlPattern.hh.
|
inline |
end iterator over the range of enabled events
Definition at line 162 of file ControlPattern.hh.
|
inline |
Check whether the event is currently unknown.
[in] | e | Event of the StateMachine |
Definition at line 94 of file ControlPattern.hh.
References Diades::Automata::Experimental::ControlPattern< Fsm >::disabled(), and Diades::Automata::Experimental::ControlPattern< Fsm >::enabled().
|
private |
Definition at line 47 of file ControlPattern.hh.
|
private |
Definition at line 46 of file ControlPattern.hh.
|
private |
Definition at line 45 of file ControlPattern.hh.