From 61d4a1dc8d36db621b4948654d5757deee7c10ad Mon Sep 17 00:00:00 2001 From: Diogo Date: Thu, 26 Jun 2025 17:50:23 +0100 Subject: [PATCH] doc --- docs/ldm.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 docs/ldm.md diff --git a/docs/ldm.md b/docs/ldm.md new file mode 100644 index 0000000..dbc73c2 --- /dev/null +++ b/docs/ldm.md @@ -0,0 +1,29 @@ +# Dependencies +- IT2S-CONFIG +- IT2S-ASN +- IT2S-TENDER +- IT2S-ITSS-MANAGEMENT (Not a build dependency, but must be running in order to init itss_epv struct) +- ZMQ +- Unity (only for unit testing) + +# Service +5 service threads: +- main - listens to OER encoded LDM requests sent through ZMQ to the socket configured in etsi-its.toml +- maintenance - deletes expired data objects that are stored in the LDM. (area of maintenance is not implemented) +- publisher_tx - (pubsub related) sends OER encoded PublishDataobjects LDM reply messages through ZMQ to the pubsub socket configured in etsi-its.toml +- publisher_event - check if an event of a subscriber was triggered and generates the LDM reply message to be sent. +- publisher_periodic - Send periodic defined messages to the subscriber, has defined in its subscription. + + +If the endianess of the client and the LDM are different (should not be since they are in the same machine, but to keep in mind if in the future the LDM should be open to the network) the filter statement might behave differently than expected, if the reference value of said filter is an integer with size > 32 bits and is stored in an OCTET_STRING. Example: +``` +FilterStatement ::= { + attribute: 72 65 66 65 72 65 6E 63 65 54 69 6D 65 + operator: 0 (equal) + refValue: E8 03 00 00 00 00 00 00 +} +``` +Here this filter is to be applied to the timestamp of CPMs, and since the timestamp is a 64bit value, it is stored in as an OCTET STRING (following example in the unit tests). + + +In ordering, the implemented algo, quick sort, does not preserve order, so only the last tuple on the list will have the final and only order. this algo must be switched by another one that preserves order, like timsort or a more simple aproach with merge sort. The tuples in the list define the importance in ordering, from least important to most important.