public CardEventRecord(byte[] value) { eventType = new EventFaultType(value[0]); eventBeginTime = new TimeReal(ConvertionClass.arrayCopy(value, 1, 4)); eventEndTime = new TimeReal(ConvertionClass.arrayCopy(value, 5, 4)); eventVehicleRegistration = new VehicleRegistrationIdentification(ConvertionClass.arrayCopy(value, 9, 15)); }
public WorkshopCardHolderIdentification(byte[] value) { workshopName = new Name(ConvertionClass.arrayCopy(value, 0, 36)); workshopAddress = new Address(ConvertionClass.arrayCopy(value, 36, 36)); cardHolderName = new HolderName(ConvertionClass.arrayCopy(value, 72, 72)); cardHolderPreferredLanguage = new Language(ConvertionClass.arrayCopy(value, 144, 2)); }
public ControlCardHolderIdentification(byte[] value) { controlBodyName = new Name(ConvertionClass.arrayCopy(value, 0, 36)); controlBodyAddress = new Address(ConvertionClass.arrayCopy(value, 36, 36)); cardHolderName = new HolderName(ConvertionClass.arrayCopy(value, 72, 72)); cardHolderPreferredLanguage = new Language(ConvertionClass.arrayCopy(value, 144, 2)); }
public CertificateRequestID(byte[] value) { requestSerialNumber = ConvertionClass.convertIntoUnsigned4ByteInt(ConvertionClass.arrayCopy(value, 0, 4)); requestMonthYear = ConvertionClass.arrayCopy(value, 4, 2); crIdentifier = value[6]; manufacturerCode = new ManufacturerCode(value[7]); }
public ExtendedSerialNumber(byte[] value) { serialNumber = ConvertionClass.convertIntoUnsigned4ByteInt(ConvertionClass.arrayCopy(value, 0, 4)); monthYear = ConvertionClass.convertBCDStringIntoString(ConvertionClass.arrayCopy(value, 4, 2)); type = value[6]; manufacturerCode = new ManufacturerCode(value[7]); }
public VuTimeAdjustmentRecord(byte[] value) { oldTimeValue = new TimeReal(ConvertionClass.arrayCopy(value, 0, 4)); newTimeValue = new TimeReal(ConvertionClass.arrayCopy(value, 4, 4)); workshopName = new Name(ConvertionClass.arrayCopy(value, 8, 36)); workshopAddress = new Address(ConvertionClass.arrayCopy(value, 44, 36)); workshopCardNumber = new FullCardNumber(ConvertionClass.arrayCopy(value, 80, 18)); }
public VuControlActivityRecord(byte[] value) { controlType = new ControlType(value[0]); controlTime = new TimeReal(ConvertionClass.arrayCopy(value, 1, 4)); controlCardNumber = new FullCardNumber(ConvertionClass.arrayCopy(value, 5, 18)); downloadPeriodBeginTime = new TimeReal(ConvertionClass.arrayCopy(value, 23, 4)); downloadPeriodEndTime = new TimeReal(ConvertionClass.arrayCopy(value, 27, 4)); }
public PlaceRecord(byte[] record) { entryTime = new TimeReal(ConvertionClass.arrayCopy(record, 0, 4)); entryTypeDailyWorkPeriod = new EntryTypeDailyWorkPeriod(record[4]); dailyWorkPeriodCountry = new NationNumeric(record[5]); dailyWorkPeriodRegion = new RegionNumeric(record[6]); vehicleOdometerValue = new OdometerShort(ConvertionClass.arrayCopy(record, 7, 3)); }
public VuCompanyLocksRecord(byte[] value) { lockInTime = new TimeReal(ConvertionClass.arrayCopy(value, 0, 4)); lockOutTime = new TimeReal(ConvertionClass.arrayCopy(value, 4, 4)); companyName = new Name(ConvertionClass.arrayCopy(value, 8, 36)); companyAddress = new Address(ConvertionClass.arrayCopy(value, 44, 36)); companyCardNumber = new FullCardNumber(ConvertionClass.arrayCopy(value, 80, 18)); }
public CertificationAuthorityKID(byte[] value) { nationNumeric = new NationNumeric(value[0]); nationAlpha = new NationAlpha(ConvertionClass.arrayCopy(value, 1, 3)); keySerialNumber = value[4]; additionalInfo = ConvertionClass.arrayCopy(value, 5, 2); caIdentifier = value[7]; }
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); }
public CardVehicleRecord(byte[] value) { vehicleOdometerBegin = new OdometerShort(ConvertionClass.arrayCopy(value, 0, 3)); vehicleOdometerEnd = new OdometerShort(ConvertionClass.arrayCopy(value, 3, 3)); vehicleFirstUse = new TimeReal(ConvertionClass.arrayCopy(value, 6, 4)); vehicleLastUse = new TimeReal(ConvertionClass.arrayCopy(value, 10, 4)); vehicleRegistration = new VehicleRegistrationIdentification(ConvertionClass.arrayCopy(value, 14, 15)); vuDataBlockCounter = new VuDataBlockCounter(ConvertionClass.arrayCopy(value, 29, 2)); }
public Name(byte[] value) { byte codePageTmp = value[0]; byte[] nameTmp = ConvertionClass.arrayCopy(value, 1, value.Length - 1); codePage = ConvertionClass.convertIntoUnsigned1ByteInt(codePageTmp); setName(nameTmp); }
public CardFaultRecord(byte[] value) { faultType = new EventFaultType(value[0]); long faultBeginTimeTmp = ConvertionClass.convertIntoUnsigned4ByteInt(ConvertionClass.arrayCopy(value, 1, 4)); faultBeginTime = new TimeReal(ConvertionClass.arrayCopy(value, 1, 4)); faultEndTime = new TimeReal(ConvertionClass.arrayCopy(value, 5, 4)); faultVehicleRegistration = new VehicleRegistrationIdentification(ConvertionClass.arrayCopy(value, 9, 15)); }
public CardIdentification(byte[] value, short cardType) { cardIssuingMemberState = new NationNumeric(value[0]); cardNumber = new CardNumber(ConvertionClass.arrayCopy(value, 1, 16), cardType); cardIssuingAuthorityName = new Name(ConvertionClass.arrayCopy(value, 17, 36)); cardIssueDate = new TimeReal(ConvertionClass.arrayCopy(value, 53, 4)); cardValidityBegin = new TimeReal(ConvertionClass.arrayCopy(value, 57, 4)); cardExpiryDate = new TimeReal(ConvertionClass.arrayCopy(value, 61, 4)); }
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)); }
public CardControlActivityDataRecord(byte[] value) { controlType = new ControlType(value[0]); controlTime = new TimeReal(ConvertionClass.arrayCopy(value, 1, 4)); controlCardNumber = new FullCardNumber(ConvertionClass.arrayCopy(value, 5, 18)); controlVehicleRegistration = new VehicleRegistrationIdentification(ConvertionClass.arrayCopy(value, 23, 15)); controlDownloadPeriodBegin = new TimeReal(ConvertionClass.arrayCopy(value, 38, 4)); controlDownloadPeriodEnd = new TimeReal(ConvertionClass.arrayCopy(value, 42, 4)); }
public CardIccIdentification(byte[] value) { clockStop = value[0]; cardExtendedSerialNumber = new ExtendedSerialNumber(ConvertionClass.arrayCopy(value, 1, 8)); cardApprovalNumber = new CardApprovalNumber(ConvertionClass.arrayCopy(value, 9, 8)); cardPersonaliserID = value[17]; embedderIcAssemblerId = ConvertionClass.arrayCopy(value, 18, 5); icIdentifier = ConvertionClass.arrayCopy(value, 23, 2); }
public CompanyActivityRecord(byte[] value) { companyActivityType = new CompanyActivityType(value[0]); companyActivityTime = new TimeReal(ConvertionClass.arrayCopy(value, 1, 4)); cardNumberInformation = new FullCardNumber(ConvertionClass.arrayCopy(value, 5, 18)); vehicleRegistrationInformation = new VehicleRegistrationIdentification(ConvertionClass.arrayCopy(value, 23, 15)); downloadPeriodBegin = new TimeReal(ConvertionClass.arrayCopy(value, 38, 4)); downloadPeriodEnd = new TimeReal(ConvertionClass.arrayCopy(value, 42, 4)); }
public Address(byte[] value) { byte codePageTmp = value[0]; byte[] addressTemp = ConvertionClass.arrayCopy(value, 1, 35); codePage = codePageTmp; address = addressTemp; }
public CardDriverActivity(byte[] value, int activityStructureLength) { activityDailyRecords = new List <CardActivityDailyRecord>(); activityPointerOldestDayRecord = ConvertionClass.convertIntoUnsigned2ByteInt(ConvertionClass.arrayCopy(value, 0, 2)); // = first CardActivityDailyRecord activityPointerNewestRecord = ConvertionClass.convertIntoUnsigned2ByteInt(ConvertionClass.arrayCopy(value, 2, 2)); // = last CardActivityDailyRecord byte[] records = new byte[activityStructureLength]; int lengthToEnd = records.Length - activityPointerOldestDayRecord; Array.Copy(value, 4 + activityPointerOldestDayRecord, records, 0, lengthToEnd); if (activityPointerOldestDayRecord != 0) { Array.Copy(value, 4, records, lengthToEnd, activityPointerOldestDayRecord); } int activityPointerLastRecordOffset; if (activityPointerNewestRecord >= activityPointerOldestDayRecord) { activityPointerLastRecordOffset = activityPointerNewestRecord - activityPointerOldestDayRecord; } else { activityPointerLastRecordOffset = records.Length - activityPointerOldestDayRecord + activityPointerNewestRecord; } int cardActivityDailyRecordsOffset = 0; int cadrActivityPreviousRecordLength = 0; int cadrActivityRecordLength = 0; int cadrIntegrityCheckActivityPreviousRecordLength = 0; while (cardActivityDailyRecordsOffset <= activityPointerLastRecordOffset) { int cadrLength = ConvertionClass.convertIntoUnsigned2ByteInt(ConvertionClass.arrayCopy(records, cardActivityDailyRecordsOffset + 2, 2)); if (cadrLength == 0) { break; } CardActivityDailyRecord cadr = new CardActivityDailyRecord(ConvertionClass.arrayCopy(records, cardActivityDailyRecordsOffset, cadrLength)); cadrActivityPreviousRecordLength = cadr.activityPreviousRecordLength.cardActivityLengthRange; cadrActivityRecordLength = cadr.activityRecordLength.cardActivityLengthRange; cardActivityDailyRecordsOffset += cadrActivityRecordLength; // next CardActivityDailyRecord cadrIntegrityCheckActivityPreviousRecordLength = cadrActivityRecordLength; // save record length for integrity check activityDailyRecords.Add(cadr); } structureSize = 2 + 2 + cardActivityDailyRecordsOffset; }
public VuIdentification(byte[] value) { vuManufacturerName = new VuManufacturerName(ConvertionClass.arrayCopy(value, 0, 36)); vuManufacturerAddress = new VuManufacturerAddress(ConvertionClass.arrayCopy(value, 36, 36)); vuPartNumber = new VuPartNumber(ConvertionClass.arrayCopy(value, 72, 16)); vuSerialNumber = new VuSerialNumber(ConvertionClass.arrayCopy(value, 88, 8)); vuSoftwareIdentification = new VuSoftwareIdentification(ConvertionClass.arrayCopy(value, 96, 8)); vuManufacturingDate = new VuManufacturingDate(ConvertionClass.arrayCopy(value, 104, 4)); vuApprovalNumber = new VuApprovalNumber(ConvertionClass.arrayCopy(value, 108, 8)); }
public VuDetailedSpeedBlock(byte[] value) { speedBlockBeginDate = new TimeReal(ConvertionClass.arrayCopy(value, 0, 4)); speedsPerSecond = new Speed[60]; for (int i = 0; i < 60; i++) { speedsPerSecond[i] = new Speed(value[4 + i]); } }
public DriverCardApplicationIdentification(byte[] value) { typeOfTachographCardId = new EquipmentType(value[0]); cardStructureVersion = new CardStructureVersion(ConvertionClass.arrayCopy(value, 1, 2)); noOfEventsPerType = new NoOfEventsPerType(value[3]); noOfFaultsPerType = new NoOfFaultsPerType(value[4]); activityStructureLength = new CardActivityLengthRange(ConvertionClass.arrayCopy(value, 5, 2)); noOfCardVehicleRecords = new NoOfCardVehicleRecords(ConvertionClass.arrayCopy(value, 7, 2)); noOfCardPlaceRecords = new NoOfCardPlaceRecords(value[9]); }
public VuOverSpeedingEventRecord(byte[] value) { eventType = new EventFaultType(value[0]); eventRecordPurpose = new EventFaultRecordPurpose(value[1]); eventBeginTime = new TimeReal(ConvertionClass.arrayCopy(value, 2, 4)); eventEndTime = new TimeReal(ConvertionClass.arrayCopy(value, 6, 4)); maxSpeedValue = new SpeedMax(value[10]); averageSpeedValue = new SpeedAverage(value[11]); cardNumberDriverSlotBegin = new FullCardNumber(ConvertionClass.arrayCopy(value, 12, 18)); similarEventsNumber = new SimilarEventsNumber(value[30]); }
public VuFaultRecord(byte[] value) { faultType = new EventFaultType(value[0]); faultRecordPurpose = new EventFaultRecordPurpose(value[1]); faultBeginTime = new TimeReal(ConvertionClass.arrayCopy(value, 2, 4)); faultEndTime = new TimeReal(ConvertionClass.arrayCopy(value, 6, 4)); cardNumberDriverSlotBegin = new FullCardNumber(ConvertionClass.arrayCopy(value, 10, 18)); cardNumberCodriverSlotBegin = new FullCardNumber(ConvertionClass.arrayCopy(value, 28, 18)); cardNumberDriverSlotEnd = new FullCardNumber(ConvertionClass.arrayCopy(value, 46, 18)); cardNumberCodriverSlotEnd = new FullCardNumber(ConvertionClass.arrayCopy(value, 64, 18)); }
public ExtendedSerialNumber(string value) { System.Text.UTF8Encoding enc = new System.Text.UTF8Encoding(); byte[] _bytes; _bytes = enc.GetBytes(value); serialNumber = ConvertionClass.convertIntoUnsigned4ByteInt(ConvertionClass.arrayCopy(_bytes, 0, 4)); monthYear = ConvertionClass.convertBCDStringIntoString(ConvertionClass.arrayCopy(_bytes, 4, 2)); type = _bytes[6]; manufacturerCode = new ManufacturerCode(_bytes[7]); }
public VuCardIWRecord(byte[] value) { cardHolderName = new HolderName(ConvertionClass.arrayCopy(value, 0, 72)); fullCardNumber = new FullCardNumber(ConvertionClass.arrayCopy(value, 72, 18)); cardExpiryDate = new TimeReal(ConvertionClass.arrayCopy(value, 90, 4)); cardInsertionTime = new TimeReal(ConvertionClass.arrayCopy(value, 94, 4)); vehicleOdometerValueAtInsertion = new OdometerShort(ConvertionClass.arrayCopy(value, 98, 3)); cardSlotNumber = new CardSlotNumber(value[101]); cardWithdrawalTime = new TimeReal(ConvertionClass.arrayCopy(value, 102, 4)); vehicleOdometerValueAtWithdrawal = new OdometerShort(ConvertionClass.arrayCopy(value, 106, 3)); previousVehicleInfo = new PreviousVehicleInfo(ConvertionClass.arrayCopy(value, 109, 19)); manualInputFlag = new ManualInputFlag(value[128]); }
public KeyIdentifier(byte[] value, short kidType) { this.kidType = kidType; if (kidType == KIDTYPE_PK_VU_TC) { extendedSerialNumber = new ExtendedSerialNumber(ConvertionClass.arrayCopy(value, 0, 8)); } else if (kidType == KIDTYPE_PK_VU) { certificateRequestID = new CertificateRequestID(ConvertionClass.arrayCopy(value, 0, 8)); } else { certificationAuthorityKID = new CertificationAuthorityKID(ConvertionClass.arrayCopy(value, 0, 8)); } }
public CardActivityDailyRecord(byte[] value) { this.activityPreviousRecordLength = new CardActivityLengthRange(ConvertionClass.arrayCopy(value, 0, 2)); this.activityRecordLength = new CardActivityLengthRange(ConvertionClass.arrayCopy(value, 2, 2)); this.activityRecordDate = new TimeReal(ConvertionClass.arrayCopy(value, 4, 4)); this.activityDailyPresenceCounter = new DailyPresenceCounter(ConvertionClass.arrayCopy(value, 8, 2)); this.activityDayDistance = new Distance(ConvertionClass.arrayCopy(value, 10, 2)); this.activityChangeInfo = new List <ActivityChangeInfo>(); for (int length = 12; length < activityRecordLength.cardActivityLengthRange; length += ActivityChangeInfo.structureSize) { ActivityChangeInfo aci = new ActivityChangeInfo(ConvertionClass.arrayCopy(value, length, ActivityChangeInfo.structureSize)); activityChangeInfo.Add(aci); } structureSize = 12 + activityRecordLength.cardActivityLengthRange; }