Baseband: Pass unhandled messages to baseband thread, processor.

This commit is contained in:
Jared Boone 2016-01-02 22:59:31 -08:00
parent 07cd99d85d
commit fd612dc207
4 changed files with 10 additions and 2 deletions

View File

@ -38,6 +38,7 @@ public:
virtual void execute(const buffer_c8_t& buffer) = 0; virtual void execute(const buffer_c8_t& buffer) = 0;
virtual void on_message(const Message* const) { };
virtual void on_update_spectrum() { }; virtual void on_update_spectrum() { };
protected: protected:

View File

@ -68,6 +68,12 @@ void BasebandThread::set_configuration(const BasebandConfiguration& new_configur
baseband_configuration = new_configuration; baseband_configuration = new_configuration;
} }
void BasebandThread::on_message(const Message* const message) {
if( baseband_processor ) {
baseband_processor->on_message(message);
}
}
void BasebandThread::on_update_spectrum() { void BasebandThread::on_update_spectrum() {
if( baseband_processor ) { if( baseband_processor ) {
baseband_processor->on_update_spectrum(); baseband_processor->on_update_spectrum();

View File

@ -39,6 +39,7 @@ public:
void set_configuration(const BasebandConfiguration& new_configuration); void set_configuration(const BasebandConfiguration& new_configuration);
void on_message(const Message* const message);
void on_update_spectrum(); void on_update_spectrum();
// This getter should die, it's just here to leak information to code that // This getter should die, it's just here to leak information to code that

View File

@ -192,8 +192,8 @@ private:
request_stop(); request_stop();
} }
void on_message_default(const Message* const) { void on_message_default(const Message* const message) {
// TODO: Pass to active baseband processor. baseband_thread.on_message(message);
} }
void handle_spectrum() { void handle_spectrum() {