Exemplo n.º 1
0
        public void SendCorrectState_WithMultipleOutputs()
        {
            var expectedState = new byte[] { 3, 0, 0, 0, 0, 128, 0, 0 };
            var client        = new OrchestratorClient(IPAddress.Loopback);

            client.SetOutput(0, true);
            client.SetOutput(1, true);
            client.SetOutput(47, true);
            var sendStateResult = client.CommitChanges();

            bool statesMatching = sendStateResult.State.SequenceEqual(expectedState);

            Assert.IsTrue(statesMatching);
        }
Exemplo n.º 2
0
        public void SetOutputState(int id, bool isActive)
        {
            _client?.SetOutput(id, isActive, SetOutputMode.Set);

            _logService.Information("Set " + id + " = " + (isActive ? "on" : "off"));
        }