#ifndef __TempControl_H
#define __TempControl_H

#include "TaskInterface.h"

#define TempControlServerName "TempControlServer"

class TempControl : public TaskInterface {

  friend class TempControl_SK;

  /////////////////////////////////////////////
  public:

  enum MyCode {
    Code1,
    Code2
  };

  struct TempData {
    float temp;
    long time;
  };

  struct MData {
    short whatzis;
  };

  TempControl(const char *name);
  ~TempControl();

  short setpoint();
  short foo(float junk);
  long actual(unsigned long index, TempControl::MData *mdata, TempControl::TempData *tdata);
  void func2(float value, short *flag);
  
  /////////////////////////////////////////////
  protected:

  enum TempControlMsgCode {
    SetpointMsgCode,
    FooMsgCode,
    ActualMsgCode,
    Func2MsgCode
  };

  struct SetpointMsg : Request, Reply {
    short returnVal;
  
  } _setpointMsg;

  struct FooMsg : Request, Reply {
    short returnVal;
    float junk;
  
  } _fooMsg;

  struct ActualMsg : Request, Reply {
    long returnVal;
    unsigned long index;
    MData mdata;
    TempData tdata;
  
  } _actualMsg;

  struct Func2Msg : Request, Reply {
    float value;
    short flag;
  
  } _func2Msg;

};

#endif

