SMA Custom Objects: Object Instantiation
SMA Custom Objects: Object Instantiation
th
<Date April 18 , 2008> – Rev. A
©Copyright InduSoft Systems Ltd. 2008
Introduction
This document describes the COM Objects created to make it possible to develop the Mobile Access Interface
for the Studio SCADA software.
Session Object
The session object creates a login session. See examples in the files functions.inc and logon.asp.
Object Instantiation
Remarks
The SMA Session is kept internally by the server. The Session object simply provides access to existing sessions and
the unique identifier by a session is the session cookie (see CreateCookie method). Therefore, in order to establish a
connection this is what needs to be done:
- Create a session object
- Call the CreateCookie Method
- Call the LogOn function
To access a session that has already been created, the following should be done:
- Create a session object
- Set the property Cookie
- Check the property IsValidCookie
For details on how this is done by the SMA, please check the following functions:
functions.inc: chkCookie, chkLogon
Logon.asp: Logon function
Methods
Description
Checks the user logon and keeps the information for the session.
Parameters
Return Values
Description
Creates a cookie for a session. Sessions are kept in the list based on their cookie, the key must be unique for that
session. SMA currently using the Remote IP as a key for a session.
Parameters
Return Values
The method has no return values, but it will fail if the cookie already exists. Therefore, before calling this function
always check with the IsValidCookie (see functions.inc, chkCookie method).
Sub Destroy()
Description
Remarks
Properties
IsValidCookie As Bool
Description
Page 2/5
Tech Note – SMA Objects
th
<Date April 18 , 2008> – Rev. A
©Copyright InduSoft Systems Ltd. 2008
IsValidLogon As Bool
Description
Returns true if the last call to the Logon for the current session returned successfully.
IsValidLevel(level) As Bool
Description
This property returns true if the level specified in the parameter level is within the acceptable boundaries for the user
currently logged on.
Alarms Object
The Alarms returns a list of alarms. See examples in the file Alarms.asp
Object Instantiation
Remarks
The Alarms object is a very simple interface to retrieve a list of alarms and acknowledge alarms.
Methods
Description
Parameters
Return Values
The method has no return values, but it will fail if the session is invalid.
Properties
NumItems As Long
Description
Item(Index) As AlarmItem)
Description
Returns the information for a specific alarm item based on the alarm item index. The AlarmItem has the following
properties: Tag, Message, TimeStamp, State, Type.
Tags Object
Returns data from tags in the tags database. See examples in the file Tags.asp.
Object Instantiation
Remarks
Use this object to retrieve and set tag data in the tags database.
Properties
Value(tag) as String
Description
Page 4/5
Tech Note – SMA Objects
th
<Date April 18 , 2008> – Rev. A
©Copyright InduSoft Systems Ltd. 2008
Type(tag) as Integer
Description
Map of Revision
Page 5/5