Oasys Dna: Business Object Reference
Oasys Dna: Business Object Reference
www.schneider-electric.com
Legal Information
The Schneider Electric brand is the sole property of Schneider Electric Industries SAS. Any
trademarks of Telvent Canada Ltd. or Telvent USA, LLC referred to in this guide are the sole
property of Telvent Canada Ltd. or Telvent USA, LLC. The Schneider Electric brand and
trademarks may not be used for any purpose without the owner's permission, given in writing. This
guide and its content are protected, within the meaning of the applicable copyright and trademark
laws and international conventions. Unless otherwise agreed in writing, you may not reproduce all
or part of this guide on any medium whatsoever without the permission of Telvent Canada Ltd. You
also agree not to establish any hypertext links to this guide or its content. All other rights are
reserved.
© 2016 Telvent Canada Ltd. All rights reserved.
Table of Contents
Table of Contents
1 Business Object Client (.NET) Reference ..............................................................................................5
1.1 Languages available for business objects......................................................................................5
2 .NET Clients introduction.......................................................................................................................19
2.1 Using the OASyS DNA Visual Studio Wizard to create a new Business Object Component.......19
2.2 Deployment..................................................................................................................................33
2.3 Testing and Debugging.................................................................................................................35
3 RealTime Business Objects...................................................................................................................40
3.1 ACEAddCode...............................................................................................................................40
3.2 ACECompile.................................................................................................................................40
3.3 ACEGetCode................................................................................................................................41
3.4 Acknowledge................................................................................................................................42
3.5 Addarea........................................................................................................................................43
3.6 AddDBalarm.................................................................................................................................44
3.7 addAPPalarm...............................................................................................................................45
3.8 AddFlexTag...................................................................................................................................46
3.9 AddSYSalarm...............................................................................................................................48
3.10 Almattr........................................................................................................................................49
3.11 Checkin.......................................................................................................................................50
3.12 CheckForDSTIssues..................................................................................................................50
3.13 Collect_fields..............................................................................................................................52
3.14 Collect_tables.............................................................................................................................52
3.15 ControlGroups............................................................................................................................53
3.16 CreateXosCmdRec.....................................................................................................................54
3.17 Droparea.....................................................................................................................................55
3.18 Enumerate..................................................................................................................................55
3.19 Filteralm......................................................................................................................................56
3.20 FilterFlexTag...............................................................................................................................57
3.21 FilterTag......................................................................................................................................58
3.22 FilterMaskedAlm.........................................................................................................................59
3.23 Fldget..........................................................................................................................................60
3.24 Fldput..........................................................................................................................................61
3.25 Fnput..........................................................................................................................................61
3.26 GetActiveAORPermissions.........................................................................................................62
3.27 GetFlexTagGroupMembers........................................................................................................64
3.28 GetFlexTagGroupRestrictionStates............................................................................................65
3.29 GetProtocolTable........................................................................................................................66
3.30 GetStatMsgTxt............................................................................................................................66
3.31 GetSystemDOASPermissions....................................................................................................67
3.32 GetTableFieldsOfKind.................................................................................................................67
3.33 GetTablesWithFieldName...........................................................................................................68
3.34 GetTagGroupCurValve...............................................................................................................68
3.35 GetTaggingVersion.....................................................................................................................71
3.36 GetUserAORPermissions...........................................................................................................71
3.37 GetYMinMax...............................................................................................................................71
3.38 Helpdb........................................................................................................................................72
3.39 Helptype.....................................................................................................................................72
3.40 InterpTrend.................................................................................................................................73
3.41 Modarea.....................................................................................................................................75
3.42 ModifyFlexTag............................................................................................................................75
3.43 RemoveFlexTag..........................................................................................................................77
3
Table of Contents
4
Business Object Client (.NET) Reference
Business Object components are instantiated on a RealTime or Historical station remotely from a
presentation tier client. Presentation tier clients use the Business Object Client class to activate OASyS
DNA Business Object Components and perform processing.
The Business Object Client class provides a client-side interface for invoking OASyS DNA Business
Object Components from:
• Visual C#
The Business Object Client has a default constructor that is used to create a new instance of the
Business object client.The syntax for it is:
The Business Object Client class also has several methods and properties that help to customize calls
to RealTime and the component.
The features and capabilities of the different languages used for client application creation vary. Different
languages have distinct strengths and limitations. The selection of a language used for development
depends on the following:
A quick comparison of the features and strengths of each available language options follows:
Visual C#:
• medium speed
• easy to write
• examples available
5
Business Object Client (.NET) Reference
C# Script:
• slow
• interpreted language
• easy to write
• examples available
• medium speed
• easy to write
• example available
AddParameter
This method is used to add a parameter to pass to the Business Object RPC.
Declaration:
Remarks:
Output parameters will be overwritten with new values after the Execute method is called. The
parameter list will persist between invocations of the Execute method unless changed.
Related Information
Execute on page 8
Create
This method is used to create a new Business Object component on the specified host. The creation of
the component will time out according to the value set in the ExecutionTimeout property, the default for
which is 10 seconds.
Declaration:
6
Business Object Client (.NET) Reference
Table 2 -
Parameter Description
Name Name of the Business Object component to create such as “Fnput” or
“HelpType” or Filteralm”
Host Name of the host on which to create the component
DeleteParameter
This method is used to delete a parameter from the end of the list to pass to the Business Object RPC.
Declaration:
7
Business Object Client (.NET) Reference
Example:
using System;
using OASySDNA.Common;
class Test
bltclient.Create(“Helptype”, “localhost”);
bltclient.AddParameter(“analog”, false);
bltclient.AddParameter(“dummy”, false);
bltclient.DeleteParameter();
Execute
This method is used to invoke changes to the Business Object component.
Declaration:
Remarks:
The eecution of the component will time out according to the value set in the ExecureTimeout property,
the default for which is 10 seconds. This method results in one or more ADO.NET tables being returned
8
Business Object Client (.NET) Reference
from the RPC. These may be retrieved using the TabularResults property which returns a DataSet
containing the tables.
ExecuteTimeout
This property indicates the timeout that will be used when the Business Object component’s are called.
Declaration:
9
Business Object Client (.NET) Reference
Example:
using System;
using OASySDNA.Common;
class Test
try
bltclient.Create(“Fnput”,”localhost”);
//Add parameters
bltclient.AddParameter(“analog”, false);
bltclient.AddParameter(“1”, false);
bltclient.AddParameter(“manual”, false);
bltclient.CreationTimeout = 500
bltclient.Execute();
catcj(System.Exception e)
10
Business Object Client (.NET) Reference
Console.WriteLine(e.Message);
Console.WriteLine(e.StackTrace);
Locale
This property indicates which locale the Business Object component uses for internationalizing strings.
Declaration:
Remarks:
When you “get” this property, an integer is returned that specifies the locale ID. This ID is a Windows
local ID. In .NET, the locale ID of the current thread can be retrieved using the
System.Globalization.CultureInfo.CurrentCulture.LCID property. The default value is returned by the
GetSystemDefaultLCID () Win32 API call.
NOTE: Baseline OASyS DNA Business Object components do not currently use this property for
internationalizing strings. The use the locale of the server instead
11
Business Object Client (.NET) Reference
Example:
using System;
using OASySDNA.Common;
class Test
try
bltclient.Create(Almattr”, “localhost”);
bltclient.Locale = System.Globalization.CultureInfo.CurrentCulture.LCID;
bltclient.Execute();
catch(System.Exception e)
Console.WriteLine(e.Message);
Console.WriteLine(e.StackTrace);
12
Business Object Client (.NET) Reference
MaxRowsToReturn
This property controls how many rows the Business Object should return
Declaration:
Remarks:
This property is passed to the Business Object as an extra parameter in the Params recordset. The
Business Object decides if this property will affect its outfut for:
• Collect_Fields
• Collect_Tables
• Filteralm
• ListConfigDatasets
• ListSelectmodes
• ShowAccessFlags
• Trend
• TrendView
• TrendFilter
13
Business Object Client (.NET) Reference
Example:
using System;
using OASySDNA.Common;
class Test
try
bltclient.Create(“Almattr”, “localhost”);
bltclient.MaxRowsToReturn = 10;
bltclient.Execute();
catch(System.Rxception e)
Console.WriteLine(e.Message);
Console.WriteLine(e.StackTrace);
14
Business Object Client (.NET) Reference
NumParameters
This property indicates how many parameters are used in calling the RPC
Declaration:
15
Business Object Client (.NET) Reference
Example:
using System;
using OASySDNA.Common;
class Test
try
bltclient.Create(“Filteralm”, “localhost”);
//Add parameters
blt.AddParameter(0,false);
blt.AddParameter(“both”,false);
catch(System.Exception e)
Console.WriteLine(e.Message);
Console.WriteLine(e.StackTrace);
16
Business Object Client (.NET) Reference
RowsAffected
This property indicates the number of rows affected by an Execute method for the Business Object
component.
Declaration:
Remarks:
Syntax
This property invokes the Business Object component’s Syntax property. It returns the XML syntax
string for the Business Object component.
Declaration:
17
Business Object Client (.NET) Reference
Example:
using System;
using OASySDNA.Common;
classTest
try
bltclient.Create(“Filteralm”, “localhost”);
Console.WriteLine(bltclient.Syntax);
catch(System.Exception e)
Console.WriteLine(e.Message);
Console.WriteLine(e.StackTrace);
18
.NET Clients introduction
Visual C# and Visual Basic are intermediate compiled languages. The compiler produces Intermediate
Language (IL) code that is interpreted by the .NET Framework Common Language Runtime (CLR). The
files produced are executable files (.exe), or if appropriately configured, dynamically loaded libraries
(.dll). The executables are compiled to run under the Microsoft .NET Framework.
Before you can create a business object client, the OASyS DNA Common product, Microsoft Visual
Studio.NET (Professional, Enterprise, or Architect), and the OASyS DNA Visual Studio.NET Wizard
must be available to you.
You will need to create a business object client before you can:
2.1 Using the OASyS DNA Visual Studio Wizard to create a new
Business Object Component
Creating a new Business Object Component through Visual Studio.NET, requires that the program has
been configured to use the OASyS DNA Visual Studio Wizard.
Procedure
19
.NET Clients introduction
3. Select Visual C# Projects or Visual Basic Projects from the left-hand pane under Project Types.
4. Select OASySDNA Service Framework BLT from the left-hand pane and BLT_Component under
Templates as shown in the figure above.
5. Type the project name in the Name: field.
6. Click OK.
Step Result: The OASyS DNA Visual Studio Wizard Welcome dialog box starts
20
.NET Clients introduction
Step Result: The OASyS DNA Visual Studio Wizard Select Product dialog box appears
Figure 3 - OASyS DNA Visual Studio Wizard Select Product dialog box
8. Select the product in which the component is deployed and click Next.
Step Result: The OASyS DNA Visual Studio Wizard Finished dialog box appears.
NOTE: You can add your own product to this list by creating a directory under <install dir>\DNA
21
.NET Clients introduction
The following diagram shows how the Business Object components are invoked:
The client uses the BLTClient.NET class to create the component through the Business Object
infrastructure. The infrastructure controls invocation on remote hosts and process isolation. The
infrastructure runs in a separate process from the client. The client and component may or may not be
on separate computers. The client chooses where to instantiate the component – locally or remotely.
The client and component are always on machines within the same domain.
The component is hosted in a special BLTHost process. This process is provided by the OASySDNA
Insfrastructure, and loads the component DLL when the component is invoked.
The infrastructure calls the interface code, which is in the <name>Component object that is derived
from the BLTComponent class. This class uses the IBLT interface to retrieve parameters from the
client. The parameters are stored in the <name>Processor object, which derives from the
BLTProcessor class.
22
.NET Clients introduction
AssemblyInfo
This file contains information about the entire .NET assembly, such as product information, version
information, and an assembly GUI. This file is also responsible for giving the assembly a strong name.
Strong-named assemblies have a unique identifier and a private key that prevents tampering.
RPC<name>
This file implements the interface class for the component. The interface class is responsible for
exposing the component to the Business Object infrastructure. It contains an instance of the
<name>Processor class, which performs the business logic. The RPC<name> class is derived from the
BLTComponent class, which does all of the interface work for you. You should not need to modify this
class.
<name>Processor
This file implements the <name>Processor class, which is derived from the BLTProcessor class.
This class implements a Process() method, which is where you write the business logic. The
constructor for this class defines the syntax for the component. The BLTProcessor class provides
built-in properties and methods to assist you in writing the business logic code.
The C# version of this class is commented using special /// comment markers and XML tags. These
tags are interpreted by the compiler to produce an XML documentation file, which can be processed by
tools such as nDoc and the built-in Build Comment Web Pages tool to produce Windows Help files and
HTML help files.
File Modification
There are two files you may want to modify to customize your Business Object Component: the
constructor, and the process() method.
The constructor of the <name>Processor class can be modified to initialize any member variables
that you create. It is also where you must initialize the component’s parameters. In order to modify the
constructor, you must create a list of its parameters.
The constructor for the <name>Processor component is where you generate the parameter list for the
component. This list determines how many parameters there are, which of them are input or output, and
what type each parameter is. These parameters are validated by the BLTComponent class. Parameter
information is also made available to the client in XML form. The XML shows details for each parameter
as well as a general usage string.
23
.NET Clients introduction
Reading Input Parameters is a fundamental step in changing the process method. Input parameters are
passed by the this.Parameters property that you set in the constructor. Each BLTParameter object
in the list contains a parameter value. Retrieve the parameters with code like this (C# version):
Parameters are expected to appear in the same order in which they were added in the constructor. It is
also important to be mindful of how you write output parameters. Output parameters are designated as
such with the IsOutput property:
Output parameters are set by modifying the Value property of the BLTParameter object in the
Parameters list:
this.Parameters.Item(0).Value = “test”;this.Parameters.Item(1).Value = 1;
You can use the built-in properties, to modify your process method in even more detail. The
BLTProcessor class, from which the <name>Processor class is derived, contains other useful
properties. These are listed in the following table.
NOTE: Use the Object Browser to examine the built in properties for the Business Object
Returning rows to the client helps you verify that your changes to the Process method have worked. The
this.AddResultSet method is used to return rows of data to the client. This method takes a
DataTable object as a parameter. The DataTable class is an ADO.NET datatype available under the
System.Data namespace.
To return rows to the client, create a DataTable object and use the methods provided to add columns
and rows. Then use the this.AddResultSet method to save the recordset for returning to the client.
Multiple DataTables may be returned.
You may also want to return errors to the client to edit your changes to the Process method. Errors can
be returned to the client by throwing a BLTException or System.Exception exception. Errors
should be divided into two types:
24
.NET Clients introduction
Expected errors (RealTime dberr codes, errors caused by the client, database locks being held, etc.).
The built in BLTException class error code is used to signify these errors. Throw a BLTException
exception to signify these errors.
Expected errors are not serious and do not affect the operation of the system. However, they should
generally be communicated to the client via a descriptive message, so that the client can show the
message to the user.
Unexpected errors require the intervention of highly technical personnel, and usually have a negative
impact on system operations. As such, they should be logged in the oasErrLog.log file. A message
indicating that the user call technical support (or some other appropriate message) should be sent to the
client.
The <name>Component class already traps all unexpected errors and logs them to the oasErrLog.log
file, so you usually don’t need to worry about them. However, in cases where you do need to trap these
kinds of errors, the following example should help:
When your are making modifications in order to customize a Business Object component, you may want
to examine the properties with the Object Browser
Properties can be set and retrieved in the Process () method as follows:
this.RowsAffected = 10;
Procedure
25
.NET Clients introduction
The OASyS DNA Net Configuration Data Store is used to store system-wide information on security,
host names, and other information. It resides in Active Directory Lightweight Directory Services (ADLDS)
To access it from your component, you add a reference to OASySDNA.Common:
Procedure
NOTE: The following example gets the virtual host name of the RealTime service.
26
.NET Clients introduction
using OASySDNA.Common.Config;
using OASySDNA.Common.DAL.ClientSDK;
using OASySDNA.Common.DAL.ServerUtilities;
string szADOConnectString;
//= dnaService.GetFQADOString();
DALService.Initialize(DNAEnvironment.SystemName);
szADOConnectString = SQLDriver.GetADOConnectionString("Realtime");
DALService.Shutdown();
conRealtime.Open(szADOConnectString,"","",0);
rsReturn.CursorLocation = ADODB.CursorLocationEnum.adUseClient;
27
.NET Clients introduction
'cmsgroup1'", conRealtime,ADODB.CursorTypeEnum.adOpenStatic,
ADODB.LockTypeEnum.adLockBatchOptimistic,0);
rsReturn.ActiveConnection = null;
conRealtime.Close();
bltrsResults.Recordset = rsReturn;
this.AddRecordset(bltrsResults);
To call other Business Object components, you use the OASySDNA.Common.BLTClient class. The
following example is a component that executes a function put on a series of RealTime points by calling
the Fnput component. In order to run this example, you must add a .NET reference to
OASySDNA.Common. You must also add the following line at the top of the <name>Processor file (C#
code):
using OASySDNA.Common.Config;
this.Parameters.Add(newBLTParameter(“PointList”, typeof
(string),false,false));
28
.NET Clients introduction
int i = 0;
//Attach to AD LDS and get the virtual host name // of the Realtime
database.OASySDNA.Common.Config.DNAService dnaService = new DNAService();
dnaService.Attach(“CHRISS”,”Realtime”);
bltclient.Create("Fnput",szRealtimeHost);
for(i=0;i<szPointArray.Length;i++)
if(szPathArray.Length == 2)
bltclient.AddParameter(szTable,false);
bltclient.AddParameter(szPointName,false);
29
.NET Clients introduction
bltclient.AddParameter(szCommand,false);
bltclient.Execute();
The following example shows how components can access RealTime database using the RealTime
High Performance DB classes. The component takes two status points as input. The status points must
be two-bit input status points. The component returns the four-bit status represented by the combination
of the two points.
using OASySDNA.RealTime.HighPerformanceSetDB;
using OASySDNA.RealTime;
using OASySDNA.RealTime.HighPerformanceDB;
In addition, the component must be installed on all machines that host the RealTime service and the
component must run on the hot RealTime machine.
Constructor:
this.Parameters.Add(new BLTParameter(
"Status1Name",typeof (string),false,false));
this.Parameters.Add(new BLTParameter(
"Status2Name",typeof (string),false,false));
30
.NET Clients introduction
Process() method:
bool bAnyFeed1;
bool bAnyFeed2;
byte bytBitWidth1;
byte bytBitWidth2;
byte bStatus1Value;
byte bStatus2Value;
int bStatusRetval;
OASySDNA.RealTime.HighPerformance.RealTimeDatabase.Open();
rtStatus.Lock(TableLockRequestType.SAFE_READ,0);
31
.NET Clients introduction
try
{rtrecStatus1.Lock(RecordLockRequestType.SAFE_READ,0);
rtrecStatus2.Lock(RecordLockRequestType.SAFE_READ,0);
bytBitWidth1 = rtrecStatus1.ReadByte("inbit.bitwi");
bAnyFeed2 = rtrecStatus2.ReadBool("anyfeed");
bytBitWidth2 = rtrecStatus2.ReadByte("inbit.bitwi");
bStatus1Value = rtrecStatus1.ReadByte("cursta");
bStatus2Value = rtrecStatus2.ReadByte("cursta");
this.Parameters.Item(2).Value = bStatusRetval;
catch(System.Exception e)
throw(e);
}finally{
if(rtrecStatus1.Locked)
32
.NET Clients introduction
{rtrecStatus1.UnLock();}
if(rtrecStatus2.Locked){rtrecStatus2.UnLock();}
if(rtStatus.Locked{
rtStatus.UnLock();
Security
A note about the security for Business Object Components.
Business Object Components use role-based security to provide component-level access control. Each
component can be configured to be accessible by a certain user or group of users. This configuration is
done at run-time.
As well, Business Object Components can determine the original calling client’s security information
(such as the user ID).
To determine who the originator of a Business Object Component call is, you can use the built-in
OriginalClientDomainName and OriginalClientUserName properties of the BLTProcessor
class:
2.2 Deployment
The two principles that affect deployment of Business Object Components are Configuration and
Installation
Business Object Components are distributed the same as other OASySDNA dlls. A configuration file
specifies which components to load and who can access them.
The startup scripts for the associated product or service must be modified to start the application under
which the components will be loaded.
33
.NET Clients introduction
Business Object Components may be started as part of any service or product. This leaves a lot of room
for choosing the installation location. In general, Business Object Components should be distributed and
installed as part of the product that contains them. For instance, the RealTime product contains many
Business Object Components that are distributed and installed with RealTime.
Another factor in choosing the installation location is the OASyS DNA SCADA Suite services that the
component uses. For example, a component that uses the RealTime.HighPerformanceDB class
must be installed on a RealTime host. This is because the HighPerformanceDB class accesses the
RealTime database directly on the local host.
The hosting process is called BLTHost.exe. Each Business Object BLT application is started by a
script that runs when the associated service is started. The applications are registered with the
Schneider Electric SCADA Suite process monitoring system. Each application will automatically load the
correct DLL at run-time to execute a given component.
This architecture allows Business Object Components to be grouped together in a single application or
split into multiple applications. Depending on your scalability needs, or for debugging purposes, you may
want to install all of your components in one application (standard) or use multiple applications.
Each Business Object application is configured using a text configuration file located in the <install
dir>\config\BLT directory. Each configuration file must follow a naming convention:
<AppName>.txt
For instance, the Arbitration Business Object Components are configured as one application in the
Arbitration.txt file.
To configure a Business Object BLTHost application file and add your first component, create a new text
file with Notepad and add the following lines:
As indicated, the first part of the line contains the name of the Business Object Component DLL you
created above – without the .DLL extension. The second part is a list of security groups that have
access to the component. The DNA Permission – View group contains all users and will allow any
OASyS DNA user to access your component.
34
.NET Clients introduction
You can choose seperate security permission group from the default to prevent unauthorized users from
accessing the component. You must choose one of the DNA Permission groups. To add more than one
group, separate them with commas as shown below:
Procedure
1. Select Start > Programs > OASyS DNA > Network Management Console
2. Select Permissions from the list.
If Business Object Component applications start when the associated service starts, it ensures that the
OASyS DNA system will monitor the health of the application. It also ensures that the application will be
shut down properly when the service stops (allowing you to update the component DLLs). Each service
has run_processes scripts located under the <install dir>\scripts\<servicename> directory.
The run_processes script for your service should include code to start up the Business Object
Component application. To see an example examine the run_processes.csc file in the RealTime
directory and find the starting BLTHost.exe.
You should use the distribute utility to install your application on the appropriate project PC. The service
that your application is part of should have a text configuration file for use by distribute. This should
appear in the <install dir>\config directory. For example, the Common service has a
Common.txt configuration file. To configure your application for distribution, add the following lines to
the file on the project Engineering Station:
>bin\bobjYourComponent.dll-e >bin\bobjYourComponent.pdb>config\BLT
\YourAppComponents.txt
When you distribute the service, the Business Object Components will be installed automatically on the
target machine.
35
.NET Clients introduction
Since Business Object Components are not standalone executables, you will need to use a client to test
them. The blttestclient application is provided to assist you in testing. This client will exercise the
component and ensure that it is communicating properly with the client.
Currently, only Visual Studio .NET or the Microsoft Common Language Runtime (CLR) debugger can be
used to debug C# or VB.NET applications (i.e. managed code). The free Debugging Tools for Windows
package (included with OASyS DNA and downloadable from Microsoft) cannot be used to debug these
components.
While inside a Remote Desktop Connection or Terminal Services Client session, you will not be allowed
to use Visual Studio.NET to debug a local process that has not been started by your session. However,
you can debug any remote process using Visual Studio.NET from a Remote Desktop Connection.
Procedure
1. Open your component’s project solution in Microsoft Visual Studio.NET on the Engineering Station or
your developer PC.
2. Choose View > Solution Explorer.
3. Right-click on the component’s project and select Properties.
4. Expand Configuration Properties, then select Build.
5. Ensure that Generate Debugging Information is selected (or set to True).
6. Repeat the above steps for each project configuration (Release and Debug).
7. Recompile the project. This will generate a .pdb file in the <install dir>\bin directory.
8. Distribute the .pdb file to the host on which the component is installed.
Procedure
36
.NET Clients introduction
Procedure
1. Start Microsoft Visual Studio.NET on the host where the component is installed.
2. Click the Tools menu and select Debug Processes.
3. Select the BLTHost process that is hosting your application and click Attach.
4. Select Managed, then click OK.
Visual Studio.NET will attach to the process. You can then use the debugger to set a breakpoint in
your code. If the local host does not have source code installed, you can map a network drive to the
Engineering Station and open a source code file from there. When you stop debugging or close
Visual Studio.NET, the BLTHost process will terminate.
If the component resides on a PC that does not have Visual Studio .NET installed, then you can debug
using the Microsoft Common Language Runtime (CLR) debugger. This debugger is included with the
Microsoft.NET Framework SDK.
37
.NET Clients introduction
Procedure
To download and install the Microsoft .NET Framework SDK, refer to the following web page:
http://msdn.microsoft.com/downloads/default.asp?url=/downloads/sample.asp?url=/msdn-files/
027/000/976/msdncompositedoc.xml
Procedure
You can now load a source file and set a breakpoint in it.
When you navigate to the VS7 debug folder, there should be a number of files, including the Machine
Debug Manager (mdm.exe)
Procedure
If the Machine Debug Manager is not installed, you can install it yourself from the Visual Studio .NET
CD. You do not need an extra Visual Studio .NET license to install this.
For information on installing the Machine Debug Manager, refer to the Microsoft Developer Network
website:
http://www.msdn.microsoft.com
Search for Setting up Remote Debugging. You may also use the following direct link:
http://msdn.microsoft.com/library/en-us/vsdebug/html/vctskInstallingRemoteDebugMonitor.asp
38
.NET Clients introduction
Procedure
1. Start Remote Desktop Connection or Terminal Services Client on the remote machine.
2. Log on to the Engineering Station, or another project PC that has Visual Studio.NET installed.
3. In the remote session, start Microsoft Visual Studio.NET.
4. Click Tools > Debug Processes.
5. In the Name field, select the host name of the target machine.
6. Double-click on the PID of the process hosting your component.
7. Select Managed check box, then click OK.
Remote Debugging
If you do not have physical access to the machine hosting the component, you can debug it remotely
from another machine. The remote machine must be on the same domain as the machine hosting the
Business Object Component. In a typical remote debugging scenario, you can log on to the Engineering
Station using Terminal Services Client or Remote Desktop Connection and debug processes on another
project machine from that session, for example:
To remotely debug Business Object Components written in VB.NET or C#, the target machine must
have the Visual Studio remote debugging components (Machine Debug Manager) installed. All OASyS
DNA systems should already have this installed.
39
RealTime Business Objects
3.1 ACEAddCode
When a text string is provided, this business object adds the string as an ACE procedure in the system.
Syntax:
Table 4 - Parameters
Name Description
procedureName This parameter is a unique identifier for an ACE procedure. The name is
composed of the procedure name, followed by a backslash ()\ and the
procedure type. For example:
The type is defined in the Editor Types configuration file for the languages
as shown below:
<EditorFileType>
code This parameter is the source code for the ACE procedure. This source
code includes the user code and the wrapper code that ACE inserts to
make a valid object that is easy to compile.
Example:
“...” represents the wrapper code.
ACEAddCode testAce
...
//<code>Output=input1+input2
...
Comments:
The RPC creates a record in the ACECode, and ACE souce code files are created on all servers
through cmxrep.
40
RealTime Business Objects
3.2 ACECompile
The function of this business object is to compile the specified code.
Syntax:
Table 5 - Parameters
Name Description
procedureName This parameter is a unique identifier for an ACE procedure. The
name is composed of the procedure name, followed by a
backslash ()\ and the procedure type. For example:
The type is defined in the Editor Types configuration file for the
languages as shown below:
<EditorFileType>
code This parameter is the source code for the ACE procedure. The
source code includes the user code and the wrapper code that
ACE inserts to make a valid object that is easy to compile
Example:
Comments:
The RPC gathers the source code for the specified ACE procedure from the file system and compiles it.
Any errors or warnings generated are returned to the caller in a datatable. If no errors are generated, the
datatable is empty. The datatable contains the columns explained in the following table.
41
RealTime Business Objects
3.3 ACEGetCode
This business objects function is to retrieve the code from the RealTime server.
Syntax:
Table 7 - Parameters
Name Description
procedureName his parameter is a unique identifier for an ACE procedure. The
name is composed of the procedure name, followed by a
backslash ()\ and the procedure type. For example:
The type is defined in the Editor Types configuration file for the
languages as shown below:
<EditorFileType>
code This parameter is the source code for the ACE procedure. The
source code includes the user code and the wrapper code that
ACE inserts to make a valid object that is easy to compile
Example:
ACEGetCode testACE””
Comments:
3.4 Acknowledge
This business object’s function is to acknowledge a list or page of alarms.
Syntax:
42
RealTime Business Objects
Table 8 - Parameters
Name Description
tablename The name of the RealTimeDB table whose record alarm is
acknowledged.
ptname The name of the record or point for which the alarm is
acknowledged
fieldname The name of the particular field for which the alarm is
acknowledged. A “*” here acknowledges alarms for all fields of the
specified table, point, and category.
NOTE: A NULL (“”) is considered to be a valid field name
category The name of the alarm category for which the alarm is
acknowledged. A “*” here acknowledges alarms for all categories
of the specified table, point, and field.
NOTE: A NULL (“”) is considered to be a valid field name
Example:
Comments:
The sequence of tablename, ptname, fieldname, and category parameters can be repeated for up to 40
individual alarms in a single call to Acknowledge.
This procedure is used primarily by ezXOS to perform page acknowledgement for alarm summary
displays. Individual alarms can be acknowledged using either Acknowledge or Fnput and the
appropriate function command. Nothing happens if acknowledge is not provided with parameters.
Related Information
AddDBalarm on page 44
AddSYSalarm on page 48
Almattr on page 49
Filteralm on page 56
3.5 Addarea
This business object’s function is to add an area to the list of areas on which a user is currently logged.
Syntax:
43
RealTime Business Objects
Table 9 - Parameters
Name Description
area The name of the area to be added to the user’s list. If a “*” is
specified all current areas are added.
selControl yes or no Indicates whether or not the user has selected this area for control.
Defaults to no.
selView yes or no Indicates whether or not the user has selected this area for
viewing. Defaults to no.
control yes or no Indicates whether or not the area is controllable by the user.
Defaults to no.
Example:
Comments:
This procedure fails if a display name is not set prior to being called.
The RealTime table that is used for this business object is xoslogins
Related Information
Droparea on page 55
Modarea on page 75
Xoslogin on page 93
3.6 AddDBalarm
This business object’s function add an alarm to a RealTimeDB table point. It is for internal use only.
Alarm generated solely by executing this RPC are transient unless additional RealTimeDB processing is
performed.
Syntax:
NOTE: The syntax shown is contained in one line. The RealTime database must be open before calling
AddDBalarm. Use VDB.OpenDatabase() to open the RealTime database.
Table 10 - Parameters
Name Description
tableName RealTimeDB table name
ptName RealTimeDB point name
Table continued…
44
RealTime Business Objects
Comments:
If the alarm represents a state change, for example, the HI limit is exceeded, then the inalarm parameter
is used to flag whether or not the RealTimeDB point is considered to be in the alarm state or not. If the
momentary alarm, for example a command failure alarm, the the point’s alarm state should not be
changed and the inalarm parameter should be set to nochange.
The severity specified for the alarm using addDBalarm indicates the severity level for which the alarm
should appear in the alarm summary. This does not affect the alarm severity of the RealTimeDB point.
Apply the update command to the flag.severity field.
Related Information
AddSYSalarm on page 48
Almattr on page 49
Filteralm on page 56
3.7 addAPPalarm
This business object’s function is to add an application alarm.
Syntax:
NOTE: The above is entered as one line of syntax. The RealTime database must be open before calling
AddAppalarm. Use VDB.OpenDatabase() to open the RealTime database.
45
RealTime Business Objects
Table 11 - Parameters
Name Description
dbName Any string that is used to filter the alarm summary by table name, this is one of
the four parameters used to distinguish a unique alarm.This table does not
need to exist in RealTimeDB.
ptName Any string that is used t filter the alarm summary by point name, this is one of
the four parameters used to distinguish a unique alarm. This point does not
need to exist in RealTimeDB.
fldName Any string that is used to filter the alarm summary by field name, this is one of
the four parameters used to distinguish a unique alarm. This field does not
need to exist in RealTimeDB,
description A description of the value that is in alarm.
group The name of the AOR group.
category The category to which the alarm belongs, this is one of the four parameters
used to distinguish a unique alarm. Only one persistent alarm can exist for a
point for an alarm category.
message Alarm message to display.
persistent If false, the larm will be removed from the alarm summary after
acknowledgement. If true, in order to delete/replace the alarm, AddAPPalarm
must be called later with the same fldname and category, and with persistent
set to false.
flashing Determines if the point should flash to indicate the alarm.
severity Alarm severity, either low, minor, medium, major, high, critical.
purgetimer Purge time in seconds. The timer starts after the alarm is acknowledged. The
alarm is purged from the almsum table if the purge time has expired and the
persistent flag is “no”. Put a 0 not to invoke purge timer functionality.
timestamp Timestamp for the alarm, added in the format of number of seconds since
January 1, 1970 00:00 Greenwich Mean Time. If 0, the system assigns both
the timestamp and msec values automatically.
msec The number of milliseconds. Part of the combine timestamp value.
dataset The dataset name from the database.
host Name of the host that generated the alarm.
priorityDisplay The name of the priority exXOS display to associate with the alarm. Can be
blank.
Example:
46
RealTime Business Objects
3.8 AddFlexTag
This BLT adds one or more flexTag record.
Input Parameters
• dbName - the database of the (first) tagged point (analog, status, rate, or multistate).
• tagType - the tag type of the record - the valid values can be found by calling
the GetFlexTagTypes BLT.
• paramList - a string with additional parameters, with zero or more entries separated by asterisks
(*).
NOTE: Within each item, the field name and value are separated by a pipe (|).
In the paramList, additional tags can be created by specifying DBnPnt fields. The DBnPnt value is of
the form "point/database". This feature supports Tag Grouping, and if a DBnPnt is specified, the
tagGroup field must also be specified.
Results
The first result set contains the tags that were successfully added.
The second result set contains the tags that did not get added (including those not within the user's
AOR).
Examples
• dbName - analog
• ptName - point1
• tagType - Info1
• paramList –
Results:
• dbName - analog
• ptName - point1
• tagType - Info1
Results:
47
RealTime Business Objects
• ptName - point1
• tagType - Info1
Results:
3.9 AddSYSalarm
This business object’s function is to add a RealTime Service system alarm to the database.
Syntax:
NOTE: The above is entered as one line of syntax. The RealTime database must be open before calling
AddSYSalarm. Use VDB.OpenDatabase() to open the RealTime database.
Table 12 - Parameters
Name Description
key A reference key for toggling the in alarm state of an alarm summary entry.
category The category to which the alarm belongs. This can be arbitrary. This is used to
distinguish similar alarms. The category must be one word without spaces.
messagetxt Alarm message to be displayed.
persistent This indicates whether or not the alarm remains in the alarm summary after
acknowledgement and purge.
flashing Indicates whether or not the point should be flashing.
severity Alarm severity, either low, medium, or high
purgetimer Purge timer, expressed in seconds. The timer starts after the alarm is
acknowledged. The alarm is purged from the almsum table. if the purge time
has expired and the persistent flag is “no”.
group The group name
Table continued…
48
RealTime Business Objects
Example:
The following adds a test system alarm:
Comments:
Alarms generated solely by executing this RPC are transient unless additional RealTime Service
processing is performed.
The host is optional, but the timestamp and msec parameters are required.
Related Information
AddDBalarm on page 44
Almattr on page 49
Filteralm on page 56
3.10 Almattr
This business object’s function is to return the alarm attributes of the appropriately filtered maximum
severity unacknowledged alarm.The RealTimeDB tables this business object uses are: xoslogins, area,
and xosalmattr.
Syntax:
Almattr
Example:
Almattr
Frequency: 2
Delay: 1
Repeat: -1
The current maximum severity unacknowledged alarm beeps twice every second, with a delay every
second, with not end time set.
Comments:
If a display name is not set, then the maximum alarm is not filtered by area of responsibility. Otherwise,
the maximum alarm is filtered according to the areas where the user and display are currently logged.
49
RealTime Business Objects
3.11 Checkin
This business object is called by ezXOS session to periodically update the check in time for a list of
areas. The check in time is set to the current time. It uses the area table in the RealTimeDB to do this.
Syntax:
Table 13 - Parameters
Name Description
area The name of the area for which the check in time is to be updates. Up to eight
areas may be specified.
Example:
Comments:
The list of area should only include the areas that are currently under control by the user.
The check-in time is used by ezXOS to check whether or not the alarms for a particular area of
responsibility are currently being monitored by an ezXOS session.
Related Information
Acknowledge on page 42
Addarea on page 43
AddDBalarm on page 44
AddSYSalarm on page 48
Filteralm on page 56
Modarea on page 75
50
RealTime Business Objects
3.12 CheckForDSTIssues
This business object’s function is to check for any potential issues with daylight savings time, when
given a date time. This is primarily used for checking DST issues for a dsh record.
Syntax:
CheckForDSTIssues <year>, <month>, <day>, <hour>, <minute>, <second>
Table 14 - Parameters
Name Description
year This parameter indicates the year of the datetime being checked. 0 indicates any
year.
month This parameter indicates the month of the datetime being checked. 0 indicates
any month.
day This parameter indicates the day of the datetime being checked. Values 1-7
correspond to different days of the week starting at 1 for Sunday. 0 indicates any
day.
hour This parameter indicates the hour of the datetime being checked. 0 indicates any
hour.
minute This parameter indicates the minute of the datetime being checked.0 indicates
any minute.
second This parameter indicates the second of the datetime being checked. 0 indicates
any second.
Comments:
After the BLT checks for any potential issues, it returns a tabular result with any findings. Potential
isuues are displayed as an errorNumber and corresponding errorMessage. The errorNumber is a
positive value if it represents a warning, and a negative value if it represents an error. Use the table
below to decode the errorNumber that is returned when this BLT is called.
51
RealTime Business Objects
For applications that include a timestamp (log files, NMC, AdminPager) the timestamp is converted to
the time zone that has been set for your computer. This setting can be accessed in the Microsoft Date
and Time Properties panel.
NOTE: Within the Historical documentation, there are references to both GMT and UTC. All fields refer
to data in the same time zone, the two notations are to indicate a difference in how the data is
represented. GMT represents a time in older tables which are stored in seconds. UTC
represents a time in newer tables which is stored as a SQL datetime2 data type.
Custom applications developed for your system may handle the UTC to DST conversion differently;
check with your Service manager if you have questions.
3.13 Collect_fields
This business object’s function is to return the names and data-types of columns in a specified table.
Syntax:
Table 15 - Parameters
Name Description
table_name The name of the RealTimeDB table to be searched.
key_name The value of the key for the specific record in the RealTimeDB table. The
procedure returns the names of fields that are currently configured for
historical data collection from the record. This parameter is optional; if it is
not specified, the procedure returns the names of fields that may be
collected from the specified table.
Comments:
This procedure is used by the XOS Forms Editor to configure historical data collection of datapoints at
regular time intervals. Suitable table names may be listed by executing the Collect_tables procedure.
Related Information
Collect_tables on page 52
Trend on page 94
52
RealTime Business Objects
3.14 Collect_tables
This business object’s function is to collect data from tables for timeline history through regular
sampling. The collect_tables registered procedure returns the names, unique key names, and
descriptions of these tables. It uses selected RealTime and application tables.
Syntax:
Collect_tables
Example:
Collect_tables
Comments:
This procedure is used by the XOS Forms Editor to configure historical data collection of data points at
regular time intervals.
Related Information
Collect_fields on page 52
Trend on page 94
3.15 ControlGroups
This business object’s function is to return an SQL “ where groupName in (<groups>” statement. This
statement filters data to include only AOR based objects you have control permission for. Control
permission is configured using the ezXOS Select Control Area dialog.
Syntax:
ControlGroups <display>
53
RealTime Business Objects
Table 16 - Parameters
Name Description
display The name of the ezXOS display session
Example:
ControlGroups “OASXOS_2”
This example returns a list of the groups of responsibility that may be controlled by the current
OASXOS_2 session
Comments:
This procedure is used primarily by ezXOS to retrieve information for filtering queries for data from
HistoricalDB.
Related Information
Addarea on page 43
GetActiveAORPermissions on page 62
Modarea on page 75
ViewGroups on page 92
Xoslogin on page 93
3.16 CreateXosCmdRec
This business object’s function is to create an ezXOS command with a unique name, given the access
name and type.
Syntax:
Table 17 - Parameters
Name Description
accessName The user or display name.
xostype The control type: user control or MMI control.
winCmds A comma- separated list of ezXOS displays to be called up when it starts.
Example:
Comments:
If user control is specified, the ezXOS displays will be called up by the “accessname” parameter starting
ezXOS. If MMI Control is specified, the ezXOS displays will be called up when it is started on the ezXOS
stations specified by accesname (regardless of the user’s identity).
54
RealTime Business Objects
3.17 Droparea
This business object’s function is to delete an area from the list of areas on which a user is currently
logged.
Syntax:
Droparea <area>
Table 18 - Parameters
Name Description
area The name of the area to be deleted from the user’s list. If no area name
is specified, all areas are deleted.
Comments:
This procedure used the xos logins table in the RealTime database. It will fail if a display name is not set
prior to being called.
Related Information
Addarea on page 43
Modarea on page 75
Xoslogin on page 93
3.18 Enumerate
This business object’s function is to list the enabled members of an enumerated type and their numerical
equivalents.
Syntax:
Enumerate <enumType>
Table 19 - Parameters
Name Description
enumType The name of the enumerated type.
enabled Allows only enabled or disable members of the enumeration to be shown.
Example:
Enumerate hilowstate
55
RealTime Business Objects
enumeration value
normal 0
hi 1
lo 2
dev 3
hi-hi 4
lo-lo 5
inst-hi 6
inst-lo 7
roc 8
Comments:
3.19 Filteralm
This business object’s function is to return filtered alarm summary data. Foreground color and flashing
status are returned along with up to 10 requested fields per alarm.
Syntax:
filteralm <skip> <almFilter> <ackFilter> <dbname> <ptname> <field <{field]>
Table 20 - Parameters
Name Description
skip The number of matching alarms to skip before returning data.
almFilter If this is yes, filteralm returns data that are in alarm, If this is no, filteralm
returns data that are not in alarm. If this is both, filteralm returns both data
that is and is not in alarm.
ackFilter If this is yes, filteralm returns unacknowledged alarms. If this is no,
filteralm returns acknowledged alarms. If this is both, filteralm returns
both acknowledged and unacknowledged alarms.
dbName The table that generated the alarm.
ptName The point on the table that generated the alarm.
field One or more field names from the almsum table. The values of these
fields are returned in addition to the foreground color integer (fgint), the
flashing status, and the severity (sevint) of the alarm.
Comments:
NOTE: Best practice is to use filterMaskedAlm instead of filterAlm.
Alarm information is returned, sorted in order from the highest to lowest severity. Within severity, the
data is sorted from newest to oldest.
56
RealTime Business Objects
The alarm filter returns non-covered and/ or system alarms based on the configuration in the xosdisplay
table and the current user and display.
If no configuration is defined in the xosdisplay table for the user or display, both non-covered and system
alarms are returned.
The foreground color is based on the alarm severity. The relationship between alarm color and severity
is defined in the xosalmattr table. If the severity is not defined in the xosalmattr table, the color is
returned red(1).
If a display name is not set, then alarms are not filtered by area of responsibility. Otherwise, alarms are
filtered according to the areas on which the user and display are currently logged.
Example:
Filteralm 0 both both analog dbname ptname
This example filters by the analog table. Notice that no point was indicated. This has the effect of
returning all the alarms in the analog table.
NOTE: By setting the dbname to “station” and ptname to the Remote name, filteralm can be used to
return all alarms from an remote.
Related Information
Addarea on page 43
AddDBalarm on page 44
AddSYSalarm on page 48
Almattr on page 49
Droparea on page 55
FilterMaskedAlm on page 59
Modarea on page 75
3.20 FilterFlexTag
FilterFlexTag lists all flexTag records that match the specified values.
Input Parameters
57
RealTime Business Objects
• tagType - the tag type of the record - valid values can be found by calling the GetFlexTagTypes
BLT.
• priority - all flexTag records that are the specified priority or higher priority will be returned.
− valid values in increasing order: undefined, low, minor, medium, high, critical.
• oldTag - only return tags gone past their expected removal date.
• messageSet - for status and multistate points, the message set of the point being tagged,
• skip - number of matching records to skip - used for scrolling in the ezXOS display.
Results
The result set lists all matching tags (within the user's AOR) in priority order.
Examples
Existing tags:
Input to FilterFlexTag
• dbName = analog
• priority = high
Results
3.21 FilterTag
This business object’s function is to list all tag records that match the specified values. The FilterTag BLT
is used for Existing tagging, not Flexible tagging.
Syntax:
FilterTag
58
RealTime Business Objects
Table 21 - Parameters
Name Description
dbfilter (optional) This parameter is the database of the tagged point (analog, status, or
multistate).
ptfilter (optional) This parameter is the point name of the tagged point.
rtufilter (optional) This parameter is the remote associated with the tagged point.
wofilter (optional) This parameter is the work order defined for the tag.
tagtypeFilter (optional) This parameter indicates the type of the tag
skip (optional) This parameter indicates the number of matching records to skip. This
parameter is used for scrolling in the ezXOS display.
Example:
Input to Filtertag:
dbfilter = analog
ptfilter = myPoint
rtufilter = myRemote
wofilter = myWorkOrder
skip = 100
Comments:
Thisbusiness object returns a list of all matching tags that correspond with your AOR.
3.22 FilterMaskedAlm
This business object’s function is similar to filterAlm (to return filtered alarm summary data) but with 2
added parameters. In order to see Test Mode alarms in ezXOS, FilterMaskedAlm must be used.
Syntax:
FilterMaskedAlm <skip> <almFilter> <ackFilter> <filterMask> <filterValue>
<dbname> <ptname> <field <{field]>
59
RealTime Business Objects
Comments:
NOTE: Best practice is to use filterMaskedAlm instead of filterAlm.
Example:
Related Information
Filteralm on page 56
3.23 Fldget
This business object’s function is to perform a RealTimeDB field get. It reads a field’s value for a given
RealTime DB table point.
Syntax:
60
RealTime Business Objects
Table 23 - Parameters
Name Description
table The RealTime DB table name.
key The RealTimeDB table point name or number.
field The RealTimeDB table point field name.
value Output variable that stores the value of the field.
Example:
Related Information
Fldput on page 61
3.24 Fldput
This business object’s function is to perform a RealTimeDB field put. It sets a field’s value for a given
RealTimeDB table point.
Syntax:
Table 24 - Parameters
Name Description
table The RealTime DB table name.
key The RealTimeDB table point name or number.
field The RealTimeDB table point field name.
value Output variable that stores the value of the field.
Example:
61
RealTime Business Objects
3.25 Fnput
This business object’s function is to perform a RealTimeDB function put. It executes a function put such
as “open“ or “close” for a RealTimeDB table point.
Syntax:
Table 25 - Parameters
Name Description
table The RealTimeDB table name.
key The RealTimeDB table point name or number.
command The Command to run
Example:
3.26 GetActiveAORPermissions
This business object returns a result set listing of all RealTime database groups for which you have
selected view and/or control access. The result set specifies whether or not you have view and/or
control permission for each group. The results of this business object change as you change the
selected view and control areas within your ezXOS session.
Syntax:
GetActiveAORPermissions
Comments:
NOTE: For user configured security settings that are independent of the ezXOS view and control
selections, use the GetUserAORPermissions BOR.
62
RealTime Business Objects
Example:
Related Information
ControlGroups on page 53
GetUserAORPermissions on page 71
63
RealTime Business Objects
ViewGroups on page 92
GetUserPermissions on page 104
3.27 GetFlexTagGroupMembers
Returns all points for a given group tag, along with their message set (for status and multistate points).
Input Parameters
• tagGroup (required) - a string specifying the tag group. If this input parameter is blank, it will return
all tagged points that have tags with a blank value for the tagGroup field (i.e. ungrouped tags).
Results
A result set with the following columns:
• Table
• Point
• Message set
Examples
In each case, the following flexTags are defined:
64
RealTime Business Objects
3.28 GetFlexTagGroupRestrictionStates
This BLT returns the output states that are common among a group of points. If even one point has
different output states, it returns an empty data set.
Input Parameters
DBnPnts (required) - a list of database points separated by an asterisk (*).
Results
The result set contains the message text for the message set configured for the specified points. These
strings will be used for selecting a state-specific restriction on a group (or sub-group) of tags.
Examples
Given the following configuration:
status.sta1 message set: OPEN, CLOSE
DBnPnts - sta1/status
Results:
OPEN
CLOSE
DBnPnts - sta1/status*sta2/status
Results:
65
RealTime Business Objects
DBnPnts - sta1/status*mul1/multistate
Results:
OPEN
CLOSE
3.29 GetProtocolTable
This business object’s function is tp specify the output parameter of a protocol. When the name of a
protocol is entered, GetProtocolTable returns the name of the RealTime table that is used to configure
the protocol records.
Syntax:
//Usage text
Example:
This example returns “opc” since opc is the name of the RealTime table used to configure OPC Client
protocols.
3.30 GetStatMsgTxt
This business object’s function is to return the text status point’s ON and OFF states and use as labels
for the buttons on the ezXOS control panel.
Syntax:
Table 27 - Parameters
Name Description
tableName The RealTimeDB table name.
pointName The RealTimeDB point name
fldName The RealTimeDB flag name
msgstate1 The message table base record
msgstate2 The message table base record + 1
Table continued…
66
RealTime Business Objects
Example:
(return status
= 0)
Return parameters
ERR
OPEN
CLOSE
TRANSIT
Comments:
The fldName field has also been provided as a parameter, becacuse there are multiple flag structures
available for various tables.
In BLTTestClient, tableName, pointName, andd fldName are specified as input parameters. The
msgstate# parameters are output parameters.
3.31 GetSystemDOASPermissions
This business object’s function is to return a result set listing all RealTimeDB doas_dataset points. The
result set specifies whether or not your connected system, that is the system the BLT is executing on,
has ownership, control privileges and configuration privileges for points assigned to the doas_dataset.
Syntax:
GetSystemDOASPermissions
3.32 GetTableFieldsOfKind
This business object’s function is to return a list of all the fields of a specified kind in a table.
Syntax:
GetTableFieldsOfKind <TableName> <KindName>
67
RealTime Business Objects
Table 28 - Parameters
Name Description
Table Name This parameter indicates the name of the table you are requesting a list of
fields for.
Kind Name This parameter indicates the RealTime Kind that you want to look for in the
table.
Example:
GetTableFieldsOfKInd analog numeric
Comments:
The RPC creates a DataTable containing all of the field names of the specified Kind.
3.33 GetTablesWithFieldName
This business object’s function is to return a list of all the tables in the RealTime database containing the
specified field.
Syntax:
Table 29 - Parameters
Name Description
FieldName This parameter indicates the name of the field you want to find.
getUniqueStringKeyName? This is an optional parameter. True indicates that only unique key string
fields are examined during the search for the specified field.
forWriteAccess? This is an optional parameter. True indicates that only fields to which you
have write access are returned
Example:
GetTablesWithFieldName dataset
Comments:
A DataTan;e os returned listing all of the tables containing the specified field.
If the getUniqueStringKeyName parameter is “True”, the DataTable will contain a second column
containing the unique key fields.
68
RealTime Business Objects
3.34 GetTagGroupCurValve
Provides the current value for all of the user-modifiable tag fields (in flexTag), given a tag group and a
(possibly empty) set of points. This is used for determining what to display for the current value of fields
in a tag group or subset of points in a tag group.
Input Parameters
• DBnPnts - a list of database points separated by an asterisk (*), if empty all members of the tag
group will be considered.
Results
The result set contains the values for the following flexTag fields:
• curTagType
• cmsg
• workOrder
• description
• expectedRemovalDate
• operatorCmdOverride
If not all members of the tag group (or specified database points) have the same value, then the value
returned will be blank.
Examples
For all of the examples, assume the following flexTag records exist:
Table continued…
69
RealTime Business Objects
Input to GetTagGroupCurValue:
TagGroup =
DBnPnts =
Input to GetTagGroupCurValue:
TagGroup = TG1
DBnPnts =
Results:
Input to GetTagGroupCurValue:
TagGroup = TG1
DBnPnts = ana1/analog
Results:
Input to GetTagGroupCurValue:
TagGroup = TG1
DBnPnts = ana1/analog*ana2/analog
Results:
70
RealTime Business Objects
3.35 GetTaggingVersion
GetTaggingVersion returns the tagging version in effect (i.e., Existing tagging or Flexible tagging).
The BLT will read the USE_FLEXIBLE_TAGGING registry variable from config\Registry
\RealTime.xml to obtain this information.
Input Parameters
None.
Results
- OR -
3.36 GetUserAORPermissions
This business object’s function is to return a result set listing all RealTime database groups. The result
set specifies whether or not you have view and/or control permission for each group. The information
indicates whether or not your security settings allow view and/or control, not if your view and/or control
permissions are enabled within an ezXOS session.
Syntax:
GetUserAORPermissions
Related Information
GetActiveAORPermissions on page 62
3.37 GetYMinMax
This business object’s function is to specify the point path from which the maximum and minimum y-axis
values are derived.
Syntax:
GetYMinMax <dataset>
71
RealTime Business Objects
Table 30 - Parameters
Dataset Column Dataset Column Type Description
Name
YAxisName string This parameter indicates the name of the trend/plot
y axis under consideration.
PenName string This parameter indicates the name of the pen
associated with the specified y-axis
PointPath string This parameter indicates the point path from which
the maximum and minimum y-axis values are
derived.
NOTE: There can be more than one pen associated with any given y-axis. While not used in the
baseline version of GetYMinMax, this column facilitates a level of project customization should it
become necessary for any given project to override or replace baseline functionality.
Comments:
Currently, baseline automatically retrieves minimum and maximum values for status, analog, rate, and
multistate point types. If customization is required, the BLT must be replaced with the custom version
and the parameter and results dataset column definitions must be honored.
3.38 Helpdb
This business object’s function is to display information on all RealTimeDB tables, or if specified a
particular RealTimeDB table.
Syntax:
helpdb {table_name]
Table 31 - Parameters
Name Description
table_name Information on the RealTimeDB table, which is specified by this parameter, is
displayed. If table_name is not given, a report on all RealTimeDB tables is
returned.
Example:
Helpdb analog
Comments:
72
RealTime Business Objects
3.39 Helptype
This business object’s function is to display the definition of a RealTimeDB data-type or table.
Syntax:
Helptype <typename>
Table 32 - Parameters
Name Description
typename helptype returns a description of the RealTimeDB datatype specified by
this parameter.
Example:
Helptype analog
Related Information
Enumerate on page 55
3.40 InterpTrend
This business object’s function is to retrieve collection/ summary data from the RealTime database
collect table and the Historical database TimeSeries or timeline table. It interpolates the start time and
end time values from previously collected values for all collect value points.
Syntax:
73
RealTime Business Objects
Table 33 - Parameters
Name Description
tablename The name of the RealTimeDB/HistoricalDB table that contains the data to be
accessed. This can be any of the following: collect, hour, day, month, or year.
tagname The name of the point to be viewed.
columnname The column of the RealTimeDB/HistoricalDB tables to view. This can be any
of the following: value, minimum, maximum, and average. If the table name is
collect, the only column allowed is the value column. If the table name is not
collect, then the value column is the instantaneous value of the point.
starttime The time from which to begin the trend data. This is entered as an integer
representing GMT time, which is localized to your time zone.
endtime The time at which the trend data stops. This is entered as an integer
representing GMT time, which is localized to your time zone.
showFieldTime If the table name is collect, enter 1 to display the field timestamp of the
collection. Enter 0 or null to not display the field timestamp of the collection.
Example:
InterpTrend 'collect', 'analog.0analog.curval', 'value', 1401375720,
1401376860, 1
74
RealTime Business Objects
3.41 Modarea
This business object’s function is to modify an area within the list of areas.
Syntax:
Table 34 - Parameters
Name Description
area The name of the area to be modified in the user’s list. A “*” results
in all areas being modified.
selControl yes or no This indicates whether or not the user has selected the area for
control.
selView yes or no This indicates whether or not the user has selected the area for
viewing.
control yes or no This indicates whether or not the area can be controlled by the
user.
Example:
Comments:
This procedure fails if a display name is not set prior to being called. If only the area parameter is given,
the area remains unchanged.
The control parameter must be set to yes if the selControl parameter is to be set to yes.
Related Information
Addarea on page 43
Droparea on page 55
Xoslogin on page 93
75
RealTime Business Objects
3.42 ModifyFlexTag
This BLT modifies all flexTag records that match.
Input Parameters
• Witin each item, the paramater type (F or M), field name, and value are separated by pipes (|).
• In the paramList, the "find" items are AND'ed together, so that all fields must match.
• There is one exception to this rule - if DBnPnt items are specified, they are OR'ed together.
• DBnPnt values are of the form "point/database". This feature supports Tag Grouping.
Results
The first result set contains the matching tags that were successfully modified. The second result set
contains the matching tags that did not get modified (including those not within the user's AOR).
Examples
In each case, these are the flexTags defined before the ModifyFlexTag BLT is called (we assume
they are reset to these values):
Initial:
Table continued…
76
RealTime Business Objects
77
RealTime Business Objects
3.43 RemoveFlexTag
Removes all flexTag records that match.
Input Parameters
• At least one parameter is required - this prevents all of the tags from being accidentally deleted.
• Within each item, the field name and value are separated by pipes (|).
• In the paramList, the items are AND'ed together, so that all fields must match.
• There is one exception to this rule - if DBnPnt items are specified, they are OR'ed together.
• DBnPnt values are of the form "point/database". This feature supports Tag Grouping.
Results
The first result set contains the matching tags that were successfully deleted. The second result set
contains the matching tags that did not get deleted (including those not within the user's AOR).
Examples
In each case, these are the flexTags defined before the RemoveFlexTag BLT is called (we assume
they are reset to these values):
Initial:
78
RealTime Business Objects
Syntax:
Table 35 - Parameters
Name Description
tableName The RealTimeDB table name.
ptName The table row name.
action Specifies the action required (set, clear, or test)
Comments:
requestAccess sets, clears, or tests the status of the advisory flag on the specified record.
All applications that configure RealTime DB tables should obey the advisory flag and use the
requestAccess RPC.
79
RealTime Business Objects
• 0- the access request is successful or the flag is currently clear. If action =”set” abd tge accessFlag
field is “clear”, 0 is returned
• 1 - the access request flag is currently set. If action = “test” or “set”, and the accessFlag is “set”, 1 is
returned
requestAccess returns two columns of results. However, it returns one column if any of the following is
true:
Multiple commands are primarily used to both clear one accessFlag and set the next accessFlag in a
single operation.
3.45 RouteSwitch
This business object's function is to trigger the switch between the Primary and Alternate replication
routes configured in the storeAndForward table. It can be used to go back and forth. When routes are
not used by the mode that is currently active (primary or alternate), they are placed in a suspended state
and wait for activation.
Syntax:
RouteSwitch <override> <ModeName>
Table 36 - Parameters
Name Description
override Specify yes to override the need for all systems to be connected
and synchronized. This will allow you to switch routes regardless of
whether or not the system is currently available and
communicating. The behavior of the override parameter defaults to
no and the routes cannot be switched if the systems are not
connected and synchronized.
ModeName Entering primary causes the BLT to attempt a route switch to the
primary destination configured in the Store and Forward table.
Entering alternate causes the BLT to attempt a route switch to
the alternate destination. In order for the RouteSwitch BLT to
succeed, the override paramater must be entered as yes in both
cases if not all systems are connected and synchronized.
80
RealTime Business Objects
Example 1:
Assume that all systems are connected and synchronized in alternate mode. Entering RouteSwitch
yes primary will result in calls to the RemoteRouteSwitchActivation BLT on each remote system
and the local machine. This enables the routes to be switched from alternate to primary on all machines.
Since an override is not required because all systems are connected and synchronized, entering
RouteSwitch and letting the override parameter default to no would still work. An override is not
required since all systems are connected and synchronized.
Example 2:
Assume that not all systems are connected nor synchronized, and that the last known state of the
storeAndForward routes is that all systems were operating on primary routes. RouteSwitch yes
alternate results in an attempt to call the RemoteRouteSwitchActivation BLT on each remote
system in order for the routes to be switched from primary to alternate. However, allowing the override
parameter to default to no prevents the RouteSwitch BLT from attempting the route switch on remote
machines. If the BLT is entered as such in this scenario, an error message is returned to indicate that all
systems must be synchronized unless the override is performed.
Comments:
The RouteSwitch BLT calls the RemoteRouteSwitchActivation BLT on all remote systems that
require it. This gets them to perform the route switch for their local routes. If you are currently operating
with the primary route active, calling this BLT results in an attempt to switch all routes to the alternate
routes configured in the storeAndForward table.
NOTE: If nothing is configured in the storeAndForward table and this BLT is used, an error message is
returned that states that the function is not allowed.
If the RouteSwitch BLT commands a system to switch into the route that it is already in,
RemoteRouteSwitchActivation will not run on that system. Note that the current system can fall
out of sync with other systems. You want all systems to be using the same route. The specification of
ModeName allows you to command synchronization to the route you desire, so that if some systems are
primary and some are alternate, specifying alternate causes RemoteRouteSwitchActivation to
run only on the systems that are using the primary route.
NOTE: You must allow the system to stabilize in between uses of the RouteSwitch BLT, otherwise the
synchronization between systems will be compromised. When the RouteSwitch BLT is
executed, an event is generated at the system from which it is executed. This event tells you
that the route switch was activated and from which location it was, as well as the current mode
and new mode. This event is generated whether the BLT is executed successfully or only
partially. If the RouteSwitch is only partially executed, it is likely that not all systems are
connected nor synchronized. In this case, the override should be used.
3.45.1 RemoteRouteSwitchActivation
This business object is usually executed internally to perform the route switch between primary and
alternate StoreAndForward routes on remote machines. You do not usually enter this BLT manually.
Syntax:
RemoteRouteSwitchActivation <originalCallingUserName>
<originalCallingHostName> <originalCallingSystemName>
81
RealTime Business Objects
Table 37 - Parameters
Name Description
originalCallingUserName The name of the user that called the RouteSwitch BLT. This
parameter is used to issue events that occur as a result of a route
switch.
originalCallingHostName The name of the computer from which the RouteSwitch BLT was
executed. This parameter is used to issue events that occur as a
result of a route switch.
originalCallingSystemName The name of the system from which the RouteSwitch BLT was
executed. This parameter is used to issue events that occur as a
result of a route switch.
Example:
RemoteRouteSwitchActivation dnaOperator1 backupRTS1 Backup
The example above shows the parameters that would be automatically passed to the remote systems
from the machine that initiated the RouteSwitch BLT. This example means the BLT was initiated by a
user named dnaOperator1 at server backupRTS1, which is part of the Backup system. The remote
systems need this information in order to perform their route switches.
Comments:
This BLT is called as a result of the execution of the RouteSwitch BLT. When that is called, it triggers
this BLT, which will perform the actual route switch between the primary and alternate storeAndForward
routes on the local system where first BLT was called. Futhermore, it may also forward itself to any
downstream systems configured in the storeAndForward table.
Usually, the parameters this BLT requires (username, hostname, and system name) are generated
automatically when RouteSwitch is executed.
Following the configuration shown above, if the RouteSwitch BLT is executed from the Backup
system, the Main system forwards the RemoteRouteSwitchActivation call to the Submaster
systems. This passes along the information required for the parameters needed by
RemoteRouteSwitchActivation. This gives the Submaster systems the ability to be responsible for
switching their own routes by executing this BLT.
82
RealTime Business Objects
NOTE: This BLT will return true or false depending upon whether or not it was successful. You should
not need to enter this BLT manually.
Example Configuration
In this example, Es owns the data which is replicated to Main or Backup depending on the active mode.
In primary mode, Main is the forwarding system and sends data to Backup and Dss. When the alternate
mode is active, the Backup system forwards the data. Assuming that the Primary mode is active, there
are two scenarios in which you would need to use the RouteSwitch BLT from a system that is not the
forwarding system.
The RouteSwitch BLT allows you to issue a route switch from any other machine in the system if Main
becomes disconnected from the rest of the systems. The RouteSwitch BLT must be issued using the
override option in this scenario. For example, if Main goes down, you could initiate the route switch by
using the BLT from Es, Backup or Dss. This switches the active route to the Alternate, where Backup is
the forwarding system. The BLT would be entered as follows: RouteSwitch yes . Issuing the BLT
triggers the RemoteRouteSwitchActivation BLT, that causes the routes to be switched on all
machines.
Assuming that you triggered a route switch from the Primary to Alternate route, but Backup was
disconnected, it would result in suspension of the Primary routes and the activation of the Alternate
route could not be completed because Backup is not available to be the forwarding system. In this
scenario, no replication would be happening. All routes would either be suspended or inactive.
This scenario can be fixed by reissuing the RouteSwitch BLT, using the override parameter, from any
of the other machines. This will allow Main to resume control as the forwarding system. The BLT would
83
RealTime Business Objects
3.46 RtTrend
This business object’s function is to retrieve instantaneous trend data from RealTimeDB.
Syntax:
Table 38 - Parameters
Name Description
table_name The RealTimeDB table name of the data to be accessed.
rec_name The point name to be viewed.
field_name The field of the RealTimeDB tables to be viewed. This must ne a field
containing a numeric value.
unusedInt This parameter is not used. It is provided for backward compatibility only
unusedInt2 This parameter is not used.
Example:
Comments:
unusedint and unusedint2 are optional parameters. Int the example above, value is used as one of
these parameters.
Related Information
Trend on page 94
3.47 ShowAccessFlags
This business object’s function is to display information on a point’s access flags
Syntax:
84
RealTime Business Objects
Table 39 - Parameters
Name Description
skip Skip the first n rows of results
Example:
ShowAccessFlags
table point key_0 key_1 key_2 key_3 key_4 key_5 XOSdisplay current_user
analog 1 wrsucpre NULL NULL NULL NULL NULL NorthConsol supervisor1
ss e
status 3 wr2invalv NULL NULL NULL NULL NULL CasualUser1 NULL
e
(2 rows affected)
Comments:
The current_user appears as NULL if the ezXOS display is no longer logged on. Otherwise, the system
user’s record name of the current ezXOS display log-on session appears.
3.48 SpoolMsg
This business object’s function is to spool a message to a spooler. The RealTime database must be
open before calling SpoolMsg. You can use VDB.OpenDatabase() to open the RealTime database.
Syntax:
Table 40 - Parameters
Name Description
spooler The spooler to which the message is directed.
time The timestamp for the spooler message.
msec The millesecond value of the timestamp.
type The type of message. This can be any of the following: alarm, control,
event, or sequence of events (soe)
host The name of the host where the message came from.
process The name of the process generating the message.
dbName The RealTimeDB table name or “” if there is none.
ptName The RealTimeDB point name or “” if there is none.
description The long description of the point, or “”.
rtu The name of the remote at which the point is located or “”.
Table continued…
85
RealTime Business Objects
Example:
To spool a test event message:
Comments:
A timestamp for the current time can be determined by using the Utility Open Server getDate call.
3.49 StoreAndForwardSummary
This business object's function is to retrieve configuration details from the StoreAndForward database to
help you determine if you want to perform a route switch. Different information will be retrieved
depending on how the BLT is entered and whether the route is in Primary or Alternate mode.
Syntax:
Table 41 - Parameters
Name Description
systemName Enter the name of the source system that is responsible for
replicating the data that it owns or the data that it is forwarding.
This parameter can also be left blank.
activeMode Enter yes if you want the BLT to return the list of destination
systems for the active mode of the specified system. Enter no if
you want the BLT to return the list of destination systems for the
mode that is currently inactive on the specified system. This
parameter can also be left blank.
Example:
StoreAndForwardSummary es yes
Entering the BLT as shown above returns the list of destination systems for the active mode on es.
Assuming that the es system is the source system in Primary mode and has three destination systems
configured in the StoreAndForward database, the results appear as shown in the table below.
86
RealTime Business Objects
Comments:
Entering this BLT without specifying parameters returns a list of all primary and alternate destination
systems configured in the StoreAndForward database. Entering this BLT and only specifying the
<system name> returns a list of all primary and alternate destination systems configured for that system.
Entering this BLT with <systemName> and no returns a list of destination systems configured in the
StoreAndForward database for the inactive mode; for instance, if the active mode is primary, entering
the BLT in this way returns the configuration for the system's alternate mode.
In order to get the full picture of StoreAndForward configuration for the route that is currently active, you
can enter this BLT using yes for the <activeMode>, but without specifying the <systemName>.
Conversely, the configuration for the mode that is currently inactive will be retrieved if you use no for the
<activeMode> without supplying a <systemName>. This is an ideal method for using this BLT to
consider performing a route switch as it returns the configuration that will happen as a result of one.
3.50 TestModeSupported
This business object’s function is to list the tables available for test mode configuration, This includes the
baseline supported tables and any tables defined through extension.
Syntax:
TestModeSupported
Example:
analog
multistate
rate
remote
status
analog
multistate
rate
remote
87
RealTime Business Objects
status
plm
Comments:
The result set contains the names of all tables that are able to have test mode defined.
3.51 Trend
This business object’s function is to retrieve collection and summary data from the RealTime database
collect table and the Historical database TimeSeries or timeline table.
Syntax:
Table 43 - Parameters
Name Description
tablename The name of the RealTimeDB/HistoricalDB table that contains the data to
be accessed. This can be any of the following: collect, hour, day, month,
year.
tagname The name of the point to be viewed.
columnname The column of the RealTimeDB/HistoricalDB tables to view. This can be
any of the following: value, minimum, maximum, average. If the table
name is collect, the only column allowed is the value column. If the table
name is not collect, the value column is the instantaneous value of the
point. (The value at the top of the hour).
starttime The time from which to begin the trend data. This is entered as an integer
representing GMT time, which is localized to your time zone.
endtime The time at which the trend data stops. This is entered as an integer
representing GMT time, which is localized to your time zone.
showFieldTime If the table name is collect, enter 1 to display the field timestamp of the
collection. Enter 0 or null to not display the field timestamp of the
collection.
Example:
Table continued…
88
RealTime Business Objects
3.52 Trend_filter
This business object’s function is to retrieve a list of points that can be trended by ezXOS.
Syntax:
Table 44 - Parameters
Name Description
skip An integer number of matching rows to skip before returning any rows.
Defaults to 0, meaning no rows are skipped.
onCollect This parameter can be set to yes or no. It defaults to yes, meaning only
points that are currently being collected are returned. If this parameter is
set to no, all points that have been placed on collect are returned.
However, the name of points that have been recently placed on collect
(new points) are not returned. This is because data for new points does
not yet exist in the HistoricalDB
Table continued…
89
RealTime Business Objects
Example:
Comments:
This procedure is primarily used by ezXOS.
Related Information
Trend on page 88
Trendview on page 90
3.53 Trendview
The function of this business object is to retrieve collection or summary data from the RealTime
database collect or Historical database TimeSeries or timeline tables.
Syntax:
Table 45 - Parameters
Name Description
tablename The name of the RealTimeDB/HistoricalDB table that contains the data to
be accessed. This can be any one of the following: collect, hour, day,
month, or year.
tagname The name of the point to be viewed.
columnname The column of the RealTimeDB/HistoricalDB tables to be viewed. This can
be any of the following: value, minimum, maximum or average. If the table
name is collect, the only column allowed is the value column. If the table
name is not collect, then the value column is the instantaneous value of
the point.
starttime The time at which to begin the trend data. This is entered in the MM/DD/
YYYY HH:MM:SS format (as per your computer’s Regional and
Language settings).
Table continued…
90
RealTime Business Objects
Example:
(8 rows affected)
3.54 UpdateCollect
This business object’s function is to modify collect data and re-summarize the affected day, month, and
year. It can add, delete, or change the collect data that exists in the Historical database collect table.
91
RealTime Business Objects
The procedure automatically re-summarizes the data for the Historical database hour, day, month, and
year tables.
Syntax:
Table 46 - Parameters
Name Description
pointName The name of the point to be modified.
time The time of the affected collect data to be modified. This value is shown
as 'YYYY-MM-DD hh:mm:ss' format (as per your computer’s Regional
and Language settings).
milliSec The field shows the millisecond value of the time field.
value The new value of the point after modification or addition. This
parameter is ignored during deletions.
operType There are three potential actions: ADD, MOD, and DEL.
fieldTime The new value of the field timestamp. This value is shown as 'YYYY-
MM-DD hh:mm:ss' format (as per your computer’s Regional and
Language settings).
fieldMillisec The field shows the millisecond value of the fieldTime field.
Example:
UpdateCollect 'analog.03_billt.curval' '2014-06-01 13:45:05' 35 75.3 'ADD'
'2014-06-01 13:45:18' 174
(1 row affected)
3.55 ViewGroups
T his BLT returns a SQL “groupName in (<groups>” statement. This statement filters data to include only
AOR based objects for which you have view permission. View permission is configured using tthe
ezXOS Select View Area dialog.
Syntax:
ViewGroups <display>
Table 47 - Parameters
Name Description
display The name of the ezXOS display session.
Example:
ViewGroups “OASXOS_2”
92
RealTime Business Objects
This example returns a list of the groups of responsibility that can be viewed by the current OASXOS_2
session.
Comments:
This procedure is used primarily by ezXOS to get information on filtering queries for data from
HistoricalDB.
Related Information
GetActiveAORPermissions on page 62
3.56 Xoslogin
This business object’s function is to initialize an ezXOS login session.
Syntax:
Xoslogin
Comments:
93
PI Business Objects
4 PI Business Objects
4.1 InterpTrend
This business object’s function is to retrieve collection and summary data from the PI Server. The
procedure returns interpolated values from the PI archive over the specified time range.
Syntax:
Table 48 - Parameters
Name Description
table_name This parameter displays the length of the summary period used to
calculate the summary values. This can be any of the following: hour,
day, month, or year.
tag_name This parameter displays the name of the point to be viewed.
column_name This parameter displays the sample interval time used to calculate the
interpolated values. This must be the value column
start_time This parameter indicates the start time in GMT.
end_time This parameter indicates the end time in GMT
show_DQ This parameter indicates whether or not the return value will display data
quality. This is an optional field. The default value is yes.
4.2 Trend_points
This business object’s function is to retrieve a list of PI points that may be trended by ezXOS.
Syntax:
Trend_points
4.3 Trend
This business objects function is to retrieve collection or summary data from the PI Server.
Syntax:
94
PI Business Objects
Table 49 - Parameters
Name Description
table_name This parameter displays the length of the summary period used to
calculate the summary values. This can be any of the following: hour,
day, month, or year. It can also be instant, which gives you the collect
values in the PI server. If instant is used, value must also be used in the
column_name field.
tag_name This parameter displays the name of the point to be viewed.
column_name This parameter displays the summary type of data to be viewed. It can be
any of the following: vlaue, minimum, maximum, or average.
start_time This parameter indicates the start time in GMT.
end_time This parameter indicates the end time in GMT
show_DQ This parameter indicates whether or not the return value will show data
quality. This is an optional field. The default value is yes.
Example:
Related Information
Collect_fields on page 52
Collect_tables on page 52
4.4 TrendView
Retrieves collection or summary data from the PI archive over a specified time range.
Syntax:
Table 50 - Parameters
Name Description
table_name This parameter displays the length of the summary period used to calculate
the summary values. This can be any of the following: instant, hour, day,
month, or year
tag_name This parameter displays the name of the point to be viewed.
Table continued…
95
PI Business Objects
Example:
96
Common Business Objects
5.1 CFGConvUser
This business object’s function is to convert the distinguished name (Active Directory) of a user to the
user’s common name.
Syntax:
Example:
CFGConvUser ”cn=CHRISS”
Row results:
Name AccountName
chriss chriss
(0 rows affected)
Resulting parameters:
cn=CHRISS
5.2 CFGGetArchivableServices
This business object’s function is to retrieve the list of services that can be archived within a system
Syntax:
Example:
CFGGetArchivableServices “main”
Row results:
Service Name
Historical
97
Common Business Objects
5.3 CFGGetArchiveHost
This business object’s function is to retrieve the list of the computers that run the archive service in a
specific system.
Syntax:
Example:
CFGGetArchiveHost “main”
Row Results:
Service Name
Historical
5.4 CFGGetCompList
This business object’s function is to retrieve the list of computers in the current OASyS DNA system or
domain.
Syntax:
Example:
C:\> CFGGetCompList
Row results:
name
DISTRICTSVR1
DISTRICTSVR2
MASTERRTS2
MASTERXOS2
DISTCTXOS
OFFSITESVR
MASTERIIS
MASTERHS1
MASTERXOS6
MASTERRTS1
MASTERXOS9
98
Common Business Objects
OFFSITEXOS
OASYSDES
MASTERXOS 1
NOTE: If a system name is given, then only computers in that system are returned. Otherwise, all
computers in the OASyS DNA domain are returned.
5.5 CFGGetGroupList
This business object’s function is to retrieve a list of all groups in the OASyS DNA domain.
Syntax:
CFGGetGroupList
Example:
C:\> CFGGetGroupList
Row results:
name
DNA HDBDataViewers
DNA report@WEB
DNA display@WEB
DNA operator@WEB
DNAreport@WEB operators
DNAreport@WEB admins
DNAreport@WEB viewers
DNAreport@WEB users
TestSecurity
DNA Admins
DNA Apps
99
Common Business Objects
Administrators
Users
Guests
Backup Operators
Replicator
Server Operators
Account Operators
Print Operators
VS Developers
DHCP Users
DHCP Administrators
Debugger Users
Domain Computers
Domain Controllers
Schema Admins
Enterprise Admins
Cert Publishers
Domain Admins
Domain Users
100
Common Business Objects
Domain Guests
DnsAdmins
DnsUpdateProxy
WINS Users
(0 rows affected)
5.6 CFGGetSrvList
This business object’s function is to take the system and service, such as RealTime, as parameters and
return a list of computers that are the primary and secondary computers for that service.
Syntax:
Example:
Row results:
name
MASTERRTS1
MASTERRTS2
(0 rows affected)
Resulting parameters:
master
realtime
5.7 CFGGetSysList
This business object’s function is to retrieve the list of systems defined in the OASyS DNA project
Syntax:
CFGGetSysList
Example:
C:\> CFGGetSysList
101
Common Business Objects
Row results:
name
Offsite1 district2
esmaster
district
dss
(0 rows affected)
5.8 CFGGetUserList
This business object’s function is to retrieve the list of SCADA users in the domain.
Syntax:
CFGGetUserList
Example:
C:\> CFGGetUserList
Row results:
name
(0 rows affected)
5.9 CFGGetUserRoleMembership
This business object’s function is to retrieve the set of roles assigned to the user.
Syntax:
CFGGetUserRoleMembership
102
Common Business Objects
Example:
C:\> CFGGetUserRoleMembership
Row results:
Row
DNAPermission - Config_Database
5.10 CFGGetXOSList
This business object’s function is to retrieve a list of ezXOSworkstations that are part of the specified
system
Syntax:
Example:
Row results:
name
MASTERXOS2 MASTERXOS6
MASTERXOS9 MASTERXOS1
(0 rows affected)
Resulting parameters:
master
5.11 GetServiceProcessList
This business object’s function is to retrieve a list of processes that are running as part of the service
you specify.
Syntax:
Example:
Row results:
103
Common Business Objects
ProcessName ProcessId
dnaService.exe 1484
PSengine.exe 5412
processMonitor.exe 2532
dnaHealthMonitor.exe 2944
dllhost.exe 3672
dllhost.exe 5524
dllhost.exe 2764
WMIMonitor.exe 3932
dnaConfigRefresh.exe 3220
SQLEngine.exe 4704
(1 row affected)
Resulting parameters:
common
5.12 GetUserPermissions
This business object’s function is to retrieve the set of permissions granted to the user.
Syntax:
GetUserPermissions
Returned Information
the list of permissions granted for objects that do not use AOR access control.
the set of AOR Groups for which the user has at least one permission, the permissions are returned
as a string of semicolon separated by permission names as well as the corresponding permission bit
mask
an entry with a blank AORGroupName that list the permissions given to objects for which an AOR
Group has not yet been assigned.
The second result set consists of the list of permissions that have an assigned mask bit value and their
corresponding mask value. For example, “DNA Permission -Change_Shift” has a PermissionMask of
512, which represents 200 in hexidecimal. because the permission uses Mask Bit 9, where the far-right
bit position is bit 0.
Example:
GetUserPermissions
104
Common Business Objects
Results:
Related Information
GetActiveAORPermissions on page 62
105
Common Business Objects
5.13 ProcessCheckout
This business object’s function is to unregister the process from the specified service and optionally
terminate the process
Syntax:
Example:
This example unregisters process 4180 from the Common service and kills the process.
Row results:
(1 rows affected)
Resulting parameters:
common
4180
5.14 RunProcess
This business object’s function is to run the shell command you specify.
Syntax:
Example:
This example creates a file called “out” under “c:\” that contains the word “hello”.
Row results:
(1 row affected)
Resulting parameters:
106
Common Business Objects
5.15 ServiceShutdown
This business object’s function is to shut down the service you specify on the current computer.
Syntax:
Example:
Row results:
-----Empty Output Recordset ----
(0 rows affected)
Resulting parameters:
realtime
5.16 ServiceStartup
This business object’s function is to start the OASyS DNA service you specify on the local computer.
Syntax:
Example:
Row results:
(0 rows affected)
Resulting parameters:
realtime
107
Common Business Objects
5.17 ToggleDebug
This business object’s function is incrementing the debug level of the process you specify.
Syntax:
Example:
This example increments the debug level of the process with ID 1000.
Comments:
Increasing the debug level increases the output to the oasErrlog.log and other log files. When using this
component, you must ensure that log file sizes do not become too large.
If the debug level is already at maximum, then the debug level is reset to its lowest value.
This component can only be used by members of the DNA Apps group.
5.18 ValidateUser
This business object’s function is to retrieve a list of the systems the user is able to login to.
Syntax:
Example:
108
Arbitration Business Objects
6.1 ServiceFailover
This business object’s function is to cause the specified arbitrated service to fail over.
Syntax:
Example:
NOTE: This component can only be used by members of the DNA Apps group. If the service is running
with hot and standby hosts and the command is run on the current hot host, the current hot
machine will stand down and the standby machine will become hot. Otherwise, no action is
taken.
109
Schneider Electric
49 Quarry Park Blvd SE
Calgary, AB T2J 6V8 - Canada
Phone: 1 (403) 253-8848
www.schneider-electric.com