Contents This chapter contains the following sections Section Title Page “Introduction? 1-1 “Problems Being Addressed? 1-3 “Problems Not Being Addressed? 1-5 “Design Rationale? 1-5 “Conformance to the DAIS? 1-7 The purpose of the DAIS Application Program Interface API is to support efficient real time transfer of large amounts of data from an industrial process to a wide range of clients It supports discovery of parameters and update of parameter values The DAIS is intended for on-line data transfer and cannot be used to configure servers implementing the API Control systems used to monitor and control industrial processes consist of the following major pieces • Process instrumentation making sensor data and actuation capabilities available • Process stations or remote terminal units RTUs reading sensor data and controlling actuators • Supervisory Control and Data Acquisition SCADA system making processed sensor data and control capabilities available to operators applications or other systems • Management systems using SCADA data to make further processing and control SCADA and management systems can be regarded having a server part where data processing is performed and a Human Machine Interface HMI part where visualization and command dialogs are made The SCADA and management system may have common or different HMI This results in a hierarchical structure shown below SCADA Management system Instrumentation RTU Process station Server Server HMI HMI Data transfer for APIs concerned with Process data Data written to process Figure 1-1 Control system structure The solid arrows in Figure 1-1 correspond to transfer of data from servers to clients The data can be state variables and parameters for example measured values calculated values limit values dead bands scan rates engineering units The dashed arrows correspond to data written to servers by clients The data can be control variables and parameters The API support simple writes operations More complex controls like select and execute for example breaker on off or raise lower commands can be implemented combining multiple write and read operations As indicated in Figure 1-1 the DAIS API can be used at several levels in a system For example a DAIS server can be an RTU Process station communication unit a SCADA server or even a Management system DAIS support both subscription and read write operations A subscription means server has no a priori knowledge of clients and it is clients that establish connection with servers Once connection is established a server calls the clients back when data becomes available or updated The callbacks mean the DAIS API also defines an interface that the client has to implement Server Client Establish connection Callback data transfer Figure 1-2 Data subscription Figure 1-2 shows the bi-directional subscription with connection establishment and callback interfaces For historical reasons SCADA systems for different industrial processes has evolved along different lines SCADA for power systems has evolved onto a UNIX base and SCADA for most other industrial processes has evolved onto a Windows NT base For UNIX based systems APIs formulated in CORBA Common Object Request Broker Architecture IDL Interface Definition Language are now emerging for example DAIS RFP [1] and UMS DAF [2] For Windows NT based systems such as OLE for Process Control OPC [3] has become the dominating standard OPC defines three different APIs measurement data access [4] alarms & events [5] and history [6] OPC is based on Microsoft COM OPC is focused on the interfaces and does not explicitly describe the information model behind the interface The information model is however implicit and can be derived from the OPC specifications This specification describes both the API and information model expressed in UML Within the CCAPI project an information model Common Information Model CIM [7] has been developed This model is now evolving into the IEC 61970-30x draft standard [8] The CIM contains a SCADA information model 61970-303 with its roots in power transmission and generation The DAIS API supports the CIM The DAIS API is intended for transfer of process data on subscription basis as indicated in Figure 1-1 and Figure 1-2 Process data consists of quality tagged and time stamped scalar values The API is intended to efficiently transfer large amounts of data simultaneously to many clients subscribers Clients and servers involved in data exchange can be of many kinds for example HMI or management systems as indicated in Figure 1-1 A client may also appear as a server for example aggregating data from other servers or performing calculations as indicated in Figure 1-3 This creates hierarchical structures of DAIS servers Serv er Server Server Serv er Serv er Serv er Server Clien t DA IS D A IS D A IS Figure 1-3 Using DAIS as interface between multiple servers As an example the servers in the leftmost layer in Figure 1-3 might be OPC compliant RTUs or IEDs next right might be communication front ends and the rightmost server may provide both telemetered and estimated data The DAIS API is intended to be used for a wide range of industrial processes For example • power transmission • power generation • power distribution • water and sewage management• oil and gas • district heating • pulp and paper • food manufacturing The kinds of data that can be reached through the DAIS API are • measurement data access • alarms & events access This data is typically available from hardware units in the process for example RTUs PLCs distributed controllers or other control centers for example SCADA systems Refined or calculated data parameters and alarms & events might also come from applications for example custom calculations state estimation optimization in SCADA or Management systems These data might be provided through the DAIS API as well This specification provides interfaces for data access including • Discovery of data available in a server • Discovery of the information model supported by a server for example available types and their properties • Synchronous and asynchronous read or write of server data • Creation and maintenance of subscriptions at the server • Client side subscription callback interfaces for event driven data transfer There are no explicit means to synchronize clients Time stamping of data is provided so that clients can judge the age Data is hierarchically organized in trees of nodes and items where the items are the leafs The nodes in the hierarchy have a type for example substation pump breaker or any collection of items The type is transparent to the interface An item is an instance of a property belonging to a type Properties can describe any kind of state variables control variables or parameters existing in a control system Data transferred by reads or callbacks are time stamped and quality coded The problem of configuring a server or control system with nodes items areas sources reasons condition spaces and source conditions is outside the scope of this specification The problem of supervising the control system equipment for example communication lines computers hard disks and provide specific interfaces for this is outside the scope of this specification It is however possible for a DAIS server to provide control system statuses as measurements Besides meeting the requirements spelled out in the RFP there are a number of design goals that have shaped solutions OPC has been in use for a number of years and this specification leverages on the experience gained by OPC There are a large number of OPC based products in the market place and cases where DAIS and OPC will be bridged are likely Adherence to OPC is important to facilitate simple bridging and porting DAIS software to from OPC Some design principles used when creating OPC were • Method behavior is sometimes controlled by an input parameter • Related data is transferred in multiple parallel vectors • Outputs are always returned in one or more output parameters To simplify and get a more uniform interface these principles have been replaced by the following • A method has one single behavior resulting in some OPC methods being replaced by more than one DAIS method • Related data is kept together in structs resulting in reduction of the number of parameters compared to OPC • Outputs are returned as method return results resulting in the OPC HRESULT parameter being replaced by exceptions and reduced number of output parameters compared to OPC A DAIS server is a real-time system required to deliver data in high rates and volumes The performance requirements mean that a typical DAIS server does not use a relational database management system for on-line operation but some kind of real-time database The DAIS API efficiently encapsulates such real-time databases from clients To be effectively delivering data DAIS must not introduce performance bottlenecks of its own This has influenced the design in several ways listed below The subscription mechanism consists of two phases In the first the client negotiates with the server on what data items to subscribe for and in the second the actual data transfer takes place This minimizes the amount of transferred data between the server and the client during on-line operation DAIS support to use sequences of data in calls rather than having calls requiring single valued parameters This allows clients to ask for processing of multiple data in a single call rather than making multiple calls thus reducing the number of LAN round trips Large volumes of data are not efficiently transferred in one method call For this reason many methods return an iterator that is used to transfer optimal volumes of data in each call The basic unit of data is a union type SimpleValue SimpleValue exploits our knowledge of the basic data types needed and eliminates CORBA any from the highest bandwidth part of the interface This can make a significant impact on performance when accumulated across large amounts of data The DAIS has three major conformance points 1 The DAIS Server 2 The DAIS Data Access 3 The DAIS Alarms and Events An implementation • shall conform to point 1 • shall conform to either point 2 or point 3 • may conform to both point 2 and point 3 The DAIS interface as defined in Section 3 2 “Server ? on page 3-30 is a mandatory conformance point for a DAIS Server with the exception of the following optional methods • DAIS Server find views • DAIS Server create data access session for view • DAIS Server create alarms and events session for view • DAIS Server inspect A server shall also conform to • Section 3 1 1 “Character Encoding ? on page 3-1 The use of XPath as described in Section 3 1 12 “Logical Expressions and Navigation ? on page 3-25 Section 5 2 4 2 “IDL ? on page 5-14 and Section 5 2 7 3 “Condition Logic ? on page 5-38 is an optional conformance point The DAIS interface as defined in Section 3 1 “Common Declarations ? on page 3-1 and Section 4 2 “API ? on page 4-8 is a mandatory conformance point for Data Access The DAIS interface as defined in Section 3 1 “Common Declarations ? on page 3-1 and Section 5 2 “API ? on page 5-6 is a mandatory conformance point for Alarms and Events The purpose of the DAIS Application Program Interface API is to support efficient real time transfer of large amounts of data from an industrial process to a wide range of clients It supports discovery of parameters and update of parameter values The DAIS is intended for on-line data transfer and cannot be used to configure servers implementing the API Control systems used to monitor and control industrial processes consist of the following major pieces • Process instrumentation making sensor data and actuation capabilities available • Process stations or remote terminal units RTUs reading sensor data and controlling actuators • Supervisory Control and Data Acquisition SCADA system making processed sensor data and control capabilities available to operators applications or other systems • Management systems using SCADA data to make further processing and control SCADA and management systems can be regarded having a server part where data processing is performed and a Human Machine Interface HMI part where visualization and command dialogs are made The SCADA and management system may have common or different HMI This results in a hierarchical structure shown below SCADA Management system Instrumentation RTU Process station Server Server HMI HMI Data transfer for APIs concerned with Process data Data written to process Figure 1-1 Control system structure The solid arrows in Figure 1-1 correspond to transfer of data from servers to clients The data can be state variables and parameters for example measured values calculated values limit values dead bands scan rates engineering units The dashed arrows correspond to data written to servers by clients The data can be control variables and parameters The API support simple writes operations More complex controls like select and execute for example breaker on off or raise lower commands can be implemented combining multiple write and read operations As indicated in Figure 1-1 the DAIS API can be used at several levels in a system For example a DAIS server can be an RTU Process station communication unit a SCADA server or even a Management system DAIS support both subscription and read write operations A subscription means server has no a priori knowledge of clients and it is clients that establish connection with servers Once connection is established a server calls the clients back when data becomes available or updated The callbacks mean the DAIS API also defines an interface that the client has to implement Server Client Establish connection Callback data transfer Figure 1-2 Data subscription Figure 1-2 shows the bi-directional subscription with connection establishment and callback interfaces For historical reasons SCADA systems for different industrial processes has evolved along different lines SCADA for power systems has evolved onto a UNIX base and SCADA for most other industrial processes has evolved onto a Windows NT base For UNIX based systems APIs formulated in CORBA Common Object Request Broker Architecture IDL Interface Definition Language are now emerging for example DAIS RFP [1] and UMS DAF [2] For Windows NT based systems such as OLE for Process Control OPC [3] has become the dominating standard OPC defines three different APIs measurement data access [4] alarms & events [5] and history [6] OPC is based on Microsoft COM OPC is focused on the interfaces and does not explicitly describe the information model behind the interface The information model is however implicit and can be derived from the OPC specifications This specification describes both the API and information model expressed in UML Within the CCAPI project an information model Common Information Model CIM [7] has been developed This model is now evolving into the IEC 61970-30x draft standard [8] The CIM contains a SCADA information model 61970-303 with its roots in power transmission and generation The DAIS API supports the CIM The DAIS API is intended for transfer of process data on subscription basis as indicated in Figure 1-1 and Figure 1-2 Process data consists of quality tagged and time stamped scalar values The API is intended to efficiently transfer large amounts of data simultaneously to many clients subscribers Clients and servers involved in data exchange can be of many kinds for example HMI or management systems as indicated in Figure 1-1 A client may also appear as a server for example aggregating data from other servers or performing calculations as indicated in Figure 1-3 This creates hierarchical structures of DAIS servers Serv er Server Server Serv er Serv er Serv er Server Clien t DA IS D A IS D A IS Figure 1-3 Using DAIS as interface between multiple servers As an example the servers in the leftmost layer in Figure 1-3 might be OPC compliant RTUs or IEDs next right might be communication front ends and the rightmost server may provide both telemetered and estimated data The DAIS API is intended to be used for a wide range of industrial processes For example • power transmission • power generation • power distribution • water and sewage management• oil and gas • district heating • pulp and paper • food manufacturing The kinds of data that can be reached through the DAIS API are • measurement data access • alarms & events access This data is typically available from hardware units in the process for example RTUs PLCs distributed controllers or other control centers for example SCADA systems Refined or calculated data parameters and alarms & events might also come from applications for example custom calculations state estimation optimization in SCADA or Management systems These data might be provided through the DAIS API as well This specification provides interfaces for data access including • Discovery of data available in a server • Discovery of the information model supported by a server for example available types and their properties • Synchronous and asynchronous read or write of server data • Creation and maintenance of subscriptions at the server • Client side subscription callback interfaces for event driven data transfer There are no explicit means to synchronize clients Time stamping of data is provided so that clients can judge the age Data is hierarchically organized in trees of nodes and items where the items are the leafs The nodes in the hierarchy have a type for example substation pump breaker or any collection of items The type is transparent to the interface An item is an instance of a property belonging to a type Properties can describe any kind of state variables control variables or parameters existing in a control system Data transferred by reads or callbacks are time stamped and quality coded This specification provides interfaces for data access including • Discovery of data available in a server • Discovery of the information model supported by a server for example available types and their properties • Synchronous and asynchronous read or write of server data • Creation and maintenance of subscriptions at the server • Client side subscription callback interfaces for event driven data transfer There are no explicit means to synchronize clients Time stamping of data is provided so that clients can judge the age Data is hierarchically organized in trees of nodes and items where the items are the leafs The nodes in the hierarchy have a type for example substation pump breaker or any collection of items The type is transparent to the interface An item is an instance of a property belonging to a type Properties can describe any kind of state variables control variables or parameters existing in a control system Data transferred by reads or callbacks are time stamped and quality coded The problem of configuring a server or control system with nodes items areas sources reasons condition spaces and source conditions is outside the scope of this specification The problem of supervising the control system equipment for example communication lines computers hard disks and provide specific interfaces for this is outside the scope of this specification It is however possible for a DAIS server to provide control system statuses as measurements Besides meeting the requirements spelled out in the RFP there are a number of design goals that have shaped solutions OPC has been in use for a number of years and this specification leverages on the experience gained by OPC There are a large number of OPC based products in the market place and cases where DAIS and OPC will be bridged are likely Adherence to OPC is important to facilitate simple bridging and porting DAIS software to from OPC Some design principles used when creating OPC were • Method behavior is sometimes controlled by an input parameter • Related data is transferred in multiple parallel vectors • Outputs are always returned in one or more output parameters To simplify and get a more uniform interface these principles have been replaced by the following • A method has one single behavior resulting in some OPC methods being replaced by more than one DAIS method • Related data is kept together in structs resulting in reduction of the number of parameters compared to OPC • Outputs are returned as method return results resulting in the OPC HRESULT parameter being replaced by exceptions and reduced number of output parameters compared to OPC A DAIS server is a real-time system required to deliver data in high rates and volumes The performance requirements mean that a typical DAIS server does not use a relational database management system for on-line operation but some kind of real-time database The DAIS API efficiently encapsulates such real-time databases from clients To be effectively delivering data DAIS must not introduce performance bottlenecks of its own This has influenced the design in several ways listed below The subscription mechanism consists of two phases In the first the client negotiates with the server on what data items to subscribe for and in the second the actual data transfer takes place This minimizes the amount of transferred data between the server and the client during on-line operation DAIS support to use sequences of data in calls rather than having calls requiring single valued parameters This allows clients to ask for processing of multiple data in a single call rather than making multiple calls thus reducing the number of LAN round trips Large volumes of data are not efficiently transferred in one method call For this reason many methods return an iterator that is used to transfer optimal volumes of data in each call The basic unit of data is a union type SimpleValue SimpleValue exploits our knowledge of the basic data types needed and eliminates CORBA any from the highest bandwidth part of the interface This can make a significant impact on performance when accumulated across large amounts of data OPC has been in use for a number of years and this specification leverages on the experience gained by OPC There are a large number of OPC based products in the market place and cases where DAIS and OPC will be bridged are likely Adherence to OPC is important to facilitate simple bridging and porting DAIS software to from OPC Some design principles used when creating OPC were • Method behavior is sometimes controlled by an input parameter • Related data is transferred in multiple parallel vectors • Outputs are always returned in one or more output parameters To simplify and get a more uniform interface these principles have been replaced by the following • A method has one single behavior resulting in some OPC methods being replaced by more than one DAIS method • Related data is kept together in structs resulting in reduction of the number of parameters compared to OPC • Outputs are returned as method return results resulting in the OPC HRESULT parameter being replaced by exceptions and reduced number of output parameters compared to OPC A DAIS server is a real-time system required to deliver data in high rates and volumes The performance requirements mean that a typical DAIS server does not use a relational database management system for on-line operation but some kind of real-time database The DAIS API efficiently encapsulates such real-time databases from clients To be effectively delivering data DAIS must not introduce performance bottlenecks of its own This has influenced the design in several ways listed below The subscription mechanism consists of two phases In the first the client negotiates with the server on what data items to subscribe for and in the second the actual data transfer takes place This minimizes the amount of transferred data between the server and the client during on-line operation DAIS support to use sequences of data in calls rather than having calls requiring single valued parameters This allows clients to ask for processing of multiple data in a single call rather than making multiple calls thus reducing the number of LAN round trips Large volumes of data are not efficiently transferred in one method call For this reason many methods return an iterator that is used to transfer optimal volumes of data in each call The basic unit of data is a union type SimpleValue SimpleValue exploits our knowledge of the basic data types needed and eliminates CORBA any from the highest bandwidth part of the interface This can make a significant impact on performance when accumulated across large amounts of data The DAIS has three major conformance points 1 The DAIS Server 2 The DAIS Data Access 3 The DAIS Alarms and Events An implementation • shall conform to point 1 • shall conform to either point 2 or point 3 • may conform to both point 2 and point 3 The DAIS interface as defined in Section 3 2 “Server ? on page 3-30 is a mandatory conformance point for a DAIS Server with the exception of the following optional methods • DAIS Server find views • DAIS Server create data access session for view • DAIS Server create alarms and events session for view • DAIS Server inspect A server shall also conform to • Section 3 1 1 “Character Encoding ? on page 3-1 The use of XPath as described in Section 3 1 12 “Logical Expressions and Navigation ? on page 3-25 Section 5 2 4 2 “IDL ? on page 5-14 and Section 5 2 7 3 “Condition Logic ? on page 5-38 is an optional conformance point The DAIS interface as defined in Section 3 1 “Common Declarations ? on page 3-1 and Section 4 2 “API ? on page 4-8 is a mandatory conformance point for Data Access The DAIS interface as defined in Section 3 1 “Common Declarations ? on page 3-1 and Section 5 2 “API ? on page 5-6 is a mandatory conformance point for Alarms and Events The DAIS interface as defined in Section 3 2 “Server ? on page 3-30 is a mandatory conformance point for a DAIS Server with the exception of the following optional methods • DAIS Server find views • DAIS Server create data access session for view • DAIS Server create alarms and events session for view • DAIS Server inspect A server shall also conform to • Section 3 1 1 “Character Encoding ? on page 3-1 The use of XPath as described in Section 3 1 12 “Logical Expressions and Navigation ? on page 3-25 Section 5 2 4 2 “IDL ? on page 5-14 and Section 5 2 7 3 “Condition Logic ? on page 5-38 is an optional conformance point The DAIS interface as defined in Section 3 1 “Common Declarations ? on page 3-1 and Section 4 2 “API ? on page 4-8 is a mandatory conformance point for Data Access The DAIS interface as defined in Section 3 1 “Common Declarations ? on page 3-1 and Section 5 2 “API ? on page 5-6 is a mandatory conformance point for Alarms and Events Contents This chapter contains the following sections Section Title Page “OLE for Process Control OPC ? 2-1 “Data Access Facility DAF ? 2-4 “COM and CORBA IDL Differences? 2-6 “IEC 1346-1 Structuring and Naming? 2-7 “IEC 61970 EMS API? 2-7 “XPath? 2-8 Differences and similarities between OPC and DAIS are described in this chapter OPC is a service API providing access to data managed by the server The data for example nodes items areas sources conditions reasons are not instantiated as objects at the client This means that OPC does not define any particular APIs for the data instances that a client can deal with directly OPC has a few coarse objects like OPCGroup and OPCEventSubscription supporting the data access DAIS has adopted this principle and is identical to OPC in this respect In OPC each client has its own OPC server object In DAIS there is only one DAIS server object shared by all clients To support individual client sessions a new session interface is defined There is one interface for data access session objects and one for alarms & events session objects The session objects correspond to the OPC server object The OPC server object has interfaces for browsing server data for example IOPCBrowseServerAddressSpace and IOPCEventAreaBrowser and information model for example IOPCItemProperties In DAIS each type of data has its own object for browsing these objects are called “home? objects The OPC browse interface methods are hence divided among the different home objects Many OPC interface method and parameter names have been kept but recasted according to the CORBA style guide But many OPC names have been replaced by new names to more clearly indicate the meaning This is particularly the case for the browse and alarms & events APIs In OPC it is common to return arrays of HRESULTs corresponding to arrays of data In the case where the data did not contain any errors an array with “no error occurred? codes still is returned In DAIS such error codes will be returned as a sequence of error structs identifying the erroneous data and an error code In case of no errors the sequence of error structs is empty OPC data accesses use both server and client side handles created based on identification texts for nodes and items To make the translation from identification texts to handles fast and avoid repeated translation in OPC an intermediate server side identifier called the blob exists In DAIS the server side handles and blobs are replaced by identifiers based on ResourceIDs both for nodes and items For a description of ResourceIDs refer to Section 2 2 “Data Access Facility DAF ? on page 2-4 The OPC client side handles are still kept in DAIS COM OPC use the standard interfaces IConnectionPoint to set up callbacks In DAIS callbacks are set up directly between server and client by updating an attribute holding the callback object The COM style enumerators in OPC are replaced by CORBA style iterators in DAIS In OPC multiple parallel vectors often pass data In DAIS a single vector holding structs thus reducing the number of parameters replaces the parallel vectors In OPC all methods return the HRESULT error value In DAIS HRESULTs are replaced by exceptions and out parameters are returned as method results instead Only in a few cases are there additional output parameters in DAIS In OPC data is generally organized in hierarchical structures In data access the leafs are called leaf nodes and the branches branch nodes or items A leaf node or item is the same as an instance of property at an object A branch node corresponds to an • Object having properties • Arbitrary organization of other branch nodes • Object having both properties and other branch nodes as children In DAIS data access the branch nodes are called nodes and the leaf nodes are called items In DAIS alarms & events the branch nodes are called areas and the leaf nodes sources In OPC branch and leaf nodes have a name unique among the nodes or items that are children of the same node A second name is formed by combining these names from each branch node in the path from the node or leaf to the root Both names are called ItemIDs in OPC and the name created by following the path to the root is sometimes called a fully qualified ItemID In DAIS the name unique among the child’s to the same node is called label and the name including the labels from all nodes in the path to the root is called pathname Both DAIS branch nodes and leaf nodes have both a label and a pathname A label is used in the same way as a name but the word label is preferred before the word name as it denotes something that is atomic that is it cannot be further divided OPC provides a server side cursor from where browsing is made and the OPC interface provides methods to move the cursor DAIS does not provide server side cursors and requires the client to keep track of browse positions themselves The reason for removing server side cursors is it makes clean up after crashed clients easier and simplifies the server design OPC does not support types meaning it is not possible in OPC to get information about the type of a node OPC however supports properties which means it is possible to browse the existing properties and what properties a particular node has DAIS has extended this to also include types that is it is possible to browse existing types the properties each type has and each node has a type OPC defines the following property sets • set 1 of OPC specific properties • set 2 of OPC recommended properties • set 3 of vendor specific properties In DAIS OPC set 1 properties cannot be browsed through the property-browsing interface Property Instead access of set 1 properties is direct in the interfaces as parameters or struct members as is the case for OPC This means that DAIS exposes only OPC set 2 and 3 properties through the property browse interface The UMS DAF and DAIS are server APIs for access of object data rather than the data objects themselves The DAF describes a generic interface for navigating and reading data from complex data structures including relations between objects Both DAF and DAIS support navigation in a space of hierarchically structured objects an object is called a node in DAIS and a resource in DAF Both support identification of objects and properties at an object In DAIS an instance of property at an object is called an item and an ItemID item identifier identifies an item An ItemID consists of a ResourceID resource identifier for the node and a PropertyID property identifier for the property The DAIS API uses ItemIDs to access data while the DAF uses ResourceIDs and PropertyIDs separated A system may implement both a DAF server and a DAIS server In such a system it shall be assumed that the same object will have the same ResourceID seen through either API This means it shall be possible to navigate to an object retrieve its ResourceID through one of the APIs and use that ResourceID with the other API In the same way PropertyIDs are the same Textual identification of resources and properties in the DAF is by URIs Uniform Resource Identifier ResourceIDs and PropertyIDs have their own URIs URIs can be translated into corresponding ResourceIDs and PropertyIDs and vice versa A property name is a URI where the container part is a unique schema identifier and the fragment part is the property name For example http www epri com schema CIM-07f xml#Measurement positiveFlowIn DAIS does not support URIs directly but has a textual representation for nodes items types and properties This textual representation may correspond to the fragment part of a URI In the case where a system supports both the DAF and the DAIS interfaces it is expected that the same object will be identified by the same ResourceID through both interfaces and the same property by the same PropertyID Sameness of objects and properties however depends on the information model exposed through the two interfaces and if the information models are different then a mapping is required In the case where a system supports both the DAF and the DAIS interfaces it is expected that the same objects will be identified by the same ResourceID and URI fragment through both interfaces and the same property by the same PropertyID and URI fragment The exact mapping has to be described for each DAIS item – DAF property pair according to the underlying information models Section 4 1 5 “Utility SCADA EMS Measurement Model ? on page 4-5 elaborates on the information model and a detailed mapping between IEC 61970-30x and the DAIS can be found in Section 4 1 5 “Utility SCADA EMS Measurement Model ? on page 4-5 The foregoing concepts are fundamental enough that they should find equivalents in any data repository Some perhaps approximate equivalents are given in Table 2-1 as a guide Table 2-1 Mappings between modeling languages RDF DAF Relational Model UML DAIS Resource Resource ResourceID Tuple i e row Object Node ResourceID Property Property PropertyID Attribute i e column or foreign key Attribute or association Property PropertyID Class Class ClassID Relation i e table Class Type TypeID Resource Description Resource Description Tuple value - Sequence URI URI ResourceID Key value - Value SimpleValue Field value - SimpleValue - ResourceID and PropertyID pair - - Item ItemID DAIS uses the DAF SimpleValue type for data transferred over the API instead of the OPC type VARIANT The data types used in OPC are Microsoft COM types and as DAIS is a CORBA API a mapping of the data types is needed The translation of OPC COM data types to DAF CORBA data types is listed below Table 2-2 Mappings between OPC and DAF data types OPC COM basic types DAF Simple Value types - ResourceID RESOURCE TYPE - URI URI TYPE LPWSTR VT BSTR string STRING TYPE BOOL VT BOOL boolean BOOLEAN TYPE LONG VT R4 long INT TYPE DWORD VT I4 unsigned long UNSIGNED TYPE double VT R8 double DOUBLE TYPE - Complex COMPLEX TYPE FILETIME VT Date DateTime DATE TIME TYPE - ULongLong ULONG LONG TYPE WORD VT I2 unsigned long UNSIGNED TYPE FLOAT VT R4 double DOUBLE TYPE BYTE VT UI1 - HRESULT VT ERROR - VARIANT VARTYPE SimpleValue SimpleValueType Interfaces defined in COM and CORBA IDL differ in a number of ways Important differences concerning interface definitions are • object referencing • interface management • error management and • IDL A detailed description of the mapping can be found in the CORBA 2 3 specification chapters 17 18 and 19 In CORBA each object is uniquely referenced in one step In COM obtaining an object usually is a two step process In the first step a stateless server object is obtained In the second step the server object is loaded with state data In CORBA an object is a unique individual that contains state from the very beginning A CORBA object has a single interface This interface can be built from several other interfaces through inheritance The resulting interface might have many methods and hence become big A COM object usually has multiple interfaces and supports the client to detect and navigate between these interfaces at run time As a CORBA interface is defined by inheritance it has to be fully defined at compile time As COM allows run time detection of interfaces the IUnknown QueryInterface method a full match between interfaces implemented by a server and interfaces known to a client is not required Mapping OPC interfaces to DAIS interfaces can be done in two ways 1 Inherit a number of OPC interfaces into one CORBA object This may result in name clashes that require renaming of methods 2 Instantiate an OPC interface as an own CORBA object referenced by a container object Both techniques are used in the DAIS specification CORBA provides exceptions for error handling and COM does not COM provides error status through a return parameter called HRESULT The caller has to explicitly test the HRESULT to decide if the operation was successful HRESULT return parameters are replaced by CORBA exceptions The COM and CORBA IDL have several syntactical differences and use different style guides DAIS as well as OPC structure nodes and items hierarchically Nodes and items have a label uniquely identifying child’s located at the same node The labels from the nodes in the path from a node or item to the root form a pathname The pathname uniquely identifies a node or item in the tree The same principle for naming objects is described in the IEC 1346-1 standard IEC 1346-1 call labels for single level designation and the pathname for multi level designation and supports multiple hierarchical structures The DAIS supports multiple structures by allowing multiple views where each view exposes one structure The IEC 61970-30x [8] draft standard also named CIM describes a specific organization of power system objects in a hierarchical structure DAIS is transparent to the structure and hence supports the IEC 61970 structure DAIS is also transparent to what attributes are defined as long as they can be reached through the hierarchy DAIS however defines a set of attributes that a DAIS server is expected to support Some of these attributes can also be found in IEC 61970-30x A detailed attribute mapping is provided later in this specification and is further elaborated in Section 4 1 5 “Utility SCADA EMS Measurement Model ? on page 4-5 The W3C XPath [13] standard describes how navigation in a hierarchical structure i e an XML document is made using an expression In DAIS navigation is made using the various browse APIs However in one place there is a need to describe navigation paths as expressions and that is for the condition logic in Alarms and Events Differences and similarities between OPC and DAIS are described in this chapter OPC is a service API providing access to data managed by the server The data for example nodes items areas sources conditions reasons are not instantiated as objects at the client This means that OPC does not define any particular APIs for the data instances that a client can deal with directly OPC has a few coarse objects like OPCGroup and OPCEventSubscription supporting the data access DAIS has adopted this principle and is identical to OPC in this respect In OPC each client has its own OPC server object In DAIS there is only one DAIS server object shared by all clients To support individual client sessions a new session interface is defined There is one interface for data access session objects and one for alarms & events session objects The session objects correspond to the OPC server object The OPC server object has interfaces for browsing server data for example IOPCBrowseServerAddressSpace and IOPCEventAreaBrowser and information model for example IOPCItemProperties In DAIS each type of data has its own object for browsing these objects are called “home? objects The OPC browse interface methods are hence divided among the different home objects Many OPC interface method and parameter names have been kept but recasted according to the CORBA style guide But many OPC names have been replaced by new names to more clearly indicate the meaning This is particularly the case for the browse and alarms & events APIs In OPC it is common to return arrays of HRESULTs corresponding to arrays of data In the case where the data did not contain any errors an array with “no error occurred? codes still is returned In DAIS such error codes will be returned as a sequence of error structs identifying the erroneous data and an error code In case of no errors the sequence of error structs is empty OPC data accesses use both server and client side handles created based on identification texts for nodes and items To make the translation from identification texts to handles fast and avoid repeated translation in OPC an intermediate server side identifier called the blob exists In DAIS the server side handles and blobs are replaced by identifiers based on ResourceIDs both for nodes and items For a description of ResourceIDs refer to Section 2 2 “Data Access Facility DAF ? on page 2-4 The OPC client side handles are still kept in DAIS COM OPC use the standard interfaces IConnectionPoint to set up callbacks In DAIS callbacks are set up directly between server and client by updating an attribute holding the callback object The COM style enumerators in OPC are replaced by CORBA style iterators in DAIS In OPC multiple parallel vectors often pass data In DAIS a single vector holding structs thus reducing the number of parameters replaces the parallel vectors In OPC all methods return the HRESULT error value In DAIS HRESULTs are replaced by exceptions and out parameters are returned as method results instead Only in a few cases are there additional output parameters in DAIS In OPC data is generally organized in hierarchical structures In data access the leafs are called leaf nodes and the branches branch nodes or items A leaf node or item is the same as an instance of property at an object A branch node corresponds to an • Object having properties • Arbitrary organization of other branch nodes • Object having both properties and other branch nodes as children In DAIS data access the branch nodes are called nodes and the leaf nodes are called items In DAIS alarms & events the branch nodes are called areas and the leaf nodes sources In OPC branch and leaf nodes have a name unique among the nodes or items that are children of the same node A second name is formed by combining these names from each branch node in the path from the node or leaf to the root Both names are called ItemIDs in OPC and the name created by following the path to the root is sometimes called a fully qualified ItemID In DAIS the name unique among the child’s to the same node is called label and the name including the labels from all nodes in the path to the root is called pathname Both DAIS branch nodes and leaf nodes have both a label and a pathname A label is used in the same way as a name but the word label is preferred before the word name as it denotes something that is atomic that is it cannot be further divided OPC provides a server side cursor from where browsing is made and the OPC interface provides methods to move the cursor DAIS does not provide server side cursors and requires the client to keep track of browse positions themselves The reason for removing server side cursors is it makes clean up after crashed clients easier and simplifies the server design OPC does not support types meaning it is not possible in OPC to get information about the type of a node OPC however supports properties which means it is possible to browse the existing properties and what properties a particular node has DAIS has extended this to also include types that is it is possible to browse existing types the properties each type has and each node has a type OPC defines the following property sets • set 1 of OPC specific properties • set 2 of OPC recommended properties • set 3 of vendor specific properties In DAIS OPC set 1 properties cannot be browsed through the property-browsing interface Property Instead access of set 1 properties is direct in the interfaces as parameters or struct members as is the case for OPC This means that DAIS exposes only OPC set 2 and 3 properties through the property browse interface OPC is a service API providing access to data managed by the server The data for example nodes items areas sources conditions reasons are not instantiated as objects at the client This means that OPC does not define any particular APIs for the data instances that a client can deal with directly OPC has a few coarse objects like OPCGroup and OPCEventSubscription supporting the data access DAIS has adopted this principle and is identical to OPC in this respect In OPC each client has its own OPC server object In DAIS there is only one DAIS server object shared by all clients To support individual client sessions a new session interface is defined There is one interface for data access session objects and one for alarms & events session objects The session objects correspond to the OPC server object The OPC server object has interfaces for browsing server data for example IOPCBrowseServerAddressSpace and IOPCEventAreaBrowser and information model for example IOPCItemProperties In DAIS each type of data has its own object for browsing these objects are called “home? objects The OPC browse interface methods are hence divided among the different home objects Many OPC interface method and parameter names have been kept but recasted according to the CORBA style guide But many OPC names have been replaced by new names to more clearly indicate the meaning This is particularly the case for the browse and alarms & events APIs In OPC it is common to return arrays of HRESULTs corresponding to arrays of data In the case where the data did not contain any errors an array with “no error occurred? codes still is returned In DAIS such error codes will be returned as a sequence of error structs identifying the erroneous data and an error code In case of no errors the sequence of error structs is empty OPC data accesses use both server and client side handles created based on identification texts for nodes and items To make the translation from identification texts to handles fast and avoid repeated translation in OPC an intermediate server side identifier called the blob exists In DAIS the server side handles and blobs are replaced by identifiers based on ResourceIDs both for nodes and items For a description of ResourceIDs refer to Section 2 2 “Data Access Facility DAF ? on page 2-4 The OPC client side handles are still kept in DAIS COM OPC use the standard interfaces IConnectionPoint to set up callbacks In DAIS callbacks are set up directly between server and client by updating an attribute holding the callback object The COM style enumerators in OPC are replaced by CORBA style iterators in DAIS In OPC multiple parallel vectors often pass data In DAIS a single vector holding structs thus reducing the number of parameters replaces the parallel vectors In OPC all methods return the HRESULT error value In DAIS HRESULTs are replaced by exceptions and out parameters are returned as method results instead Only in a few cases are there additional output parameters in DAIS In OPC data is generally organized in hierarchical structures In data access the leafs are called leaf nodes and the branches branch nodes or items A leaf node or item is the same as an instance of property at an object A branch node corresponds to an • Object having properties • Arbitrary organization of other branch nodes • Object having both properties and other branch nodes as children In DAIS data access the branch nodes are called nodes and the leaf nodes are called items In DAIS alarms & events the branch nodes are called areas and the leaf nodes sources In OPC branch and leaf nodes have a name unique among the nodes or items that are children of the same node A second name is formed by combining these names from each branch node in the path from the node or leaf to the root Both names are called ItemIDs in OPC and the name created by following the path to the root is sometimes called a fully qualified ItemID In DAIS the name unique among the child’s to the same node is called label and the name including the labels from all nodes in the path to the root is called pathname Both DAIS branch nodes and leaf nodes have both a label and a pathname A label is used in the same way as a name but the word label is preferred before the word name as it denotes something that is atomic that is it cannot be further divided OPC provides a server side cursor from where browsing is made and the OPC interface provides methods to move the cursor DAIS does not provide server side cursors and requires the client to keep track of browse positions themselves The reason for removing server side cursors is it makes clean up after crashed clients easier and simplifies the server design OPC does not support types meaning it is not possible in OPC to get information about the type of a node OPC however supports properties which means it is possible to browse the existing properties and what properties a particular node has DAIS has extended this to also include types that is it is possible to browse existing types the properties each type has and each node has a type OPC defines the following property sets • set 1 of OPC specific properties • set 2 of OPC recommended properties • set 3 of vendor specific properties In DAIS OPC set 1 properties cannot be browsed through the property-browsing interface Property Instead access of set 1 properties is direct in the interfaces as parameters or struct members as is the case for OPC This means that DAIS exposes only OPC set 2 and 3 properties through the property browse interface The UMS DAF and DAIS are server APIs for access of object data rather than the data objects themselves The DAF describes a generic interface for navigating and reading data from complex data structures including relations between objects Both DAF and DAIS support navigation in a space of hierarchically structured objects an object is called a node in DAIS and a resource in DAF Both support identification of objects and properties at an object In DAIS an instance of property at an object is called an item and an ItemID item identifier identifies an item An ItemID consists of a ResourceID resource identifier for the node and a PropertyID property identifier for the property The DAIS API uses ItemIDs to access data while the DAF uses ResourceIDs and PropertyIDs separated A system may implement both a DAF server and a DAIS server In such a system it shall be assumed that the same object will have the same ResourceID seen through either API This means it shall be possible to navigate to an object retrieve its ResourceID through one of the APIs and use that ResourceID with the other API In the same way PropertyIDs are the same Textual identification of resources and properties in the DAF is by URIs Uniform Resource Identifier ResourceIDs and PropertyIDs have their own URIs URIs can be translated into corresponding ResourceIDs and PropertyIDs and vice versa A property name is a URI where the container part is a unique schema identifier and the fragment part is the property name For example http www epri com schema CIM-07f xml#Measurement positiveFlowIn DAIS does not support URIs directly but has a textual representation for nodes items types and properties This textual representation may correspond to the fragment part of a URI In the case where a system supports both the DAF and the DAIS interfaces it is expected that the same object will be identified by the same ResourceID through both interfaces and the same property by the same PropertyID Sameness of objects and properties however depends on the information model exposed through the two interfaces and if the information models are different then a mapping is required In the case where a system supports both the DAF and the DAIS interfaces it is expected that the same objects will be identified by the same ResourceID and URI fragment through both interfaces and the same property by the same PropertyID and URI fragment The exact mapping has to be described for each DAIS item – DAF property pair according to the underlying information models Section 4 1 5 “Utility SCADA EMS Measurement Model ? on page 4-5 elaborates on the information model and a detailed mapping between IEC 61970-30x and the DAIS can be found in Section 4 1 5 “Utility SCADA EMS Measurement Model ? on page 4-5 The foregoing concepts are fundamental enough that they should find equivalents in any data repository Some perhaps approximate equivalents are given in Table 2-1 as a guide Table 2-1 Mappings between modeling languages RDF DAF Relational Model UML DAIS Resource Resource ResourceID Tuple i e row Object Node ResourceID Property Property PropertyID Attribute i e column or foreign key Attribute or association Property PropertyID Class Class ClassID Relation i e table Class Type TypeID Resource Description Resource Description Tuple value - Sequence URI URI ResourceID Key value - Value SimpleValue Field value - SimpleValue - ResourceID and PropertyID pair - - Item ItemID DAIS uses the DAF SimpleValue type for data transferred over the API instead of the OPC type VARIANT The data types used in OPC are Microsoft COM types and as DAIS is a CORBA API a mapping of the data types is needed The translation of OPC COM data types to DAF CORBA data types is listed below Table 2-2 Mappings between OPC and DAF data types OPC COM basic types DAF Simple Value types - ResourceID RESOURCE TYPE - URI URI TYPE LPWSTR VT BSTR string STRING TYPE BOOL VT BOOL boolean BOOLEAN TYPE LONG VT R4 long INT TYPE DWORD VT I4 unsigned long UNSIGNED TYPE double VT R8 double DOUBLE TYPE - Complex COMPLEX TYPE FILETIME VT Date DateTime DATE TIME TYPE - ULongLong ULONG LONG TYPE WORD VT I2 unsigned long UNSIGNED TYPE FLOAT VT R4 double DOUBLE TYPE BYTE VT UI1 - HRESULT VT ERROR - VARIANT VARTYPE SimpleValue SimpleValueType The DAF describes a generic interface for navigating and reading data from complex data structures including relations between objects Both DAF and DAIS support navigation in a space of hierarchically structured objects an object is called a node in DAIS and a resource in DAF Both support identification of objects and properties at an object In DAIS an instance of property at an object is called an item and an ItemID item identifier identifies an item An ItemID consists of a ResourceID resource identifier for the node and a PropertyID property identifier for the property The DAIS API uses ItemIDs to access data while the DAF uses ResourceIDs and PropertyIDs separated A system may implement both a DAF server and a DAIS server In such a system it shall be assumed that the same object will have the same ResourceID seen through either API This means it shall be possible to navigate to an object retrieve its ResourceID through one of the APIs and use that ResourceID with the other API In the same way PropertyIDs are the same Textual identification of resources and properties in the DAF is by URIs Uniform Resource Identifier ResourceIDs and PropertyIDs have their own URIs URIs can be translated into corresponding ResourceIDs and PropertyIDs and vice versa A property name is a URI where the container part is a unique schema identifier and the fragment part is the property name For example http www epri com schema CIM-07f xml#Measurement positiveFlowIn DAIS does not support URIs directly but has a textual representation for nodes items types and properties This textual representation may correspond to the fragment part of a URI In the case where a system supports both the DAF and the DAIS interfaces it is expected that the same object will be identified by the same ResourceID through both interfaces and the same property by the same PropertyID Sameness of objects and properties however depends on the information model exposed through the two interfaces and if the information models are different then a mapping is required In the case where a system supports both the DAF and the DAIS interfaces it is expected that the same objects will be identified by the same ResourceID and URI fragment through both interfaces and the same property by the same PropertyID and URI fragment The exact mapping has to be described for each DAIS item – DAF property pair according to the underlying information models Section 4 1 5 “Utility SCADA EMS Measurement Model ? on page 4-5 elaborates on the information model and a detailed mapping between IEC 61970-30x and the DAIS can be found in Section 4 1 5 “Utility SCADA EMS Measurement Model ? on page 4-5 The foregoing concepts are fundamental enough that they should find equivalents in any data repository Some perhaps approximate equivalents are given in Table 2-1 as a guide Table 2-1 Mappings between modeling languages RDF DAF Relational Model UML DAIS Resource Resource ResourceID Tuple i e row Object Node ResourceID Property Property PropertyID Attribute i e column or foreign key Attribute or association Property PropertyID Class Class ClassID Relation i e table Class Type TypeID Resource Description Resource Description Tuple value - Sequence URI URI ResourceID Key value - Value SimpleValue Field value - SimpleValue - ResourceID and PropertyID pair - - Item ItemID DAIS uses the DAF SimpleValue type for data transferred over the API instead of the OPC type VARIANT The data types used in OPC are Microsoft COM types and as DAIS is a CORBA API a mapping of the data types is needed The translation of OPC COM data types to DAF CORBA data types is listed below Table 2-2 Mappings between OPC and DAF data types OPC COM basic types DAF Simple Value types - ResourceID RESOURCE TYPE - URI URI TYPE LPWSTR VT BSTR string STRING TYPE BOOL VT BOOL boolean BOOLEAN TYPE LONG VT R4 long INT TYPE DWORD VT I4 unsigned long UNSIGNED TYPE double VT R8 double DOUBLE TYPE - Complex COMPLEX TYPE FILETIME VT Date DateTime DATE TIME TYPE - ULongLong ULONG LONG TYPE WORD VT I2 unsigned long UNSIGNED TYPE FLOAT VT R4 double DOUBLE TYPE BYTE VT UI1 - HRESULT VT ERROR - VARIANT VARTYPE SimpleValue SimpleValueType Interfaces defined in COM and CORBA IDL differ in a number of ways Important differences concerning interface definitions are • object referencing • interface management • error management and • IDL A detailed description of the mapping can be found in the CORBA 2 3 specification chapters 17 18 and 19 In CORBA each object is uniquely referenced in one step In COM obtaining an object usually is a two step process In the first step a stateless server object is obtained In the second step the server object is loaded with state data In CORBA an object is a unique individual that contains state from the very beginning A CORBA object has a single interface This interface can be built from several other interfaces through inheritance The resulting interface might have many methods and hence become big A COM object usually has multiple interfaces and supports the client to detect and navigate between these interfaces at run time As a CORBA interface is defined by inheritance it has to be fully defined at compile time As COM allows run time detection of interfaces the IUnknown QueryInterface method a full match between interfaces implemented by a server and interfaces known to a client is not required Mapping OPC interfaces to DAIS interfaces can be done in two ways 1 Inherit a number of OPC interfaces into one CORBA object This may result in name clashes that require renaming of methods 2 Instantiate an OPC interface as an own CORBA object referenced by a container object Both techniques are used in the DAIS specification CORBA provides exceptions for error handling and COM does not COM provides error status through a return parameter called HRESULT The caller has to explicitly test the HRESULT to decide if the operation was successful HRESULT return parameters are replaced by CORBA exceptions The COM and CORBA IDL have several syntactical differences and use different style guides In CORBA each object is uniquely referenced in one step In COM obtaining an object usually is a two step process In the first step a stateless server object is obtained In the second step the server object is loaded with state data In CORBA an object is a unique individual that contains state from the very beginning A CORBA object has a single interface This interface can be built from several other interfaces through inheritance The resulting interface might have many methods and hence become big A COM object usually has multiple interfaces and supports the client to detect and navigate between these interfaces at run time As a CORBA interface is defined by inheritance it has to be fully defined at compile time As COM allows run time detection of interfaces the IUnknown QueryInterface method a full match between interfaces implemented by a server and interfaces known to a client is not required Mapping OPC interfaces to DAIS interfaces can be done in two ways 1 Inherit a number of OPC interfaces into one CORBA object This may result in name clashes that require renaming of methods 2 Instantiate an OPC interface as an own CORBA object referenced by a container object Both techniques are used in the DAIS specification CORBA provides exceptions for error handling and COM does not COM provides error status through a return parameter called HRESULT The caller has to explicitly test the HRESULT to decide if the operation was successful HRESULT return parameters are replaced by CORBA exceptions The COM and CORBA IDL have several syntactical differences and use different style guides DAIS as well as OPC structure nodes and items hierarchically Nodes and items have a label uniquely identifying child’s located at the same node The labels from the nodes in the path from a node or item to the root form a pathname The pathname uniquely identifies a node or item in the tree The same principle for naming objects is described in the IEC 1346-1 standard IEC 1346-1 call labels for single level designation and the pathname for multi level designation and supports multiple hierarchical structures The DAIS supports multiple structures by allowing multiple views where each view exposes one structure The IEC 61970-30x [8] draft standard also named CIM describes a specific organization of power system objects in a hierarchical structure DAIS is transparent to the structure and hence supports the IEC 61970 structure DAIS is also transparent to what attributes are defined as long as they can be reached through the hierarchy DAIS however defines a set of attributes that a DAIS server is expected to support Some of these attributes can also be found in IEC 61970-30x A detailed attribute mapping is provided later in this specification and is further elaborated in Section 4 1 5 “Utility SCADA EMS Measurement Model ? on page 4-5 The W3C XPath [13] standard describes how navigation in a hierarchical structure i e an XML document is made using an expression In DAIS navigation is made using the various browse APIs However in one place there is a need to describe navigation paths as expressions and that is for the condition logic in Alarms and Events Contents This chapter contains the following sections Section Title Page “Common Declarations? 3-1 “Server? 3-30 This section describes the DAISServer and IDL common to the server data access and alarms & events To support universal character encodings the UTF-8 Unicode standard [12] shall be used for characters and strings The DAIS relies on the Data Access Facility DAF for basic data type declarations and some DAF declarations for example ResourceID and SimpleValue are included because of this DAIS common declarations for example DAIS Quality are made in DAISCommon Interfaces for nodes types properties and sessions are also common between data access and alarms & events The Interface Definition Language IDL files and dependencies listed in Figure 3-1 are defined DAFIdentifiers DAFDescriptions DAISSession DAISCommon DAISNode DAISProperty DAISType Figure 3-1 Dependencies among common IDL files Refer to the Data Access Facility specification [2] Refer to the Data Access Facility specification [2] File DAISCommon idl#ifndef DAIS COMMON IDL#define DAIS COMMON IDL#pragma prefix "omg org"#include module DAIS{typedef unsigned short SupportedFunctions const SuportedFunctions DAIS DATA ACCESS =0x0001 const SupportedFunctions DAIS ALARMS AND EVENTS =0x0002 typedef DAFDescriptions ResourceID ResourceID typedef DAFDescriptions SimpleValueType SimpleValueType typedef DAFDescriptions SimpleValue SimpleValue typedef DAFDescriptions DateTime DateTime typedef DAFDescriptions PropertyID PropertyID typedef DAFDescriptions PropertyValueSequence PropertyValues sequences of resource idstypedef sequence ResourceIDs typedef sequence PropertyIDs truct ItemID{ResourceID resource PropertyID property } typedef sequence ItemIDs typedef unsigned long ClientItemHandle typedef sequence ClientItemHandles typedef unsigned long long ServerItemHandle typedef sequence ServerItemHandles typedef short ServerItemIdentificationType const ServerItemIdentificationType ITEM ID = 0 const ServerItemIdentificationType PATH NAME = 1 union ServerItemIdentification switch ServerItemIdentificationType { case ITEM ID ItemID item case PATH NAME string pathname } typedef sequenceServerItemIdentifications typedef unsigned short Error struct ItemError { Error err ClientItemHandle client handle ServerItemHandle server handle string pathname string reason } typedef sequence ItemErrors error codes const Error ERROR DAISOK = 0 const Error ERROR BAD RIGHTS = 1 const Error ERROR UNKNOWN ITEMID = 2 const Error ERROR CLAMPED = 3 const Error ERROR OUT OF RANGE = 4 const Error ERROR UNKNOWN PATHNAME = 5 const Error ERROR BAD TYPE = 6 const Error ERROR UNKNOWN ACCESS PATH = 7 const Error ERROR INTERNAL SERVER = 8 const Error ERROR INVALID DAIS HANDLE = 9 enum AccessRights { READABLE WRITEABLE READ AND WRITEABLE } typedef unsigned long OPCQuality typedef unsigned long UserQuality struct Quality { OPCQuality opc quality UserQuality user quality } Masks for extracting quality subfields note 'status' mask also includes 'Quality' bits const OPCQuality OPC QUALITY MASK = 0x000000C0 const OPCQuality OPC STATUS MASK = 0x000000FC const OPCQuality OPC LIMIT MASK = 0x00000003 Values for QUALITY MASK bit field const OPCQualityOPC QUALITY BAD = 0x00000000 const OPCQuality OPC QUALITY UNCERTAIN = 0x00000040 const OPCQualityOPC QUALITY GOOD = 0x000000C0 STATUS MASK Values for Quality = BAD const OPCQuality OPC QUALITY CONFIG ERROR = 0x00000004 const OPCQuality OPC QUALITY NOT CONNECTED = 0x00000008 const OPCQuality OPC QUALITY DEVICE FAILURE = 0x0000000C const OPCQuality OPC QUALITY SENSOR FAILURE = 0x00000010 const OPCQuality OPC QUALITY LAST KNOWN = 0x00000014 const OPCQuality OPC QUALITY COMM FAILURE = 0x00000018 const OPCQuality OPC QUALITY OUT OF SERVICE = 0x0000001C STATUS MASK Values for Quality = UNCERTAIN const OPCQuality OPC QUALITY LAST USABLE = 0x00000044 const OPCQuality OPC QUALITY SENSOR CAL = 0x00000050 const OPCQuality OPC QUALITY EGU EXCEEDED = 0x00000054 const OPCQuality OPC QUALITY SUB NORMAL = 0x00000058 const OPCQuality DAIS QUALITY OCILLATORY = 0x0000005C STATUS MASK Values for Quality = GOOD const OPCQuality OPC QUALITY LOCAL OVERRIDE= 0xD8 use EXQ Source xxx instead of OPC QUALITY LOCAL OVERRIDE Values for Limit Bitfield const OPCQualityOPC LIMIT OK = 0x00000000 const OPCQualityOPC LIMIT LOW = 0x00000001 const OPCQualityOPC LIMIT HIGH = 0x00000002 const OPCQualityOPC LIMIT CONST = 0x00000003 DAIS Quality extension masks const OPCQuality EXQ SOURCE MASK = 0x00000700 const OPCQuality EXQ TEST MASK = 0x00000800 const OPCQuality EXQ OPERATOR BLOCKED MASK = 0x00001000 const OPCQuality EXQ TIMESTAMP ACCURACY MASK = 0x00006000 DAIS Quality source extensionconst OPCQuality EXQ SOURCE NONE = 0x00000000 const OPCQuality EXQ SOURCE PROCESS = 0x00000100 const OPCQuality EXQ SOURCE PRIMARY SUBSTITUTED = 0x00000200 const OPCQuality EXQ SOURCE INHERITED SUBSTITUTED= 0x00000300 const OPCQuality EXQ SOURCE CORRECTED = 0x00000400 const OPCQuality EXQ SOURCE DEFAULTED = 0x00000500 DAIS Time stamp accuracyconst OPCQuality EXQ TS ACC 10 MSEC = 0x00000000 const OPCQuality EXQ TS ACC 100 MSEC = 0x00002000 const OPCQuality EXQ TS ACC SECOND = 0x00004000 const OPCQuality EXQ TS ACC BAD TIME = 0x00006000 } #endif DAIS COMMON IDL SupportedFunctions This constant tells what functions the DAIS server i e Data access Alarms & Events or both supports In case the server is extended with other functions they are included as well e g Historical Data functionality HDAIS DAF declarations These declarations for example ResourceID import DAF declarations to DAIS ItemID A pair of a ResourceID and a PropertyID It uniquely identifies an item that is a property at a node Member Description resource The ResourceID property The PropertyID ClientItemHandle A client created numeric handle used by the client to efficiently identify data coming from the server in callbacks ServerItemHandle A server created numeric handle used by the server to efficiently identify items in client calls ServerItemIdentification A union that holds either an ItemID or a pathname Either can be used for identification of an item Error Numeric error codes that are returned by ItemError EnumValue Description ERROR DAISOK Used to indicate an error free result ERROR BAD RIGHTS The Items AccessRights do not allow the operation ERROR UNKNOWN ITEMID The resource or property in the ItemID is unknown ERROR CLAMPED A value passed to WRITE was accepted but the output was clamped ERROR OUT OF RANGE The value was out of range ERROR UNKNOWN PATHNAME The pathname was not recognised ERROR BAD TYPE The server cannot convert the data between the specified format requested data type and the canonical data type ERROR UNKNOWN ACCESS PATH The item's access path is unknown ERROR INTERNAL SERVER An error has appeared in the server due to some server internal problem ERROR INVALID DAIS HANDLE A client or server handle was invalid ItemError A struct for reporting of item related errors Member Description err An error code as described below client handle The client side handle identifying the item server handle The server side handle identifying the item pathname The pathname for display or presentation purposes reason An additional text explaining the error AccessRights Numeric access rights supported per item EnumValue Description READABLE Read only data WRITEABLE Write only data READ AND WRITABLE Both read and write data OPCQuality A flag word giving the OPC quality Each flag has a specific meaning as described below Four groups of flags exist 1 Main quality telling if a value is good bad or suspected 2 Detailed quality 3 Limits telling if the value is stuck 4 Historical data access flags Those flags are described in the HDAIS specification Bit masks are defined to extract these flags Quality status and limit bit masks Mask Description OPC QUALITY MASK Bit mask for main quality OPC STATUS MASK Bit mask for detailed quality OPC LIMIT MASK Bit mask for the limits Main quality enumeration numbers Enum Description OPC QUALITY BAD The number for bad quality OPC QUALITY UNCERTAIN The number for uncertain quality OPC QUALITY GOOD The number for good quality After application of the OPC QUALITY MASK the quality shall be compared directly to the enumeration numbers to decide the quality Detailed quality flags for bad quality Flag Description OPC QUALITY CONFIG ERROR There is a server configuration error concerning this value OPC QUALITY NOT CONNECTED The source of the value is not connected OPC QUALITY DEVICE FAILURE A device failure has been detected OPC QUALITY SENSOR FAILURE A sensor failure has been detected OPC QUALITY LAST KNOWN The updating has stopped but there is an old value available OPC QUALITY COMM FAILURE Communication has failed and no value available OPC QUALITY OUT OF SERVICE The updating of the value is manually blocked for update the item is not active Detailed quality flags for uncertain quality Flag Description OPC QUALITY LAST USABLE The value is old The time stamp gives the age OPC QUALITY EGU EXCEEDED The value is beyond the capability of representation for example counter overflow OPC QUALITY SENSOR CAL The sensor calibration is bad OPC QUALITY SUB NORMAL Value is derived from multiple sources where the majority has less than required good quality DAIS QUALITY OCILLATORY If a binary value changes cyclically with a frequency higher than a specific threshold it is oscillating This quality compliant with IEC 61850-7-3 Definition of limit flags Flag Description OPC LIMIT OK The value is not limited that is it moves freely up or down OPC LIMIT LOW The value is stuck at a low limit OPC LIMIT HIGH The value is stuck at a high limit OPC LIMIT CONST The value is stuck constant DAIS Quality extension masks The part of the flag word giving the DAIS extended quality Each flag has a specific meaning as described below These quality definitions are based on the revised IEC 61850-7-3 definitions of quality The following masks are defined Mask Description EXQ SOURCE MASK Bit mask for the source EXQ TEST MASK Bit mask for the test status The test status indicates that the value is generated by a test and shall not be regarded as an operational value EXQ OPERATOR BLOCKED MASK Bit mask for the operator blocked status The status indicates that the value has been blocked for update and is old The OPC QUALITY LAST USABLE quality shall be set as well EXQ TIMESTAMP ACCURACY MASK Bit mask for the time stamp accuracy Flags defining source Flag Description EXQ SOURCE NONE There is no source for this data item The code is used for spare items not yet allocated EXQ SOURCE PROCESS The source for this value is the process EXQ SOURCE PRIMARY SUBSTITUTED The value is manually substituted EXQ SOURCE INHERITED SUBSTITUTED A substituted value has been copied or used as input to some calculation The result value is then marked with EXQ SOURCE INHERITED SUBSTITUTED EXQ SOURCE CORRECTED An alternate and more accurate value has been calculated by some application e g a State Estimator If this value has been used to correct the original value it shall be indicated EXQ SOURCE CORRECTED EXQ REMOTE DEFAULTED The value is initialized by a default value Flags defining time stamp quality Flag Description EXQ LOCAL NONEEXQ TS ACC 10 MSEC The value is not updated locally i e it has a remote source specification The flags =0 indicate that the accuracy is 10 milliseconds or better IEC61850-7-2 performance class T0 EXQ LOCAL SUBSTITUTEDEXQ TS ACC 100 MSEC The value is locally substituted manually The flags =1 indicate that the accuracy is 100 milliseconds or better EXQ LOCAL SE REPLACEDEXQ TS ACC SECOND The value is locally substituted by State Estimator The flags =2 indicate that the accuracy is in the range of seconds or better EXQ TS ACC BAD TIME The flags =3 indicate that the time stamp is bad QualityThe DAIS quality consists of OPCQuality and ExtendedQuality Member Description opc quality The quality as specified by OPC including extensions from DAIS user quality A user specific quality Methods that return information about more than one resource may return an iterator The resource description iterator allows a client to access a large query result sequentially several resources at a time This is necessary where the ORB limits message sizes It also enables implementations to overlap the client and server processing of query results if necessary The client and the data provider should cooperate to manage the lifetime of the iterator and the resources it consumes The destroy and next n methods allow the client and data provider respectively to indicate that the iterator may be destroyed In addition the data provider may autonomously destroy the iterator at any time for resource management or other reasons If a client detects that an iterator has been destroyed it will not interpret this condition in itself as either an indication that the end of the iteration has been reached or as a permanent failure of the data provider next n This operation returns possibly 0 and at most n resource descriptions in the form of a resource description sequence In all cases the state of the iteration is indicated by the Boolean return value • True means that there may be more resource descriptions beyond those returned so far • False means all the resource descriptions have now been returned No further calls are expected for this iterator and the data provider may destroy the iterator at any time after the call returns reset This operation resets the iterator to the first element clone This operation returns a copy of the iterator destroy This operation is used to terminate iteration before all the resource descriptions have been returned After destroy is invoked no further calls are expected for this iterator The data provider may destroy the iterator at any time after the call returns A node may represent a real world object such as a location or a piece of equipment A node may also represent a schema item such as a type or property Nodes correspond to “branches? in the IOPCBrowseServerAddressSpace or IOPCEventAreaBrowser interfaces Nodes correspond to Resources in the RDF model and the DAF interface Each node has a universal identity given by its ResourceID The ResourceID of a node is the same in all views provided by a DAIS server DAIS servers may be coordinated with DAF servers so that a node has the same ResourceID as the corresponding resource Each node has zero or more child s A child may be another node or any other type of object for example data access items or alarms & event sources Each node has a type The type determines what other types of child objects a node has Nodes are arranged in a strict hierarchy for naming purposes A DAIS server may provide more than one such hierarchy each is called a view The view is selected when the session is initiated Within a view each node except for the root node has a single parent node a label that is unique among all nodes with the same parent and a unique pathname A node’s pathname is a string that contains its label and the pathname of its parent The pathname must be a valid URI but apart from that the syntax of pathnames is implementation dependent The Node IDL defines a main interface DAIS Node IHome for browsing among the hierarchically structured nodes Nodes are described by DAIS Node Description struct DAIS Node Iterator max left next n reset clone destroy <> DAIS Node IHome find find each find by parent find by type get pathnames get ids <> 0 n 1 0 n1Node id ResourceID label string type ResourceID 0 n0 1 n1NodeItemComponent pathname string 1 0 * +parent 10 * Figure 3-2 DAIS node IDL in UML File DAISNode idl #ifndef DAIS NODE IDL #define DAIS NODE IDL #pragma prefix "omg org" #include module DAIS { module Node { struct Description { ResourceID id ResourceID parent string label string descrip ResourceID type boolean is leaf } typedef sequence< Description > Descriptions interface Iterator { boolean next n in unsigned long n out Descriptions nodes void reset Iterator clone void destroy } interface IHome { exception UnknownResourceID {string reason } exception InvalidFilter {string reason } exception UnkownTypeID {string reason } Description find in ResourceID node raises UnknownResourceID Descriptions find each in ResourceIDs nodes raises UnknownResourceID Iterator find by parent in ResourceID node in string filter criteria raises UnknownResourceID InvalidFilter Iterator find by type in ResourceID node in string filter criteria in ResourceIDs type filter raises UnknownResourceID InvalidFilter UnknownTypeID Strings get pathnames in ResourceIDs nodes ResourceIDs get ids in Strings pathnames } } } #endif DAIS NODE IDL Description A struct describing a node Member Description id The identification of this node parent The identification of the parent node label The label single level designation of the node descrip A descriptive text for the node type A reference to the type of the node is leaf Indicate if the node is a leaf i e it has no child nodes Iterator Refer to Section 3 1 6 “Iterator Methods IDL ? on page 3-10 This interface corresponds to the OPC interface EnumString with the difference that the Iterator returns the Description struct instead of a string IHome An interface used for browsing nodes The interface corresponds to the IOPCBrowseServerAddressSpace with the BrowseFilterType set to OPC BRANCH or the IOPCEventAreaBrowser A major difference to OPC is that the server does not provide a cursor for clients Instead clients have to provide the browse position in each call UnknownResourceID An exception telling that the ResourceID is unknown For methods taking a sequence of resource ids the first found unknown id is reported The likely reason behind this exception is some misunderstanding between the server and client code due to a programming error InvalidFilter An exception telling the filter criteria string is not correct The likely reason behind this exception is an erroneously entered string UnknownTypeID An exception telling one or more TypeIDs does not exist find For a given node return information about that node Parameter Description node A node identification return The node description find each For a sequence of nodes return information about each node Parameter Description nodes A sequence of node identifications return An iterator holding the node descriptions find by parent For a given node return all child nodes at that node Hence to reach leaf nodes using this method repeated calls must be made for each level This corresponds to the OPC method BrowseOPCItemIDs with the parameter dwBrowseFilterType set to OPC BRANCH Parameter Description node The parent node identification filter criteria A server specific filter string This is entirely free format and may be entered by the user via a text field An empty string indicates no filtering The filter selects nodes with a pathname matching the filter criteria For a description of the filter refer to Section 3 1 11 “Filter Definitions ? on page 3-25 return An iterator holding the child node descriptions find by type For a sub-tree given by the node parameter return all child nodes of the specified type This will return all leaf nodes under the given sub-tree root node There is no corresponding operation in OPC Refer to Section 4 2 4 1 “DAIS Item Overview ? on page 4-15 for a description of how item browsing is mapped to OPC Parameter Description node The identification of the node defining the sub-tree filter criteria A server specific filter string This is entirely free format and may be entered by the user via a text field An empty string indicates no filtering The filter selects nodes with a pathname matching the filter criteria For a description of the filter refer to Section 3 1 11 “Filter Definitions ? on page 3-25 type filter A list of TypeIDs Nodes matching any of the TypeIDs will be held by the returned iterator return An iterator holding descriptions for the found nodes get pathnames Translate a sequence of node identifications to the corresponding sequence of pathnames If a node fails to translate to a pathname due to an unknown node identification the corresponding pathname is an empty string Parameter Description nodes The sequence of nodes return The corresponding sequence of pathnames get ids Translate a sequence of pathnames to the corresponding sequence of node identifications If a pathname fails to translate to a node identification due to an unrecognized pathname the corresponding node identification is NULL Parameter Description pathnames The sequence of pathnames return The corresponding sequence of node identifications A type represents a set of related properties and associations Each node has a type and all the properties represented by that type apply to the node Each type is identified by a ResourceID and has a label and description A type may be obtained for any node using the node’s TypeID Related types may be grouped into a schema A ResourceID identifies each schema All the types in a schema may be obtained given the schema ResourceID A schema and its type may be represented as nodes in one or more of views provided by a DAIS server When a schema is represented as a node the node’s ResourceID and the schema ResourceID are identical Similarly when a type is represented as a node the node’s ResourceID and the type’s ResourceID are identical The type’s parent is always the node representing its schema the type’s label is identical to the node label and the type’s description is identical to the node description The type IDL defines a main interface DAIS Type IHome for browsing supported types DAIS Type IHome find find by schema <> +aggregated types 11 0 n0 n 0 n0 n 11 0 n0 n Type id ResourceID schema ResourceID label string description string DAIS Type Iterator max left next n destroy <> Figure 3-3 DAIS type IDL in UML File DAISType idl #ifndef DAIS TYPE IDL #define DAIS TYPE IDL #pragma prefix "omg org" #include "DAISCommon idl" module DAIS { module Type { struct Description { ResourceID id ResourceID schema string label string descrip ResourceIDs aggregated types } typedef sequence Descriptions interface Iterator { boolean next n in unsigned long n out Descriptions types void reset Iterator clone void destroy } interface IHome { exception UnknownResourceID {string reason } Description find in ResourceID type raises UnknownResourceID Iterator find by schema in ResourceID schema raises UnknownResourceID } } } #endif DAIS TYPE IDL Description A struct describing a type Member Description id The identification of this type schema The identification of the schema where the type is defined label The label of the type descrip A description of the type aggregated types A sequence of type identifications that a node of this type may contain This information is intended as a guide when the type filter is specified for the find by type methods IHome An object used to browse the types There is no corresponding interface in OPC UnknownResourceID An exception telling that the ResourceID is unknown The likely reason behind this exception is some misunderstanding between the server and client code due to a programming error find For a given type return information about that type Parameter Description type A type identification return The type description find by schema For a given schema find all types defined by that schema Parameter Description schema The identification of the schema return A sequence of type descriptions A property represents a characteristic of a node that can be described with a value A given property may apply to many nodes for each such node there will be an item corresponding to the property See Section 4 2 4 “DAISItem IDL ? on page 4-15 A DAIS property corresponds to a property in RDF and the DAF A DAIS property corresponds to the concept of a property in OPC accessed with the IOPCItemProperties QueryAvailableProperties method However the six core OPC properties timestamp quality value do not correspond to properties in DAIS They are given special treatment in OPC they are not the same as other OPC properties See Section 4 2 4 “DAISItem IDL ? on page 4-15 for interfaces to handle these Each property is identified by a ResourceID and has a label description and canonical data type The canonical data type is a member of the SimpleType enumeration and indicates the preferred CORBA atomic data type for values of this property Every item of a given property has an identical canonical data type A property may be obtained for any item via the property member of the ItemID All properties that apply to a given node may be obtained given the node’s ResourceID All properties that apply to the nodes of a given type may be obtained given the TypeID A property may be represented as a node in one or more of views provided by a DAIS server In this case the node’s ResourceID and the property’s ResourceID are identical The property’s parent is always the node representing the type to which it belongs The property’s label is identical to the node label and the property’s description is identical to the node description The property IDL defines a main interface DAIS Property IHome for browsing properties The information model describing how the properties are related to nodes and items is found in Section 4 1 1 “Nodes Items Types and Properties ? on page 4-2 Property id PropertyID label string description string canonical data type SimpleValueType DAIS Property IHome <> find find each find by node find by type 0 n 1 0 n1 Figure 3-4 DAIS property IDL in UML File DAISProperty idl#ifndef DAIS PROPERTY IDL#define DAIS PROPERTY IDL#pragma prefix "omg org"#include module DAIS {module Property { struct Description { PropertyID id string label string descrip SimpleValueType canonical data type } typedef sequence Descriptions interface IHome { exception UnknownResourceID {string reason } Description find in PropertyID property raises UnknownResourceID Descriptions find each in PropertyIDs properties raises UnknownResourceID Descriptions find by node in ResourceID node raises UnknownResourceID Descriptions find by type in ResourceID type raises UnknownResourceID } } } #endif DAIS PROPERTY IDL Description Describe a property Member Description id The identification of this property label The label single level designation of the property descrip A description of the property canonical data type The data type used for the property in the server Home An object used for browsing properties defined for a type or existing at a node It corresponds to the OPC interface IOPCItemProperties UnknownResourceID An exception telling that the ResourceID is unknown The likely reason behind this exception is some misunderstanding between the server and client code due to a programming error find For a given property return information about that property Parameter Description property A property identification return The property description find each For a given property return information about that property Parameter Description properties A sequence of property identifications return The sequence of property descriptions find by node For a node return information about each property describing its items This method corresponds to IOPCItemProperties QueryAvailableProperties Parameter Description node A node identification return A sequence of property descriptions find by type For a given type return all property descriptions Parameter Description type A type identification return A sequence of property descriptions The session is an interface inherited by data access and alarms & events sessions A session represents a single conversation with the DAIS service A session has a connection to a shut down callback used by a server to shut down clients in the case of an ordered shut down of the server If the session object is destroyed or a failure is detected by the server when invoking an operation on any callback objects then the session is terminated A session object corresponds to the OPC server object hence each OPC server object will be represented by a session object in DAIS Client fro m DA ISServ er DAIS ShutdownCallback <> shutdown notify 1 0 1 10 1DAIS Session <> status DAIS SessionStatus callback DAIS ShutdownCallback callback callback DAIS ShutdownCallback destroy 0 1 1 0 11 Figure 3-5 DAIS session IDL in UML The status method corresponds to the read only SessionStatus attribute in the IDL The callback get and set methods correspond to the ShutDownCallback attribute File DAISSession idl #ifndef DAIS SESSION IDL #define DAIS SESSION IDL #pragma prefix "omg org" #include module DAIS { struct SessionStatus { string name DateTime start time DateTime current time DateTime last update time unsigned long group count long band width } interface ShutdownCallback { void shutdown notify in string reason } interface Session { readonly attribute SessionStatusstatus attribute ShutdownCallback callback void destroy } } #endif DAIS SESSION IDL SessionStatus A struct holding session status Parameter Description name Within the server unique name of the session start time The time when the session was started This time is not reset during the session lifetime current time The current time as known by the server last update time The time when the server sent an event notification for this session group count The current number of groups for a data access session or the number of event subscriptions for an alarms & event session band width If held updated by the server the percentage bandwidth in use for communication with underlying RTUs or devices A value of 100 or more indicates that more bandwidth for communication with devices is required than available A value of -1 indicates the value is unknown by the server ShutdownCallback An object implemented by clients and used by the server to indicate that it will shutdown soon No further calls should be made and no further data callbacks should be expected shutdown notify Parameter Description reason An explanation of why the server is shutting down Session An interface representing a single conversation with the DAIS service The interface is inherited into interfaces representing sessions supporting specific services for example data access or alarms & events status A read only attribute holding the SessionStatus callback An attribute holding a reference to a ShutDownCallback object A client that wants to receive shut down callbacks from a server shall update the attribute with a reference to a ShutDownCallback object destroy A method for deletion of the session object Some methods have a filter string for example the browse methods find by type and find by parent in DAISNode and DAISItem The filter string shall contain a pattern that is used to match a text string e g the pathname The text strings matching the pattern are passing the filter The strings that may appear in the filter string pattern are listed below Characters in pattern Matches in string ? Any single character * Zero or more characters # Any single digit 0-9 substring The specified substring [charlist] Any single character in charlist [!charlist] Any single character not in charlist Some examples of patterns and strings are given below Pattern String String pass filter a*a aBBBa Yes [A-Z] F Yes [!A-Z] F No a#a a2a Yes a[L-P]#[!c-e] aM5b Yes B?T* BAT123khg Yes B?T* CAT123khg No This section defines a little language that is used to describe logical expressions and navigation in structures A logical expression evaluates to true or false and can be used in filters for collection of data or definition of states etc The condition logic described in Section 5 2 7 “DAISConditionSpace IDL ? on page 5-32 is used to define states In DAIS the data model seen through the API is a hierarchical structure of typed nodes A typed node may contain other typed nodes and or property values called items This data model is described in more detail in Section 4 1 “Information Model ? on page 4-1 In addition to this hierarchy DAIS supports data models where a property value may refer to one or more other nodes Hence navigation via such references is needed as well An information model that includes both hierarchy and references is the IEC 61970 briefly described in Section 4 1 5 “Utility SCADA EMS Measurement Model ? on page 4-5 To be able to navigate to nodes in the structure the little language shall include support for describing paths XML Path Language XPath [13] is a language that supports navigation in structures and this specification uses a subset of XPath as the logical expression language XPath requires the exposed data model to be hierarchical even though a model is exposed as hierarchical it may internally be organized in other ways A logical expression in XPath is called “PredicateExpr? statement 9 in the XPath specification [13] A PredicateExpr evaluates to true or false A logical expression in DAIS is called DAIS Expression The rules for a DAIS expression are • DAIS Expression = PredicateExpr The following restrictions of the functionality described in the XPath specification are defined for DAIS Expression • The union operator "|" is not supported refer to statement 18 in [13] • The arithmetic operators "+" "-" "div" "*" and "mod" are not supported refer to statements 25 26 and 27 in [13] • unabbreviated location paths is not supported • abbreviated location paths is supported • the following axes are supported child parent descendant attribute and self • the following XPath functions are supported id position not true false The mapping between DAIS and XML data models is listed below Table 3-1 Mapping between DAIS and XML data models DAIS entity XML entity Comment Node A DAIS Node element that may be contained by another DAIS node element The DAIS Node element name is the DAIS Type name DAIS Type Description label referenced by DAIS Node Description type If the DAIS Node element has a parent element the parent is given by Node Description parent Node Description id An id attribute of type ID at a DAIS Node element Accessed by the id function Node Description label A child element of a DAIS Node element The element name is “label ? The value is Node Description label Table 3-1 Mapping between DAIS and XML data models DAIS entity XML entity Comment Node Description descrip A child element of a DAIS Node element The element name is “description ? The value is Node Description descrip Item A DAIS Item element that is child of a DAIS Node element The element name is the DAIS Property name DAIS Property Description label concatenated with the DAIS Node element name separated by a “ ? The DAIS Property is given by Item Description id property The DAIS Node parent element is given by Item Description id resource Item Description value The value of the DAIS Item element XML data example