Updating Parameters At Run Time

<< Click to Display Table of Contents >>

 

Updating Parameters At Run Time

To add, remove, or change any parameter at run time from a device or Agent, execute the next procedures:

1.Create a Tag named "UpdateConfig" and inform in its ParamDevice property the name of any device, such as "Test", because this value cannot be an empty String. Configure the ParamItem property with the value "UpdateConfig".

2.Create, in an application in Elipse E3, Elipse Power, or Elipse Water, a script to write the parameters to update using the SetConfigurationParameters Tag from IOKit library. For more information, please check topic Documentation of I/O Interfaces.

3.The names of parameters used by this Driver are described on the next table and they store the result of the configuration performed on the SNMP Device Config tab of the configuration window.

 

Parameters used by this Driver

Parameter

Description

SNMP.DeviceCount

Indicates the number of devices on a list, in which each device is addressed by an index starting at 0 (zero). This index is needed for all other properties

SNMP.Device[Index].Name

Name of a device according to the index, such as SNMP.Device[0].Name = "MainSwitch"

SNMP.Device[Index].IP

IP address

SNMP.Device[Index].Port

UDP/IP port

SNMP.Device[Index].Community

Reading community

SNMP.Device[Index].WCommunity

Writing community

SNMP.Device[Index].Version

Version of SNMP protocol

SNMP.Device[Index].MaxReq

Maximum number of simultaneous requests

SNMP.Device[Index].Modules

List of MIB modules

SNMP.Device[Index].Disable

Possible values are 1: Disables communication with this device or 0: Enables communication with this device

 

In the next example script, communication is enabled with a device with index 1 (one) and configured the IP address of this device. After sending these parameters by using a writing to the SetConfigurationParameters Tag, a communication restart is requested by writing to the UpdateConfig Tag.

Dim CommArr(1)
CommArr(0) = Array("SNMP.Device[1].Disable",0)
CommArr(1) = Array("SNMP.Device[1].IP","192.168.100.2")
Item("DriverSNMP").Write -1,0,0,3,CommArr
Item("DriverSNMP").Item("UpdateConfig").WriteEx(1)

Was this page useful?