コード例 #1
0
ファイル: RegisterNetwork.cs プロジェクト: Mavtak/roomie
        protected override void Execute_HomeAutomationDefinition(HomeAutomationCommandContext context)
        {
            var interpreter = context.Interpreter;
            var networks = context.Networks;

            var address = context.ReadParameter("Address").Value;

            interpreter.WriteEvent("Searching for PiEngineering devices");

            var network = new PiEngineeringNetwork(new HomeAutomationNetworkContext(context.Engine, context.ThreadPool), address);
            networks.Add(network);

            interpreter.WriteEvent("Done.");
        }
コード例 #2
0
        protected override void Execute_HomeAutomationDefinition(HomeAutomationCommandContext context)
        {
            var interpreter = context.Interpreter;
            var networks    = context.Networks;

            var address = context.ReadParameter("Address").Value;

            interpreter.WriteEvent("Searching for PiEngineering devices");

            var network = new PiEngineeringNetwork(new HomeAutomationNetworkContext(context.Engine, context.ThreadPool), address);

            networks.Add(network);

            interpreter.WriteEvent("Done.");
        }