Skip to content

SW_DevMCP

Rolf Obrecht edited this page Dec 15, 2022 · 9 revisions

Device Module "MCP"

Module Information

System

System Comments
RPi OK
PC Linux OK
PC Windows OK
Mac OK

Dependencies

Python
Module
Install Anaconda
- ? ?

Command Line Arguments

none

Config File Parameter

none

Description

The "MCP" Module (= Main Control Program? ) builds the central control instance for all the other modules. All modules read and write from/to a shared buffer, and the main routine telex.py hands out the buffer contents to all enabled device modules in sequence. Each device module can/react on the contents of the buffer which may hold text or commands, and finally write its results back to the buffer for further recognition/processing by the other modules (and MCP).

MCP contains the central "heartbeat" of the system, it monitors the different states of piTelex, issues commands to the other modules depending on the actual state, reads result codes from the modules and updates the current state of the system.

Main status codes

Code Name Description
ZZ Sleeping StandBy, Teleprinter off, waiting for action
Z Offline Teleprinter may be on (depending on module)
WB Dialing
"WählBereit"
1. Ready to dial
A ActiveInit Connection established, printer start command sent
AA ActiveReady Connection established, printer ready

Issuing commands

Commands are identified by a preceeding <ESC>, therefore issuing <ESC>-A<Enter> e.g. in the screen module will switch the teleprinter on and will output someting like <MCP:TP1><piT:AA>.

These are messages from different modules. To the left of the colon is the abbreviated module identifier, to the right the output of the module. In the above example MCP reacts to our A command by giving the command to switch in the teleprinter; after execution of the 'printer on' command the RPiTTY module sends message AA (printer ready).

Hint: For debbuging purposes you can use most of these codes as commands (i.e. embedded in <ESC> and <Enter>) to force the system into a specific state. But keep in mind that this might lead to an uncertain overall behaviour, because normal state transition conditions are neglected and overridden. For more commands see Screen Module

Available Module Identifiers

Module ID
txBase ???
Archive Arc
CH340TTY chT
ED1000SC edS
Eliza Eza
IRC IRC
ITelexClient iTc
ITelexSrv iTs
Log Log
MCP MCP
News Nws
REST Rst
RPiCtrl piC
RPiTTY piT
Screen Scn
ShellCmd ShC
Terminal Trm
Twitter Twt
TwitterV2 TwtV2

Implementation

TODO

Clone this wiki locally