Lines Matching full:data
32 static void gnss_nmea0183_match_reset_gsv(struct gnss_nmea0183_match_data *data) in gnss_nmea0183_match_reset_gsv() argument
34 data->satellites_length = 0; in gnss_nmea0183_match_reset_gsv()
35 data->gsv_message_number = 1; in gnss_nmea0183_match_reset_gsv()
39 static void gnss_nmea0183_match_publish(struct gnss_nmea0183_match_data *data) in gnss_nmea0183_match_publish() argument
41 if ((data->gga_utc == 0) || (data->rmc_utc == 0)) { in gnss_nmea0183_match_publish()
45 if (data->gga_utc == data->rmc_utc) { in gnss_nmea0183_match_publish()
46 gnss_publish_data(data->gnss, &data->data); in gnss_nmea0183_match_publish()
53 struct gnss_nmea0183_match_data *data = user_data; in gnss_nmea0183_match_gga_callback() local
55 if (gnss_nmea0183_parse_gga((const char **)argv, argc, &data->data) < 0) { in gnss_nmea0183_match_gga_callback()
59 if (gnss_nmea0183_match_parse_utc(argv, argc, &data->gga_utc) < 0) { in gnss_nmea0183_match_gga_callback()
63 gnss_nmea0183_match_publish(data); in gnss_nmea0183_match_gga_callback()
69 struct gnss_nmea0183_match_data *data = user_data; in gnss_nmea0183_match_rmc_callback() local
71 if (gnss_nmea0183_parse_rmc((const char **)argv, argc, &data->data) < 0) { in gnss_nmea0183_match_rmc_callback()
75 if (gnss_nmea0183_match_parse_utc(argv, argc, &data->rmc_utc) < 0) { in gnss_nmea0183_match_rmc_callback()
79 gnss_nmea0183_match_publish(data); in gnss_nmea0183_match_rmc_callback()
86 struct gnss_nmea0183_match_data *data = user_data; in gnss_nmea0183_match_gsv_callback() local
98 if (header.message_number != data->gsv_message_number) { in gnss_nmea0183_match_gsv_callback()
99 gnss_nmea0183_match_reset_gsv(data); in gnss_nmea0183_match_gsv_callback()
103 data->gsv_message_number++; in gnss_nmea0183_match_gsv_callback()
106 &data->satellites[data->satellites_length], in gnss_nmea0183_match_gsv_callback()
107 data->satellites_size - data->satellites_length); in gnss_nmea0183_match_gsv_callback()
109 gnss_nmea0183_match_reset_gsv(data); in gnss_nmea0183_match_gsv_callback()
113 data->satellites_length += (uint16_t)ret; in gnss_nmea0183_match_gsv_callback()
115 if (data->satellites_length == header.number_of_svs) { in gnss_nmea0183_match_gsv_callback()
116 gnss_publish_satellites(data->gnss, data->satellites, data->satellites_length); in gnss_nmea0183_match_gsv_callback()
117 gnss_nmea0183_match_reset_gsv(data); in gnss_nmea0183_match_gsv_callback()
122 int gnss_nmea0183_match_init(struct gnss_nmea0183_match_data *data, in gnss_nmea0183_match_init() argument
125 __ASSERT(data != NULL, "data argument must be provided"); in gnss_nmea0183_match_init()
128 memset(data, 0, sizeof(struct gnss_nmea0183_match_data)); in gnss_nmea0183_match_init()
129 data->gnss = config->gnss; in gnss_nmea0183_match_init()
131 data->satellites = config->satellites; in gnss_nmea0183_match_init()
132 data->satellites_size = config->satellites_size; in gnss_nmea0183_match_init()