Esempio n. 1
0
        public void SendFS20Command(FS20Command fs20command)
        {
            byte[] commandbytes = new byte[11]; // Reports des FS20PCS immer 11 Byte Gesamtlänge
            commandbytes[0] = 0x01; // HIDReportID
            commandbytes[1] = 0x06; // Byte Anzahl
            commandbytes[2] = 0xF1; // BefehlID
            fs20command.CommandToBytes().CopyTo(commandbytes, 3);

            this.WriteToDevice(commandbytes);
        }
Esempio n. 2
0
        public FS20Command Clone()
        {
            FS20Command temp = new FS20Command();
            temp.HouseCode = this.HouseCode;
            temp.Adress = this.Adress;
            temp.Command = this.Command;
            temp.Time = this.Time;
            temp.Ergebnis = this.Ergebnis;
            temp.Event = this.Event;

            return temp;
        }
Esempio n. 3
0
        public static FS20Command BytesToFS20Command(byte[] commandBytes)
        {
            FS20Command temp = new FS20Command();
            temp.HouseCode = ByteToFS20String(commandBytes[0]) + ByteToFS20String(commandBytes[1]);
            temp.Adress = ByteToFS20String(commandBytes[2]);
            temp.Command = commandBytes[3];
            if (commandBytes.Length > 4)
            {
                temp.Time = commandBytes[4];
            }

            return temp;
        }