/*-----------------------------------------------------------------------*
  CLASS: Watchdog

  DESCRIPTION: Driver for WDIII

  $Id: Watchdog.h,v 1.4 2000/09/15 19:50:54 jrieffel Exp $
 *-----------------------------------------------------------------------*/

#ifndef _WATCHDOG_H
#define _WATCHDOG_H

//#include "WatchdogOutput.h"
//#include "WatchdogLog.h"
#include "SerialDevice.h"
#include "DeviceIF.h"
#include <unistd.h>
#include <termios.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/uio.h>
#include <fcntl.h>
#include <errno.h>

#include "WatchdogIF.h"
#include "WatchdogCommand.h"
#include "WatchdogOutput.h"
#include "PeriodicTask.h"
#include "SharedData.h"
#include "time.h"
#include "Syslog.h"
#include "SerialParameters.h"


class Watchdog : public PeriodicTask {

  //  friend class WatchdogLog;

public:
     
     Watchdog( SerialDevice *interface, SerialParameters *serialParams );
     virtual ~Watchdog();
     
protected:

     WatchdogIF::WD_Data _wd_data;
     WatchdogIF::WD_Time_Struct _wd_time;

     DeviceIF::Status init();
     DeviceIF::Status keepAlive_callback();
     DeviceIF::Status wd_command_handler();
     DeviceIF::Status parse_wd_reply(char *reply);

     WatchdogCommand *_command;
     WatchdogOutput *_output;
     SerialDevice *_device;
     
     SerialParameters *_serialParams;
     

};


#endif

