LoadParameterInfo (XmlDoc subroutine): Difference between revisions

From m204wiki
Jump to navigation Jump to search
mNo edit summary
 
 
(5 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{Template:XmlDoc:LoadParameterInfo subtitle}}
{{Template:XmlDoc:LoadParameterInfo subtitle}}
<var>LoadParameterInfo</var> loads an <var>XmlDoc</var> with information about <var class="product">Model 204</var> parameters in Rocket M204 and Sirius products. A "pattern" argument lets you select parameters
This method loads an <var>XmlDoc</var> with information about <var class="product">Model 204</var> parameters
in CCA and Sirius products.
A "pattern" argument lets you select parameters
from one or both product families.
from one or both product families.
   
   
This method is primarily intended for User Language products delivered
This method is primarily intended for <var class="product">User Language</var> products delivered by Sirius Software, and the schema of the returned document may change from release to release.
by Sirius Software, and the schema of the returned document may change
 
from release to release.
==Syntax==
==Syntax==
{{Template:XmlDoc:LoadParameterInfo syntax}}
{{Template:XmlDoc:LoadParameterInfo syntax}}
Line 14: Line 10:
<table class="syntaxTable">
<table class="syntaxTable">
<tr><th>doc</th>
<tr><th>doc</th>
<td>An expression that points to the <var>XmlDoc</var> to contain the selected parameter information. This <var>XmlDoc</var> instance must be empty. </td></tr>
<td>An expression that points to the <var>XmlDoc</var> to contain the selected parameter information. This <var>XmlDoc</var> instance must be empty.</td></tr>
<tr><th>paramOrFam</th>
<tr><th>paramOrFam</th>
<td>An optional argument that is a complement of, and that may be specified before or after, the <var class="term">famOrParam</var> 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:
<td>An optional argument that is a complement of, and that may be specified before or after, the <var class="term">famOrParam</var> 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:
Line 21: Line 17:
<td>This selects, from the sources specified or implied in the method's second argument, all system parameters that match the specified pattern.
<td>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 (<tt>A*</tt> or <tt>*A</tt>), or between two specified character strings (<tt>A*BC</tt>). A solitary asterisk selects all parameters (qualified by <var class="term">familyString</var>).
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 (<code>A*</code> or <code>*A</code>), or between two specified character strings (<code>A*BC</code>). A solitary asterisk selects all parameters (qualified by <var class="term">familyString</var>).
If you omit the <var class="term">paramOrFam</var> argument, the default for the <var class="term">paramPattern</var> option is to select all parameters. </td></tr>
If you omit the <var class="term">paramOrFam</var> argument, the default for the <var class="term">paramPattern</var> option is to select all parameters. </td></tr>
<tr><th>familyString</th>
<tr><th>familyString</th>
<td>Either or both of the strings: <tt>Base</tt> and <tt>Sirius</tt>. <tt>Base</tt> means the <var class="product">Model 204</var> core product; <tt>Sirius</tt> means the Sirius-added parameters.
<td>Either, or both, of the strings: <code>Base</code> and <code>Sirius</code>. <code>Base</code> means the <var class="product">Model 204</var> core product; <code>Sirius</code> means the Sirius-added parameters.
   
   
If you omit the <var class="term">paramOrFam</var> argument, the default for the <var class="term">familyString</var> option is to select from both <tt>Base</tt> and <tt>Sirius</tt> parameters. </td></tr>
If you omit the <var class="term">paramOrFam</var> argument, the default for the <var class="term">familyString</var> option is to select from both <code>Base</code> and <code>Sirius</code> parameters. </td></tr>
   
   
</table>
</table>
Line 35: Line 31:
   
   
==Usage notes==
==Usage notes==
<ul><li>The parameters that your argument pattern selects are unsorted XML elements in <var class="term">doc</var>, the <var>XmlDoc</var> method object.  The information for each parameter currently includes:
<ul><li>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.
<li>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.
</ul></ul>
   
   
The parameters that your argument pattern selects are unsorted XML elements
==Examples==
in <var class="term">doc</var>, the <var>XmlDoc</var> method object.
The following request displays all Sirius parameters beginning with <code>A</code> and resettable by the system manager. The <var>[[SelectNodes_(XmlDoc/XmlNode_function)|SelectNodes]]</var> method finds the <code>reset</code> nodes that have <code>System manager</code> descendants; the <var>Print</var> method displays the parents of those found nodes:
The information for each parameter currently includes:
<p class="code">begin
<ul>
  %d is object xmldoc
<li>As XML attributes:
  %d = new
two or more XML attributes that specify where to locate the parameter within
  %d:loadParameterInfo('A*', 'Sirius')
internal data structures, maximum and minimum values (if applicable),
  %l object xmlNodelist
and possibly other parameter-specific values.
  %l = %d:[[SelectNodes_(XmlDoc/XmlNode_function)|selectNodes]]('//reset[.="System manager"]')
<li>As XML child or grandchild elements: a text description of the parameter,
  %i float
where the parameter is set,
  for %i from 1 to %l:count
whether it is a system or user parameter, and whether it is displayed
      %l:[[Item_(XmlNodelist_function)|item]](%i):print('..')
as character, numeric, or hexadecimal.
  end for
</ul>
end
===Example===
The following request displays all Sirius parameters beginning
with <tt>A</tt> and resettable by the system manager.
The SelectNodes method finds the <tt>reset</tt> nodes that have
<tt><var>System</var> manager</tt> descendants; the Print method displays
the parents of those found nodes:
<p class="code">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
</p>
</p>
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"
Line 81: Line 61:
</parameter>
</parameter>
</p>
</p>
<b>Note:</b>
<p class="note"><b>Note:</b>
The above result displays the <var>XmlDoc</var> format from a <var class="product">Sirius Mods</var> &Vsn. 7.6 request.
The above result displays the <var>XmlDoc</var> format from a <var class="product">[[Sirius Mods]]</var> Version 7.6 request. Prior to Version 7.6, the parameter name was the name of a document <var>Element</var>, and the parameter description was the <var>Element</var>'s text. </p>
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==
==See also==
{{Template:XmlDoc:LoadParameterInfo footer}}
{{Template:XmlDoc:LoadParameterInfo footer}}

Latest revision as of 20:42, 3 March 2014

Load parameter info into this XmlDoc (XmlDoc class)

LoadParameterInfo loads an XmlDoc with information about Model 204 parameters in Rocket M204 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.

Examples

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 Version 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