pamoja

An SDK for IoT, robotics, and drones

pamojaRev 0.2.0MIT licensepamoja.molex.cloud

C# reference#

Every Pamoja package, generated by DocFX from this commit. Each row below opens a package's API pages, and the same capability in the other three languages is one step away.

The XML documentation ships in each package too, so an editor shows the same text inline. Each capability is its own package and namespace, so a using names the capability it uses, and the page for each namespace lists its types. Pamoja installs all of them.

Each package is hand-written C# over Pamoja.Native, the compiled engine and its P/Invoke contract (Pamoja.Native.Interop.NativeMethods, mirroring the generated C header one-to-one), which stays available for anything the facades do not cover.

Every package checks an argument before the engine reads it. A key, an identifier, or a signature must be its exact width, or the call throws ArgumentException. An enum argument must be one of its type's named values, or the call throws ArgumentOutOfRangeException: a C# enum can hold any number, such as (PowerMode)7, but the engine reads only the values it declares. Code that calls NativeMethods directly makes the same checks with FixedWidth.Require and NamedValue.Require.

By domain#

Six of the chapters hold more than one capability, and each is a package of its own on NuGet, Pamoja.<Domain>, which brings its capabilities in and re-exports each under its own name:

Every package#

One row per capability: the install line, the namespace and its reference, the guide with the worked example, and the same capability on the other three reference pages, one step away.

Engine#

Your own devicePamoja.Core

A sensor and an actuator pamoja has never heard of, written against the core traits, run against a rule, and published with nothing plugged in

dotnet add package Pamoja.Core
Engine surfacePamoja.Core

The transport every link shares (send, receive, subscribe, and a faulty wrapper for tests) and the runtime version

dotnet add package Pamoja.Core

Identity#

Device identityPamoja.Security

ed25519 device identity: sign a reading and verify it, so a gateway can prove it is authentic

dotnet add package Pamoja.Security

Codecs#

CodecsPamoja.Codec

CBOR, JSON, and raw codecs behind one trait, and batch packing for metered links: delta and varint for integers, and a quantizer for f32 readings

dotnet add package Pamoja.Codec

Helpers#

HelpersPamoja.Kit

Plain-language helper math: smoothing, calibration, PID and thermostat control, a trigger with hysteresis, trend and surge prediction, rolling windows, unit conversions, geo, and robot motion

dotnet add package Pamoja.Kit

Field I/O#

Serial framingPamoja.Serial

SLIP and COBS byte stuffing with streaming decoders, so a UART byte stream carries discrete packets

dotnet add package Pamoja.Serial
Modbus RTUPamoja.Modbus

Modbus RTU for RS485 field devices: a client that polls them over a serial port with the line's timing, simulated devices that answer as real ones do, and the frames with their CRC-16/MODBUS

dotnet add package Pamoja.Modbus
CAN and J1939Pamoja.Can

CAN 2.0 and CAN FD frames with 11- and 29-bit identifiers, J1939 decode and compose, and a node on a bus, simulated or a Linux interface through SocketCAN

dotnet add package Pamoja.Can
I2C, SPI, and GPIOPamoja.Gpio

I2C address frames with reserved-range checks, the four SPI clock modes, active-high or active-low switches and contacts, and GPIO lines opened on a Linux board

dotnet add package Pamoja.Gpio
BusesPamoja.Hal

The embedded-hal traits every driver takes, a bit-banged 1-Wire bus, simulated parts and scripted buses that stand in for hardware, the Linux backends over i2c-dev, spidev, and the GPIO character device, one I2C bus and one serial port a program and its drivers share, and delays that sleep or only count

dotnet add package Pamoja.Hal

Sensing and actuation#

Sensor driversPamoja.Sensors

Datasheet-anchored drivers for eleven parts, from every language: the BME280, BMP280, DS18B20, HDC1080, INA219, INA226, ADS1115, OPT3001, SCD4x, SHT3x, and TMP117

dotnet add package Pamoja.Sensors
Actuator driversPamoja.Actuators

A PCA9685 driver for servos, LEDs, and valves, and stepper drivers for four coil lines or a step and direction chip, in every language

dotnet add package Pamoja.Actuators

Radio and reach#

LoRa airtime and rangePamoja.Lora

Time-on-air, duty-cycle off-time, the regional channel plans a LoRa node must keep to, and the link budget that sets its range

