CommandStatus ICommandHandler.Operate(AnalogOutputDouble64 command, ushort index, OperateType opType)
 {
     lock (mutex)
     {
         return(GetOrElseAndLogAnalog(command.value, index, analogMap, () => proxy.Operate(command, index, opType)));
     }
 }
 CommandStatus ICommandHandler.Select(AnalogOutputDouble64 command, ushort index)
 {
     lock (mutex)
     {
         return(GetOrElse(index, analogMap, () => proxy.Select(command, index)));
     }
 }
Example #3
0
        // demonstrates how to build a set of command headers for a complex command request
        static ICommandHeaders GetCommandHeaders()
        {
            var crob = new ControlRelayOutputBlock(ControlCode.PULSE_ON, 1, 100, 100);
            var ao   = new AnalogOutputDouble64(1.37);

            return(CommandSet.From(
                       CommandHeader.From(IndexedValue.From(crob, 0)),
                       CommandHeader.From(IndexedValue.From(ao, 1))
                       ));
        }
 CommandStatus ICommandHandler.DirectOperate(AnalogOutputDouble64 command, uint index)
 {
     return status();
 }
 CommandStatus ICommandHandler.Select(AnalogOutputDouble64 command, uint index)
 {
     return status();
 }
Example #6
0
 CommandStatus ICommandHandler.Operate(AnalogOutputDouble64 command, ushort index)
 {
     return(CommandStatus.NOT_SUPPORTED);
 }
 CommandStatus ICommandHandler.Select(AnalogOutputDouble64 command, ushort index)
 {
     lock (mutex)
     {
         return GetOrElse(index, analogMap, () => proxy.Select(command, index));
     }
 }
 CommandStatus ICommandHandler.Operate(AnalogOutputDouble64 command, ushort index, OperateType opType)
 {
     lock (mutex)
     {
         return GetOrElseAndLogAnalog(command.value, index, analogMap, () => proxy.Operate(command, index, opType));
     }
 }
 CommandStatus ICommandHandler.Operate(AnalogOutputDouble64 command, ushort index, OperateType opType)
 {
     return CommandStatus.NOT_SUPPORTED;
 }
 CommandStatus ICommandHandler.Select(AnalogOutputDouble64 command, ushort index)
 {
     return CommandStatus.NOT_SUPPORTED;
 }