Beispiel #1
0
        private Task SendCommand(byte roomId, byte deviceId, char function, string parameter, string displayLine1, string displayLine2)
        {
            string instructionNumber = _instructionNumber.Next();

            string command = _commandBuilder.BuildCommandString(instructionNumber, roomId, deviceId, function, parameter, displayLine1, displayLine2);

            byte[] packet = Encoding.ASCII.GetBytes(command);

            return(_socket.SendAsync(packet, packet.Length));
        }