Exemplo n.º 1
0
def SetupDeviceConnection():
    deviceConnection = ServerlessDeviceConnection()
    BlinkyLEDDevice = Device()
    BlinkyLEDDevice.DeviceID = 444
    BlinkyLEDDevice.SetDeviceName('BlinkyLED')
    OnOffControls = ControlValue()
    OnOffControls.ControlName = 'LEDState'
    OnOffControls.ControlValueType = OnOffControls.OnOff
    OnOffControls.ControlID = 0
    BlinkyLEDDevice.ControlList.append(OnOffControls)
    deviceConnection.SetDeviceData(BlinkyLEDDevice)
    return deviceConnection
Exemplo n.º 2
0
def SetupDeviceConnection():
    deviceConnection = ServerlessDeviceConnection()
    ButtonDevice = Device()
    ButtonDevice.DeviceID = 27
    ButtonDevice.SetDeviceName('MyButt')
    outControl = ControlValue()
    outControl.ControlName = 'Butt'
    outControl.ControlDirection = outControl.Output
    outControl.ControlValueType = outControl.Range
    outControl.ControlID = 0
    ButtonDevice.ControlList.append(outControl)

    deviceConnection.SetDeviceData(ButtonDevice)
    return deviceConnection
Exemplo n.º 3
0
from ServerlessDevice import ServerlessDeviceConnection

import sys
from ControlValue import ControlValue
from Device import Device
from Vertex import Vertex
from CommonDataTypes import HeepIPAddress

functionalDevice = Device()
functionalDevice.DeviceID = 5678
functionalDevice.SetFrontEndXY(100, 287)
functionalDevice.SetIconInformation(1, [chr(3), chr(4), chr(12), chr(41)])
functionalDevice.SetDeviceName("JERCERB")
OnOffControls = ControlValue()
OnOffControls.ControlValueType = OnOffControls.OnOff
OnOffControls.ControlDirection = 1
OnOffControls.ControlName = 'Fig'
OnOffControls.ControlID = 2
functionalDevice.ControlList.append(OnOffControls)

AnotherControl = ControlValue()
AnotherControl.ControlValueType = AnotherControl.OnOff
AnotherControl.ControlDirection = 1
AnotherControl.ControlName = 'Pretzel'
AnotherControl.ControlID = 1
functionalDevice.ControlList.append(AnotherControl)

Output1 = ControlValue()
Output1.ControlValueType = Output1.Range
Output1.ControlName = 'Fruity'
Output1.ControlID = 0