b758ade2afc93a5dab8ea55c5e1d01e27ee52990
David Blume Migrate from SDK1 to SceneG...

David Blume authored 6 years ago

1) <?xml version="1.0" encoding="utf-8" ?>
2) 
3) <component name="TagTask" extends="Task">
4) 
5) <interface>
6)   <field id="updateText" type="string" value="Tagging from TagTask"/>
7) </interface>
8) <children>
9)   <Settings id="MySettings" />
10) </children>
11) 
12) <script type="text/brightscript" >
13) <![CDATA[
14) 
15) sub init()
16)     m.top.functionName = "executeTask"
17)     m.settings = m.top.findNode("MySettings")
18) end sub
19) 
20) function executeTask() as void
21)     m.port = CreateObject("roMessagePort")
22) 
23)     deviceInfo = CreateObject("roDeviceInfo")
David Blume Make the ID a few character...

David Blume authored 6 years ago

24)     clientID = Right(deviceInfo.GetChannelClientId(), 6)
David Blume Use GetChannelClientId

David Blume authored 6 years ago

25)     modelID = deviceInfo.GetModel()
David Blume Migrate from SDK1 to SceneG...

David Blume authored 6 years ago

26) 
David Blume Use GetChannelClientId

David Blume authored 6 years ago

27)     aaIPAddrs = deviceInfo.GetIPAddrs()
David Blume Migrate from SDK1 to SceneG...

David Blume authored 6 years ago

28)     for each key in aaIPAddrs
29)         ipAddr = aaipAddrs[key]
30)         if ipAddr <> invalid and ipAddr.Len() > 0
31)             ' m.top.updateText = key + " = " + ipAddr
32)         end if
33)     end for
34) 
David Blume Use GetChannelClientId

David Blume authored 6 years ago

35)     sendRequest(ipAddr, clientID + "-" + modelID)