Changeset 286 in flair-src for trunk/lib/FlairSensorActuator


Ignore:
Timestamp:
Jan 8, 2019, 10:13:03 AM (3 years ago)
Author:
Sanahuja Guillaume
Message:

draw vrpn axis in simulator

Location:
trunk/lib/FlairSensorActuator/src
Files:
4 edited
14 moved

Legend:

Unmodified
Added
Removed
  • trunk/lib/FlairSensorActuator/src/SimulatedBldc.cpp

    r285 r286  
    44// %flair:license}
    55//  created:    2014/02/07
    6 //  filename:   SimuBldc.cpp
     6//  filename:   SimulatedBldc.cpp
    77//
    88//  author:     Guillaume Sanahuja
     
    1717#ifdef CORE2_64
    1818
    19 #include "SimuBldc.h"
     19#include "SimulatedBldc.h"
    2020#include <FrameworkManager.h>
    2121#include <GridLayout.h>
     
    3535namespace actuator {
    3636
    37 SimuBldc::SimuBldc(const IODevice *parent, Layout *layout, string name,
     37SimulatedBldc::SimulatedBldc(const IODevice *parent, Layout *layout, string name,
    3838                   uint8_t motors_count, uint32_t modelId,uint32_t deviceId)
    3939    : Bldc(parent, layout, name, motors_count) {
     
    5252}
    5353
    54 SimuBldc::~SimuBldc() {
     54SimulatedBldc::~SimulatedBldc() {
    5555  if(buf!=NULL) free(buf);
    5656}
    5757
    58 string SimuBldc::ShMemName(uint32_t modelId,uint32_t deviceId) {
     58string SimulatedBldc::ShMemName(uint32_t modelId,uint32_t deviceId) {
    5959  ostringstream dev_name;
    6060  dev_name << "simu" <<  modelId << "_bldc_" << deviceId;
     
    6262}
    6363
    64 void SimuBldc::SetMotors(float *value) {
     64void SimulatedBldc::SetMotors(float *value) {
    6565  float *values=(float*)buf;
    6666  for (int i = 0; i < MotorsCount(); i++) values[i] = k->Value() * value[i];
  • trunk/lib/FlairSensorActuator/src/SimulatedBldc.h

    r285 r286  
    44// %flair:license}
    55/*!
    6  * \file SimuBldc.h
     6 * \file SimulatedBldc.h
    77 * \brief Class for a simulation bldc
    88 * \author Guillaume Sanahuja, Copyright Heudiasyc UMR UTC/CNRS 7253
     
    1111 */
    1212
    13 #ifndef SIMUBLDC_H
    14 #define SIMUBLDC_H
     13#ifndef SIMULATEDBLDC_H
     14#define SIMULATEDBLDC_H
    1515
    1616#include <Bldc.h>
     
    3030namespace flair {
    3131namespace actuator {
    32 /*! \class SimuBldc
     32/*! \class SimulatedBldc
    3333*
    3434* \brief Class for a simulation bldc
    3535*
    3636*/
    37 class SimuBldc : public Bldc {
     37class SimulatedBldc : public Bldc {
    3838public:
    3939  /*!
    4040  * \brief Constructor
    4141  *
    42   * Construct a SimuBldc
     42  * Construct a SimulatedBldc
    4343  *
    4444  * \param parent parent
     
    4949  * \param deviceId Bldc id of the Model
    5050  */
    51   SimuBldc(const core::IODevice *parent, gui::Layout *layout, std::string name,
     51  SimulatedBldc(const core::IODevice *parent, gui::Layout *layout, std::string name,
    5252           uint8_t motors_count, uint32_t modelId,uint32_t deviceId);
    5353
     
    5656  *
    5757  */
    58   ~SimuBldc();
     58  ~SimulatedBldc();
    5959
    6060  /*!
     
    9595} // end namespace actuator
    9696} // end namespace flair
    97 #endif // SIMUBLDC_H
     97#endif // SIMULATEDBLDC_H
  • trunk/lib/FlairSensorActuator/src/SimulatedCamera.cpp

    r285 r286  
    44// %flair:license}
    55//  created:    2014/03/06
    6 //  filename:   SimuCamera.cpp
     6//  filename:   SimulatedCamera.cpp
    77//
    88//  author:     Guillaume Sanahuja
     
    1717#ifdef CORE2_64
    1818
    19 #include "SimuCamera.h"
     19#include "SimulatedCamera.h"
    2020#include <FrameworkManager.h>
    2121#include <GroupBox.h>
     
    3131namespace sensor {
    3232
    33 SimuCamera::SimuCamera(string name,
     33SimulatedCamera::SimulatedCamera(string name,
    3434                       uint16_t width, uint16_t height, uint8_t channels,
    3535                       uint32_t modelId,uint32_t deviceId, uint8_t priority)
     
    4242  output->img->imageData = shmemReadBuf;
    4343
    44   ostringstream dev_name;
    45   dev_name << "simu" <<  modelId << "_cam_" << deviceId;
    4644  shmem = new SharedMem((Thread *)this,ShMemName(modelId, deviceId), buf_size, SharedMem::Type::producerConsumer);
    4745 
     
    5048
    5149
    52 SimuCamera::~SimuCamera() {
     50SimulatedCamera::~SimulatedCamera() {
    5351  SafeStop();
    5452  Join();
     
    5654}
    5755
    58 string SimuCamera::ShMemName(uint32_t modelId,uint32_t deviceId) {
     56string SimulatedCamera::ShMemName(uint32_t modelId,uint32_t deviceId) {
    5957  ostringstream dev_name;
    6058  dev_name << "simu" <<  modelId << "_cam_" << deviceId;
     
    6260}
    6361
    64 void SimuCamera::Run(void) {
     62void SimulatedCamera::Run(void) {
    6563  Time time;
    6664
  • trunk/lib/FlairSensorActuator/src/SimulatedCamera.h

    r285 r286  
    44// %flair:license}
    55/*!
    6  * \file SimuCamera.h
     6 * \file SimulatedCamera.h
    77 * \brief Class for a simulation camera
    88 * \author Guillaume Sanahuja, Copyright Heudiasyc UMR UTC/CNRS 7253
     
    1111 */
    1212
    13 #ifndef SIMUCAMERA_H
    14 #define SIMUCAMERA_H
     13#ifndef SIMULATEDCAMERA_H
     14#define SIMULATEDCAMERA_H
    1515
    1616#include <Camera.h>
     
    2626namespace flair {
    2727namespace sensor {
    28 /*! \class SimuCamera
     28/*! \class SimulatedCamera
    2929*
    3030* \brief Class for a simulation camera
    3131*/
    32 class SimuCamera : public core::Thread, public Camera {
     32class SimulatedCamera : public core::Thread, public Camera {
    3333public:
    3434  /*!
    3535  * \brief Constructor
    3636  *
    37   * Construct a SimuCamera.
     37  * Construct a SimulatedCamera.
    3838        * It will be child of the FrameworkManager.
    3939  *
     
    4646  * \param priority priority of the Thread
    4747  */
    48   SimuCamera(std::string name,
     48  SimulatedCamera(std::string name,
    4949             uint16_t width, uint16_t height, uint8_t channels, uint32_t modelId,uint32_t deviceId,
    5050             uint8_t priority);
     
    5555  *
    5656  */
    57   ~SimuCamera();
     57  ~SimulatedCamera();
    5858
    5959protected:
     
    8989} // end namespace sensor
    9090} // end namespace flair
    91 #endif // SIMUCAMERA_H
     91#endif // SIMULATEDCAMERA_H
  • trunk/lib/FlairSensorActuator/src/SimulatedGps.cpp

    r285 r286  
    44// %flair:license}
    55//  created:    2014/05/26
    6 //  filename:   SimuGps.cpp
     6//  filename:   SimulatedGps.cpp
    77//
    88//  author:     Guillaume Sanahuja
     
    1717#ifdef CORE2_64
    1818
    19 #include "SimuGps.h"
     19#include "SimulatedGps.h"
    2020#include <FrameworkManager.h>
    2121#include <GpsData.h>
     
    3838namespace sensor {
    3939
    40 SimuGps::SimuGps(string name,
     40SimulatedGps::SimulatedGps(string name,
    4141                 NmeaGps::NMEAFlags_t NMEAFlags, uint32_t modelId,uint32_t deviceId,uint8_t priority)
    4242    : NmeaGps(name, NMEAFlags),Thread(getFrameworkManager(), name, priority) {
     
    5757
    5858
    59 SimuGps::~SimuGps() {
     59SimulatedGps::~SimulatedGps() {
    6060  SafeStop();
    6161  Join();
    6262}
    6363
    64 string SimuGps::ShMemName(uint32_t modelId,uint32_t deviceId) {
     64string SimulatedGps::ShMemName(uint32_t modelId,uint32_t deviceId) {
    6565  ostringstream dev_name;
    6666  dev_name << "simu" <<  modelId << "_gps_" << deviceId;
     
    6868}
    6969
    70 void SimuGps::Run(void) {
     70void SimulatedGps::Run(void) {
    7171  gps_states_t state;
    7272  char buf[512];
  • trunk/lib/FlairSensorActuator/src/SimulatedGps.h

    r285 r286  
    44// %flair:license}
    55/*!
    6  * \file SimuGps.h
     6 * \file SimulatedGps.h
    77 * \brief Class for a simulation GPS
    88 * \author Guillaume Sanahuja, Copyright Heudiasyc UMR UTC/CNRS 7253
     
    1111 */
    1212
    13 #ifndef SIMUGPS_H
    14 #define SIMUGPS_H
     13#ifndef SimulatedGPS_H
     14#define SimulatedGPS_H
    1515
    1616#include <Thread.h>
     
    2929namespace flair {
    3030namespace sensor {
    31 /*! \class SimuGps
     31/*! \class SimulatedGps
    3232*
    3333* \brief Class for a simulation GPS
    3434*/
    35 class SimuGps : public core::Thread, public NmeaGps {
     35class SimulatedGps : public core::Thread, public NmeaGps {
    3636public:
    3737  /*!
     
    4747  * \param priority priority of the Thread
    4848  */
    49   SimuGps(std::string name,
     49  SimulatedGps(std::string name,
    5050          NmeaGps::NMEAFlags_t NMEAFlags, uint32_t modelId,uint32_t deviceId,uint8_t priority);
    5151
     
    5454  *
    5555  */
    56   ~SimuGps();
     56  ~SimulatedGps();
    5757
    5858private:
     
    9090} // end namespace sensor
    9191} // end namespace flair
    92 #endif // SIMUGPS_H
     92#endif // SIMULATEDGPS_H
  • trunk/lib/FlairSensorActuator/src/SimulatedImu.cpp

    r285 r286  
    44// %flair:license}
    55//  created:    2014/02/07
    6 //  filename:   SimuImu.cpp
     6//  filename:   SimulatedImu.cpp
    77//
    88//  author:     Guillaume Sanahuja
     
    1717#ifdef CORE2_64
    1818
    19 #include "SimuImu.h"
     19#include "SimulatedImu.h"
    2020#include <FrameworkManager.h>
    2121#include <ImuData.h>
     
    3535namespace sensor {
    3636
    37 SimuImu::SimuImu(string name, uint32_t modelId,uint32_t deviceId,
     37SimulatedImu::SimulatedImu(string name, uint32_t modelId,uint32_t deviceId,
    3838                 uint8_t priority)
    3939    : Imu(name,false), Thread(getFrameworkManager(), name, priority) {
     
    4747}
    4848
    49 SimuImu::~SimuImu() {
     49SimulatedImu::~SimulatedImu() {
    5050  SafeStop();
    5151  Join();
    5252}
    5353
    54 string SimuImu::ShMemName(uint32_t modelId,uint32_t deviceId) {
     54string SimulatedImu::ShMemName(uint32_t modelId,uint32_t deviceId) {
    5555  ostringstream dev_name;
    5656  dev_name << "simu" <<  modelId << "_imu_" << deviceId;
     
    5858}
    5959
    60 void SimuImu::Run(void) {
     60void SimulatedImu::Run(void) {
    6161  imu_states_t state;
    6262  ImuData *imuData;
  • trunk/lib/FlairSensorActuator/src/SimulatedImu.h

    r285 r286  
    44// %flair:license}
    55/*!
    6  * \file SimuImu.h
     6 * \file SimulatedImu.h
    77 * \brief Class for a simulation Imu
    88 * \author Guillaume Sanahuja, Copyright Heudiasyc UMR UTC/CNRS 7253
     
    1111 */
    1212
    13 #ifndef SIMUIMU_H
    14 #define SIMUIMU_H
     13#ifndef SIMULATEDIMU_H
     14#define SIMULATEDIMU_H
    1515
    1616#include <Imu.h>
     
    2929namespace flair {
    3030namespace sensor {
    31 /*! \class SimuImu
     31/*! \class SimulatedImu
    3232*
    3333* \brief Class for a simulation Imu
    3434*/
    35 class SimuImu : public Imu, public core::Thread {
     35class SimulatedImu : public Imu, public core::Thread {
    3636public:
    3737  /*!
    3838  * \brief Constructor
    3939  *
    40   * Construct a SimuImu.
     40  * Construct a SimulatedImu.
    4141        * It will be child of the FrameworkManager.
    4242  *
     
    4646  * \param priority priority of the Thread
    4747  */
    48   SimuImu(std::string name,
     48  SimulatedImu(std::string name,
    4949          uint32_t modelId,uint32_t deviceId, uint8_t priority);
    5050
     
    5353  *
    5454  */
    55   ~SimuImu();
     55  ~SimulatedImu();
    5656
    5757private:
     
    9797} // end namespace sensor
    9898} // end namespace flair
    99 #endif // SIMUIMU_H
     99#endif // SIMULATEDIMU_H
  • trunk/lib/FlairSensorActuator/src/SimulatedLaser.cpp

    r285 r286  
    44// %flair:license}
    55//  created:    2014/02/07
    6 //  filename:   SimuUs.cpp
     6//  filename:   SimulatedUs.cpp
    77//
    88//  author:     Guillaume Sanahuja
     
    1717#ifdef CORE2_64
    1818
    19 #include "SimuLaser.h"
     19#include "SimulatedLaser.h"
    2020#include <FrameworkManager.h>
    2121#include <SpinBox.h>
     
    3333namespace sensor {
    3434
    35 SimuLaser::SimuLaser(string name,
     35SimulatedLaser::SimulatedLaser(string name,
    3636                     uint32_t modelId,uint32_t deviceId, uint8_t priority)
    3737    : Thread(getFrameworkManager(), name, priority), LaserRangeFinder(name) {
     
    4444}
    4545
    46 SimuLaser::~SimuLaser() {
     46SimulatedLaser::~SimulatedLaser() {
    4747  SafeStop();
    4848  Join();
    4949}
    5050
    51 string SimuLaser::ShMemName(uint32_t modelId,uint32_t deviceId) {
     51string SimulatedLaser::ShMemName(uint32_t modelId,uint32_t deviceId) {
    5252  ostringstream dev_name;
    5353  dev_name << "simu" <<  modelId << "_laser_" << deviceId;
     
    5555}
    5656
    57 void SimuLaser::Run(void) {
     57void SimulatedLaser::Run(void) {
    5858  float z[360];
    5959
  • trunk/lib/FlairSensorActuator/src/SimulatedLaser.h

    r285 r286  
    44// %flair:license}
    55/*!
    6  * \file SimuUs.h
     6 * \file SimulatedUs.h
    77 * \brief Class for a simulation UsRangeFinder
    88 * \author Guillaume Sanahuja, Copyright Heudiasyc UMR UTC/CNRS 7253
     
    1111 */
    1212
    13 #ifndef SIMULASER_H
    14 #define SIMULASER_H
     13#ifndef SIMULATEDLASER_H
     14#define SIMULATEDLASER_H
    1515
    1616#include <LaserRangeFinder.h>
     
    2828namespace flair {
    2929namespace sensor {
    30 /*! \class SimuUs
     30/*! \class SimulatedUs
    3131*
    3232* \brief Class for a simulation UsRangeFinder
    3333*/
    34 class SimuLaser : public core::Thread, public LaserRangeFinder {
     34class SimulatedLaser : public core::Thread, public LaserRangeFinder {
    3535public:
    3636  /*!
    3737  * \brief Constructor
    3838  *
    39   * Construct a SimuUs.
     39  * Construct a SimulatedUs.
    4040  *
    4141  * \param name name
     
    4444  * \param priority priority of the Thread
    4545  */
    46   SimuLaser(std::string name,
     46  SimulatedLaser(std::string name,
    4747            uint32_t modelId,uint32_t deviceId, uint8_t priority);
    4848
     
    5151  *
    5252  */
    53   ~SimuLaser();
     53  ~SimulatedLaser();
    5454
    5555protected:
     
    8383} // end namespace sensor
    8484} // end namespace flair
    85 #endif // SIMULASER_H
     85#endif // SIMULATEDLASER_H
  • trunk/lib/FlairSensorActuator/src/SimulatedPressureSensor.cpp

    r285 r286  
    44// %flair:license}
    55//  created:    2018/05/24
    6 //  filename:   SimuPressureSensor.cpp
     6//  filename:   SimulatedPressureSensor.cpp
    77//
    88//  author:     Guillaume Sanahuja
     
    1717#ifdef CORE2_64
    1818
    19 #include "SimuPressureSensor.h"
     19#include "SimulatedPressureSensor.h"
    2020#include <FrameworkManager.h>
    2121#include <SpinBox.h>
     
    3333namespace sensor {
    3434
    35 SimuPressureSensor::SimuPressureSensor(string name, uint32_t modelId,uint32_t deviceId,
     35SimulatedPressureSensor::SimulatedPressureSensor(string name, uint32_t modelId,uint32_t deviceId,
    3636               uint8_t priority)
    3737    : Thread(getFrameworkManager(), name, priority), PressureSensor( name) {
     
    4444}
    4545
    46 SimuPressureSensor::~SimuPressureSensor() {
     46SimulatedPressureSensor::~SimulatedPressureSensor() {
    4747  SafeStop();
    4848  Join();
    4949}
    5050
    51 string SimuPressureSensor::ShMemName(uint32_t modelId,uint32_t deviceId) {
     51string SimulatedPressureSensor::ShMemName(uint32_t modelId,uint32_t deviceId) {
    5252  ostringstream dev_name;
    5353  dev_name << "simu" <<  modelId << "_pressure_" << deviceId;
     
    5555}
    5656
    57 void SimuPressureSensor::Run(void) {
     57void SimulatedPressureSensor::Run(void) {
    5858  float p;
    5959
  • trunk/lib/FlairSensorActuator/src/SimulatedPressureSensor.h

    r285 r286  
    44// %flair:license}
    55/*!
    6  * \file SimuPressureSensor.h
     6 * \file SimulatedPressureSensor.h
    77 * \brief Class for a simulation PressureSensor
    88 * \author Guillaume Sanahuja, Copyright Heudiasyc UMR UTC/CNRS 7253
     
    1111 */
    1212
    13 #ifndef SIMUPRESSURESENSOR_H
    14 #define SIMUPRESSURESENSOR_H
     13#ifndef SIMULATEDPRESSURESENSOR_H
     14#define SIMULATEDPRESSURESENSOR_H
    1515
    1616#include <PressureSensor.h>
     
    2828namespace flair {
    2929namespace sensor {
    30 /*! \class SimuPressureSensor
     30/*! \class SimulatedPressureSensor
    3131*
    3232* \brief Class for a simulation PressureSensor
    3333*/
    34 class SimuPressureSensor : public core::Thread, public PressureSensor {
     34class SimulatedPressureSensor : public core::Thread, public PressureSensor {
    3535public:
    3636  /*!
    3737  * \brief Constructor
    3838  *
    39   * Construct a SimuPressureSensor.
     39  * Construct a SimulatedPressureSensor.
    4040        * It will be child of the FrameworkManager.
    4141  *
     
    4545  * \param priority priority of the Thread
    4646  */
    47   SimuPressureSensor(std::string name,
     47  SimulatedPressureSensor(std::string name,
    4848         uint32_t modelId,uint32_t deviceId, uint8_t priority);
    4949
     
    5252  *
    5353  */
    54   ~SimuPressureSensor();
     54  ~SimulatedPressureSensor();
    5555
    5656protected:
     
    8484} // end namespace sensor
    8585} // end namespace flair
    86 #endif // SIMUPRESSURESENSOR_H
     86#endif // SIMULATEDPRESSURESENSOR_H
  • trunk/lib/FlairSensorActuator/src/SimulatedUs.cpp

    r285 r286  
    44// %flair:license}
    55//  created:    2014/02/07
    6 //  filename:   SimuUs.cpp
     6//  filename:   SimulatedUs.cpp
    77//
    88//  author:     Guillaume Sanahuja
     
    1717#ifdef CORE2_64
    1818
    19 #include "SimuUs.h"
     19#include "SimulatedUs.h"
    2020#include <FrameworkManager.h>
    2121#include <SpinBox.h>
     
    3333namespace sensor {
    3434
    35 SimuUs::SimuUs(string name, uint32_t modelId,uint32_t deviceId,
     35SimulatedUs::SimulatedUs(string name, uint32_t modelId,uint32_t deviceId,
    3636               uint8_t priority)
    3737    : Thread(getFrameworkManager(), name, priority), UsRangeFinder( name) {
     
    4444}
    4545
    46 SimuUs::~SimuUs() {
     46SimulatedUs::~SimulatedUs() {
    4747  SafeStop();
    4848  Join();
    4949}
    5050
    51 string SimuUs::ShMemName(uint32_t modelId,uint32_t deviceId) {
     51string SimulatedUs::ShMemName(uint32_t modelId,uint32_t deviceId) {
    5252  ostringstream dev_name;
    5353  dev_name << "simu" <<  modelId << "_us_" << deviceId;
     
    5555}
    5656
    57 void SimuUs::Run(void) {
     57void SimulatedUs::Run(void) {
    5858  float z;
    5959 
  • trunk/lib/FlairSensorActuator/src/SimulatedUs.h

    r285 r286  
    44// %flair:license}
    55/*!
    6  * \file SimuUs.h
     6 * \file SimulatedUs.h
    77 * \brief Class for a simulation UsRangeFinder
    88 * \author Guillaume Sanahuja, Copyright Heudiasyc UMR UTC/CNRS 7253
     
    1111 */
    1212
    13 #ifndef SIMUUS_H
    14 #define SIMUUS_H
     13#ifndef SIMULATEDUS_H
     14#define SIMULATEDUS_H
    1515
    1616#include <UsRangeFinder.h>
     
    2828namespace flair {
    2929namespace sensor {
    30 /*! \class SimuUs
     30/*! \class SimulatedUs
    3131*
    3232* \brief Class for a simulation UsRangeFinder
    3333*/
    34 class SimuUs : public core::Thread, public UsRangeFinder {
     34class SimulatedUs : public core::Thread, public UsRangeFinder {
    3535public:
    3636  /*!
    3737  * \brief Constructor
    3838  *
    39   * Construct a SimuUs.
     39  * Construct a SimulatedUs.
    4040        * It will be child of the FrameworkManager.
    4141  *
     
    4545  * \param priority priority of the Thread
    4646  */
    47   SimuUs(std::string name,
     47  SimulatedUs(std::string name,
    4848         uint32_t modelId,uint32_t deviceId, uint8_t priority);
    4949
     
    5252  *
    5353  */
    54   ~SimuUs();
     54  ~SimulatedUs();
    5555
    5656protected:
     
    8484} // end namespace sensor
    8585} // end namespace flair
    86 #endif // SIMUUS_H
     86#endif // SIMULATEDUS_H
  • trunk/lib/FlairSensorActuator/src/VrpnObject.cpp

    r214 r286  
    1818#include "VrpnObject.h"
    1919#include "VrpnObject_impl.h"
    20 #include "VrpnClient.h"
    2120#include <string.h>
    2221#include <Matrix.h>
     
    3029
    3130VrpnObject::VrpnObject(string name,
    32                        const TabWidget *tab)
    33     : IODevice(GetVrpnClient(), name) {
    34   pimpl_ = new VrpnObject_impl(this, name, -1, tab);
     31                       const TabWidget *tab,VrpnClient *client)
     32    : IODevice(client, name) {
     33  pimpl_ = new VrpnObject_impl(this, name, -1, tab,client);
    3534  AddDataToLog(pimpl_->output);
    3635 
     
    3938
    4039VrpnObject::VrpnObject(string name, uint8_t id,
    41                        const TabWidget *tab)
    42     : IODevice(GetVrpnClient(), name) {
     40                       const TabWidget *tab,VrpnClient *client)
     41    : IODevice(client, name) {
    4342  Warn("Creation of object %s with id %i\n", name.c_str(), id);
    44   pimpl_ = new VrpnObject_impl(this, name, id, tab);
     43  pimpl_ = new VrpnObject_impl(this, name, id, tab,client);
    4544  AddDataToLog(pimpl_->output);
    4645 
  • trunk/lib/FlairSensorActuator/src/VrpnObject.h

    r214 r286  
    1616
    1717#include <IODevice.h>
     18#include <VrpnClient.h>
    1819#include <Vector3D.h>
    1920#include <stdint.h>
     
    3233
    3334class VrpnObject_impl;
    34 class VrpnClient_impl;
    3535
    3636namespace flair {
     
    4545class VrpnObject : public core::IODevice {
    4646  friend class ::VrpnObject_impl;
    47   friend class ::VrpnClient_impl;
    4847
    4948public:
     
    5554  * \param name VRPN object name, should be the same as defined in the server
    5655  * \param tab Tab for the user interface
     56  * \param client VrpnClient of the connection, if unspecified, use the default one
    5757  */
    5858  VrpnObject(std::string name,
    59              const gui::TabWidget *tab);
     59             const gui::TabWidget *tab,sensor::VrpnClient *client=GetVrpnClient());
    6060
    6161  /*!
    6262  * \brief Constructor
    6363  *
    64   * Construct a VrpnObject. Connection is done by IP.
     64  * Construct a VrpnObject. Connection is done by xbee.
    6565  *
    6666  * \param name name
    67   * \param id VRPN object id, should be the same as defined in the server
     67  * \param id VRPN object id, should be the same as defined in the xbee bridge
    6868  * \param tab Tab for the user interface
     69  * \param client VrpnClient of the connection, if unspecified, use the default one
    6970  */
    7071  VrpnObject(std::string name, uint8_t id,
    71              const gui::TabWidget *tab);
     72             const gui::TabWidget *tab,sensor::VrpnClient *client=GetVrpnClient());
    7273
    7374  /*!
  • trunk/lib/FlairSensorActuator/src/VrpnObject_impl.cpp

    r275 r286  
    4040
    4141VrpnObject_impl::VrpnObject_impl(VrpnObject *self,
    42                                  string name, int id, const TabWidget *tab) {
    43   parent = GetVrpnClient();
     42                                 string name, int id, const TabWidget *tab,VrpnClient *client) {
     43  parent = client;
    4444  this->self = self;
    4545
  • trunk/lib/FlairSensorActuator/src/unexported/VrpnObject_impl.h

    r223 r286  
    4747  VrpnObject_impl(flair::sensor::VrpnObject *self,
    4848                  std::string name,
    49                   int id, const flair::gui::TabWidget *tab);
     49                  int id, const flair::gui::TabWidget *tab,flair::sensor::VrpnClient *client);
    5050  ~VrpnObject_impl(void);
    5151
Note: See TracChangeset for help on using the changeset viewer.