VB Script / VBA Helper Objects

To ease the use of the API, we have exposed a series of collections and objects typical of the API.


ListString

Simple lists of string of variable size. It can contain empty strings.

Methods

  • Constructor: create an ListString object.
    • Input parameters: nothing
    • Return: nothing
  • Count: returns the number of items in the collection
    • Input parameters: nothing
    • Return: number of items in the collection
  • Add: add an element to collection
    • Input parameters: string to add
    • Return: nothing
  • Clear: clear the collection
    • Input parameters: nothing
    • Return: nothing
  • Remove: remove an element.
    • Input parameters: string to remove
    • Return: boolean indicating the result of the operation
  • RemoveAt: remove the element in the indicated index.
    • Input parameters: integer indicating the index
    • Return: nothing
  • Property GET Item: get an item.
    • Input parameters: integer indicating the index
    • Return: string at index.
  • Property SET Item: set an item.
    • Input parameters: integer indicating the index
    • Return: nothing.

ListInteger

Simple lists of string of variable size. It can contain empty strings.

Methods

  • Constructor: create an ListInteger object.
    • Input parameters: nothing
    • Return: nothing
  • Count: returns the number of items in the collection
    • Input parameters: nothing
    • Return: number of items in the collection
  • Add: add an element to collection
    • Input parameters: integer to add
    • Return: nothing
  • Clear: clear the collection
    • Input parameters: nothing
    • Return: nothing
  • Remove: remove an element.
    • Input parameters: integer to remove
    • Return: boolean indicating the result of the operation
  • RemoveAt: remove the element in the indicated index.
    • Input parameters: integer indicating the index
    • Return: nothing
  • Property GET Item: get an item.
    • Input parameters: integer indicating the index
    • Return: integer at index.
  • Property SET Item: set an item.
    • Input parameters: integer indicating the index
    • Return: nothing.

KeyValue

A simple key-value pair (String, String). ZeusAPI can also use key-value pair lists.

  • Key. String
  • Value. String

ListKeyValue

Simple lists of KeyValue of variable size.

Methods

  • Constructor: create an ListKeyValue object.
    • Input parameters: nothing
    • Return: nothing
  • Count: returns the number of items in the collection
    • Input parameters: nothing
    • Return: number of items in the collection
  • Add: add an element to collection
    • Input parameters: KeyValue to add
    • Return: nothing
  • Clear: clear the collection
    • Input parameters: nothing
    • Return: nothing
  • Remove: remove an element.
    • Input parameters: KeyValue to remove
    • Return: boolean indicating the result of the operation
  • RemoveAt: remove the element in the indicated index.
    • Input parameters: integer indicating the index
    • Return: nothing
  • Property GET Item: get an item.
    • Input parameters: integer indicating the index
    • Return: KeyValue at index.
  • Property SET Item: set an item.
    • Input parameters: integer indicating the index
    • Return: nothing.

StationPropertiesAPI

Object with the following members:

  • Model. String. The model of the device, for example "NEMOS_N200", "HERMES_M100", etc.
  • Serial. String. The device serial number.
  • Latitude. String. GPS latitude, in decimal format.
  • Longitude. String. GPS longitude, in decimal format.
  • Group. String. Zeus Group.
  • Reference1. String. Reference 1 field filled on Zeus Server Stations tab, usually containing more info or some reference of internal use.
  • Reference2. String. Reference 2 field filled on Zeus Server Stations tab, usually containing more info or some reference of internal use.
  • ChannelNames. ListString. List of names for every channel. Every index corresponding to Channels Enumeration.
  • ChannelUnits. ListString. List of units for every channel. Every index corresponding to Channels Enumeration.
  • ChannelViews. DictionaryStringListString. Dictionary of channel views, containing at least the view "Default" (the default graph view on Zeus), or any other view configured for this station inside "Views" tab on Zeus Server.

DictionaryStringListString

Dictionary of (String, ListString).

Methods

  • Constructor: create an DictionaryStringListString object.
    • Input parameters: nothing
    • Return: nothing
  • Property GET Item: get an item.
    • Input parameters: key (string)
    • Return: ListString.
  • Property SET Item: set an item.
    • Input parameters: key (String) and value (ListString)
    • Return: nothing.
  • Add: add an element to collection
    • Input parameters: key (String) and value (ListString) to add
    • Return: nothing
  • Clear: clear the collection
    • Input parameters: nothing
    • Return: nothing
  • ContainsKey: determines if the collection has the indicated key
    • Input parameters: key (String)
    • Return: boolean
  • Count: returns the number of items in the collection
    • Input parameters: nothing
    • Return: number of items in the collection
  • Keys: return an ArrayList with de keys.
    • Input parameters: nothing
    • Return: ArrayList(String) with the keys of the collection.
  • Remove: remove an element.
    • Input parameters: Key(String) to remove
    • Return: boolean indicating the result of the operation

DictionaryStringObject

Dictionary of (String, ListString).

Methods

  • Constructor: create an DictionaryStringObject object.
    • Input parameters: nothing
    • Return: nothing
  • Property GET Item: get an item.
    • Input parameters: key (string)
    • Return: an variable object.
  • Property SET Item: set an item.
    • Input parameters: key (String) and value (object)
    • Return: nothing.
  • Add: add an element to collection
    • Input parameters: key (String) and value (object) to add
    • Return: nothing
  • Clear: clear the collection
    • Input parameters: nothing
    • Return: nothing
  • ContainsKey: determines if the collection has the indicated key
    • Input parameters: key (String)
    • Return: boolean
  • Count: returns the number of items in the collection
    • Input parameters: nothing
    • Return: number of items in the collection
  • Keys: return an ArrayList with de keys.
    • Input parameters: nothing
    • Return: ArrayList(String) with the keys of the collection.
  • Remove: remove an element.
    • Input parameters: Key(String) to remove
    • Return: boolean indicating the result of the operation

