OPCHDA.NET-UA
HDAServer Class Members
See Also  Fields  Properties  Methods  Events Send Feedback
OpcHDaNetUaOption.Net4 Assembly > hdaUAwrapper Namespace : HDAServer Class

Glossary Item Box

The following tables list the members exposed by HDAServer.

Public Constructors

 NameDescription
Public ConstructorHDAServer Constructor Constructs a wrapper instance for one UA server. The optional configuration settings are read from the application configuration file.  
Top

Public Fields

 NameDescription
Public FieldAuthenticationWindowsIntegrated  
Public FieldcfgName Name of the application. this string is used to build: - the configuratuion file name xxx.Ua.Config.Xml - the endpoint definition file name xxx.Ua.Endpoints.Xml  
Public Fieldstatic (Shared in Visual Basic)onNotifyUntrustedCertificate handler that is called when the server certificate is untrusted  
Public FieldPreferredEndpoint Use this endpoint at connect if possible.  
Public FieldPreferSecureConnection Use the endpoint with highest security if true, otherwise the lowest priority.  
Public FieldproxyServer The object with the server access methods.  
Public FieldTraceMaskUserDefined  
Public Fieldstatic (Shared in Visual Basic)UaAppConfigFileAutoCreate If not null then an application configuration file is created unless it already exists. The defined name is used as the appliction name.  
Top

Public Properties

 NameDescription
Public PropertyDefNamespaceURIs NamespaceURIs that match the NodeIDs persisted in the client application. If the application doesn't set this property before the Connect then the URIs are tried to be loaded from the file app.url.XML in the same directory as the app.exe executable. url is the UA server URL without the xxx://  
Public PropertyisConnected Indicates the client connect status. The server may have closed the session for e.g. loss of communication.  
Public PropertyTraceEventsTrace Event selection. This is a bit mask of the following flags:
0x0: None
0x1: Output error messages
0x2: Output informational messages
0x4: Output stack traces
0x8: Output basic messages for service calls
0x10: Output detailed messages for service calls
0x20: Output basic messages for each operation
0x40: Output detailed messages for each operation
0x80: Output messages related to application initialization or shutdown
0x100: Output messages related to a call to an external system
0x200: Output messages related to security  
Public PropertyTraceOutputs Trace output destination selection  
Top

Public Methods

 NameDescription
Public MethodCallUaMethodExecute a call of a UA Method.
The input arguments must specified according the method input parameter definition. in the order and data type  
Public MethodCancelRead

This synchronous function cancels the outstanding operation. The actual implementation is server specific, but the server shall respond via the client's CancelComplete event handler unless a FAILED error code is returned from the call.

If a FAILED error code is returned, there will be no callback to the client's CancelComplete event handler.

 
Public MethodConnect The UA server connection is initiated with the optional credentials.  
Public MethodCreateBrowse This synchronous function creates a new OPCHDA_BROWSER object. The filters will be applied to all method calls to this instance of the browser. The server is expected to validate the filter arrays. The server must support a single client having simultaneous access to multiple browse interfaces. Filtering is optional behavior for a server. If a server does not support filtering, or only supports filtering on some of the requested attributes, the server shall return an interface to a browser which is only filtered on the accepted attributes. A server which does not support filtering shall return a pointer to an unfiltered browser interface. Filter operations are additive. To successfully pass filter criteria, the item must successfully satisfy all of the filter criteria. Implementation of filtering and browsing is server specific, however it is anticipated that servers with hierarchical name spaces may only apply filters to leaves, causing them to return branches which have no leaves which satisfy the criteria. It is anticipated that a client may create one browser to locate a particular area of the hierarchy, obtain a fully qualified branch name using GetBranchPosition, then pass that branch name to another browser which is using a different filter set. Servers may optionally support wild cards for string filters. To represent a single character the “?” shall be used. To represent multiple characters the “*” shall be used.  
Public MethodDeleteAtTimeOverloaded. 

This asynchronous function is intended to be used to delete specific data from the history database; e.g., lab data that is incorrect and cannot be correctly reproduced.

The results are returned via the client's UpdateComplete event handler.

This function deletes the values and qualities in the history database for the specified timestamps for one or more items.

 
Public MethodDeleteRawOverloaded. 

This asynchronous function deletes the values, qualities, and timestamps from the history database for the specified time domain for one or more items. This function is intended to be used to delete data that has been accidentally entered into the history database; e.g., deletion of data from a source with incorrect timestamps.

The results are returned via the client's UpdateComplete event handler.

 
Public MethodDisconnect Disconnect form the UA server  
Public MethodGetAggregates This synchronous function returns the list of aggregates supported by the server. The OPC defined aggregates are defined in specification section 5.3.3. Vendor specific aggregates also are supported. The vendor supplied aggregates are made available to allow the client to use all the functions available to their specific server. If no aggregates are supported, the function shall return a count of 0 and NULL pointers.  
Public MethodGetHistorianStatus Get the current status of the UA server, converted to the OPC HDA defined states.  
Public MethodGetItemAttributes This synchronous function returns the item attributes supported by the server. The OPC defined attribute types are defined in specification section 5.2. Vendor specific attributes also are supported. The vendor supplied attributes are made available to allow the client to access and display vendor specific information. Attribute data types are intended to allow query filtering when browsing item ids. If no attributes are supported by the server, the function shall return a count of 0 and NULL pointers.  
Public MethodGetItemHandles Given a list of ItemIDs and client handles, this function returns the server handles for each item. The returned server handles must be used in all requests to read or update history. The supplied client handles are included in the returns of all read and update requests.  
Public MethodGetLocaleID Get the current default LocalID. ( IOPCCommon::GetLocaleID )  
Public MethodGetNodeClass Returns the UA NodeClass enumerator value for each item.  
Public MethodGetUaMethodDefinition Retrieve the argument definition for the method specified by the node identifier (item ID).  
Public MethodInsertOverloaded. 

