/****************************************************************************/
/* Copyright (c) 2000 MBARI                                                 */
/* MBARI Proprietary Information. All rights reserved.                      */
/****************************************************************************/
/* Summary  :                                                               */
/* Filename : TempControl.cc                                                */
/* Author   :                                                               */
/* Project  :                                                               */
/* Version  : 1.0                                                           */
/* Created  : 02/07/2000                                                    */
/* Modified :                                                               */
/* Archived :                                                               */
/****************************************************************************/
/* Modification History:                                                    */
/****************************************************************************/
/*
NOTE: This file is automatically generated.
DO NOT MODIFY.
*/

#include "TempControl.h"

TempControl::TempControl(const char *name)
  :  TaskInterface(name, TempControlServerName)
{
}

TempControl::~TempControl()
{
}

void TempControl::eatMy(TempControl::Shorts shorts)
{
  // Copy any input args to appropriate message fields
  
  // Set message code and send message
  _eatMyMsg.code = EatMyMsgCode;

  send(&_eatMyMsg, sizeof(EatMyMsg),
       &_eatMyMsg, sizeof(EatMyMsg));

  // Copy any output fields of msg to appropriate output args
  memcpy(shorts, &_eatMyMsg.shorts, sizeof(Shorts));
  
  return;
}


short TempControl::setpoint()
{
  // Copy any input args to appropriate message fields
  
  // Set message code and send message
  _setpointMsg.code = SetpointMsgCode;

  send(&_setpointMsg, sizeof(SetpointMsg),
       &_setpointMsg, sizeof(SetpointMsg));

  // Copy any output fields of msg to appropriate output args
  
  return _setpointMsg.returnVal;
}


short TempControl::foo(float junk)
{
  // Copy any input args to appropriate message fields
  _fooMsg.junk = junk;
  
  // Set message code and send message
  _fooMsg.code = FooMsgCode;

  send(&_fooMsg, sizeof(FooMsg),
       &_fooMsg, sizeof(FooMsg));

  // Copy any output fields of msg to appropriate output args
  
  return _fooMsg.returnVal;
}


short TempControl::foo(float junk, short blah, float *junkOut)
{
  // Copy any input args to appropriate message fields
  _foo01Msg.junk = junk;
  _foo01Msg.blah = blah;
  
  // Set message code and send message
  _foo01Msg.code = Foo01MsgCode;

  send(&_foo01Msg, sizeof(Foo01Msg),
       &_foo01Msg, sizeof(Foo01Msg));

  // Copy any output fields of msg to appropriate output args
  *junkOut = _foo01Msg.junkOut;
  
  return _foo01Msg.returnVal;
}


long TempControl::actual(unsigned long index, TempControl::MData *mdata, TempControl::TempData *tdata)
{
  // Copy any input args to appropriate message fields
  _actualMsg.index = index;
  memcpy(&_actualMsg.mdata, mdata, sizeof(MData));
  
  // Set message code and send message
  _actualMsg.code = ActualMsgCode;

  send(&_actualMsg, sizeof(ActualMsg),
       &_actualMsg, sizeof(ActualMsg));

  // Copy any output fields of msg to appropriate output args
  memcpy(tdata, &_actualMsg.tdata, sizeof(TempData));
  
  return _actualMsg.returnVal;
}


void TempControl::func2(float value, short *flag)
{
  // Copy any input args to appropriate message fields
  _func2Msg.value = value;
  _func2Msg.flag = *flag;
  
  // Set message code and send message
  _func2Msg.code = Func2MsgCode;

  send(&_func2Msg, sizeof(Func2Msg),
       &_func2Msg, sizeof(Func2Msg));

  // Copy any output fields of msg to appropriate output args
  *flag = _func2Msg.flag;
  
  return;
}