LastKnownValuesAPI

Object with the following members:

  • lastConnectionTime. Date. Timestamp of values (UTC).
  • RSSI. Integer. Received Signal Strength Indication (RSSI).
  • PowerSupply. String. Can be an Integer with Voltage or a String with "green" (good condition), "orange" (must replace batteries in 3 months) or "red" (must replace batteries within current month).
  • values. DictionaryStringSingle. List of values. Every key corresponding to Channels Enumeration.

DictionaryStringSingle

Dictionary of (String, ListString).

Methods

  • Constructor: create an DictionaryStringSingle object.
    • Input parameters: nothing
    • Return: nothing
  • Property GET Item: get an item.
    • Input parameters: key (string)
    • Return: Single.
  • Property SET Item: set an item.
    • Input parameters: key (String) and value (Single)
    • Return: nothing.
  • Add: add an element to collection
    • Input parameters: key (String) and value (Single) to add
    • Return: nothing
  • Clear: clear the collection
    • Input parameters: nothing
    • Return: nothing
  • ContainsKey: determines if the collection has the indicated key
    • Input parameters: key (String)
    • Return: boolean
  • Count: returns the number of items in the collection
    • Input parameters: nothing
    • Return: number of items in the collection
  • Keys: return an ArrayList with de keys.
    • Input parameters: nothing
    • Return: ArrayList(String) with the keys of the collection.
  • Remove: remove an element.
    • Input parameters: Key(String) to remove
    • Return: boolean indicating the result of the operation

Historical

Object with the following members. ZeusAPI can also use Historical lists:

  • DateOfRecord. Date. Timestamp of the record.
  • ChannelID. Integer. Channel ID of the record. See Channels Enumeration.
  • Reason. String. Reason of the record. See Reasons Enumeration
  • Value. Single. The value of the record.

ListHistorical

Simple lists of Historical of variable size.

Methods

  • Constructor: create an ListHistorical object.
    • Input parameters: nothing
    • Return: nothing
  • Count: returns the number of items in the collection
    • Input parameters: nothing
    • Return: number of items in the collection
  • Add: add an element to collection
    • Input parameters: Historical to add
    • Return: nothing
  • Clear: clear the collection
    • Input parameters: nothing
    • Return: nothing
  • Remove: remove an element.
    • Input parameters: Historical to remove
    • Return: boolean indicating the result of the operation
  • RemoveAt: remove the element in the indicated index.
    • Input parameters: integer indicating the index
    • Return: nothing
  • Property GET Item: get an item.
    • Input parameters: integer indicating the index
    • Return: Historical at index.
  • Property SET Item: set an item.
    • Input parameters: integer indicating the index
    • Return: nothing.

Alarms

Object with the following members. ZeusAPI can also use Alarms lists:

  • StationID. String. ID (ZeusID) of the station.
  • DateOfRecord. Date. Timestamp of the record.
  • Reason. Integer. Reason of the record. See Reasons Enumeration.
  • ChannelID. Integer. Channel ID of the Alarm.
  • AlarmText. String. The text of the alarm. For example: "TEMPERATURE OUT OF RANGE".
  • RawValue. String. The raw string of the alarm, coded as Zeus stores it, for use as reference for future queries.

ListAlarms

Simple lists of Alarms of variable size.

Methods

  • Constructor: create an ListAlarms object.
    • Input parameters: nothing
    • Return: nothing
  • Count: returns the number of items in the collection
    • Input parameters: nothing
    • Return: number of items in the collection
  • Add: add an element to collection
    • Input parameters: Alarms to add
    • Return: nothing
  • Clear: clear the collection
    • Input parameters: nothing
    • Return: nothing
  • Remove: remove an element.
    • Input parameters: Alarms to remove
    • Return: boolean indicating the result of the operation
  • RemoveAt: remove the element in the indicated index.
    • Input parameters: integer indicating the index
    • Return: nothing
  • Property GET Item: get an item.
    • Input parameters: integer indicating the index
    • Return: Alarms at index.
  • Property SET Item: set an item.
    • Input parameters: integer indicating the index
    • Return: nothing.

ProgrammableRelayPeriodAPI

Object with the following members:

  • Weekdays. ListString. List of days of the week (L,M,X,J,V,S,D).
  • ActivationTime. String. Time with the format hh:mm indicating the activation time.
  • Duration. UInteger. Duration (seconds) of the period.

ListProgrammableRelayPeriodAPI

Simple lists of ProgrammableRelayPeriodAPI of variable size.

Methods

  • Constructor: create an ProgrammableRelayPeriodAPI object.
    • Input parameters: nothing
    • Return: nothing
  • Count: returns the number of items in the collection
    • Input parameters: nothing
    • Return: number of items in the collection
  • Add: add an element to collection
    • Input parameters: ProgrammableRelayPeriodAPI to add
    • Return: nothing
  • Clear: clear the collection
    • Input parameters: nothing
    • Return: nothing
  • Remove: remove an element.
    • Input parameters: ProgrammableRelayPeriodAPI to remove
    • Return: boolean indicating the result of the operation
  • RemoveAt: remove the element in the indicated index.
    • Input parameters: integer indicating the index
    • Return: nothing
  • Property GET Item: get an item.
    • Input parameters: integer indicating the index
    • Return: ProgrammableRelayPeriodAPI at index.
  • Property SET Item: set an item.
    • Input parameters: integer indicating the index
    • Return: nothing.