OpenSCADAWiki: Home Page En/Doc/API/part18 ...

Home | Index | Changes | Comments | Users | Registration | Login  Password:  
 
This is an old revision of HomePageEn/Doc/API/part18 from 2010-01-24 15:15:10..

18. Service functions of the OpenSCADA control interface

Service functions - is an interface to access the OpenSCADA system through the OpenSCADA control interface from external systems. This mechanism is the basis for all exchange mechanisms within OpenSCADA, implemented through weak links and standard exchange protocol of OpenSCADA. Its main advantage is the priority processing and the possibility of using non-standard packaging data. For access to normal data you can use the standard commands of the control interface.

18.1. Group access to the values of the parameter's attributes of the subsystem "Data acquisition", as well as to the detailed information

These requests let you to obtain detailed information about the parameters of the subsystem "Data acquisition", to acquire the values of all attributes of the parameters, and also to make the group setting. Detailed information about requests is given in Table 23.


Table 23. Attributes of the request commands of the attributes' parameters of the subsystem "Data acquisition"

IdNameValue
Request command of information about the attributes of the parameter: <list path="/sub_DAQ/mod_{SRC}/cntr_{CNTR}/prm_{PRM}/%2fserv%2fattr"/>
<el id="iatr"/> Information of the attributes In separate tags the information about attribute is returned.
id
Attribute's ID The character identifier of the single attribute.
nm
Attribute's name The name of the single attribute.
flg
Attribute's flags Flags of the single attribute.
tp
Attribute's type The type of the single attribute.
vals
Values area of the attribute. Values area of the single attribute.
names
The names of the attribute's values for the selective type. The names of the single attribute's values for the selective type.
Team request command of the all values of attributes of the parameter: <get path="/sub_DAQ/mod_{SRC}/cntr_{CNTR}/prm_{PRM}/%2fserv%2fattr"/>
<el id="iatr">val</el> Attributes' values In separate tags the values of the attributes are returned.
The set command of the the values of the specified attributes of the parameter: <set path="/sub_DAQ/mod_{SRC}/cntr_{CNTR}/prm_{PRM}/%2fserv%2fattr"/>
<el id="iatr">val</el> The values of attributes are specified In separate tags the values of attributes are specified.

18.2. Access to archived data of the archives of messages

To request the archive data in the archiving subsystem of the messages archive's object the following command is provided <info path="/sub_Archive/%2fserv%2fmess"/> è <get path="/sub_Archive/%2fserv%2fmess"/> to request the information about the archive and archive's values respectively. The detailed description of these commands is presented in Table 24.


Table 24. Attributes of request commands of information about the archive of values and archive data

IdNameValue
Request command of the information about the archive: <info path="/sub_Archive/%2fserv%2fmess"/>
arch Setting the name of the archive's archiver Archive's archiver, for which to specify the parameters.
end Control of the archive's top in the given archiver As a result of the request points to the real top of the messages' archive in the given archiver <arch>.
beg Control of the archive's depth in the given archiver As a result of the request points to the real depth of the messages' archive in the given archiver <arch>.
Request command of the archival and/or current data: <get path="/sub_Archive/%2fserv%2fmess"/>
tm Time set Time of the block's top of the messages' archive .
tm_grnd Time set of the foundation/beginning of the archive Points to the foundation/beginning of the archive.
arch Setting of the archive's archiver Specifies at what archiver to request the values. If the archiver is not specified, the request will be made consistently in all archivers with the exception of duplicates.
cat Setting the message's category Specify the category/template of the requested messages.
lev Setting the level of importance Specifies the importance level of messages for which and above to get the messages.
<el>mess</el> Messages In separate tags the messages are returned.
time
Message's time Time of the separate message.
cat
Message's category Category of the separate message.
lev
Message's level Level of the separate message.

18.3. Access to archived data of the values' archive

To request the archive data in the archiving subsystem of the values archive's object and parameter's attribute object of "Data acquisition" subsystem the following command is provided <info path="{a_p_addr}/%2fserv%2fval"/> è <get path="{a_p_addr}/%2fserv%2fval"/> to request the information about the archive's and archive values respectively. Attributes of these commands, involving various mechanisms of the request are presented in Table 25.


Table 25. Attributes of the request commands of information about the archive of archive data

IdNameValue
Request command of the information about the archive: <info path="{a_p_addr}/%2fserv%2fval"/>
arch Setting the name of the archive's archiver Archive's archiver, for which to specify the parameters.
end Control of the archive's top in the given archiver As a result of the request points to the real top of the values' archive in the given archiver <arch>. In the case of the archive's absence the attribute is set to "0".
beg Control of the archive's depth in the given archiver As a result of the request points to the real depth of the values' archive in the given archiver <arch>. In the case of the archive's absence the attribute is set to "0".
per Control of the archive's periodicity in the given archiver As a result of the request points to the real periodicity of the values' archive in the given archiver <arch>. In the case of the archive's absence the attribute is set to "0".
vtp Control of the archive's/parameter's type of value Returns the code of the type of the archive data values: 0 - Boolean, 1 - Integer, 4 - Real, 5 - String. But this property is only available in the case of request at the parameter without archive!
Request command of archive or/and current data <get path="{a_p_addr}/%2fserv%2fval"/>
tm Setting and control of time Time of the requested value or top of the archive values' block. If the attribute is not specified or equal to "0", the last value is returned. The value of this attribute is set to the value of time of obtained value or of the top of the archival data block.
tm_grnd Setting and control of the foundation/beginning time of the archive Points to the foundation/beginning of the archive. If the attribute is not specified or equal to "0", then the request of one value is made. The value of this attribute is set to the foundation of the block of archival data time.
per Setting and control of the periodicity of the obtained values Periodicity of requested values. If the attribute is not specified or equal to "0" or less than the real periodicity of the archive, then the values will be returned with the real periodicity of the archive and the value of this attribute will be set to the real periodicity value. If the attribute's value is more than the actual periodicity, the values of the archive will be averaged to the specified periodicity.
arch Setting and control of the archive's archiver Specifies at what archiver to request the values. If the archiver is not specified, the request will be made consistent with the priority from best to worst. The name of the archiver, from whom the values are obtained, will be indicated in this attribute when returning the result. If the archiver for this parameter is not set, or such archiver is not present, then the value of this attribute will be reset. In the case of the request, crossing several archivers, the processing occurs only for the first archiver with the specification of its name and dimension in the relevant attributes. To request the data of follow-up archivers the request is repeated starting from the dimension of the previous request.
mode Setting and control of the mode of transfer of the archive data

The form in which it is desirable to obtain the archive data is specified. The following modes/forms of transfer of archives' data are provided:

0 - Simple record: single value - one string without packaging of the related values. In the case of string archive the values are encoded to exclude the newlines characters. Example of the writing form:
34.5678
23.6543
65.8754
34.6523

1 - Packed record on the principle of folding the related values: one value - one record. Before each value it is indicated its position number, separated by the space:

0 34.5678
1 23.6543
4 65.8754
6 34.6523

2 - The array of unpackaged binary values encoded by Mime Base64. Can not be used for string archives.
real_prec Setting the precision of the real values Specifies the precision with which to transmit the data of real values in the "0" and "1" mode. By default, this precision is 6 digits.
round_perc Setting the rounding percent Indicates the rounding percentage of related numeric values for the mode of "1".

 
There are no files on this page.[Display files/form]
There is no comment on this page. [Display comments/form]