public Vehicle_Events_And_Faults() { vuFaultData = new VuFaultData(); vuEventData = new VuEventData(); vuOverSpeedingControlData = new VuOverSpeedingControlData(); vuOverSpeedingEventData = new VuOverSpeedingEventData(); vuTimeAdjustmentData = new VuTimeAdjustmentData(); }
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; }