Examples#
Everything on this page runs in CI on every change, so an example here is never one that
worked once. The programs are complete: each has a main, reads top to bottom, and runs
with nothing plugged in, since a simulator or a loopback stands in for the hardware.
A guide's example is a different thing: the same program in four languages, spliced into that guide from the test file that runs it, with the line that runs it and what it proves on the guide's own page. The guides are in the sidebar, grouped the way the capability map groups them.
Programs#
Each one is a complete program with a main, written to be read top to bottom and run with nothing plugged in. The line beside it runs it.
Program 1
batched_telemetryexamples/batched_telemetry.rsMetered-link encoding: pack a batch of readings into a fraction of the bytes.
cargo run -p pamoja-examples --example batched_telemetryProgram 2
brooder_nodeexamples/brooder_node.rsA poultry brooder, built from a shared profile and run through a cold night.
cargo run -p pamoja-examples --example brooder_nodeProgram 3
conformanceexamples/conformance.rsThe whole SDK in one run: a cold-chain node from sensor to gateway over loopback.
- Imports
pamoja-profile
cargo run -p pamoja-examples --example conformanceProgram 4
conformance_vectorsexamples/conformance_vectors.rsRegenerates the cross-language conformance vectors.
cargo run -p pamoja-examples --example conformance_vectorsProgram 5
degraded_linkexamples/degraded_link.rsOffline-first survives a flaky link: buffer, retry over a degraded link, lose nothing.
cargo run -p pamoja-examples --example degraded_linkProgram 6
device_profileexamples/device_profile.rsA device profile assembled into a ready-to-run cold-chain node, over loopback.
cargo run -p pamoja-examples --example device_profileProgram 7
gateway_fleetexamples/gateway_fleet.rsA site gateway carrying its nodes upstream, and drawing what it carried on a console.
cargo run -p pamoja-examples --example gateway_fleetProgram 8
lora_budgetexamples/lora_budget.rsLoRa airtime and duty cycle: what it costs to send a batch over a long-range link.
cargo run -p pamoja-examples --example lora_budgetProgram 9
mavlink_sitlexamples/mavlink_sitl.rsFly a mission on a MAVLink vehicle with no hardware.
- Imports
pamoja-corepamoja-mavlink
cargo run -p pamoja-examples --example mavlink_sitlProgram 10
robot_waypointexamples/robot_waypoint.rsDrive a rover safely, dead-reckon where it is, steer to a waypoint, and speak ROS 2.
- Imports
pamoja-kitpamoja-ros2
cargo run -p pamoja-examples --example robot_waypointProgram 11
signed_auditexamples/signed_audit.rsA tamper-evident cold-chain log: signed, hash-chained fridge readings.
cargo run -p pamoja-examples --example signed_auditProgram 12
signed_telemetryexamples/signed_telemetry.rsTamper-evident telemetry: a device signs each reading, a gateway verifies it.
cargo run -p pamoja-examples --example signed_telemetryProgram 13
signed_updateexamples/signed_update.rsUpdating a device in the field, including the update that goes wrong.
cargo run -p pamoja-examples --example signed_updateProgram 14
store_and_forwardexamples/store_and_forward.rsOffline-first store-and-forward, end to end, with no hardware and no broker.
cargo run -p pamoja-examples --example store_and_forwardProgram 15
telemetryexamples/telemetry.rsObservability that degrades gracefully on a metered link.
- Imports
pamoja-codecpamoja-telemetry
cargo run -p pamoja-examples --example telemetryCommunity programs#
Programs people have shared, held to the same bar: complete, run in CI with nothing plugged in, and credited in the file. The community page says how to add one.
None yet. The first one is yours to add.