Skip to main content

The machine operator package runs state machines based on the below meta-model:

StateMachine:
    'events'
        events+=Event
    'end'

    'commands'
        commands+=Command
    'end'

    ('commandgroups'
        commandGroupBlocks+=CommandGroupBlock        
    'end')? 

    states+=State
;

Keyword:
    'end' | 'events' | 'state' | 'actions' | 'commandgroups' | 'group' | 'groupend'
;

Event:
    name=SMID code=ID
;

Command:
    name=SMID code=ID
;

CommandGroupBlock:
    'group' name=SMID
        groupCommands+=[Command|SMID]       
    'groupend'
;

GroupOrCommand: Command | CommandGroupBlock;

State:
    'state' name=ID
        ('actions' '{' actions+=[GroupOrCommand | SMID] '}')?
        (transitions+=Transition)?
    'end'
;

Transition:
    event=[Event|SMID] '=>' to_state=[State]
;

SMID:
    !Keyword ID
;

Comment:
    /\/\*(.|\n)*?\*\//
;

The package will run a basic microwave oven as the default state machine. The default microwave oven has only 2 functionalities: baking and cleaning. This is a very legacy oven, because of which the cleaning is not timer controlled. You have to manually turn off the cleaning.

To run the oven as a state machine, execute the command machineop. If you want to execute a different state machine other than the default one, you can pass the path to the state machine file (with .pymo extension) to the package via the -m flag.

machineop -m <PATH-TO_CUSTOM_STATE_MACHINE>

To define a custom interpreter to the state machine model, you can pass the python interpreter using the -i flag.

machineop -i <PATH-TO_CUSTOM_INTERPRETER>

If you want to get even more creative, you can specify your custom meta-model as well using the -t flag.

machineop -t <PATH-TO_CUSTOM_META_MODEL>

Connecting all together, you can have your own completely customized textx setup using your own custom meta-model, model and interpreter.

machineop -m <PATH-TO_CUSTOM_STATE_MACHINE> -i <PATH-TO_CUSTOM_INTERPRETER> -t <PATH-TO_CUSTOM_META_MODEL>

Metadata

Release files for machineop 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for machineop 0.1.0
File Size Uploaded Provenance Actions
machineop-0.1.0.tar.gz 4.1 kB Without provenance Details for machineop-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for machineop 0.1.0
File Interpreter ABI Platform Actions
machineop-0.1.0-py3-none-any.whl Python 3 none any Details for machineop-0.1.0-py3-none-any.whl

Total release size: 9.0 kB

Release files / machineop-0.1.0.tar.gz

Download URL machineop-0.1.0.tar.gz
Size 4.1 kB
Tags Source
SHA-256 checksum
How to use checksums
18caacd4a252b80d64ac8321c1430c58df895337eba9091ec6d94349ed89014d
BLAKE2b-256 checksum
How to use checksums
26534bb50878c0cde1f38ac8e8774ecbe6ea904d4aa2340c767e615d8feedd9b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.8.13

Release files / machineop-0.1.0-py3-none-any.whl

Download URL machineop-0.1.0-py3-none-any.whl
Size 4.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d8a294cb2cc0752831e20f0245994917504bcfef09cb52cb39d1510558182c55
BLAKE2b-256 checksum
How to use checksums
a731e7222d9a5402e6ac8ab20ea2041244fee49566a1ceef8337be6872586855
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.8.13

Security for machineop 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page