The IStatisticsType is an Interface to manage statistical data of any kind, and provides general information about those statistical data.
The concrete statistical data are managed in DataVariables referenced from the Object or ObjectType implementing the Interface with a HasStatisticComponent Reference, either directly or indirectly. Those Variables are not predefined by the Interface, but added by the concrete Objects or ObjectTypes implementing the Interface. In Figure 9, an example is given. The MyStatisticsType is implementing IStatisticsType and provides the statistical Variables StatVar_A and its subvariable StatVar_A1, as well as StatX and StatY, groups by the Object StatGroup. The Property StartTime applies to all of them, as well as the Method ResetStatistics.
Figure 9 Example of the usage of the IStatisticsType Interface
IStatisticsType is formally defined in Table 38.
Table 38 – IStatisticsType Definition
Attribute 
Value 

BrowseName 
IStatisticsType 

IsAbstract 
True 

Description 
Base interface for managing statistical data. 

References 
Node Class 
BrowseName 
DataType 
TypeDefinition 
Other 
Subtype of the BaseInterfaceType defined in OPC 100005 i.e. inheriting the InstanceDeclarations of that Node. 

0:HasProperty 
Variable 
StartTime 
0:DateTime 
0:PropertyType 
O 
0:HasComponent 
Method 
ResetStatistics 


O 
StartTime provides the information, at what point in time all statistical data, provided by the Object implementing the Interface, have been started to be collected. The StartTime changes when the collection of the statistical data is reset.
Note that the StartTime does not indicate, if the statistical data is aggregated from the start time, or rolled over after some specific condition. This is defined by subtypes of the IStatisticsType. Therefore, it is recommended not to use the IStatisticsType directly, but only subtypes of it.
The InstanceDeclarations of the IStatisticsType have the Attribute values defined in Table 39.
Table 39 – IStatisticsType Attribute values for child Nodes
Source Path 
Value 
Description 
StartTime 
 
Indicates the point in time at which the collection of the statistical data has been started. 
ResetStatistics 
 
Restarts all statistical data, including a reset of the StartTime to the current time. 
The ResetStatistics Method resets all statistical data provided by the Object implementing the Interface. That includes, that the StartTime is reset to the current time.
The signature of this Method is specified below. The Method does not have Input or OutputArguments.
Signature
ResetStatistics (
);
Method Result Codes (defined in Call Service)
Result Code 
Description 
Bad_UserAccessDenied 
See OPC 100004 for a general description. 
Its formal representation in the AddressSpace is defined in Table 40.
Table 40 – ResetStatistics Method Definition
Attribute 
Value 

BrowseName 
ResetStatistics 

References 
NodeClass 
BrowseName 
DataType 
TypeDefinition 
ModellingRule 






The IAggregateStatisticsType is a subtype of the IStatisticsType Interface. The statistical data managed by Objects or ObjectTypes implementing this Interface is not rolling over, i.e. all data from the start of tracking the statistical data are considered, until the tracking gets reset. It is formally defined in Table 41.
Table 41 – IAggregateStatisticsType Definition
Attribute 
Value 

BrowseName 
IAggregateStatisticsType 

IsAbstract 
True 

Description 
Base interface for managing statistical data that is not rolled over all data from the start of tracking the statistical data are considered, until the tracking gets reset. 

References 
Node Class 
BrowseName 
DataType 
TypeDefinition 
Other 
Subtype of the IStatisticsType defined in 6.2.1, i.e. inheriting the InstanceDeclarations of that Node. 

0:HasProperty 
Variable 
ResetCondition 
0:String 
0:PropertyType 
O 
ResetCondition describes the reason and context for the reset of the statistics, which is done without a trigger from an OPC UA Client, like calling the ResetStatistics Method. ResetCondition is a vendorspecific, human readable string. ResetCondition is nonlocalized and might contain an expression that can be parsed by certain clients. Examples are: “AFTER 4 HOURS”, “AFTER 1000 ITEMS”, “OPERATOR”. “OPERATOR” means, that an operator resets the statistics on a local HMI.
The InstanceDeclarations of the IAggregateStatisticsType have the Attribute values defined in Table 42.
Table 42 – IAggregateStatisticsType Attribute values for child Nodes
Source Path 
Value 
Description 
ResetCondition 
 
The reason and context for the reset of the statistics, which is done without a trigger from an OPC UA Client, like calling the ResetStatistics Method. ResetCondition is a vendorspecific, human readable string. ResetCondition is nonlocalized and might contain an expression that can be parsed by certain clients. Examples are: “AFTER 4 HOURS”, “AFTER 1000 ITEMS”, “OPERATOR”. “OPERATOR” means, that an operator resets the statistics on a local HMI. 
The IRollingStatisticsType is a subtype of the IStatisticsType Interface. The statistical data managed by Objects or ObjectTypes implementing this Interface is rolling over, i.e. only a certain amount of data is considered for statistical data. It is formally defined in Table 43.
Table 43 – IRollingStatisticsType Definition
Attribute 
Value 

BrowseName 
IRollingStatisticsType 

IsAbstract 
True 

Description 
Base interface for managing statistical data that is rolled over, i.e. only a certain amount of data is considered for statistical data. 

References 
Node Class 
BrowseName 
DataType 
TypeDefinition 
Other 
Subtype of the IStatisticsType defined in 6.2.1, i.e. inheriting the InstanceDeclarations of that Node. 

0:HasProperty 
Variable 
WindowDuration 
0:Duration 
0:PropertyType 
O 
0:HasProperty 
Variable 
WindowNumberOfValues 
0:UInt32 
0:PropertyType 
O 
WindowDuration describes the duration after the statistical data are rolled over. Only the data that were gathered during that duration are considered for the statistical data, even if the time intervals between the StartTime and the current time is longer.
WindowNumberOfValues describes the maximum number of values before the data gets rolled over. For the statistical data, only the data fitting into the number of values is considered, even if more data were gathered since StartTime.
An Object or ObjectType implementing IRollingStatisticsType shall never provide WindowDuration and WindowNumberOfValues together It shall provide a maximum of one of those Properties.
The InstanceDeclarations of the IRollingStatisticsType have the Attribute values defined in Table 44.
Table 44 – IRollingStatisticsType Attribute values for child Nodes
Source Path 
Value 
Description 
WindowDuration 
 
The duration after the statistical data are rolled over. Only the data that were gathered during that duration are considered for the statistical data, even if the time intervals between the StartTime and the current time is longer. 
WindowNumberOfValues 
 
The number of values before the data gets rolled over. For the statistical data, only the data fitting into the number of values is considered, even if more data were gathered since StartTime. 