// -*-C++-*-
/*!
 * @file  RefHardCtrlProvSVC_impl.h
 * @brief Service implementation header of RefHardCtrlProv.idl
 *
 */

#include "RefHardCtrlProvSkel.h"
#include "ControlTerminalStub.h"
#include <rtm/Manager.h>
#include <rtm/DataFlowComponentBase.h>
#include <rtm/CorbaPort.h>
#include <rtm/DataInPort.h>
#include <rtm/DataOutPort.h>
#include <rtm/idl/BasicDataTypeSkel.h>

#include <iostream>
#include <stdio.h>
#include <stdlib.h>

#ifndef REFHARDCTRLPROVSVC_IMPL_H
#define REFHARDCTRLPROVSVC_IMPL_H
 
/*!
 * @class RefHardCtrlSVC_impl
 * Example class implementing IDL interface RefHardCtrl
 */
class RefHardCtrlSVC_impl
 : public virtual POA_RefHardCtrl,
   public virtual PortableServer::RefCountServantBase
{
 private:
   // Make sure all instances are built on the heap by making the
   // destructor non-public
   //virtual ~RefHardCtrlSVC_impl();

 public:
  /*!
   * @brief standard constructor
   */
   RefHardCtrlSVC_impl();
  /*!
   * @brief destructor
   */
   virtual ~RefHardCtrlSVC_impl();

   // attributes and operations
   void RHMoveTo(const Position2D& pos, CORBA::Short direction);
   void RHStop();
   void RHReturn(const Position2D& base);
   CORBA::Long RHGetStatus();
   Position3D RHGetArmPosition();
   Position2D RHGetLocalizePosition();
   void RHGuideReq(const Position2D& entrance, const Position2D& room, const char* name);
   void RHDrinkServeReq(const Position2D& visitor, const Position2D& warehouse, const char* name);
   void RHDrinkTransportReq(const Position2D& dist, const char* name);
   void RHGarbageCollectReq(const Position2D& dist, const char* name);
   void RHGarbageDumpReq(const Position2D& dumpsite, const char* name);

   int iamhungry;

   // ========== service port data ========== //
   RTC::CorbaConsumer<StateChangeFromRH>* terminal_;	//!< Pointer of port [terminal]

  /*!
   * @brief  The port is passed to the Consumer
     @return void				
   */
   void setConsumers(
      RTC::CorbaConsumer<StateChangeFromRH>* terminal
   );

};



#endif // REFHARDCTRLPROVSVC_IMPL_H


