Exemplo n.º 1
0
Control1.ControlName = 'Forge'
Control1.ControlID = 0
Control2 = ControlValue()
Control2.ControlName = 'Fast'
Control2.ControlID = 1
otherDevice.ControlList.append(Control1)
otherDevice.ControlList.append(Control2)
otherDevice.AddVertex(myVertex)
otherDevice.SetFrontEndXY(10322, 1032)
otherDevice.SetIPAddress(myIP)

otherDevice.SetIconInformation(1, [chr(3), chr(4), chr(12), chr(41)])
myString = otherDevice.GetDeviceString()

print CheckEquality(OpCodeUtilities().ConvertStringToByteArray(myString),
                    otherDevice.GetDeviceByteArray(),
                    "Get Device String OpCodes")
print CheckEquality(otherDevice.GetIPAddress().GetIPAsString(), "192.168.1.1",
                    "Get Device IP Address")

# Action Op Codes
actionParser = ActionOpCodeParser()
myArray = [chr(0x0A), chr(0x02), chr(0x01), chr(0x0f)]
SuccessArray = [
    chr(0x10),
    chr(0x00),
    chr(0x00),
    chr(0x30),
    chr(0x2c),
    chr(len("Value Set"))
]