Changeset 13 in flair-dev for trunk/include/FlairMeta/Uav.h


Ignore:
Timestamp:
Apr 8, 2016, 3:39:24 PM (5 years ago)
Author:
Bayard Gildas
Message:

formatting script + include reformatted

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/FlairMeta/Uav.h

    r9 r13  
    1717
    1818namespace flair {
    19     namespace core {
    20         class FrameworkManager;
    21     }
    22     namespace filter {
    23         class Ahrs;
    24         class UavMultiplex;
    25     }
    26     namespace actuator {
    27         class Bldc;
    28     }
    29     namespace sensor {
    30         class UsRangeFinder;
    31         class BatteryMonitor;
    32         class VrpnClient;
    33         class Imu;
    34         class Camera;
    35     }
     19namespace core {
     20class FrameworkManager;
     21}
     22namespace filter {
     23class Ahrs;
     24class UavMultiplex;
     25}
     26namespace actuator {
     27class Bldc;
     28}
     29namespace sensor {
     30class UsRangeFinder;
     31class BatteryMonitor;
     32class VrpnClient;
     33class Imu;
     34class Camera;
     35}
    3636}
    3737
    3838namespace flair {
    3939namespace meta {
    40     class MetaUsRangeFinder;
    41     class MetaVrpnObject;
     40class MetaUsRangeFinder;
     41class MetaVrpnObject;
    4242
    43     /*! \class Uav
    44     *
    45     * \brief Base class to construct sensors/actuators depending on uav type
    46     */
    47     class Uav: public core::Object {
    48         public:
    49         /*
    50             typedef enum {
    51                 None,
    52                 Auto,//rt serial if hds x4 ou x8, auto ip sinon
    53                 AutoIP,
    54                 UserDefinedIP,
    55                 AutoSerialPort,
    56                 } VRPNType_t;
     43/*! \class Uav
     44*
     45* \brief Base class to construct sensors/actuators depending on uav type
    5746*/
    58             //uav_name: for optitrack
    59             Uav(core::FrameworkManager* parent,std::string name,filter::UavMultiplex *multiplex=NULL);
    60             ~Uav();
    61             void SetupVRPN(std::string optitrack_address,std::string name);
    62             //vrpn serial: broken, need to add serial port in uav specific code
    63             //void SetupVRPNSerial(core::SerialPort *vrpn_port,std::string name,int VRPNSerialObjectId);
    64             virtual void SetupVRPNAutoIP(std::string name);
     47class Uav : public core::Object {
     48public:
     49  /*
     50      typedef enum {
     51          None,
     52          Auto,//rt serial if hds x4 ou x8, auto ip sinon
     53          AutoIP,
     54          UserDefinedIP,
     55          AutoSerialPort,
     56          } VRPNType_t;
     57*/
     58  // uav_name: for optitrack
     59  Uav(core::FrameworkManager *parent, std::string name,
     60      filter::UavMultiplex *multiplex = NULL);
     61  ~Uav();
     62  void SetupVRPN(std::string optitrack_address, std::string name);
     63  // vrpn serial: broken, need to add serial port in uav specific code
     64  // void SetupVRPNSerial(core::SerialPort *vrpn_port,std::string name,int
     65  // VRPNSerialObjectId);
     66  virtual void SetupVRPNAutoIP(std::string name);
    6567
    66             virtual void StartSensors(void);
    67             void UseDefaultPlot(void);
    68             actuator::Bldc* GetBldc(void) const;
    69             filter::UavMultiplex* GetUavMultiplex(void) const;
    70             sensor::Imu* GetImu(void) const;
    71             filter::Ahrs* GetAhrs(void) const;
    72             MetaUsRangeFinder* GetMetaUsRangeFinder(void) const;
    73             sensor::UsRangeFinder* GetUsRangeFinder(void) const;
    74             sensor::BatteryMonitor* GetBatteryMonitor(void) const;
    75             sensor::VrpnClient* GetVrpnClient(void) const;
    76             meta::MetaVrpnObject* GetVrpnObject(void) const;
    77             sensor::Camera* GetVerticalCamera(void) const;
     68  virtual void StartSensors(void);
     69  void UseDefaultPlot(void);
     70  actuator::Bldc *GetBldc(void) const;
     71  filter::UavMultiplex *GetUavMultiplex(void) const;
     72  sensor::Imu *GetImu(void) const;
     73  filter::Ahrs *GetAhrs(void) const;
     74  MetaUsRangeFinder *GetMetaUsRangeFinder(void) const;
     75  sensor::UsRangeFinder *GetUsRangeFinder(void) const;
     76  sensor::BatteryMonitor *GetBatteryMonitor(void) const;
     77  sensor::VrpnClient *GetVrpnClient(void) const;
     78  meta::MetaVrpnObject *GetVrpnObject(void) const;
     79  sensor::Camera *GetVerticalCamera(void) const;
    7880
    79         protected:
    80             void SetBldc(const actuator::Bldc *bldc);
    81             void SetMultiplex(const filter::UavMultiplex *multiplex);
    82             void SetAhrs(const filter::Ahrs *ahrs);
    83             void SetUsRangeFinder(const sensor::UsRangeFinder *us);
    84             void SetBatteryMonitor(const sensor::BatteryMonitor *battery);
    85             void SetVerticalCamera(const sensor::Camera *verticalCamera);
     81protected:
     82  void SetBldc(const actuator::Bldc *bldc);
     83  void SetMultiplex(const filter::UavMultiplex *multiplex);
     84  void SetAhrs(const filter::Ahrs *ahrs);
     85  void SetUsRangeFinder(const sensor::UsRangeFinder *us);
     86  void SetBatteryMonitor(const sensor::BatteryMonitor *battery);
     87  void SetVerticalCamera(const sensor::Camera *verticalCamera);
    8688
    87         private:
    88             sensor::Imu* imu;
    89             filter::Ahrs* ahrs;
    90             actuator::Bldc* bldc;
    91             filter::UavMultiplex *multiplex;
    92             sensor::UsRangeFinder* us;
    93             MetaUsRangeFinder* meta_us;
    94             sensor::VrpnClient *vrpnclient;
    95             MetaVrpnObject* uav_vrpn;
    96             sensor::BatteryMonitor* battery;
    97             sensor::Camera* verticalCamera;
    98     };
     89private:
     90  sensor::Imu *imu;
     91  filter::Ahrs *ahrs;
     92  actuator::Bldc *bldc;
     93  filter::UavMultiplex *multiplex;
     94  sensor::UsRangeFinder *us;
     95  MetaUsRangeFinder *meta_us;
     96  sensor::VrpnClient *vrpnclient;
     97  MetaVrpnObject *uav_vrpn;
     98  sensor::BatteryMonitor *battery;
     99  sensor::Camera *verticalCamera;
     100};
    99101} // end namespace meta
    100102} // end namespace flair
Note: See TracChangeset for help on using the changeset viewer.