Lines Matching full:data

41 	struct gnss_data data;  member
51 struct gnss_emul_data *data = dev->data; in gnss_emul_lock_sem() local
53 (void)k_sem_take(&data->lock, K_FOREVER); in gnss_emul_lock_sem()
58 struct gnss_emul_data *data = dev->data; in gnss_emul_unlock_sem() local
60 k_sem_give(&data->lock); in gnss_emul_unlock_sem()
65 struct gnss_emul_data *data = dev->data; in gnss_emul_update_fix_timestamp() local
69 data->fix_timestamp_ms = ((uptime_ms / data->fix_interval_ms) + 1) * data->fix_interval_ms; in gnss_emul_update_fix_timestamp()
72 data->resume_timestamp_ms = data->fix_timestamp_ms; in gnss_emul_update_fix_timestamp()
78 struct gnss_emul_data *data = dev->data; in gnss_emul_fix_is_acquired() local
81 time_since_resume = data->fix_timestamp_ms - data->resume_timestamp_ms; in gnss_emul_fix_is_acquired()
88 struct gnss_emul_data *data = dev->data; in gnss_emul_clear_fix_timestamp() local
90 data->fix_timestamp_ms = 0; in gnss_emul_clear_fix_timestamp()
96 struct gnss_emul_data *data = dev->data; in gnss_emul_schedule_work() local
98 k_work_schedule(&data->data_dwork, K_TIMEOUT_ABS_MS(data->fix_timestamp_ms)); in gnss_emul_schedule_work()
103 struct gnss_emul_data *data = dev->data; in gnss_emul_cancel_work() local
106 return k_work_cancel_delayable_sync(&data->data_dwork, &sync); in gnss_emul_cancel_work()
111 struct gnss_emul_data *data = dev->data; in gnss_emul_is_resumed() local
113 return data->fix_timestamp_ms > 0; in gnss_emul_is_resumed()
133 struct gnss_emul_data *data = dev->data; in gnss_emul_set_fix_rate() local
139 data->fix_interval_ms = fix_interval_ms; in gnss_emul_set_fix_rate()
145 struct gnss_emul_data *data = dev->data; in gnss_emul_get_fix_rate() local
147 *fix_interval_ms = data->fix_interval_ms; in gnss_emul_get_fix_rate()
154 struct gnss_emul_data *data = dev->data; in gnss_emul_set_navigation_mode() local
160 data->nav_mode = mode; in gnss_emul_set_navigation_mode()
167 struct gnss_emul_data *data = dev->data; in gnss_emul_get_navigation_mode() local
169 *mode = data->nav_mode; in gnss_emul_get_navigation_mode()
175 struct gnss_emul_data *data = dev->data; in gnss_emul_set_enabled_systems() local
181 data->enabled_systems = systems; in gnss_emul_set_enabled_systems()
187 struct gnss_emul_data *data = dev->data; in gnss_emul_get_enabled_systems() local
189 *systems = data->enabled_systems; in gnss_emul_get_enabled_systems()
351 struct gnss_emul_data *data = dev->data; in gnss_emul_clear_data() local
353 memset(&data->data, 0, sizeof(data->data)); in gnss_emul_clear_data()
358 struct gnss_emul_data *data = dev->data; in gnss_emul_set_fix() local
360 data->data.info.satellites_cnt = 8; in gnss_emul_set_fix()
361 data->data.info.hdop = 100; in gnss_emul_set_fix()
362 data->data.info.fix_status = GNSS_FIX_STATUS_GNSS_FIX; in gnss_emul_set_fix()
363 data->data.info.fix_quality = GNSS_FIX_QUALITY_GNSS_SPS; in gnss_emul_set_fix()
368 struct gnss_emul_data *data = dev->data; in gnss_emul_set_utc() local
373 timestamp = (time_t)(data->fix_timestamp_ms / 1000); in gnss_emul_set_utc()
376 millisecond = (uint16_t)(data->fix_timestamp_ms % 1000) in gnss_emul_set_utc()
379 data->data.utc.hour = datetime.tm_hour; in gnss_emul_set_utc()
380 data->data.utc.millisecond = millisecond; in gnss_emul_set_utc()
381 data->data.utc.minute = datetime.tm_min; in gnss_emul_set_utc()
382 data->data.utc.month = datetime.tm_mon + 1; in gnss_emul_set_utc()
383 data->data.utc.century_year = datetime.tm_year % 100; in gnss_emul_set_utc()
388 struct gnss_emul_data *data = dev->data; in gnss_emul_set_nav_data() local
390 data->data.nav_data.latitude = 10000000000; in gnss_emul_set_nav_data()
391 data->data.nav_data.longitude = -10000000000; in gnss_emul_set_nav_data()
392 data->data.nav_data.bearing = 3000; in gnss_emul_set_nav_data()
393 data->data.nav_data.speed = 0; in gnss_emul_set_nav_data()
394 data->data.nav_data.altitude = 20000; in gnss_emul_set_nav_data()
400 struct gnss_emul_data *data = dev->data; in gnss_emul_clear_satellites() local
402 data->satellites_len = 0; in gnss_emul_clear_satellites()
407 struct gnss_emul_data *data = dev->data; in gnss_emul_system_enabled() local
409 return BIT(system_bit) & data->enabled_systems; in gnss_emul_system_enabled()
414 struct gnss_emul_data *data = dev->data; in gnss_emul_add_satellite() local
417 data->satellites[data->satellites_len].prn = system_bit; in gnss_emul_add_satellite()
418 data->satellites[data->satellites_len].snr = system_bit + 20; in gnss_emul_add_satellite()
419 data->satellites[data->satellites_len].elevation = system_bit + 40; in gnss_emul_add_satellite()
420 data->satellites[data->satellites_len].azimuth = system_bit + 60; in gnss_emul_add_satellite()
421 data->satellites[data->satellites_len].system = BIT(system_bit); in gnss_emul_add_satellite()
422 data->satellites[data->satellites_len].is_tracked = true; in gnss_emul_add_satellite()
423 data->satellites_len++; in gnss_emul_add_satellite()
443 struct gnss_emul_data *data = CONTAINER_OF(dwork, struct gnss_emul_data, data_dwork); in gnss_emul_work_handler() local
444 const struct device *dev = data->dev; in gnss_emul_work_handler()
454 gnss_publish_data(dev, &data->data); in gnss_emul_work_handler()
458 gnss_publish_satellites(dev, data->satellites, data->satellites_len); in gnss_emul_work_handler()
467 struct gnss_emul_data *data = dev->data; in gnss_emul_init_data() local
469 data->dev = dev; in gnss_emul_init_data()
470 k_sem_init(&data->lock, 1, 1); in gnss_emul_init_data()
471 k_work_init_delayable(&data->data_dwork, gnss_emul_work_handler); in gnss_emul_init_data()
491 static struct gnss_emul_data GNSS_EMUL_NAME(inst, data) = { \
503 &GNSS_EMUL_NAME(inst, data), \