HA4IoT.Hardware.LogicalBinaryOutput.Write C# (CSharp) Method

Write() public method

public Write ( BinaryState state, bool commit = true ) : void
state BinaryState
commit bool
return void
        public void Write(BinaryState state, bool commit = true)
        {
            state = CoerceState(state);

            // TODO: Implement animations here.
            foreach (var output in _outputs)
            {
                output.Write(state, false);
            }

            if (commit)
            {
                foreach (var output in _outputs)
                {
                    output.Write(state);
                }
            }

            _state = state;
        }