Module Controller :: Class CMealyMachine
[hide private]
[frames] | no frames]

Class CMealyMachine
source code

object --+
         |
        CMealyMachine

A Class to create a Mealy machine Controller from a DFA Controller. The method CMealyMachine.getPLCCode exploits the Mealy machine in order to produce the PLC control program.

Instance Methods [hide private]
  __init__(self, controller)
Creates a Mealy machine Controller from a DFA Controller.
  __processState(self, s)
  __processInput(self, i)
  __processOutput(self, o)
  getMealyAutomaton(self)
Returns the Mealy machine represented as an Automaton.
  getPLCCode(self, filename)
Write the PLC control program in ST language to the specified filename.

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


Class Variables [hide private]

Inherited from object: __class__


Method Details [hide private]

__init__(self, controller)
(Constructor)

source code 

Creates a Mealy machine Controller from a DFA Controller.

This constructor builds automatically the Mealy machine.
Parameters:
  • controller (a Automata.CAutomaton instance) - The DFA Controller which has to be converted into a Mealy machine Controller
Returns:
void
Overrides: object.__init__

__processState(self, s)

source code 

__processInput(self, i)

source code 

__processOutput(self, o)

source code 

getMealyAutomaton(self)

source code 
Returns the Mealy machine represented as an Automaton.
Returns:
a Automata.CAutomaton instance

getPLCCode(self, filename)

source code 

Write the PLC control program in ST language to the specified filename.

The Mealy machine is processed in order to produce the code.
Parameters:
  • filename (string) - the output file path where to write the code
Returns:
void