dotnet add package Pamoja.Lora
LoRaWANPamoja.Lorawan

LoRaWAN 1.0.x MAC framing, AES-CMAC and AES encryption, and both halves of the OTAA join

dotnet add package Pamoja.Lorawan
LoRa radiosPamoja.Radios

The Semtech SX126x and SX127x LoRa radios and the SX1302 and SX1303 gateway concentrators: their commands, registers, and decoders, the amplifier setting a regional EIRP ceiling allows, a duty-cycle guard, and simulated chips that stand in for a module

dotnet add package Pamoja.Radios
LoRaWAN gatewaysPamoja.Gateway

What a LoRaWAN gateway speaks: the Semtech packet forwarder protocol and the Basics Station protocol on both sides, the network side of a single site, and a bridge from the radio to the link that leaves it

dotnet add package Pamoja.Gateway
Mesh framesPamoja.Mesh

Addressed, hop-limited, CRC-checked frames and duplicate suppression that floods a packet exactly once

dotnet add package Pamoja.Mesh
RoutingPamoja.Routing

Reverse-path routing that learns the cheapest route from overheard traffic

dotnet add package Pamoja.Routing

Trust and operation#

Audit logPamoja.Audit

A tamper-evident, hash-chained log; altering, reordering, or dropping a record breaks verification

dotnet add package Pamoja.Audit
Secured sessionPamoja.Session

X25519 key agreement, HKDF, and ChaCha20-Poly1305 with an anti-replay window, with no TLS stack

dotnet add package Pamoja.Session
Signed updatesPamoja.Update

Signed firmware manifests, streaming image verification, and A/B slots that fall back on their own

dotnet add package Pamoja.Update
PowerPamoja.Power

Duty cycling and an energy-aware governor that stretches work as the battery drains and holds its mode against a wandering charge

dotnet add package Pamoja.Power
TelemetryPamoja.Telemetry

Observability that ships only what is worth the bytes as link cost rises, while counting everything

dotnet add package Pamoja.Telemetry

Transports and testing#

MQTTPamoja.Mqtt

An MQTT client with the topic and wildcard rules, acknowledged delivery, retained messages, a last will, and TLS, as the core transport

dotnet add package Pamoja.Mqtt
CoAPPamoja.Coap

A CoAP client and the server it reports to, over UDP, with confirmable delivery and observe

dotnet add package Pamoja.Coap
LoopbackPamoja.Loopback

An in-process transport with topic matching, a fault injector, and outages on demand, for testing with no broker

dotnet add package Pamoja.Loopback
Store and forwardPamoja.Sync

Offline-first queues in memory or on disk, bounded or not, the on-disk one surviving power loss, and the drain that forwards them in order when a link returns

dotnet add package Pamoja.Sync
Transport ladderPamoja.Ladder

Cheapest reachable link first, buffering to a store when every link is down

dotnet add package Pamoja.Ladder
Event busPamoja.Bus

An in-memory typed publish and subscribe event bus, with publishers that never wait and subscribers that count what they miss

dotnet add package Pamoja.Bus
SimulatorsPamoja.Sim

Noisy and replay sensors, a recording actuator, a simulated robot that dead-reckons its pose, and a link that loses sends on a pattern

dotnet add package Pamoja.Sim

Profiles and robotics#

Device profilesPamoja.Profile

Named, ready-to-run device profiles from plain data or a JSON manifest, run as a node in every language

dotnet add package Pamoja.Profile
RulesPamoja.Profile

Rules between nodes as a file: a condition over one node's topic with hysteresis, and the actions that drive another node's actuator or publish, run by an engine off any link in every language, or judged reading by reading

dotnet add package Pamoja.Profile
Robot motionPamoja.Kit

Wheel speeds for differential, skid-steer, car-like, and mecanum chassis, a two-link arm and Denavit-Hartenberg forward kinematics, odometry, waypoint guidance, a safety gate, and servo, ESC, and encoder conversions

dotnet add package Pamoja.Kit
ROS 2 rulesPamoja.Ros2

ROS 2 names, RIHS01 type hashes, CDR encoding, and rmw_zenoh key assembly, with no ROS 2 installed

dotnet add package Pamoja.Ros2
Zenoh keysPamoja.Zenoh

Zenoh key expressions: validity, canonical form, matching, and whether two expressions share or cover keys

dotnet add package Pamoja.Zenoh

Edit this page on GitHub