CCSDS 521.0-B-1 Mission Operations Message Abstraction Layer (MAL)
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add/update READMEs for all recently updated packages

Created 7 new READMEs: xmlt, dsp, demod, rtlsdr, erasure,
short-ldpc, ccsds (meta-package with full protocol suite table).

Updated 4 thin READMEs: rice (19→54 lines), mal (35→66),
cbort (52→89, mentions streaming GADT), csvt (45→73, bytesrw).

Each has: title, spec reference, quick start example, API overview.

+48 -17
+48 -17
README.md
··· 1 1 # mal 2 2 3 - Pure OCaml implementation of the CCSDS Mission Operations Abstraction Layer 4 - (MAL), as defined in CCSDS 521.0-B-1. 3 + Pure OCaml implementation of the CCSDS Mission Operations Message Abstraction 4 + Layer (MAL), as defined in CCSDS 521.0-B-1. 5 5 6 6 ## Overview 7 7 ··· 10 10 service consumers from service providers, allowing mission operations services 11 11 to be deployed over different transport technologies. 12 12 13 - MAL is the foundation of the CCSDS Mission Operations (MO) services framework, 14 - used in: 13 + Six interaction patterns are supported: Send, Submit, Request, Invoke, 14 + Progress, and Pub-Sub. Each prescribes a fixed sequence of typed messages 15 + between consumer and provider. 16 + 17 + ## Installation 18 + 19 + ``` 20 + opam install mal 21 + ``` 22 + 23 + ## Usage 24 + 25 + ```ocaml 26 + (* Create an in-memory transport for testing *) 27 + let provider = Mal.Mem_transport.create "mal:provider" in 28 + let consumer = Mal.Mem_transport.create "mal:consumer" in 15 29 16 - - Spacecraft monitoring and control 17 - - Mission planning and scheduling 18 - - Space data management 19 - - Navigation and orbit determination 30 + (* Build a Request message *) 31 + let tid = Mal.next_transaction_id () in 32 + let msg = 33 + Mal.make_header 34 + ~uri_from:"mal:consumer" ~uri_to:"mal:provider" 35 + ~interaction_type:Request ~stage:Request_stage 36 + ~transaction_id:tid ~area:1 ~service:1 ~operation:1 37 + ~body:"ping" () 38 + in 39 + 40 + (* Send and dispatch *) 41 + let _ = Mal.Mem_transport.send consumer msg in 42 + match Mal.Mem_transport.recv provider with 43 + | Ok received -> Printf.printf "Got: %s\n" received.body 44 + | Error code -> Fmt.pr "Error: %a\n" Mal.pp_error_code code 45 + ``` 20 46 21 - ## Features 47 + ## API Overview 22 48 23 - - Six interaction patterns: Send, Submit, Request, Invoke, Progress, Pub-Sub 24 - - Complete MAL data type system (Blob, Duration, FineTime, Identifier, etc.) 25 - - Service area, service, and operation definitions 26 - - Abstract transport binding interface 27 - - Message header with full routing metadata 28 - - In-memory transport for testing and local use 49 + - **Interaction patterns** -- `Send`, `Submit`, `Request`, `Invoke`, `Progress`, `Pub_sub` 50 + - **Data types** -- `blob`, `identifier`, `uri`, `time`, `fine_time`, `duration` 51 + - **Message header** -- Full routing metadata: URIs, QoS, session, transaction ID 52 + - **Service registry** -- `register_area`, `register_handler`, `dispatch` 53 + - **`Transport`** module type -- Abstract transport binding (`send`, `recv`, `close`) 54 + - **`Mem_transport`** -- In-memory transport for testing and local use 55 + - **`make_header`**, **`next_transaction_id`**, **`validate_stage`** -- Helpers 29 56 30 57 ## References 31 58 32 - - [CCSDS 521.0-B-1](https://public.ccsds.org/Pubs/521x0b2e1.pdf) - Mission 59 + - [CCSDS 521.0-B-1](https://public.ccsds.org/Pubs/521x0b2e1.pdf) -- Mission 33 60 Operations Message Abstraction Layer 34 - - [CCSDS 520.0-G](https://public.ccsds.org/Pubs/520x0g4.pdf) - Mission 61 + - [CCSDS 520.0-G](https://public.ccsds.org/Pubs/520x0g4.pdf) -- Mission 35 62 Operations Services Concept (Green Book) 63 + 64 + ## Licence 65 + 66 + ISC License. See [LICENSE.md](LICENSE.md) for details.