24 #ifndef GNSS_SDR_CONTROL_THREAD_H 25 #define GNSS_SDR_CONTROL_THREAD_H 45 #include <boost/thread.hpp> 72 explicit ControlThread(std::shared_ptr<ConfigurationInterface> configuration);
100 unsigned int processed_control_messages()
const 102 return processed_control_messages_;
105 unsigned int applied_actions()
const 107 return applied_actions_;
123 void apply_action(
unsigned int what);
128 void event_dispatcher(
bool &valid_event, pmt::pmt_t &msg);
131 bool read_assistance_from_XML();
136 void gps_acq_assist_data_collector();
142 std::vector<std::pair<int, Gnss_Satellite>> get_visible_sats(time_t rx_utc_time,
const std::array<float, 3> &LLH);
149 void telecommand_listener();
150 void keyboard_listener();
151 void sysv_queue_listener();
154 const std::string eph_default_xml_filename_ =
"./gps_ephemeris.xml";
155 const std::string utc_default_xml_filename_ =
"./gps_utc_model.xml";
156 const std::string iono_default_xml_filename_ =
"./gps_iono.xml";
157 const std::string ref_time_default_xml_filename_ =
"./gps_ref_time.xml";
158 const std::string ref_location_default_xml_filename_ =
"./gps_ref_location.xml";
159 const std::string eph_gal_default_xml_filename_ =
"./gal_ephemeris.xml";
160 const std::string eph_cnav_default_xml_filename_ =
"./gps_cnav_ephemeris.xml";
161 const std::string gal_iono_default_xml_filename_ =
"./gal_iono.xml";
162 const std::string gal_utc_default_xml_filename_ =
"./gal_utc_model.xml";
163 const std::string cnav_utc_default_xml_filename_ =
"./gps_cnav_utc_model.xml";
164 const std::string eph_glo_gnav_default_xml_filename_ =
"./glo_gnav_ephemeris.xml";
165 const std::string glo_utc_default_xml_filename_ =
"./glo_utc_model.xml";
166 const std::string gal_almanac_default_xml_filename_ =
"./gal_almanac.xml";
167 const std::string gps_almanac_default_xml_filename_ =
"./gps_almanac.xml";
169 const size_t channel_event_type_hash_code_ =
typeid(channel_event_sptr).hash_code();
170 const size_t command_event_type_hash_code_ =
typeid(command_event_sptr).hash_code();
172 std::shared_ptr<ConfigurationInterface> configuration_;
173 std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> control_queue_;
174 std::shared_ptr<GNSSFlowgraph> flowgraph_;
176 std::thread cmd_interface_thread_;
177 std::thread keyboard_thread_;
178 std::thread sysv_queue_thread_;
179 std::thread gps_acq_assist_data_collector_thread_;
182 boost::thread fpga_helper_thread_;
198 unsigned int processed_control_messages_;
199 unsigned int applied_actions_;
202 bool receiver_on_standby_;
205 bool telecommand_enabled_;
209 #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.