Skip to content

What is libsig

libsig is the code. The product the project is aiming at is a lightweight IoT platform: the aim is that you build libsig onto your devices and run cloud instances that process the signal data those devices produce.

Today, a capsule is a unit of logic with named input and output terminals that runs inside a service in the host. It is the small unit a system is assembled from. The aim is that a capsule is a piece of code meant to run on a device or in the cloud; that placement is not built yet (see Roadmap).

The rest of this page separates that aim from what you can use today.

libsig is a C11 framework for POSIX platforms (Linux and macOS only). It provides:

  • capsules with named input and output terminals;
  • services, each with its own worker thread, that deliver signals between capsule instances;
  • projects: a directory of JSON files that defines capsule configurations and wires them into services;
  • sighost, a host program that loads a project and runs it;
  • a management API (a C interface and a REST transport over HTTP), a WebSocket signal feed, and a standalone web UI that edits a running project;
  • built-in capsules: counter, simulator, logger, filter, switch and state_change, plus weather, which needs the optional HTTP client.

Today capsules run in the host process you start on a POSIX machine. Running them on devices or in the cloud is planned: see the Roadmap.

  • Microcontroller targets, for example an Arduino reading a GPIO pin.
  • Secure channels between deployments over TCP, MQTT or ZMQ.
  • Cloud instances that subscribe to device data.

Nothing in the documentation describes these as available. They appear here and in the home page roadmap only.

Term Meaning
Capsule Compiled-in code with named input and output terminals and a table of properties it accepts.
Terminal A named input (with a handler) or output of a capsule. A signal emitted on an output terminal is delivered to the input terminals it is connected to.
Configuration A named, configured capsule, stored as configurations/<Name>.cfg.
Service A worker thread with a signal queue that owns a set of capsule instances and delivers signals between them. Stored as services/<name>.cfg.
Instance One configuration as used by one service, with its own state. This is what runs.
Project A directory of configuration and service files, loaded and wired together.

Architecture covers these in detail, including lifecycle, ownership and threading rules. Configuration describes the file formats.