Runtime Parameter Update

<< Click to Display Table of Contents >>

 

Runtime Parameter Update

In order to add, remove or change a SNMP Agent device parameter in runtime, please follow the steps below:

 

1 - Create a tag named "UpdateConfig". Inform at the Device field any device name (ex: "Teste" - it cannnot be empty) and at the Item field the text "UpdateConfig".

2 - Create at your E3/Power project a script that will change the desired parameters through the IOKIT operation "SetConfigurationParameters" described at Documentation of I/O Interfaces.

The parameter names used by this driver are shown below. They store the configuration performed at the Device Config tab - SNMP Device Config.

 

ParAMETER

DescriPTION

SNMP.DeviceCount

Indicates the total number of devices. Each device is addressed by an Index starting at 0. The Index is necessary for all other properties.

SNMP.Device[Index].Name

Name of the device informed by the Index.

Exemple:

SNMP.Device[0].Name = "MainSwitch"

SNMP.Device[Index].IP

IP Address

SNMP.Device[Index].Port

Port

SNMP.Device[Index].Community

Read community

SNMP.Device[Index].WCommunity

Write community

SNMP.Device[Index].Version

SNMP Version

SNMP.Device[Index].MaxReq

Max number of simultaneous requests

SNMP.Device[Index].Modules

List of MIB modules

SNMP.Device[Index].Disable

1 = disables the communication with this device; 0 = enables

 

At the example script below, we are enabling the communication with the device with Index = 1 and defining it´s IP Address. After sending the parameters through the Write operation at the SetConfigurationParameters tag (-1,0,0,3), we request the configuration update through the write operation at 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)