Changeset 122 in flair-src for trunk/lib/FlairMeta/src/Uav.h


Ignore:
Timestamp:
01/06/17 13:56:26 (7 years ago)
Author:
Sanahuja Guillaume
Message:

modifs uav vrpn i686

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/FlairMeta/src/Uav.h

    r121 r122  
    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 }
     19        namespace filter {
     20                class Ahrs;
     21                class UavMultiplex;
     22        }
     23        namespace actuator {
     24                class Bldc;
     25        }
     26        namespace sensor {
     27                class UsRangeFinder;
     28                class BatteryMonitor;
     29                class Imu;
     30                class Camera;
     31        }
    3632}
    3733
     
    3935namespace meta {
    4036class MetaUsRangeFinder;
    41 class MetaVrpnObject;
    4237
    4338/*! \class Uav
    4439*
    45 * \brief Base class to construct sensors/actuators depending on uav type
     40* \brief Base class to construct sensors/actuators depending on uav type.
     41* The Object is created with
     42*  the FrameworkManager as parent. FrameworkManager must be created before.
     43* Only one instance of this class is allowed by program.
    4644*/
    4745class Uav : public core::Object {
    4846public:
    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,
     47
     48  Uav(std::string name,
    6049      filter::UavMultiplex *multiplex = NULL);
    6150  ~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);
    6751
    68   virtual void StartSensors(void);
     52  virtual void StartSensors(void)=0;
    6953  void UseDefaultPlot(void);
    7054  actuator::Bldc *GetBldc(void) const;
     
    7559  sensor::UsRangeFinder *GetUsRangeFinder(void) const;
    7660  sensor::BatteryMonitor *GetBatteryMonitor(void) const;
    77   sensor::VrpnClient *GetVrpnClient(void) const;
    78   meta::MetaVrpnObject *GetVrpnObject(void) const;
    7961  sensor::Camera *GetVerticalCamera(void) const;
    8062  sensor::Camera *GetHorizontalCamera(void) const;
     63        virtual std::string GetDefaultVrpnAddress(void) const{return "127.0.0.1:3883";}
    8164
    8265protected:
     
    9679  sensor::UsRangeFinder *us;
    9780  MetaUsRangeFinder *meta_us;
    98   sensor::VrpnClient *vrpnclient;
    99   MetaVrpnObject *uav_vrpn;
    10081  sensor::BatteryMonitor *battery;
    10182  sensor::Camera *verticalCamera,*horizontalCamera;
    10283};
     84
     85/*!
     86* \brief get Uav
     87*
     88* \return the Uav
     89*/
     90Uav *GetUav(void);
     91
    10392} // end namespace meta
    10493} // end namespace flair
Note: See TracChangeset for help on using the changeset viewer.