Previous | Table of Contents | Next |
//File: DAISGroup.idl #ifndef _DAIS_GROUP_IDL #define _DAIS_GROUP_IDL #pragma prefix "omg.org"
#include <DAISCommon.idl> #include <DAISGroupEntry.idl> #include <DAISDAIO.idl>
module DAIS { module DataAccess { module Group {
exception DuplicateName {string reason;};
struct State {
string | name; | ||||
unsigned long | update_rate; | ||||
boolean | active; | ||||
long | time_bias; | ||||
double | percent_deadband; | ||||
unsigned long | locale_id; | ||||
}; |
struct PublicGroupDescription
{ ResourceID id; State group_state;
}; typedef sequence<PublicGroupDescription>PublicGroupDescriptions;
interface Manager : GroupEntry::Manager ,IO::AsyncIO ,IO::SyncIO ,IO::ConnectionPoint
{
State get_state ();
unsigned long set_state ( in State group_state ) raises (DuplicateName);
Manager clone ( in string name ) raises (DuplicateName);
PublicGroupDescription clone_group_to_public ( in string name ) raises (DuplicateName);
void destroy (); }; interface IHome {
exception UnknownResourceID {string reason;};
PublicGroupDescriptions find_public_groups();
PublicGroupDescription find (in ResourceID public_group ) raises (UnknownResourceID);
Manager create_group (
in State group_state,
out unsigned long revised_update_rate
) raises (DuplicateName);
Manager clone_group_from_public (
in ResourceID public_group,
in string name
) raises (DuplicateName, UnknownResourceID);
void remove_public_group (
in ResourceID public_group
) raises (UnknownResourceID); };};};}; #endif // _DAIS_GROUP_IDL
DuplicateName
An exception raised when an object is created and the name already exists. No object is created if the exception is raised.
Used for session and group manager objects.
State
The struct contains information about the group state.
Members | Description | ||||
name | Within the session and public groups, unique name of the group. | ||||
update_rate | Update rate for the group in milliseconds. When used as input it specifies the fastest rate at which data changes may be sent to on_data_change() for items in this group. This also indicates the desired accuracy of cached data. This is intended only to control the behavior at the interface. How the server deals with the update rate and how often it actually polls the hardware internally is an implementation detail. Passing 0 indicates the server should use the fastest practical rate. |
activetime_biaspercent_deadbandlocale_id |
|||||
Indicates if the group is active and data from devices is updated in the cache. | |||||
The time bias in minutes for the group. A zero value when used as input will tell the server to use the default system time bias. This bias behaves like the Bias field in the Win32 TIME_ZONE_INFORMATION structure. | |||||
The percent change for an item value that will cause a call back for that value. This parameter only applies to items in the group that are of analog type. If a client specifies a zero deadband, the value will be reported with the update rate. | |||||
The localization number for the language used when returning string values. |
Manager
An object used to manage a group. It has a set of methods related to the group itself. It also inherits methods from interfaces
for group entry management and data transfer. For
group entry management refer to Section 4.2.6, “DAISGroupEntry IDL,? on page 4-32
and for data transfer refer to
Section 4.2.4, “DAISItem IDL,? on page 4-15. The
DAIS::DataAccess::Group::Manager interface corresponds to the IOPCGroupStateMgt interface.
get_state()
The method gets the group status.
set_state()
The method sets the group status.
Parameter | Description | ||||
group_state | The State with the updates. All members will be updated. If the name already exists, a DuplicateName exception is raised and no update is made. | ||||
return | The closest update rate the server is able to provide for the group. |
clone()
Create a copy of a group.
Parameter | Description | ||||
name | The name to be given for the new group. If the name already exists, a DuplicateName exception is raised and no clone is created. | ||||
return | A description of the public group. |
clone_group_to_public ()
Create a public copy of a group including all items and the group state.
Parameter | Description | ||||
name | The name to be given for the new group. If the name already exists, a DuplicateName exception is raised and no public group is created. | ||||
return | A description of the public group. |
destroy()
Delete the group.
PublicGroupDescription
A struct describing public groups.
Member |
Description |
||||
id | A ResourceID identifying the public group. | ||||
group_state | The group state struct including the group name. |
IHome
The factory object for groups. The corresponding OPC interface is IOPCServer.
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.
find_public_groups()
Find all public groups defined in the server.
find()
For a given public group, return information about that group.
Member |
Description |
||||
public_group | A ResourceID identifying the public group. | ||||
return | A public group description. |
create_group()
Create a new initially empty group.
Parameter | Description | ||||
group_state | The State to be set for the new group. | ||||
revised_update_rate | The closest update rate the server is able to provide for the group. | ||||
return | The new group. |
clone_group_from_public()
Create a copy from a public group having an existing set of entries and state.
Parameter |
Description |
||||
public_group | The identification of the public group. | ||||
name | The name of the new group. | ||||
return | The new group. |
remove_public_group()
Remove a public group.
Parameter |
Description |
||||
public_group | The identification of the public group. | ||||
return | None. |
Group management
Figure 4-15 Group management interaction
Activate subscription
Figure 4-16 Active subscription interaction
Activate a subscription silently
Figure 4-17 Activate a subscription silently interaction
Cancel
refresh( )
cancel( )
async_read( )
cancel( )
async_write( )
cancel( )
Figure 4-18 Cancellation interaction