public static string GetPumpStatusEnum(PumpStatusEnum pumpStatusEnum)
        {
            switch (pumpStatusEnum)
            {
            case PumpStatusEnum.Idle: return("02");

            case PumpStatusEnum.Reserved: return("0#");

            case PumpStatusEnum.Authorized: return("0:");

            case PumpStatusEnum.NozzlePickUp: return("0;");

            case PumpStatusEnum.StartedDispend: return("0;");

            case PumpStatusEnum.Dispensing: return("0?");

            case PumpStatusEnum.DispenseCompleted: return("12");

            case PumpStatusEnum.Finalized: return("42");

            case PumpStatusEnum.NoRespond: return("00");

            case PumpStatusEnum.NoAuthorise: return("03");

            case PumpStatusEnum.PumpBlocked: return("82");

            case PumpStatusEnum.Disabled: return("7F");

            default: return($"[{pumpStatusEnum.ToString()}|{(int)pumpStatusEnum}]");
            }
        }
예제 #2
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="pse"></param>
 /// <returns></returns>
 private PumpStatus IsPumpRun(PumpStatusEnum pse)
 {
     if (pse == PumpStatusEnum.Run)
     {
         return(PumpStatus.Run);
     }
     else if (pse == PumpStatusEnum.Stop)
     {
         return(PumpStatus.Stop);
     }
     throw new ArgumentException(pse.ToString());
 }
예제 #3
0
파일: PumpStatus.cs 프로젝트: wpmyj/c3
 /// <summary>
 ///
 /// </summary>
 /// <param name="value"></param>
 /// <returns></returns>
 static public PumpStatus Find(PumpStatusEnum value)
 {
     if (value == PumpStatusEnum.Run)
     {
         return(Run);
     }
     else if (value == PumpStatusEnum.Stop)
     {
         return(Stop);
     }
     else
     {
         throw new ArgumentException(value.ToString());
     }
 }
예제 #4
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="pse"></param>
 /// <returns></returns>
 private PumpStatus IsPumpRun(PumpStatusEnum pse)
 {
     if (pse == PumpStatusEnum.Run)
     {
         return PumpStatus.Run;
     }
     else if (pse == PumpStatusEnum.Stop)
     {
         return PumpStatus.Stop;
     }
     throw new ArgumentException(pse.ToString());
 }