コード例 #1
0
ファイル: CardSlotsStatus.cs プロジェクト: ruslan81/FIS
        /// <summary>
        /// возвращает статус(тип) карты в слоте для карты второго водителя
        /// </summary>
        /// <returns>DRIVER CARD, WORKSHOP CARD, CONTROL CARD, COMPANY CARD, UNKNOWN CARD</returns>
        public string getCoDriverCardSlotsStatus_toString()
        {
            string result;

            switch (ConvertionClass.convertIntoUnsigned1ByteInt(getCoDriverCardSlotsStatus()))
            {
            case 0x1:
                result = "DRIVER CARD";
                break;

            case 0x2:
                result = "WORKSHOP CARD";
                break;

            case 0x3:
                result = "CONTROL CARD";
                break;

            case 0x4:
                result = "COMPANY CARD";
                break;

            default:
                result = "UNKNOWN CARD";
                break;
            }
            return(result);
        }
コード例 #2
0
ファイル: CertificateContent.cs プロジェクト: ruslan81/FIS
 public CertificateContent(byte[] value, short kidType)
 {
     certificateProfileIdentifier    = ConvertionClass.convertIntoUnsigned1ByteInt(value[0]);
     certificationAuthorityReference = new KeyIdentifier(ConvertionClass.arrayCopy(value, 1, 8), kidType);
     certificateHolderAuthorisation  = new CertificateHolderAuthorisation(ConvertionClass.arrayCopy(value, 9, 7));
     certificateEndOfValidity        = new TimeReal(ConvertionClass.arrayCopy(value, 16, 4));
     certificateHolderReference      = new KeyIdentifier(ConvertionClass.arrayCopy(value, 20, 8), kidType);
     publicKey = new PublicKey(ConvertionClass.arrayCopy(value, 28, 136));
 }
コード例 #3
0
ファイル: Name.cs プロジェクト: ruslan81/FIS
        public Name(byte[] value)
        {
            byte codePageTmp = value[0];

            byte[] nameTmp = ConvertionClass.arrayCopy(value, 1, value.Length - 1);

            codePage = ConvertionClass.convertIntoUnsigned1ByteInt(codePageTmp);
            setName(nameTmp);
        }
コード例 #4
0
        public VehicleRegistrationNumber(byte[] value)
        {
            byte codePageTemp = value[0];

            byte[] vehicleRegNumberTemp = ConvertionClass.arrayCopy(value, 1, value.Length - 1);

            codePage         = ConvertionClass.convertIntoUnsigned1ByteInt(codePageTemp);
            vehicleRegNumber = ConvertionClass.arrayCopy(vehicleRegNumberTemp, 0, 13);
        }
コード例 #5
0
ファイル: CardSlotsStatus.cs プロジェクト: ruslan81/FIS
        /// <summary>
        /// перегруженный метод. В основном использовался для дебага и разработки.
        /// </summary>
        /// <returns>возращает строку со всеми данными сразу</returns>
        public override string ToString()
        {
            string result;

            switch (ConvertionClass.convertIntoUnsigned1ByteInt(getDriverCardSlotsStatus()))
            {
            case 0x1:
                result = "DriverCard Slot Status: DRIVER_CARD_INSERTED \r\n";
                break;

            case 0x2:
                result = "DriverCard Slot Status: WORKSHOP_CARD_INSERTED \r\n";
                break;

            case 0x3:
                result = "DriverCard Slot Status: CONTROL_CARD_INSERTED \r\n";
                break;

            case 0x4:
                result = "DriverCard Slot Status: COMPANY_CARD_INSERTED \r\n";
                break;

            default:
                result = "DriverCardSlotsStatus: UNKNOWN_CARD_INSERTED \r\n";
                break;
            }
            switch (ConvertionClass.convertIntoUnsigned1ByteInt(getCoDriverCardSlotsStatus()))
            {
            case 0x1:
                result += "CoDriverCard Slot Status: DRIVER_CARD_INSERTED\r\n";
                break;

            case 0x2:
                result += "CoDriverCard Slot Status: WORKSHOP_CARD_INSERTED\r\n";
                break;

            case 0x3:
                result += "CoDriverCard Slot Status: CONTROL_CARD_INSERTED\r\n";
                break;

            case 0x4:
                result += "CoDriverCard Slot Status: COMPANY_CARD_INSERTED\r\n";
                break;

            default:
                result += "CoDriverCard Slot Status: UNKNOWN_CARD_INSERTED\r\n";
                break;
            }
            return(result);
        }
コード例 #6
0
ファイル: VuControlActivityData.cs プロジェクト: ruslan81/FIS
        public VuControlActivityData(byte[] value)
        {
            vuControlActivityRecords = new List <VuControlActivityRecord>();

            noOfControls  = ConvertionClass.convertIntoUnsigned1ByteInt(value[0]);
            structureSize = 1 + noOfControls * VuControlActivityRecord.structureSize;

            if (noOfControls != 0)
            {
                for (int i = 0; i < noOfControls; i++)
                {
                    byte[] record = ConvertionClass.arrayCopy(value, 1 + (i * VuControlActivityRecord.structureSize), VuControlActivityRecord.structureSize);
                    VuControlActivityRecord vcar = new VuControlActivityRecord(record);
                    vuControlActivityRecords.Add(vcar);
                }
            }
        }
