LoadParameterInfo (XmlDoc subroutine): Difference between revisions
m (1 revision) |
m (→Examples) |
||
(One intermediate revision by one other user 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 and Sirius products. A "pattern" argument lets you select parameters | <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 | ||
from one or both product families. | 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. | 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. | ||
==Syntax== | ==Syntax== | ||
Line 37: | Line 37: | ||
==Examples== | ==Examples== | ||
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 following request displays all Sirius parameters beginning with <code>A</code> and resettable by the system manager. The <var>[[SelectNodes_(XmlDoc/XmlNode_function)| | |||
<p class="code">begin | <p class="code">begin | ||
%d is object xmldoc | %d is object xmldoc | ||
Line 62: | 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> 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. | 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> | ||
</ | |||
==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:
| ||||
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.