#ifndef sharknirdrotServiceWorker_h
#define sharknirdrotServiceWorker_h
/**************************/
/* THIS CLASS IS NOT USED */
/**************************/
#include <Basda/Device.h>
#include <sharknir/drotServiceWorkerSkeleton.h> /* THIS FILE DOES NOT EXIST */

namespace sharknir
{
  class drotServiceWorker : public sharknir::drotServiceWorkerSkeleton
  {
       struct DeviceAsyncImpl : Basda::DeviceAsync
       {
          virtual int asyncWait(const Nice::Time & _t);
          virtual int asyncStatus(const std::string & _s, int _d);
          drotServiceWorker * m_worker;
       };
       DeviceAsyncImpl m_deviceAsync;

    public:
       drotServiceWorker(const Nice::JointPtr & _config);
       virtual ~drotServiceWorker();

       virtual void init();
       virtual void deinit();
       virtual void activate();
       virtual void deactivate();
       virtual void terminate();

       virtual void stop();
       virtual void abort();

       virtual bool isReachable();
       virtual double getPosition(std::string _unit);
       virtual void setPosition(double _position, std::string _unit);
       virtual double getDeviceEncoderPosition(std::string _unit);
       virtual double getAbsoluteEncoderPosition();
       virtual double getIncrementalEncoderPosition();
       virtual double convertPosition(double _position, bool _absolute, std::string _unit_from, std::string _unit_to);
       virtual double getVelocity();
       virtual bool isAtHome();
       virtual bool isAtLimit();
       virtual bool isMoving();
       virtual double getNamedPosition(int _named_position);
       virtual std::string getRA();
       virtual void changeDerotationWithAbsoluteOffset(const Nice::Date & _start_date, double _position, std::string _unit);
       virtual void changeDerotationWithRelativeOffset(const Nice::Date & _start_date, double _position, std::string _unit);
       virtual void moveRelative(double _position, std::string _unit);
       virtual void moveAbsolute(double _position, std::string _unit);
       virtual void moveToHome();
       virtual void moveToLimit(double _limit);
       virtual void moveToNamedPosition(int _named_position);
       virtual void startDerotation(const Nice::Date & _start_date, double _position, std::string _unit);

  };
}
#endif
