CommandStatus ICommandHandler.Operate(AnalogOutputFloat32 command, ushort index, OperateType opType) { lock (mutex) { return(GetOrElseAndLogAnalog(command.value, index, analogMap, () => proxy.Operate(command, index, opType))); } }
CommandStatus ICommandHandler.Select(AnalogOutputFloat32 command, ushort index) { lock (mutex) { return(GetOrElse(index, analogMap, () => proxy.Select(command, index))); } }
public static AnalogOutputFloat32 GetAnalogOutput(this Command command) { if (command.Point.Type == BasicType.ANALOG_CONTROL && command.AnalogValue.HasValue) { AnalogOutputFloat32 aof = new AnalogOutputFloat32(Convert.ToSingle(command.AnalogValue)); return aof; } else { throw new ArgumentException("Invalid argument: Point.Type must be ANALOG_CONTROL and AnalogValue must be != null"); } }
CommandStatus ICommandHandler.DirectOperate(AnalogOutputFloat32 command, uint index) { return status(); }
CommandStatus ICommandHandler.Select(AnalogOutputFloat32 command, uint index) { return status(); }
CommandStatus ICommandHandler.Operate(AnalogOutputFloat32 command, ushort index) { return(CommandStatus.NOT_SUPPORTED); }
CommandStatus ICommandHandler.Select(AnalogOutputFloat32 command, ushort index) { lock (mutex) { return GetOrElse(index, analogMap, () => proxy.Select(command, index)); } }
CommandStatus ICommandHandler.Operate(AnalogOutputFloat32 command, ushort index, OperateType opType) { lock (mutex) { return GetOrElseAndLogAnalog(command.value, index, analogMap, () => proxy.Operate(command, index, opType)); } }
CommandStatus ICommandHandler.Select(AnalogOutputFloat32 command, ushort index) { return CommandStatus.NOT_SUPPORTED; }
CommandStatus ICommandHandler.Operate(AnalogOutputFloat32 command, ushort index, OperateType opType) { return CommandStatus.NOT_SUPPORTED; }