21 #ifndef GNSS_SDR_CONTROL_THREAD_H 22 #define GNSS_SDR_CONTROL_THREAD_H 42 #include <boost/thread.hpp> 78 explicit ControlThread(std::shared_ptr<ConfigurationInterface> configuration);
106 unsigned int processed_control_messages()
const 108 return processed_control_messages_;
111 unsigned int applied_actions()
const 113 return applied_actions_;
131 static void handle_signal(
int sig);
135 void apply_action(
unsigned int what);
140 void event_dispatcher(
bool &valid_event, pmt::pmt_t &msg);
143 bool read_assistance_from_XML();
148 void gps_acq_assist_data_collector()
const;
154 std::vector<std::pair<int, Gnss_Satellite>> get_visible_sats(time_t rx_utc_time,
const std::array<float, 3> &LLH);
161 void telecommand_listener();
162 void keyboard_listener();
163 void sysv_queue_listener();
164 void print_help_at_exit()
const;
167 const std::string eph_default_xml_filename_ =
"./gps_ephemeris.xml";
168 const std::string utc_default_xml_filename_ =
"./gps_utc_model.xml";
169 const std::string iono_default_xml_filename_ =
"./gps_iono.xml";
170 const std::string ref_time_default_xml_filename_ =
"./gps_ref_time.xml";
171 const std::string ref_location_default_xml_filename_ =
"./gps_ref_location.xml";
172 const std::string eph_gal_default_xml_filename_ =
"./gal_ephemeris.xml";
173 const std::string eph_cnav_default_xml_filename_ =
"./gps_cnav_ephemeris.xml";
174 const std::string gal_iono_default_xml_filename_ =
"./gal_iono.xml";
175 const std::string gal_utc_default_xml_filename_ =
"./gal_utc_model.xml";
176 const std::string cnav_utc_default_xml_filename_ =
"./gps_cnav_utc_model.xml";
177 const std::string eph_glo_gnav_default_xml_filename_ =
"./glo_gnav_ephemeris.xml";
178 const std::string glo_utc_default_xml_filename_ =
"./glo_utc_model.xml";
179 const std::string gal_almanac_default_xml_filename_ =
"./gal_almanac.xml";
180 const std::string gps_almanac_default_xml_filename_ =
"./gps_almanac.xml";
182 const size_t channel_event_type_hash_code_ =
typeid(channel_event_sptr).hash_code();
183 const size_t command_event_type_hash_code_ =
typeid(command_event_sptr).hash_code();
185 std::shared_ptr<ConfigurationInterface> configuration_;
186 std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> control_queue_;
187 std::shared_ptr<GNSSFlowgraph> flowgraph_;
189 std::thread cmd_interface_thread_;
190 std::thread keyboard_thread_;
191 std::thread sysv_queue_thread_;
192 std::thread gps_acq_assist_data_collector_thread_;
195 boost::thread fpga_helper_thread_;
211 unsigned int processed_control_messages_;
212 unsigned int applied_actions_;
215 bool well_formatted_configuration_;
216 bool conf_file_has_section_;
217 bool conf_file_has_mandatory_globals_;
218 bool conf_has_signal_sources_;
219 bool conf_has_observables_;
221 bool receiver_on_standby_;
224 bool telecommand_enabled_;
231 #endif // GNSS_SDR_CONTROL_THREAD_H
Interface of a thread-safe std::queue.
class that implements a C++ interface to external Secure User Location Protocol (SUPL) client library...
This class represents a GNSS flow graph.
Interface of an Assisted GNSS REFERENCE TIME storage.
Class that implements a TCP/IP telecommand command line interface for GNSS-SDR.
Interface of an Assisted GNSS REFERENCE LOCATION storage.
Class that defines a receiver command event.
int run()
Runs the control thread.
ControlThread()
Default constructor.
This abstract class represents an interface to configuration parameters.
This class represents a GNSS satellite.
Class that defines a channel event.
Interface of an Assisted GNSS REFERENCE TIME storage.
Interface of an Assisted GNSS REFERENCE LOCATION storage.
class that implements a C++ interface to external Secure User Location Protocol (SUPL) client library...
~ControlThread()
Destructor.
std::shared_ptr< GNSSFlowgraph > flowgraph()
Instantiates a flowgraph.
void set_control_queue(std::shared_ptr< Concurrent_Queue< pmt::pmt_t >> control_queue)
Sets the control_queue.
This class represents the main thread of the application, so the name is ControlThread. This is the GNSS Receiver Control Plane: it connects the flowgraph, starts running it, and while it does not stop, reads the control messages generated by the blocks, processes them, and applies the corresponding actions.