public Vehicle_Activities(byte[] value) { int offset1 = 7; downloadedDayDate = new TimeReal(HexBytes.arrayCopy(value, 0, 4)); odoMeterValueMidnight = new OdometerShort(HexBytes.arrayCopy(value, 4, 3)); int offset2 = 2 + HexBytes.convertIntoUnsigned2ByteInt(HexBytes.arrayCopy(value, offset1, 2)) * VuCardIWRecord.structureSize; vuCardIWData = new VuCardIWData(HexBytes.arrayCopy(value, offset1, offset2)); int offset3 = 2 + HexBytes.convertIntoUnsigned2ByteInt(HexBytes.arrayCopy(value, offset1 + offset2, 2)) * ActivityChangeInfo.structureSize; vuActivityDailyData = new VuActivityDailyData(HexBytes.arrayCopy(value, offset1 + offset2, offset3), downloadedDayDate); int offset4 = 1 + HexBytes.convertIntoUnsigned1ByteInt(value[offset1 + offset2 + offset3]) * VuPlaceDailyWorkPeriodRecord.structureSize; vuPlaceDailyWorkPeriodData = new VuPlaceDailyWorkPeriodData(HexBytes.arrayCopy(value, offset1 + offset2 + offset3, offset4)); int offset5 = 2 + HexBytes.convertIntoUnsigned2ByteInt(HexBytes.arrayCopy(value, offset1 + offset2 + offset3 + offset4, 2)) * SpecificConditionRecord.structureSize; vuSpecificConditionData = new VuSpecificConditionData(HexBytes.arrayCopy(value, offset1 + offset2 + offset3 + offset4, offset5)); structureSize = offset1 + offset2 + offset3 + offset4 + offset5; }
public EF_Application_Identification(byte[] value) { // size = value.length; cardType = HexBytes.convertIntoUnsigned1ByteInt(value[0]); switch (cardType) { case 1: //DRIVER_CARD { driverCardApplicationIdentification = new DriverCardApplicationIdentification(value); cardStructureVersion = driverCardApplicationIdentification.cardStructureVersion.Get_CardStructureVersion_Bytes(); noOfEventsPerType = driverCardApplicationIdentification.noOfEventsPerType.noOfEventsPerType; noOfFaultsPerType = driverCardApplicationIdentification.noOfFaultsPerType.noOfFaultsPerType; activityStructureLength = driverCardApplicationIdentification.activityStructureLength.cardActivityLengthRange; noOfCardVehicleRecords = driverCardApplicationIdentification.noOfCardVehicleRecords.noOfCardVehicleRecords; noOfCardPlaceRecords = driverCardApplicationIdentification.noOfCardPlaceRecords.noOfCardPlaceRecords; } break; case 2: //WORKSHOP_CARD { workshopCardApplicationIdentification = new WorkshopCardApplicationIdentification(value); cardStructureVersion = workshopCardApplicationIdentification.cardStructureVersion.Get_CardStructureVersion_Bytes(); noOfEventsPerType = workshopCardApplicationIdentification.noOfEventsPerType.noOfEventsPerType; noOfFaultsPerType = workshopCardApplicationIdentification.noOfFaultsPerType.noOfFaultsPerType; activityStructureLength = workshopCardApplicationIdentification.activityStructureLength.cardActivityLengthRange; noOfCardVehicleRecords = workshopCardApplicationIdentification.noOfCardVehicleRecords.noOfCardVehicleRecords; noOfCardPlaceRecords = workshopCardApplicationIdentification.noOfCardPlaceRecords.noOfCardPlaceRecords; noOfCalibrationRecords = workshopCardApplicationIdentification.noOfCalibrationRecords.noOfCalibrationRecords; } break; case 3: //CONTROL_CARD { controlCardApplicationIdentification = new ControlCardApplicationIdentification(value); cardStructureVersion = controlCardApplicationIdentification.cardStructureVersion.Get_CardStructureVersion_Bytes(); noOfControlActivityRecords = controlCardApplicationIdentification.noOfControlActivityRecords.noOfControlActivityRecords; } break; case 4: //COMPANY_CARD { companyCardApplicationIdentification = new CompanyCardApplicationIdentification(value); cardStructureVersion = companyCardApplicationIdentification.cardStructureVersion.Get_CardStructureVersion_Bytes(); noOfCompanyActivityRecords = companyCardApplicationIdentification.noOfCompanyActivityRecords.noOfCompanyActivityRecords; } break; default: break; } }
public Vehicle_Technical_Data(byte[] value) { int offset1 = 116 + 20; vuIdentification = new VuIdentification(HexBytes.arrayCopy(value, 0, 116)); sensorPaired = new SensorPaired(HexBytes.arrayCopy(value, 116, 20)); int offset2 = 1 + HexBytes.convertIntoUnsigned1ByteInt(value[136]) * VuCalibrationRecord.structureSize; vuCalibrationData = new VuCalibrationData(HexBytes.arrayCopy(value, 136, offset2)); size = offset1 + offset2; }
public Vehicle_Overview(byte[] value) { int offset1 = 194 + 194 + 17 + 1 + 14 + 4 + 4 + 4 + 1 + 4 + 18 + 36; memberStateCertificate = new MemberStateCertificate(HexBytes.arrayCopy(value, 0, 194)); vuCertificate = new VuCertificate(HexBytes.arrayCopy(value, 194, 194)); vehicleIdentificationNumber = new VehicleIdentificationNumber(HexBytes.arrayCopy(value, 388, 17)); vehicleRegistrationIdentification = new VehicleRegistrationIdentification(HexBytes.arrayCopy(value, 405, 15)); currentDateTime = new CurrentDateTime(HexBytes.arrayCopy(value, 420, 4)); vuDownloadablePeriod = new VuDownloadablePeriod(HexBytes.arrayCopy(value, 424, 8)); cardSlotsStatus = new CardSlotsStatus(value[432]); vuDownloadActivityData = new VuDownloadActivityData(HexBytes.arrayCopy(value, 433, 58)); int offset2 = 1 + HexBytes.convertIntoUnsigned1ByteInt(value[offset1]) * VuCompanyLocksRecord.structureSize; vuCompanyLocksData = new VuCompanyLocksData(HexBytes.arrayCopy(value, offset1, offset2)); int offset3 = 1 + HexBytes.convertIntoUnsigned1ByteInt(value[offset1 + offset2]) * VuControlActivityRecord.structureSize; vuControlActivityData = new VuControlActivityData(HexBytes.arrayCopy(value, offset1 + offset2, offset3)); size = offset1 + offset2 + offset3; }
public Vehicle_Events_And_Faults(byte[] value) { int offset1 = 1 + HexBytes.convertIntoUnsigned1ByteInt(value[0]) * VuFaultRecord.structureSize; vuFaultData = new VuFaultData(HexBytes.arrayCopy(value, 0, offset1)); int offset2 = 1 + HexBytes.convertIntoUnsigned1ByteInt(value[offset1]) * VuEventRecord.structureSize; vuEventData = new VuEventData(HexBytes.arrayCopy(value, offset1, offset2)); int offset3 = 9; vuOverSpeedingControlData = new VuOverSpeedingControlData(HexBytes.arrayCopy(value, offset1 + offset2, offset3)); int offset4 = 1 + HexBytes.convertIntoUnsigned1ByteInt(value[offset1 + offset2 + offset3]) * VuOverSpeedingEventRecord.structureSize; vuOverSpeedingEventData = new VuOverSpeedingEventData(HexBytes.arrayCopy(value, offset1 + offset2 + offset3, offset4)); int offset5 = 1 + HexBytes.convertIntoUnsigned1ByteInt(value[offset1 + offset2 + offset3 + offset4]) * VuTimeAdjustmentRecord.structureSize; vuTimeAdjustmentData = new VuTimeAdjustmentData(HexBytes.arrayCopy(value, offset1 + offset2 + offset3 + offset4, offset5)); structureSize = offset1 + offset2 + offset3 + offset4 + offset5; }