private static async Task Run(ZigbeeController controller) { var rst = new SYS_RESET(1); await controller.Channel.SendAsync(rst, Predicate, CancellationToken.None); Console.ReadLine(); }
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(); }