21 #ifndef GNSS_SDR_CONTROL_THREAD_H 22 #define GNSS_SDR_CONTROL_THREAD_H 42 #include <boost/thread.hpp> 76 explicit ControlThread(std::shared_ptr<ConfigurationInterface> configuration);
104 unsigned int processed_control_messages()
const 106 return processed_control_messages_;
109 unsigned int applied_actions()
const 111 return applied_actions_;
127 void apply_action(
unsigned int what);
132 void event_dispatcher(
bool &valid_event, pmt::pmt_t &msg);
135 bool read_assistance_from_XML();
140 void gps_acq_assist_data_collector()
const;
146 std::vector<std::pair<int, Gnss_Satellite>> get_visible_sats(time_t rx_utc_time,
const std::array<float, 3> &LLH);
153 void telecommand_listener();
154 void keyboard_listener();
155 void sysv_queue_listener();
156 void print_help_at_exit()
const;
159 const std::string eph_default_xml_filename_ =
"./gps_ephemeris.xml";
160 const std::string utc_default_xml_filename_ =
"./gps_utc_model.xml";
161 const std::string iono_default_xml_filename_ =
"./gps_iono.xml";
162 const std::string ref_time_default_xml_filename_ =
"./gps_ref_time.xml";
163 const std::string ref_location_default_xml_filename_ =
"./gps_ref_location.xml";
164 const std::string eph_gal_default_xml_filename_ =
"./gal_ephemeris.xml";
165 const std::string eph_cnav_default_xml_filename_ =
"./gps_cnav_ephemeris.xml";
166 const std::string gal_iono_default_xml_filename_ =
"./gal_iono.xml";
167 const std::string gal_utc_default_xml_filename_ =
"./gal_utc_model.xml";
168 const std::string cnav_utc_default_xml_filename_ =
"./gps_cnav_utc_model.xml";
169 const std::string eph_glo_gnav_default_xml_filename_ =
"./glo_gnav_ephemeris.xml";
170 const std::string glo_utc_default_xml_filename_ =
"./glo_utc_model.xml";
171 const std::string gal_almanac_default_xml_filename_ =
"./gal_almanac.xml";
172 const std::string gps_almanac_default_xml_filename_ =
"./gps_almanac.xml";
174 const size_t channel_event_type_hash_code_ =
typeid(channel_event_sptr).hash_code();
175 const size_t command_event_type_hash_code_ =
typeid(command_event_sptr).hash_code();
177 std::shared_ptr<ConfigurationInterface> configuration_;
178 std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> control_queue_;
179 std::shared_ptr<GNSSFlowgraph> flowgraph_;
181 std::thread cmd_interface_thread_;
182 std::thread keyboard_thread_;
183 std::thread sysv_queue_thread_;
184 std::thread gps_acq_assist_data_collector_thread_;
187 boost::thread fpga_helper_thread_;
203 unsigned int processed_control_messages_;
204 unsigned int applied_actions_;
207 bool well_formatted_configuration_;
208 bool conf_file_has_section_;
209 bool conf_file_has_mandatory_globals_;
210 bool conf_has_signal_sources_;
211 bool conf_has_observables_;
213 bool receiver_on_standby_;
216 bool telecommand_enabled_;
223 #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.