Esempio n. 1
0
        private static async Task Run(ZigbeeController controller)
        {
            var rst = new SYS_RESET(1);
            await controller.Channel.SendAsync(rst, Predicate, CancellationToken.None);

            Console.ReadLine();
        }
Esempio n. 2
0
        static void Main(string[] args)
        {
            // Configure Serilog
            Log.Logger = new LoggerConfiguration()
                         .MinimumLevel.Debug()
                         .WriteTo.Console()
                         .CreateLogger();

            var controller = new ZigbeeController("COM5");

            controller.Open();

            try
            {
                Run(controller).Wait();
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.ToString());
            }
            Console.ReadLine();
        }