コード例 #1
0
 CommandStatus ICommandHandler.Operate(AnalogOutputFloat32 command, ushort index, OperateType opType)
 {
     lock (mutex)
     {
         return(GetOrElseAndLogAnalog(command.value, index, analogMap, () => proxy.Operate(command, index, opType)));
     }
 }
コード例 #2
0
 CommandStatus ICommandHandler.Select(AnalogOutputFloat32 command, ushort index)
 {
     lock (mutex)
     {
         return(GetOrElse(index, analogMap, () => proxy.Select(command, index)));
     }
 }
コード例 #3
0
ファイル: CommandExt.cs プロジェクト: robrhce/Tulip
 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");
     }
 }
コード例 #4
0
 CommandStatus ICommandHandler.DirectOperate(AnalogOutputFloat32 command, uint index)
 {
     return status();
 }
コード例 #5
0
 CommandStatus ICommandHandler.Select(AnalogOutputFloat32 command, uint index)
 {
     return status();
 }
コード例 #6
0
 CommandStatus ICommandHandler.Operate(AnalogOutputFloat32 command, ushort index)
 {
     return(CommandStatus.NOT_SUPPORTED);
 }
コード例 #7
0
 CommandStatus ICommandHandler.Select(AnalogOutputFloat32 command, ushort index)
 {
     lock (mutex)
     {
         return GetOrElse(index, analogMap, () => proxy.Select(command, index));
     }
 }
コード例 #8
0
 CommandStatus ICommandHandler.Operate(AnalogOutputFloat32 command, ushort index, OperateType opType)
 {
     lock (mutex)
     {
         return GetOrElseAndLogAnalog(command.value, index, analogMap, () => proxy.Operate(command, index, opType));
     }
 }
コード例 #9
0
 CommandStatus ICommandHandler.Select(AnalogOutputFloat32 command, ushort index)
 {
     return CommandStatus.NOT_SUPPORTED;
 }
コード例 #10
0
 CommandStatus ICommandHandler.Operate(AnalogOutputFloat32 command, ushort index, OperateType opType)
 {
     return CommandStatus.NOT_SUPPORTED;
 }