267
edits
No edit summary |
No edit summary |
||
Line 10: | Line 10: | ||
==== Set Debugger Level ==== | ==== Set Debugger Level ==== | ||
Sets the level at which messages will be | Sets the level at which messages will be logged. | ||
The method header is: | |||
<syntaxhighlight lang=C> | |||
/** | |||
* @brief Sets the level for which the messages will be logged | |||
* The orders from less to most verbose modes are: | |||
* MISB_NONE | |||
* MISB_ERROR | |||
* MISB_WARN | |||
* MISB_INFO | |||
* MISB_DEBUG | |||
* | |||
* @param level Level for messages to be logged | |||
*/ | |||
void SetDebuggerLever(LogLevel level); | |||
</syntaxhighlight> | |||
'''Example''': | |||
<syntaxhighlight lang=C> | |||
misb.SetDebuggerLever(MISB_DEBUG); | |||
</syntaxhighlight> | |||
==== Set Formatter ==== | ==== Set Formatter ==== | ||
Line 52: | Line 66: | ||
'''Example''': | '''Example''': | ||
<syntaxhighlight lang=C> | <syntaxhighlight lang=C> | ||
misb.SetFormatter(misb::formatter::JSON_FORMAT); | misb.SetFormatter(misb::formatter::JSON_FORMAT); | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Line 62: | Line 76: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
==== Encode ==== | ==== 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. | 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. | ||
The method header is: | |||
<syntaxhighlight lang=C> | |||
/** | |||
* @brief Receive string metadata that will convert to KLV | |||
* bytes in MISB | |||
* | |||
* @param data String metadata that is in the formatter format valid | |||
* @return std::vector<unsigned char> Return KLV bytes in MISB but if there is | |||
* any internal problem will return empty vector | |||
*/ | |||
std::vector<unsigned char> Encode(std::string data); | |||
</syntaxhighlight> | |||
==== Decode ==== | ==== 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. | 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. |
edits