Telecommunications Core
The core of the entire telecomms operation
This thing basically handles the main broadcasting of the data, as well as NTTC configs The relays dont do any actual processing, they are just objects which can bring tcomms to another zlevel
Vars | |
link_password | Password for linking stuff together |
---|---|
linked_relays | List of all linked relays |
nttc | The NTTC config for this device |
reachable_zlevels | List of all reachable devices |
ui_tab | What tab of the UI were currently on |
Procs | |
Destroy | Destructor for the core. |
Initialize | Initializer for the core. |
check_power_on | Power-on checker |
handle_message | Proc which takes in the message datum |
onTransitZ | Z-Level transit change helper |
refresh_zlevels | Proc to remake the list of available zlevels |
zlevel_reachable | Helper to see if a zlevel is reachable |
Var Details
link_password
Password for linking stuff together
linked_relays
List of all linked relays
nttc
The NTTC config for this device
reachable_zlevels
List of all reachable devices
ui_tab
What tab of the UI were currently on
Proc Details
Destroy
Destructor for the core.
Ensures that the machine is taken out of the global list when destroyed, and also unlinks all connected relays
Initialize
Initializer for the core.
Calls parent to ensure its added to the GLOB of tcomms machines, before generating a link password and adding itself to the list of reachable Zs.
check_power_on
Power-on checker
Checks the z-level to see if an existing core is already powered on, and deny this one turning on if there is one. Returns TRUE if it can power on, or FALSE if it cannot
handle_message
Proc which takes in the message datum
Some checks are ran on the signal, and NTTC is applied After that, it is broadcasted out to the required Z-levels
Arguments:
- tcm - The tcomms message datum
onTransitZ
Z-Level transit change helper
Handles parent call of disabling the machine if it changes Z-level, but also rebuilds the list of reachable levels
refresh_zlevels
Proc to remake the list of available zlevels
Loops through the list of connected relays and adds their zlevels in. This is called if a relay is added or removed
zlevel_reachable
Helper to see if a zlevel is reachable
This is a simple check to see if the input z-level is in the list of reachable ones Returns TRUE if it can, FALSE if it cant
Arguments:
- zlevel - The input z level to test