Beispiel #1
0
        public static string ToCustomString(this PsnCommandPartConfirmation val)
        {
            switch (val)
            {
            case PsnCommandPartConfirmation.EverythyngIsOk:
                return("Подтверждено");

            case PsnCommandPartConfirmation.WrongFirstCrcByte:
                return("Первый байт CRC не совпадает");

            case PsnCommandPartConfirmation.WrongSecondCrcByte:
                return("Второй байт CRC не совпадает");

            case PsnCommandPartConfirmation.WrongAddress:
                return("Адрес не совпадает");

            case PsnCommandPartConfirmation.WrongCommandCode:
                return("Код команды не совпадает");

            default:
                return(null);
            }
        }
Beispiel #2
0
 public PsnCommandPartAndConfirmation(IPsnProtocolCommandPartConfiguration commandPart, PsnCommandPartConfirmation confirmation)
 {
     _commandPart  = commandPart;
     _confirmation = confirmation;
 }