LibMISB/LibMISB Introduction/ Functionalities supported: Difference between revisions

From RidgeRun Developer Wiki
No edit summary
No edit summary
Line 2: Line 2:


<noinclude>
<noinclude>
{{LibMISB/Head|previous=LibMISB_Introduction/What_does_the_library_do|next=LibMISB/Getting Started|keywords=}}
{{LibMISB/Head|previous=LibMISB_Introduction/What_does_the_library_do|next=LibMISB_Introduction|keywords=}}
</noinclude>
</noinclude>



Revision as of 20:08, 20 June 2022




Previous: LibMISB_Introduction/What_does_the_library_do Index Next: LibMISB_Introduction





LibMISB/Getting_Started

General

The functionalities of the library, regardless of the standard used, are as follows

SetDebuggerLevel

Sets the level at which messages will be recorded. The modes, ordered from least to most verbose, are as follows:

  1. MISB_NONE
  2. MISB_ERROR
  3. MISB_WARN
  4. MISB_INFO
  5. MISB_DEBUG

SetFormatter

Sets the Formatter object to convert between format and metadata object. In other words, the user chooses which file format to use for both encoding and decoding actions.

  • Composition input format: For the input file to be encoded, it must follow the following structure (an example will be shown using the JSON format).
{ 
  "key": "<MISB KEY>",
  "items": [
    {
      "tag": "<TAG NUMBER>",
      "value": "<TAG VALUE>"
    }
  ]
}

Note: some tags are mandatories depending on the standard.

Encode

Performs the encoding of the metadata that was parsed by the Formatter. Encoding will depend on the MISB standard key found in the input file.

Decode

Performs decoding of the metadata found in a KLV byte packet. The decoding will depend on the MISB standard key found in the packet. Once decoded, it will return the data according to the configured format type.