This asynchronous function inserts values and qualities into the history database for the specified timestamps for one or more items. If a value exists at the specified timestamp, the new value shall not be inserted; instead errors shall indicate an error.

This function is intended to insert new values at the specified timestamps; e.g., the insertion of lab data to reflect the time of data collection.

The results are returned via the client's UpdateComplete event handler.

 
Public MethodInsertAnnotationsOverloaded. 

This asynchronous function inserts annotations into the history database. This function is intended to insert annotations by users to document observations for a value at a specified timestamp.

The results are returned via the client's InsertAnnotations event handler.

 
Public MethodInsertReplaceOverloaded. 

This asynchronous function inserts or replaces values and qualities at the specified timestamps for one or more items. If the item has a value at the specified timestamp, the new value and quality shall replace the old one. If there is no value at that timestamp, the function shall insert the new data.

This function is intended to unconditionally insert/replace values and qualities; e.g., correction of values for bad sensors.

The results are returned via the client's UpdateComplete event handler.

 
Public MethodQueryAvailableLocaleIDs Query the LocaleIDs supported by the OPC Server. ( IOPCCommon::QueryAvailableLocaleIDs ) If any error occurs a ThrowExceptionForHR is thrown.  
Public MethodReadAnnotationsOverloaded. 

This asynchronous function reads the annotations from the history database in the specified time domain for the specified item IDs.

This function is intended to read annotations for an item at specified timestamps.

The results are returned via the client's ReadAnnotations event handler.

 
Public MethodReadAtTimeOverloaded. 

This asynchronous function reads the values and qualities from the history database for the specified timestamps for one or more items.

This function is intended to provide values to correlate with other values with a known timestamp. For example, the values of sensors when lab samples were collected.

The results are returned via the client's ReadComplete event handler.

 
Public MethodReadAttributeOverloaded. 

This asynchronous function reads the attribute values and timestamps from the history database for the specified time domain for an item.

This function is intended to be used to retrieve attributes that have changed to correlate the values of these attributes with the values of their data. For example, the recalibration of a sensor may have required the normal maximum and minimum attributes to be changed.

The results are returned via the client's ReadAttributeComplete event handler.

 
Public MethodReadModifiedOverloaded. 

This asynchronous function reads the values, qualities, timestamps, user ID, and timestamp of the modification from the history database for the specified time domain for one or more items.

The purpose of this function is to read values from history that have been modified/replaced (a value was returned with a quality of OPCHDA_EXTRADATA, indicating that there were other values for that item/timestamp which had been superseded).

The results are returned via the client's ReadModifiedComplete event handler.

 
Public MethodReadProcessedOverloaded. 

This asynchronous function computes aggregate values, qualities, and timestamps from data in the history database for the specified time domain for one or more items.

The time domain is divided into subintervals of duration resampleInterval. The specified aggregate is calculated for each subinterval beginning with startTime by using the data within the next resampleInterval.

This function is intended to provide values calculated with respect to the resample interval. For example, this function can provide hourly statistics such as Maximum, Minimum, Average, et. al. for each item during the specified time domain when resampleInterval is 1 hour.

The results are returned via the client's ReadComplete event handler.

 
Public MethodReadRawOverloaded. 

This asynchronous function asynchronously reads the values, qualities, and timestamps from the history database for the specified time domain for one or more items.

When bBounds is TRUE, the bounding values for the time domain are returned. This function is intended for use by clients wanting the actual data saved within the historian.

The actual data may be compressed or may be all data collected for the item depending on the historian and the storage rules invoked when the item values were saved. The optional bounding values are provided to allow clients to interpolate values for the start and end times when trending the actual data on a display.

The results are returned via the client's ReadComplete event handler.

 
Public MethodReleaseItemHandles This synchronous function releases associations between server handles and client handles for specific HDA items.  
Public MethodReplaceOverloaded. 

This asynchronous function replaces values and qualities in the history database at the specified timestamps for one or more items. If no value exists at the specified timestamp, the new value shall not be inserted; instead errors shall indicate an error. This function is intended to replace existing values at the specified timestamp; e.g., correct lab data that was improperly processed, but inserted into the history database.

The results are returned via the client's UpdateComplete event handler.

 
Public MethodSetClientName This method is not implemented in UA. In DA it's main use is for debugging purposes.  
Public MethodSetLocaleID Set the default LocaleId for this session. ( IOPCCommon::SetLocaleID )  
Public MethodValidateItemIDs This synchronous function validates that specific HDA item IDs are known to the server.  
Top

Public Events

 NameDescription
Public EventonTraceUA Trace Notifcation application callback handler.
The events being logged are defined by the value in the TraceEvents mask. The application handler is called in addition to the logging to file. Logging to file can be disabled by configuring an empty log file name.  
Top

See Also

Copyright © 2018 Advosol Inc. All Rights Reserved.