コード例 #7
0
ファイル: VuEventData.cs プロジェクト: ruslan81/FIS
        public VuEventData(byte[] value)
        {
            vuEventRecords = new List <VuEventRecord>();

            noOfVuEvents  = ConvertionClass.convertIntoUnsigned1ByteInt(value[0]);
            structureSize = 1 + noOfVuEvents * VuEventRecord.structureSize;

            if (noOfVuEvents != 0)
            {
                for (int i = 0; i < noOfVuEvents; i++)
                {
                    byte[]        record = ConvertionClass.arrayCopy(value, 1 + (i * VuEventRecord.structureSize), VuEventRecord.structureSize);
                    VuEventRecord ver    = new VuEventRecord(record);
                    vuEventRecords.Add(ver);
                }
            }
        }
コード例 #8
0
        public VuPlaceDailyWorkPeriodData(byte[] value)
        {
            vuPlaceDailyWorkPeriodRecords = new List <VuPlaceDailyWorkPeriodRecord>();

            noOfPlaceRecords = ConvertionClass.convertIntoUnsigned1ByteInt(value[0]);
            structureSize    = 1 + noOfPlaceRecords * VuPlaceDailyWorkPeriodRecord.structureSize;

            if (noOfPlaceRecords != 0)
            {
                for (int i = 0; i < noOfPlaceRecords; i++)
                {
                    byte[] record = ConvertionClass.arrayCopy(value, 1 + (i * VuPlaceDailyWorkPeriodRecord.structureSize), VuPlaceDailyWorkPeriodRecord.structureSize);
                    VuPlaceDailyWorkPeriodRecord vpdwpr = new VuPlaceDailyWorkPeriodRecord(record);
                    vuPlaceDailyWorkPeriodRecords.Add(vpdwpr);
                }
            }
        }
コード例 #9
0
 public NoOfCardPlaceRecords(byte b)
 {
     noOfCardPlaceRecords = ConvertionClass.convertIntoUnsigned1ByteInt(b);
 }
コード例 #10
0
        public NoOfFaultsPerType(string value)
        {
            byte b = Convert.ToByte(value);

            noOfFaultsPerType = ConvertionClass.convertIntoUnsigned1ByteInt(b);
        }
コード例 #11
0
 public NoOfFaultsPerType(byte b)
 {
     noOfFaultsPerType = ConvertionClass.convertIntoUnsigned1ByteInt(b);
 }
コード例 #12
0
 public EntryTypeDailyWorkPeriod(byte value)
 {
     entryTypeDailyWorkPeriod = ConvertionClass.convertIntoUnsigned1ByteInt(value);
 }
コード例 #13
0
ファイル: Name.cs プロジェクト: ruslan81/FIS
 public Name(byte codePageTmp, string name)
 {
     codePage = ConvertionClass.convertIntoUnsigned1ByteInt(codePageTmp);
     setName(name);
 }
コード例 #14
0
 public Speed(byte b)
 {
     speed = ConvertionClass.convertIntoUnsigned1ByteInt(b);
 }
コード例 #15
0
 public NoOfCalibrationRecords(byte b)
 {
     noOfCalibrationRecords = ConvertionClass.convertIntoUnsigned1ByteInt(b);
 }
コード例 #16
0
 public SimilarEventsNumber(byte b)
 {
     similarEventsNumber = ConvertionClass.convertIntoUnsigned1ByteInt(b);
 }
コード例 #17
0
ファイル: ManufacturerCode.cs プロジェクト: ruslan81/FIS
 public ManufacturerCode(byte b)
 {
     manufacturerCode = ConvertionClass.convertIntoUnsigned1ByteInt(b);
 }
コード例 #18
0
 public NationNumeric(byte value)
 {
     this.nationNumeric = ConvertionClass.convertIntoUnsigned1ByteInt(value);
 }
コード例 #19
0
 public VehicleRegistrationNumber(byte codePageTemp, byte[] vehicleRegNumberTemp)
 {
     codePage         = ConvertionClass.convertIntoUnsigned1ByteInt(codePageTemp);
     vehicleRegNumber = ConvertionClass.arrayCopy(vehicleRegNumberTemp, 0, 13);
 }
コード例 #20
0
ファイル: CompanyActivityType.cs プロジェクト: ruslan81/FIS
 public CompanyActivityType(byte value)
 {
     companyActivityType = ConvertionClass.convertIntoUnsigned1ByteInt(value);
 }
コード例 #21
0
ファイル: EquipmentType.cs プロジェクト: ruslan81/FIS
 public EquipmentType(byte value)
 {
     equipmentType = ConvertionClass.convertIntoUnsigned1ByteInt(value);
 }
コード例 #22
0
        public NoOfCalibrationRecords(string value)
        {
            byte b = Convert.ToByte(value);

            noOfCalibrationRecords = ConvertionClass.convertIntoUnsigned1ByteInt(b);
        }
コード例 #23
0
ファイル: EquipmentType.cs プロジェクト: ruslan81/FIS
        public EquipmentType(string value)
        {
            byte b = Convert.ToByte(value);

            equipmentType = ConvertionClass.convertIntoUnsigned1ByteInt(b);
        }
コード例 #24
0
 public CardSlotNumber(byte value)
 {
     cardSlotNumber = ConvertionClass.convertIntoUnsigned1ByteInt(value);
 }
コード例 #25
0
ファイル: OverspeedNumber.cs プロジェクト: ruslan81/FIS
 public OverspeedNumber(byte b)
 {
     overspeedNumber = ConvertionClass.convertIntoUnsigned1ByteInt(b);
 }