Black Knight

Chameleon





Chameleon is designed to be used as part of larger automated systems.

Specifically, Chameleon's command line interface gives developers the ability to run plug-ins from within their own programs. You'll notice the command line options do not provide the ability to select specific plug-ins, input files or custom properties. This is deliberate. It is intended that all three settings be provided to Chameleon via a Chameleon Save File (*.cham). This means that if you wish to invoke Chameleon programmatically, you will likely have to generate .cham files within your application. Fortunately, this is an easy process because .cham files are composed of easily understood XML.

The .cham file has several major components:

  1. The header. This is standard text that identifies the file as having XML formatting and belonging to Chameleon. An example of the header is shown below:
  2. <?xml version="1.0"?>
    <!DOCTYPE Saved_Automation_Session>
    
  3. The Session tag. Chameleon's root XML element is 'Session' and all other tags are contained within.
  4. The Verbosity tag. This tag tells the GUI whether it should be in normal mode or debug mode (this governs what sort of messages are displayed). Set to 'True' for normal or 'False' for debug.
  5. <Verbosity>True</Verbosity>
    

  6. The Algorithm tag. Each Algorithm tag provides information about a single plug-in. If you do not wish to invoke a particular plug-in programmatically, you do not need to list it here. If you do wish to invoke it, you must provide its full namespacing in the name attribute, and set the checked attribute to True. See the example below:
  7. <Algorithm name="Universal.Converter.FileSplitter" checked="True">
    </Algorithm>
    

  8. Each Algorithm tag requires a Custom_Data tag within. Custom_Data tags contain plug-in specific settings, equivalent to the fields set under 'Custom Properties' in the graphical client. Each plug-in uses its own data format, so it is recommended that you experiment with the graphical client to deduce the encoding. See below for an example:
  9.   <Algorithm name="Universal.Converter.FileSplitter" checked="True">
          <Custom_Data>
          	True@MeasurementReport@6
          </Custom_Data>
      </Algorithm>
    

    Custom_Data is required, even if the plug-in doesn't use it, so you may see something like the following:

    <Algorithm name="top.Converter.topToExcel" checked="True">
    	<Custom_Data />
    </Algorithm>
    
  10. The Data_File tag. These tags encapsulate full paths to the input files that you wish the plug-ins to operate on. Please see the example below:
  11.   <Data_File>C:\Test\run1.log</Data_File>
      <Data_File>C:\Test\run2.log</Data_File>
      <Data_File>C:\Test\run3.log</Data_File>
    

With this information, you should be able to automatically generate .cham files and then pass them to Chameleon programmatically from the command line. If you are unsure regarding an aspect of .cham syntax, you should generate an equivalent file using the graphical client, and use that file as a reference.