Module ddCommunication.protocols.LCPWirelessProtocol.DDCPReplyTelegrams.KeyboardStatusReply

Expand source code
#from .protocols.LCPWirelessProtocol.HelperMethods import ReadBit
from ..HelperMethods import ReadBit 

class KeyboardStatusReply:

    def __init__(
            self,
            keypressHandled=False,
            autoLedOn=False,
            offLedOn=False,
            handLedOn=False,
            remoteRefActive=False,
            localRefActive=False,
            wizardNotSupported=False,
            notUsed2=False):
        self.KeyPressHandled = keypressHandled
        self.AutoLedOn = autoLedOn
        self.OffLedOn = offLedOn
        self.HandLedOn = handLedOn
        self.RemoteRefActive = remoteRefActive
        self.LocalRefActive = localRefActive
        self.WizardNotSupported = wizardNotSupported
        self.NotUsed2 = notUsed2

    def GetBytes(self):
        pass

    def GetMessageType(self):
        return 0x1E

    def GetTypeHeader(self):
        return 0x00

    @staticmethod
    def FromBytes(data):
        Bitfield = data[0]
        keyPressHandled = ReadBit(Bitfield, 0)
        autoLedOn = ReadBit(Bitfield, 1)
        offLedOn = ReadBit(Bitfield, 2)
        handLedOn = ReadBit(Bitfield, 3)
        remoteRefActive = ReadBit(Bitfield, 4)
        localRefActive = ReadBit(Bitfield, 5)
        wizardNotSupported = ReadBit(Bitfield, 6)
        notUsed2 = ReadBit(Bitfield, 7)
        return KeyboardStatusReply(
            keyPressHandled,
            autoLedOn,
            offLedOn,
            handLedOn,
            remoteRefActive,
            localRefActive,
            wizardNotSupported,
            notUsed2)

Classes

class KeyboardStatusReply (keypressHandled=False, autoLedOn=False, offLedOn=False, handLedOn=False, remoteRefActive=False, localRefActive=False, wizardNotSupported=False, notUsed2=False)
Expand source code
class KeyboardStatusReply:

    def __init__(
            self,
            keypressHandled=False,
            autoLedOn=False,
            offLedOn=False,
            handLedOn=False,
            remoteRefActive=False,
            localRefActive=False,
            wizardNotSupported=False,
            notUsed2=False):
        self.KeyPressHandled = keypressHandled
        self.AutoLedOn = autoLedOn
        self.OffLedOn = offLedOn
        self.HandLedOn = handLedOn
        self.RemoteRefActive = remoteRefActive
        self.LocalRefActive = localRefActive
        self.WizardNotSupported = wizardNotSupported
        self.NotUsed2 = notUsed2

    def GetBytes(self):
        pass

    def GetMessageType(self):
        return 0x1E

    def GetTypeHeader(self):
        return 0x00

    @staticmethod
    def FromBytes(data):
        Bitfield = data[0]
        keyPressHandled = ReadBit(Bitfield, 0)
        autoLedOn = ReadBit(Bitfield, 1)
        offLedOn = ReadBit(Bitfield, 2)
        handLedOn = ReadBit(Bitfield, 3)
        remoteRefActive = ReadBit(Bitfield, 4)
        localRefActive = ReadBit(Bitfield, 5)
        wizardNotSupported = ReadBit(Bitfield, 6)
        notUsed2 = ReadBit(Bitfield, 7)
        return KeyboardStatusReply(
            keyPressHandled,
            autoLedOn,
            offLedOn,
            handLedOn,
            remoteRefActive,
            localRefActive,
            wizardNotSupported,
            notUsed2)

Static methods

def FromBytes(data)
Expand source code
@staticmethod
def FromBytes(data):
    Bitfield = data[0]
    keyPressHandled = ReadBit(Bitfield, 0)
    autoLedOn = ReadBit(Bitfield, 1)
    offLedOn = ReadBit(Bitfield, 2)
    handLedOn = ReadBit(Bitfield, 3)
    remoteRefActive = ReadBit(Bitfield, 4)
    localRefActive = ReadBit(Bitfield, 5)
    wizardNotSupported = ReadBit(Bitfield, 6)
    notUsed2 = ReadBit(Bitfield, 7)
    return KeyboardStatusReply(
        keyPressHandled,
        autoLedOn,
        offLedOn,
        handLedOn,
        remoteRefActive,
        localRefActive,
        wizardNotSupported,
        notUsed2)

Methods

def GetBytes(self)
Expand source code
def GetBytes(self):
    pass
def GetMessageType(self)
Expand source code
def GetMessageType(self):
    return 0x1E
def GetTypeHeader(self)
Expand source code
def GetTypeHeader(self):
    return 0x00