AnsweredAssumed Answered

LUA script - probeportlist field not found in getrobots,1 request

Question asked by 1_Javier on Oct 16, 2014
Latest reply on Oct 16, 2014 by 1_Javier

Hello,


Im stuck with some stupid thing that cannot find out why it's not working. If anybody can help me I will be much appreciated. It should be an stupid detail :smileysad:


Attached code, maybe it's useless for someone.

 

Probeportlist should contain the table of probes for each robot under the hub "HUB". But this variable is always nil, so the call seems it's not obtaining this field (Detail 0 skips this table) or I am missing something.

 

 

local HUB = "cdn-m1moncg-001" local addr2 = "/MEV_MON/"..HUB.."/"..HUB.."/hub" ---------------------------- --* DO *--       local args = pds.create()       pds.putString(args, "detail", "1")      local tb2Robots = nimbus.request(addr2,"getrobots", args)      if tb2Robots ~= nil then           for _,robot in pairs(tb2Robots.robotlist) do              if robot.status == 0 and robot.name == "cdn-m1monwg-001" then                   print(robot.name)                   print(robot.probeportlist)                   for _,probe2 in pairs(robot.probeportlist) do                     file.write (fname,timestamp.format ( timestamp.now(), "%H:%M:%S").." Probe "..probe2.name.."\n")                  pds.delete(args)                   end              end         end      end

 

Thanks in advance,

Javier

Outcomes