Glossary

action
Function to be executed when a machine receives an event.
create_gobj
Factory function to create gobj’s. See ginsfsm.gaplic.GAplic.create_gobj().
event

It’s a event-name or any object with a event_name attribute that feeds a simple-machine.

This is how gobj communicate with each other: using events.

event-filter
Function for filtering events being broadcasting.
event-list
List or tuple of all input-event’s event names used in the machine.
event-name
String defining the name of an event.
gaplic

An instance of ginsfsm.gaplic.GAplic class or derived.

It’s the root, the grandfather,

the container of all gobj’s‘ running in the same thread or subprocess.

gconfig-template

The gconfig-template is the argument to the ginsfsm.gconfig.GConfig class.

It’s a python dictionary.

The key is the parameter name, and the value is a list describing the parameter:

[type, default value, and description]

This is an example from ginsfsm.examples.ontimer:

ONTIMER_GCONFIG = {  # type, default_value, flag, validate_function, desc
    'seconds': [int, 2, 0, None, "Seconds to repeat the command."],
    'verbose': [int, 0, 0, None, "Increase output verbosity."],
    'command': [str, 'ls', 0, None, "Command to execute."],
}

See ginsfsm.gconfig for more details.

gobj
An instance of ginsfsm.gobj.GObj class or derived.
input-event
Events that a gobj receive from other gobj’s, or send to itself.
machine
Value of machine key of simple-machine that is another dictionary describing the machine ginsfsm.smachine.
named-gobj
A gobj with name. Several gobj could have the name.
next-state
Name of next state to set in a machine when it receives an event.
output-event
Events that are sent to another gobj’s.
principal
Any gobj created without parent.
simple-machine

The simple-machine is the argument to the ginsfsm.smachine.SMachine class.

It’s a simple implementation of an Finite State Machines (FSM) using a python dictionary with three keys.

This is an example from ginsfsm.examples.ontimer:

ONTIMER_FSM = {
    'event_list': ('EV_TIMEOUT',),
    'state_list': ('ST_STATE',),
    'machine': {
        'ST_STATE':
        (
            ('EV_TIMEOUT', ac_task, 'ST_STATE'),
        ),
    }
}

See ginsfsm.smachine for more details.

start_up
The pseudo “__init__” method of the GObj class. Method of ginsfsm.gobj.GObj class to be overried.
state
State name of a machine’s state. We don’t difference between state and state-name, as opposite as event/event-name, because there is no a visible state instance.
state-list
List of state names of the machine. No matter the order, but it is important the first state, because it is the default state when the machine starts.
unique-named-gobj
A gobj with a unique name. Only one gobj could have the name.
unnamed-gobj
A gobj without name.