Path: blob/master/libraries/AP_ADSB/AP_ADSB_Backend.h
9667 views
/*1This program is free software: you can redistribute it and/or modify2it under the terms of the GNU General Public License as published by3the Free Software Foundation, either version 3 of the License, or4(at your option) any later version.56This program is distributed in the hope that it will be useful,7but WITHOUT ANY WARRANTY; without even the implied warranty of8MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the9GNU General Public License for more details.1011You should have received a copy of the GNU General Public License12along with this program. If not, see <http://www.gnu.org/licenses/>.13*/14#pragma once1516#include "AP_ADSB.h"1718#if HAL_ADSB_ENABLED19class AP_ADSB_Backend20{21public:22// constructor.23AP_ADSB_Backend(AP_ADSB &frontend, uint8_t instance);2425// we declare a virtual destructor so that ADSB drivers can26// override with a custom destructor if need be27virtual ~AP_ADSB_Backend(void) {}2829// static detection function30static bool detect();3132virtual void update() = 0;3334virtual bool init() { return true; }3536protected:3738uint8_t _instance;3940AP_HAL::UARTDriver *_port;4142// references43AP_ADSB &_frontend;44};45#endif // HAL_ADSB_ENABLED464748