[BUG-14790] system.device.addDevice - zeroBasedAddressing is inverted

ignition80
#1

When using the function system.device.addDevice with the deviceProps containing “zeroBasedAddressing” : “false”, the device created gets the parameter “One-based addressing” set to false:

image

The scripting keyword should be oneBasedAddressing to match the gateway GUI parameter (and functionality) or the logic should be inverted (setting zeroBasedAddressing to false should set the GUI parameter “One-based addressing” to true)

0 Likes

#2

Thank you, I have added a ticket for this and will let you know when its been fixed.

0 Likes

#3

Are you using the keyword-argument based zeroBasedAddressing, or passing a dictionary to deviceProps with zeroBasedAddressing? I’m looking at making a fix, and curious which way it’s actually being used.

0 Likes

#4

I’m using it in the deviceProps dictionnary:

deviceProps = {“Hostname” : adresse, “zeroBasedAddressing” : False}
system.device.addDevice(deviceType = “ModbusTcp”, deviceName = nom, deviceProps = deviceProps)

0 Likes

#5

Okay, the fix up for review right now is just to add a new OneBasedAddressing setting that’s going to do what’s expected - ZeroBasedAddressing will still work, but obviously with inverted functionality.

0 Likes

#6

This is updated in the newest nightly build - basically, the setting that’s exposed to users is now the proper zero-based addressing setting, so addDevice matches actual device configuration.

0 Likes

split this topic #7

7 posts were split to a new topic: addDevice zeroBasedAddressing not working properly on upgrade

0 Likes