Configuration of the Function dpGetPeriod
This chapter describes the function dpGetPeriod.
Function type
Select the function type dpGetPeriod after creating and naming a new data set (see chapter data set) and click on Next>.
Parameters
Shows the parameters that are available for the configuration. Select the parameters and click on Next>
Function Parameters
Parameter | Description |
---|---|
startTime | The start time of the queried time range |
endTime | The end time of the queried time range |
bonus | Number of values that are also displayed before the startTime and after the endTime |
dpName | The data point element which is queried |
Wildcards must not be used for defining the data point element (the dpName parameter).
See the CTRL function dpGetPeriod for further information regarding the function and the parameters.
SOAP Request
Click on Edit Parameter to specify values for the parameters:
The time is specified in the format: <yyyy>-<mm>-<dd>T<hh>:<mm>:<sss>.<msec>, e.g. 2015-05-05T13:00:00.000
Click on the OK button and click on Next>.
See chapter alertGetPeriod for a detailed description of the SOAP request.
SOAP Response
No changes are necessary for this window. Click on Next>
Row Mapping
Select "table" and click on the > button to select the XPath Expression. The "Select or edit the XPath expression" window is opened. Select the option "XML elements named "table" at any location" and click on the OK button. See chapter alertGetPeriod for a detailed description.
Column Mapping
The Column Mapping defines the columns for the table row. The columns are mapped to child elements or attributes within the selected data row element. In contrast to row mapping, you can select several elements. Select an element from the window on the left and click on the > button. The Column mapping window is opened. Select the data type from the combo box as well as the option "XML elements named "<element>" at any location". Click on the OK button.
The column mapping contains the attributes:
date (the date when the value was set)
value (the data point value)
You can also return the error code and the error text in addition to the alert attributes. Since these two elements are located on the same level as the /table, you cannot return them in the same data set. Thus, a second identical data set must be created to display the error code and the text.
Error code | Description |
-1 | Datapoint not found |
-2 | Answergroup error |
-3 | Error in the RDB Query |
The BIRT tool queries dates and time as strings by default. You can, however, change the data type for dates and time in the output columns (see chapter alertGetPeriod)).
Show Sample Data
As mentioned in the chapter alertGetPeriod, you have to specify default values for the parameters in order to use the "Show Sample Data" button. If the default values are set, you can check the settings before completing the configuration.