Lines Matching refs:data

25  * data is stored in a sensor-type specific format in the object's float and byte arrays.
27 * To aid unmarshalling the object's data arrays, this class provides static nested classes and
29 * conversion methods each have an optional data parameter which, if not null, will be used and
128 * When this data was acquired in car or received from car. It is elapsed real-time of data
133 * array holding float type of sensor data. If the sensor has single value, only floatValues[0]
136 /** array holding int type of sensor data */
212 * @param data an optional output parameter which, if non-null, will be used by this method
214 * @return an EnvironmentData object corresponding to the data contained in the CarSensorEvent.
216 public EnvironmentData getEnvironmentData(EnvironmentData data) {
218 if (data == null) {
219 data = new EnvironmentData();
221 data.timeStampNs = timeStampNs;
222 data.temperature = floatValues[INDEX_ENVIRONMENT_TEMPERATURE];
223 data.pressure = floatValues[INDEX_ENVIRONMENT_PRESSURE];
224 return data;
236 * @param data an optional output parameter which, if non-null, will be used by this method
238 * @return a NightData object corresponding to the data contained in the CarSensorEvent.
240 public NightData getNightData(NightData data) {
242 if (data == null) {
243 data = new NightData();
245 data.timeStampNs = timeStampNs;
246 data.isNightMode = intValues[0] == 1;
247 return data;
259 * @param data an optional output parameter which, if non-null, will be used by this method
261 * @return a GearData object corresponding to the data contained in the CarSensorEvent.
263 public GearData getGearData(GearData data) {
265 if (data == null) {
266 data = new GearData();
268 data.timeStampNs = timeStampNs;
269 data.gear = intValues[0];
270 return data;
282 * @param data an optional output parameter which, if non-null, will be used by this method
284 * @return a ParkingBreakData object corresponding to the data contained in the CarSensorEvent.
286 public ParkingBrakeData getParkingBrakeData(ParkingBrakeData data) {
288 if (data == null) {
289 data = new ParkingBrakeData();
291 data.timeStampNs = timeStampNs;
292 data.isEngaged = intValues[0] == 1;
293 return data;
310 * @param data an optional output parameter which, if non-null, will be used by this method
312 * @return a FuelLevel object corresponding to the data contained in the CarSensorEvent.
314 public FuelLevelData getFuelLevelData(FuelLevelData data) {
316 if (data == null) {
317 data = new FuelLevelData();
319 data.timeStampNs = timeStampNs;
321 data.level = -1;
322 data.range = -1;
325 data.level = -1;
327 data.level = (int) floatValues[INDEX_FUEL_LEVEL_IN_PERCENTILE];
330 data.range = -1;
332 data.range = floatValues[INDEX_FUEL_LEVEL_IN_DISTANCE];
335 data.lowFuelWarning = intValues[0] == 1;
336 return data;
348 * @param data an optional output parameter which, if non-null, will be used by this method
350 * @return an OdometerData object corresponding to the data contained in the CarSensorEvent.
352 public OdometerData getOdometerData(OdometerData data) {
354 if (data == null) {
355 data = new OdometerData();
357 data.timeStampNs = timeStampNs;
358 data.kms = floatValues[0];
359 return data;
371 * @param data an optional output parameter which, if non-null, will be used by this method
373 * @return a RpmData object corresponding to the data contained in the CarSensorEvent.
375 public RpmData getRpmData(RpmData data) {
377 if (data == null) {
378 data = new RpmData();
380 data.timeStampNs = timeStampNs;
381 data.rpm = floatValues[0];
382 return data;
394 * @param data an optional output parameter which, if non-null, will be used by this method
396 * @return a CarSpeedData object corresponding to the data contained in the CarSensorEvent.
398 public CarSpeedData getCarSpeedData(CarSpeedData data) {
400 if (data == null) {
401 data = new CarSpeedData();
403 data.timeStampNs = timeStampNs;
404 data.carSpeed = floatValues[0];
405 return data;
417 * @param data an optional output parameter which, if non-null, will be used by this method
419 * @return a DrivingStatusData object corresponding to the data contained in the CarSensorEvent.
421 public DrivingStatusData getDrivingStatusData(DrivingStatusData data) {
423 if (data == null) {
424 data = new DrivingStatusData();
426 data.status = intValues[0];
427 return data;