public EF_Identification(byte[] value, short cardType) { this.cardType = cardType; cardIdentification = new CardIdentification(HexBytes.arrayCopy(value, 0, 65), cardType); if (EquipmentType.COMPANY_CARD == cardType) { companyCardHolderIdentification = new CompanyCardHolderIdentification(HexBytes.arrayCopy(value, 65, value.Length - 65)); structureSize = CompanyCardHolderIdentification.structureSize; } else if (EquipmentType.CONTROL_CARD == cardType) { controlCardHolderIdentification = new ControlCardHolderIdentification(HexBytes.arrayCopy(value, 65, value.Length - 65)); structureSize = ControlCardApplicationIdentification.structureSize; } else if (EquipmentType.DRIVER_CARD == cardType) { driverCardHolderIdentification = new DriverCardHolderIdentification(HexBytes.arrayCopy(value, 65, 78)); structureSize = DriverCardHolderIdentification.structureSize; } else if (EquipmentType.WORKSHOP_CARD == cardType) { workshopCardHolderIdentification = new WorkshopCardHolderIdentification(HexBytes.arrayCopy(value, 65, value.Length - 65)); structureSize = WorkshopCardHolderIdentification.structureSize; } else { //Error!!! } }
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 Vehicle_Detailed_Speed(byte[] value) { int offset1 = HexBytes.convertIntoUnsigned2ByteInt(HexBytes.arrayCopy(value, 0, 2)) * VuDetailedSpeedBlock.structureSize; vuDetailedSpeedData = new VuDetailedSpeedData(value); size = offset1; }
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; }