Skip to content
Mikayla edited this page Dec 17, 2025 · 6 revisions

Protected Peripheral Manager

This system operates as an protected abstraction layer to CompterCraft peripherals, including devices such as modems, monitors, and reactors. Peripheral access is protected using Lua's pcall to prevent exceptions from crashing the main application. Such exceptions/errors are treated as "faults" and are reported. Fault states can be checked using automatically generated functions returned as part of a wrapped peripheral.

Logging of reported faults is rate limited by error so that numerous calls don't fill up a log file quickly. Repeated errors are only re-reported every 20 occurrences.

The specific error message from the failed function call can be checked. Automatic fault clearing will clear fault information after a successful function call, or this can be disabled to keep fault occurrence information available until the fault is manually cleared.

The PPM provides a should_terminate() function that will report if any device had an exception caused by the computer receiving a Terminate interrupt (ctrl + T in the computer console usually).

Code for this system can be found within the file /scada-common/ppm.lua.

Virtual Devices

Virtual devices can be "mounted" as placeholder, which are utilized by the RTU Gateway application when it can't find devices that it was configured to use and by the Reactor PLC when no reactor was found on boot.

Arbitrary functions on both virtual and non-virtual devices can be called without raising exceptions as the __index metamethod has been set to handle and log these as a fault as well.

Homepage

  1. User Manual
    1. System Setup Guide
      1. Device Layout
        1. Coordinator Displays
      2. Connecting to Mekanism Machines
      3. Application Installation
        1. Space Requirements
        2. Installation
        3. Updating
        4. Uninstalling
      4. SCADA Network
        1. Network Channels
        2. Network Connectivity
      5. Setup & Configuration
        1. Supervisor Setup
        2. Coordinator Setup
        3. Reactor PLC Setup
        4. RTU Gateway Setup
      6. Initial Startup
    2. Configurator Tools
      1. Supervisor Configurator
      2. Coordinator Configurator
      3. Reactor PLC Configurator
      4. RTU Gateway Configurator
      5. Pocket Configurator
    3. Redstone Waste Setup Guide
    4. TL;DR Quickstart
    5. FAQ and Common Problems
    6. Colorblind Accessibility
    7. Annunciator Panels
    8. Alarms
    9. System Views
      1. Main View Screen
      2. Valve & Flow Screen
      3. Unit View Screens
    10. Operating Procedure
    11. Status Messages
    12. Glossary
  2. Computer Applications
    1. Reactor PLC
      1. Front Panel
      2. Non-Networked Mode
      3. RPS
      4. PLC Emergency Coolant
    2. RTU Gateway
      1. Front Panel
    3. Supervisory Computer
      1. Front Panel
    4. Coordinator Computer
      1. Front Panel
    5. Pocket
      1. Home and Navigation
      2. Connectivity
      3. Main Applications
      4. System Details and Testing
  3. Notable System Components
    1. Co-routine Threading
    2. Project File Layout/Overview
    3. PPM - Protected Peripherals Manager
    4. RSIO - Redstone I/O
    5. Utility Classes
    6. Networking
  4. Notes
    1. Known Issues
    2. Process Closed Loop Controller
    3. Project Files and Layout
    4. Alternative Installation Strategies
  5. Investigations
    1. Startup Rate High
    2. Reactor Temperature Calculation
  6. References & Resources
    1. CC: Tweaked Character Set
    2. Mekanism API Notes
    3. Design & Regulatory References
  7. Legacy
    1. coord.settings File
    2. config.lua Files
      1. Supervisor config.lua
      2. Coordinator config.lua
      3. Reactor PLC config.lua
      4. RTU Gateway config.lua

Clone this wiki locally