Previous Table of Contents Next


3.2.2.2 IDL


   //File: DAISServer.idl#ifndef _DAIS_SERVER_IDL#define _DAIS_SERVER_IDL#pragma prefix "omg.org"#include <DAISDASession.idl>#include <DAISAESession.idl>

   module DAIS {

   enum ServerState {SERVER_STATE_RUNNING,SERVER_STATE_FAILED,SERVER_STATE_NOCONFIG,SERVER_STATE_SUSPENDED,SERVER_STATE_TEST

   };

   struct ServerStatus { DateTime start_time; DateTime current_time; ServerState server_state; unsigned long session_count; unsigned long major_version; unsigned long minor_version; unsigned long build_number; string vendor_info;

   };

   interface Inspection {};

   interface Server

   { exception DuplicateName {string reason;}; exception InvalidView {string reason;};

   readonly attribute ServerStatusstatus;readonly attribute SupportedFunctions supported_functions;

   DataAccess::Session create_data_access_session(in string session_name) raises (DuplicateName);

   DataAccess::Session create_data_access_session_for_view( in string session_name, in string view_name

   ) raises (DuplicateName, InvalidView);

   AlarmsAndEvents::Session create_alarms_and_events_session( in string session_name ) raises (DuplicateName);

   AlarmsAndEvents::Session

   create_alarms_and_events_session_for_view( in string session_name, in string view_name ) raises (DuplicateName, InvalidView);

   Strings find_views();

   Inspection inspect();

   };};

   #endif // _DAIS_SERVER_IDL

   ServerState

   An enumeration of the states a Server may have.

EnumValue Description
SERVER_STATE_RUNNING The server is running normally. This is the usual state for a server.
SERVER_STATE_FAILED A vendor specific fatal error has occurred within the server. The server is no longer functioning. The recovery procedure from this situation is vendor specific.
SERVER_STATE_NOCONFIG The server is running but has no configuration information loaded and thus cannot function normally. This state implies that the server needs configuration information in order to function. Servers that do not require configuration information should not return this state.
SERVER_STATE_SUSPENDED The server has been temporarily suspended via some vendor specific method and is not getting or sending data. Note that Quality will be returned as OPC_QUALITY_OUT_OF_SERVICE.
SERVER_STATE_TEST The server is in Test Mode. The outputs are disconnected from the real hardware but the server will otherwise behave normally. Inputs may be real or may be simulated depending on the vendor implementation. Quality will generally be returned normally.

   ServerStatus

Member Description
start_time Time the server was started. This is constant for the server instance and is not reset when the server changes states. Each instance of a server should keep the time when the process started.
current_time The current time as known by the server.
server_state The current status of the server. Refer to ServerState enumeration.
session_count The total number of sessions created by clients for this server.
major_version The major version of the server software.

minor_version

build_number

vendor_info

The minor version of the server software.
The ‘build number’ of the server software.
Vendor specific string providing additional information about the server. It is recommended that this mention the name of the company and the type of device(s) supported.

   supported_functions

   A constant that tells what functions are implemented by the DAIS server (e.g., Data Access, Alarms & Events or both.)

   Inspection

   An optional interface intended to be specialized into a vendor specific inspection object. The inspection object is intended to expose server internal details for debugging and inspection purposes.

   Server

   An object implementing the DAIS server. A DAIS server might provide more than one view on nodes. A view is a specific hierarchical organization of nodes and nodes may appear in more than one hierarchical structure (for example, a functional structure or a location structure as defined by IEC 1346-1), refer also to Section 2.4, “IEC 1346-1, Structuring and Naming,? on page 2-7.

   DuplicateName

   An exception raised when an object is created and the name already exists. No object is created if the exception is raised. Is used for session and group manager objects.

   InvalidView

   An exception raised when an invalid view is specified. An invalid view is if the view name does not exist or a view not intended for the type of session is used (for example, a view for data access is used for alarms & events).

   statusAn attribute holding the ServerStatus.create_data_access_session()

   A method for creation of a data access session object. The default view will be used.

Parameter Description
name The name of the session. If an empty name is supplied, the server will create a name for the session. If a duplicate name is supplied, no session is generated.
return A reference to the created DAIS::DataAccess::Session object.

   create_data_access_session_for_view()

   A method for creation of a data access session object using a view of nodes.

Parameter Description
name The name of the session. If an empty name is supplied, the server will create a name for the session. If a duplicate name is supplied, no session is generated.
view_name The name of the view to open. If no name is supplied, the default view will be used.
return A reference to the created DAIS::DataAccess::Session object.

   create_alarms_and_events_session()

   A method for creation of an alarms & events session object. The default view will be used.

Parameter Description
name The name of the session. If an empty name is supplied, the server will create a name for the session. If a duplicate name is supplied, no session is generated.
return A reference to the created DAIS::DataAccess::Session object.

   create_alarms_and_events_session_for_view()

   A method for creation of an alarms & events session object using a view of areas. This allows a server to support different area structures for different purposes (for example, operational responsibility, workorder management).

Parameter Description
name The name of the session. If an empty name is supplied, the server will create a name for the session. If a duplicate name is supplied, no session is generated.
view_name The name of the view to open.
return A reference to the created DAIS::DataAccess::Session object.

   find_views()

   A method to get the names for the server supported views.


   inspect()

   A method for creation of an inspection object.


   Session Management


   Figure 3-8 Session management interaction