Example #1
0
        public static void Command(this LibCECClient client, params byte[] values)
        {
            var cmd = new CecCommand();

            foreach (byte value in values)
            {
                cmd.PushBack(value);
            }

            client.Transmit(cmd);
        }
Example #2
0
        /// <summary>
        /// Send command via the command enum <see cref="CecOpcode"/>.
        /// </summary>
        /// <param name="client"></param>
        /// <param name="cmd"></param>
        public static void Command(this LibCECClient client, CecOpcode cmd)
        {
            Console.WriteLine($"Received Command: {cmd}");

            CecCommand newCommand = new CecCommand
            {
                Initiator   = CecLogicalAddress.PlaybackDevice1,
                Destination = CecLogicalAddress.Tv,
                Opcode      = cmd
            };

            client.Transmit(newCommand);
        }