10.1.15.12-06212024

Multi-format Support for NI/NIT

This section describes the rules for different intent-related functions when the multi-format parser is used.

Rules for NI Execution

When a parser having multiple formats is used in intent, the system will decide which parser format will be used by the following rules:
  • During intent execution, the system will try to use the format parser from left to right and stop this process if one format parser succeeds.
  • Before parsing data with a format parser, the system will try to qualify the text format by keywords. If it fails, the system will skip the format parser and move to the next format parser. For the rules of qualifying formats, see Logic to Qualify Format.
  • After a format parser has finished the parsing, the system will check the values of defined critical variables. If anyone critical variable is empty, the system will skip this and move to the next format parser.

Rule for Updating Intent Baseline

This section describes the new rules for updating the intent baseline before intent execution when a multi-format parser is used.

  • After retrieving command data, the obtained command data will be used to match all format parsers. After a parser format succeeds, the format will be set as primary format, and the obtained command data will be updated into the primary format and the intent baseline will be updated with this. The sample texts in other formats will not change.
  • If no parser format can be matched, the intent baseline of the current device command will not be updated.

Rules for Diagnosis Definition in NI Editor

Only the variables defined in the primary parser format will be available for intent diagnosis definition.

Rules for Intent Baseline in NI

The logic of intent baseline in NI will follow the rules below:

  • Only the sample text in the primary format will be used as intent baseline text. If you manually set another format as the primary format, the intent baseline also changes.
  • In NI Editor, if you retrieve data in a non-primary format, the variable values parsed by retrieving data will not be used to update the intent baseline.
  • For each format tab in the Command Diagnosis window, the following information is displayed in a floating tip message.

    • Name of the format.
    • Whether the sample texts in this format are used as intent baseline.
    • Whether critical variables are set for this format.
      InformationNote: As the NI Editor opens, the command texts are the sample texts from the primary format.
  • During the Duplicate Command Section or Switch Devices operations, all the parser formats that have been defined in the current/existing command section will be copied to the new command section. After this, the system will go through the process of matching format, set the new matched format as the primary format, and the intent baseline will be automatically updated by the new command sections in this primary format.

Rules for Copying Parser in NI Editor

Instead of defining a new parser from scratch for parsing variables in NI, you can copy a parser from the parser library or copy a verified parser in NI.

  • The sample texts and the parser patterns in all the parser formats are copied.
  • The sample texts of the current parser format will be reserved to overwrite the sample texts of in the primary format of the copied parser.
  • Other formats which are not the primary format of the copied parser will not be replaced.

After a parser is copied, you can continue to edit the line patterns in the parser.

Rules for NIT Decoding

In NIT decoding, the decode results will contain information about which parser format is qualified and matched with the device command, and then the recorded parser format will be used for intent replication.

Rules for Intent Replication

During intent replication, for each device command:

  • The qualified parser format recorded in the decode results will be set as the primary format. The current device command text in decode results will be used to update the sample text in this primary format.
  • Other parser formats in the seed device will be copied to the cloned intent, which means the cloned intent will use the sample text and the parser definition in the seed intent.

The logic of how to treat multiple parser formats in NIT replication also applies to intent replication via NIC.