The following tables list the members exposed by OpcGroup.
Name | Description | |
---|---|---|
Active | OpcGroup Active state property assignement. A get is from the OpcGroup property. Use OpcGrp.GetStat() to refresh the properties if this may be necessary. On set the OPC server is updated. On server call errors an exception is thrown if the property OpcServer.ErrorsAsExecptions is set. | |
HandleClient | OpcGroup Client Handle property assignement. A get is from the OpcGroup property. Use OpcGrp.GetStat() to refresh the properties if this may be necessary. On set the OPC server is updated. | |
HandleServer | OpcGroup Server Handle property assignement. A get is from the OpcGroup property. Use OpcGrp.GetStat() to refresh the properties if this may be necessary. Only get access is allowed. | |
LocaleID | OpcGroup LocaleID property assignement. A get is from the OpcGroup property. Use OpcGrp.GetStat() to refresh the properties if this may be necessary. On set the OPC server is updated. On server call errors an exception is thrown if the property OpcServer.ErrorsAsExecptions is set. | |
Name | OpcGroup name property assignement. A get is from the OpcGroup property. Use OpcGrp.GetStat() to refresh the properties if this may be necessary. On set the OPC server is updated. | |
PercentDeadband | OpcGroup PercentDeadband property assignement. A get is from the OpcGroup property. Use OpcGrp.GetStat() to refresh the properties if this may be necessary. On set the OPC server is updated. On server call errors an exception is thrown if the property OpcServer.ErrorsAsExecptions is set. | |
Public | OpcGroup name property assignement. A get is from the OpcGroup property. Use OpcGrp.GetStat() to refresh the properties if this may be necessary. Only get is allowes with this property. | |
TimeBias | OpcGroup TimeBias property assignement. A get is from the OpcGroup property. Use OpcGrp.GetStat() to refresh the properties if this may be necessary. On set the OPC server is updated. On server call errors an exception is thrown if the property OpcServer.ErrorsAsExecptions is set. | |
UpdateRate | OpcGroup UpdateRate property assignement. A get is from the OpcGroup property. Use OpcGrp.GetStat() to refresh the properties if this may be necessary. On set the OPC server is updated. On server call errors an exception is thrown if the property OpcServer.ErrorsAsExecptions is set. |
Name | Description | |
---|---|---|
AddItems | Add a set of items to the group. ( IOPCItemMgt::AddItems ) It is acceptable to add the same item to the group more than once. This will generate a 2nd item with a unique ServerHandle. Any FAILED code in ppErrors indicates that the corresponding item was NOT added to the group and that the corresponding OPCITEMRESULT will not contain useful information. As an alternative to OPC_E_BADTPYE it is acceptable for the server to return any FAILED error returned by VariantChangeType or VariantChangeTypeEx. The server provided item handle will be unique within the group, but may not be unique across groups. The server is allowed to 'reuse' the handles of deleted items. Items cannot be added to public groups. The client needs to free all of the memory associated with the OPCITEMRESULTs including the BLOB. If the server supports the BLOB it will return an updated BLOB in the OPCITEMRESULTs. This BLOB may differ in both content and size from the one passed by the client in OPCITEMDEF. Note that if an Advise is active, the client will begin receiving callbacks for active items. This can occur very quickly, perhaps even before the client has time to process the returned results. The client must be designed to deal with this. One simple solution is for the client to clear the Active state of the group while doing AddItems and to restore it after the AddItems is completed and the results are processed. | |
AdviseIOPCDataCallback | Activates the callback handling. The server makes callbacks on data change, read complete, write complet and cancel complete. The user needs to install callback event handlers to actually getting notified. | |
Cancel2 | Request that the server cancel an outstanding transaction. ( IOPCAsyncIO2::Cancel2 ) | |
ClearItemDeadband | Clears the individual item PercentDeadband, effectively reverting them back to the deadband value set in the group. ( Available in OPC DA V3 servers only ). | |
ClearItemSamplingRate | Clears the sampling rate on individual items, which was previously set with SetItemSamplingRate. ( Available in OPC DA V3 servers only ). The item will revert back to the update rate of the group. | |
CloneGroup | Clone a group. There is rarely a good reason to use this method. | |
GetEnable | Retrieves the last Callback Enable value set with SetEnable. ( IOPCAsyncIO2::GetEnable ) | |
GetItemAttributes | Get the attibutes of all items in the group. | |
GetItemBufferEnable | Queries the current state of the servers buffering for requested items. ( Available in OPC DA V3 servers only ). | |
GetItemDeadband | Gets the deadband values for each of the requested items. ( Available in OPC DA V3 servers only ). | |
GetItemSamplingRate | Gets the sampling rate on individual items, which was previously set with GetItemSamplingRate ( Available in OPC DA V3 servers only ). | |
GetKeepAlive | Returns the currently active keep-alive time for the group subscription. ( Available in OPC DA V3 servers only ). | |
GetState | Overloaded. Updates the member variables in the OpcGroup object with the current state of the OPC group by calling IOPCGroupStateMgt::GetState. The status information can then be accessed using the OpcGroup property accessors. | |
QualityToString | Helper method to build a string for an OPC Quality code | |
Read | Overloaded. Read the value, quality and timestamp information for one or more items in a group. The function runs to completion before returning.( IOPCSyncIO::Read ) | |
ReadMaxAge | Overloaded. Reads one or more values, qualities and timestamps for the items specified. This is functionally similar to the OPCSyncIO::Read method except it is asynchronous and no source is specified (DEVICE or CACHE). The server will make the determination as whether the information will be obtained from the device or cache. This decision will be based upon the MaxAge parameter. If the information in the cache is within the MaxAge, then the data will be obtained from the cache, otherwise the server must access the device for the requested information. | |
Refresh2 | Force a callback to IOPCDataCallback::OnDataChange for all active items in the group (whether they have changed or not). Inactive items are not included in the callback. ( IOPCAsyncIO2::Refresh2 ) | |
RefreshMaxAge | Force a callback to IOPCDataCallback::OnDataChange for all active items in the group (whether they have changed or not). Inactive items are not included in the callback. The MaxAge value will determine where the data is obtained. There will be only one MaxAge value, which will determine the MaxAge for all active items in the group. This means some of the values may be obtained from cache while others could be obtained from the device depending on the “freshness” of the data in the cache. | |
Remove | Remove the associated OPC group and release all interfaces. Existing callbacks are UnAdvised and then the server function IOPCServer::RemoveGroup is called. | |
RemoveItems | Remove a set of items from the group. ( IOPCItemMgt::RemoveItems ) | |
SetActiveState | Sets one or more items in a group to active or inactive. This controls whether or not valid data can be obtained from Read CACHE for those items and whether or not they are included in the IAdvise subscription to the group. ( IOPCItemMgt::SetActiveState ) | |
SetClientHandles | Changes the client handle for one or more items in a group. IOPCItemMgt::SetClientHandles ) | |
SetDatatypes | Overloaded. Changes the requested data type for one or more items in a group. | |
SetEnable | Controls the operation of OnDataChange. Basically setting Enable to FALSE will disable any OnDataChange callbacks with a transaction ID of 0 (those which are not the result of a Refresh). ( IOPCAsyncIO2::SetEnable ) | |
SetItemBufferEnable | Requests that the server turns on or off, depending on the value of the enableState parameter, the buffering of data for the identified items, which are collected for items that have an update rate faster than the group update rate. ( Available in OPC DA V3 servers only ). | |
SetItemDeadband | Overrides the deadband specified for the group for each item. ( Available in OPC DA V3 servers only ). | |
SetItemSamplingRate | Sets the sampling rate on individual items. ( Available in OPC DA V3 servers only ). This overrides the update rate of the group as far as collection from the underlying device is concerned. The update rate associated with individual items does not effect the callback period. | |
SetKeepAlive | Sets the keep-alive time for the group subscription. Only OPC DA V3 servers support the keep alive feature. The OPCDA.NET Professional Edition emulates the keep alive feature for servers that don't implement the OPC DA V3 IOPCGroupStateMgt2 interface. Some servers may implement the interface but not the method. In this case the OpcServer.DeclareV2 property has to be set to force the emulation to be used. The emulation has a client side thread that makes periodically GetStatus server calls and executes keepalive DataChange callbacks accourding the OPC DA V3 keep alive specification. Clients can set the keep-alive time for a subscription to cause the server to provide client callbacks on the subscription when there are no new events to report. Clients can then be assured of the health of the server and subscription without resorting to pinging the server with calls to GetStatus(). Using this facility, a client can expect a callback (data or keep-alive) within the specified keep-alive time. Servers shall reset their keep-alive timers when real data is sent (i.e. it is not acceptable to constantly send the keep-alive callback at a fixed period equal to the keep-alive time irrespective of data callbacks). | |
SetName | Change the name of the OPC group. ( IOPCGroupStateMgt::SetName ) The name must be unique. The name cannot be changed for public groups. | |
SetState | The client can set various states of the group. The "defined" flag has to be set in the argument object for each state the client wants to change. Group states can be changed by calling this method or alternatively individually by assigning the corresponding OpcGroup property. | |
ValidateItems | validate a set of items. ( IOPCItemMgt::ValidateItems ) Determines if an item is valid (could it be added without error). Also returns information about the item such as canonical datatype. Does not affect the group in any way. | |
Write | Overloaded. Writes values to one or more items in a group. The function runs to completion. The values are written to the DEVICE. That is, the function should not return until it verifies that the device has actually accepted (or rejected) the data. ( IOPCSyncIO::Write ) | |
WriteVQT | Overloaded. Writes one or more values, qualities and timestamps for the items specified. ( Available only in OPC DA V3 servers ) This method is functionally similar to the OpcGroup.Write except that Quality and Timestamp may be written. If a client attempts to write VQ, VT, or VQT it should expect that the server will write them all or none at all. |
Name | Description | |
---|---|---|
CancelCompleted | Is called from the server on cancel completed events. AdviseIOPCDataCallback needs to be called to activate the callback handling. The client can install handlers to handle notifications of completion of cancel requests. | |
DataChanged | Is called from the server on data change events. AdviseIOPCDataCallback needs to be called to activate the callback handling. The client can install handlers to handle notifications of data changes and Refreshes. | |
ReadCompleted | Is called from the server on read completed events. AdviseIOPCDataCallback needs to be called to activate the callback handling. The client can install handlers to handle notifications of completion of read requests. | |
WriteCompleted | Is called from the server on write completed events. AdviseIOPCDataCallback needs to be called to activate the callback handling. The client can install handlers to handle notifications of completion of write requests. |