LoadParameterInfo (XmlDoc subroutine): Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (1 revision)
mNo edit summary
Line 59: Line 59:
%d is <var>Object</var> Xmldoc
%d is <var>Object</var> Xmldoc
%d = new
%d = new
%d:<var>LoadParameterInfo</var>('A*', 'Sirius')
%d:LoadParameterInfo('A*', 'Sirius')
%l <var>Object</var> <var>XmlNodelist</var>
%l Object XmlNodelist
%l = %d:SelectNodes('//reset[.="System manager"]')
%l = %d:SelectNodes('//reset[.="System manager"]')
%i <var>Float</var>
%i Float
For %i From 1 To %l:Count
For %i From 1 To %l:Count
<p class="code">%l:Item(%i):Print('..')
  %l:Item(%i):Print('..')
</p>
End For
End For
End
End
Line 71: Line 70:


The example result follows (the long first line is wrapped for display purposes).
The example result follows (the long first line is wrapped for display purposes).
<p class="output"><parameter name="ACTRDS" table="KZS" offset="036C"
<p class="output"><parameter name="ACTRDS" table="KZS" offset="036C" looseMin="-32,768" looseMax="32,767">
looseMin="-32,768" looseMax="32,767">
  <description>ACTIVE RSA SUBTASKS</description>
<description>ACTIVE RSA SUBTASKS</description>
  <reset additional="EXEC PARM and User 0">
<reset additional="EXEC PARM and User 0">
    System manager
    <var>System</var> manager
  </reset>
</reset>
  <viewClass>system</viewClass>
<viewClass>system</viewClass>
  <displayType>numeric</displayType>
<displayType>numeric</displayType>
</parameter>
</parameter>
</p>
</p>

Revision as of 16:28, 7 February 2011

Load parameter info into this XmlDoc (XmlDoc class)


This method loads an XmlDoc with information about Model 204 parameters in CCA and Sirius products. A "pattern" argument lets you select parameters from one or both product families.

This method is primarily intended for User Language products delivered by Sirius Software, and the schema of the returned document may change from release to release.

Syntax

doc:LoadParameterInfo[( [string])]

Syntax terms

doc An expression that points to the XmlDoc to contain the selected parameter information. This XmlDoc instance must be empty.
paramOrFam An optional argument that is a complement of, and that may be specified before or after, the famOrParam argument. This is a string (case ignored, leading and trailing blanks ignored, default null) that represents either of two options, which have the following forms:

paramPattern This selects, from the sources specified or implied in the method's second argument, all system parameters that match the specified pattern.

Patterns are formed using an asterisk (*) as a wildcard character, where the asterisk stands for one or more characters before or after a specified character string (A* or *A), or between two specified character strings (A*BC). A solitary asterisk selects all parameters (qualified by familyString). If you omit the paramOrFam argument, the default for the paramPattern option is to select all parameters.

familyString Either or both of the strings: Base and Sirius. Base means the Model 204 core product; Sirius means the Sirius-added parameters.

If you omit the paramOrFam argument, the default for the familyString option is to select from both Base and Sirius parameters.

famOrParam An optional argument that is a complement of, and that may be specified before or after, the paramOrFam argument. This argument has the same constituent options as paramOrFam, and it is interpreted as the alternative option type of the one you specify in paramOrFam.

Usage notes

The parameters that your argument pattern selects are unsorted XML elements in doc, the XmlDoc method object. The information for each parameter currently includes:

  • As XML attributes: two or more XML attributes that specify where to locate the parameter within internal data structures, maximum and minimum values (if applicable), and possibly other parameter-specific values.
  • As XML child or grandchild elements: a text description of the parameter, where the parameter is set, whether it is a system or user parameter, and whether it is displayed as character, numeric, or hexadecimal.

Example

The following request displays all Sirius parameters beginning with A and resettable by the system manager. The SelectNodes method finds the reset nodes that have System manager descendants; the Print method displays the parents of those found nodes:

Begin %d is Object Xmldoc %d = new %d:LoadParameterInfo('A*', 'Sirius') %l Object XmlNodelist %l = %d:SelectNodes('//reset[.="System manager"]') %i Float For %i From 1 To %l:Count %l:Item(%i):Print('..') End For End

The example result follows (the long first line is wrapped for display purposes).

<parameter name="ACTRDS" table="KZS" offset="036C" looseMin="-32,768" looseMax="32,767"> <description>ACTIVE RSA SUBTASKS</description> <reset additional="EXEC PARM and User 0"> System manager </reset> <viewClass>system</viewClass> <displayType>numeric</displayType> </parameter>

Note: The above result displays the XmlDoc format from a Sirius Mods &Vsn. 7.6 request. Prior to version 7.6, the parameter name was the name of a document Element, and the parameter description was the Element's text.

See also