Module Automata :: Class CAutomaton :: Class __CEvent
[hide private]
[frames] | no frames]

Class __CEvent
source code

object --+
         |
        __CEvent

A class to implement an event object.

This class is privately declared inside the CAutomaton class. Every instance will then be created by the CAutomaton public methods (see the CAutomaton.addEvent method).

Instance Methods [hide private]
  __init__(self, automaton, id, name, comment, controllable)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
  getId(self)
  setId(self, id)
Set the ID of the Event.
  getName(self)
  setName(self, name)
Set the name of the Event.
  getComment(self)
  setComment(self, comment)
Set a comment for the Event.
  setControllable(self, controllable)
Set the controllable flag of the event.
  setPriorityList(self, events)
Add one ore more event for which the current one has top priority.
  getPriorityList(self)
Returns a copy of the list of prioritized events.
  isSubdued(self, event)
Returns True if the specified event has less priority than the current one (than it is Subdued).
  isControllable(self)
Returns a flag which states if the current Event is controllable or not.

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__


Class Variables [hide private]

Inherited from object: __class__


Properties [hide private]
id  
name  
comment  
controllable  

Method Details [hide private]

__init__(self, automaton, id, name, comment, controllable)
(Constructor)

source code 
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
Overrides: object.__init__
(inherited documentation)

getId(self)

source code 
Returns:
The ID of the Event

setId(self, id)

source code 
Set the ID of the Event.
Parameters:
  • id (integer) - the ID of the event (univocal key)
Returns:
void

getName(self)

source code 
Returns:
The Name of the Event

setName(self, name)

source code 
Set the name of the Event.
Parameters:
  • name (string) - the name of the Event
Returns:
void

getComment(self)

source code 
Returns:
The comment associated to the Event

setComment(self, comment)

source code 
Set a comment for the Event.
Parameters:
  • comment (string) - a description of the Event
Returns:
void

setControllable(self, controllable)

source code 
Set the controllable flag of the event. A True value means that the event is controllable, a False value that it is not controllable.
Parameters:
  • controllable (boolean) - a flag which determines if the Event is controllable or not
Returns:
void

setPriorityList(self, events)

source code 

Add one ore more event for which the current one has top priority.

The priorities over events are used when an automaton which represents a Supervisor is processed in order to carry out a deterministic Controller (see the CAutomaton.toDeterministicController method)
Parameters:
  • events (string) - a list of the names of the less priority events
Returns:
True if the list has been properly added, False if some error has occurred (mostly one of the specified event name is not a valid one for the current automaton)

getPriorityList(self)

source code 
Returns a copy of the list of prioritized events. See the setPriorityList method for further information.
Returns:
A copy of the list of prioritized events names

isSubdued(self, event)

source code 

Returns True if the specified event has less priority than the current one (than it is Subdued).

The method looks for if the specified event is in the Priority List of the current event or in the Priority List of one of its subdueds.
Parameters:
  • event (string) - the name of the event to check
Returns:
True if the event is subdued, False otherwise

isControllable(self)

source code 
Returns a flag which states if the current Event is controllable or not.
Returns:
True if the Event is controllable, False otherwise

Property Details [hide private]

id

Get Method:
Automata.CAutomaton.__CEvent.getId(self)
Set Method:
Automata.CAutomaton.__CEvent.setId(self, id) - Set the ID of the Event.
Delete Method:
None

name

Get Method:
Automata.CAutomaton.__CEvent.getName(self)
Set Method:
Automata.CAutomaton.__CEvent.setName(self, name) - Set the name of the Event.
Delete Method:
None

comment

Get Method:
Automata.CAutomaton.__CEvent.getComment(self)
Set Method:
Automata.CAutomaton.__CEvent.setComment(self, comment) - Set a comment for the Event.
Delete Method:
None

controllable

Get Method:
Automata.CAutomaton.__CEvent.isControllable(self) - Returns a flag which states if the current Event is controllable or not.
Set Method:
Automata.CAutomaton.__CEvent.setControllable(self, controllable) - Set the controllable flag of the event.
Delete Method:
None