#ifndef _IBCDMMONITOR_H
#define _IBCDMMONITOR_H

#include "DmMonitor.h"
#include "IbcApp.h"

/*
CLASS 
IbcDmMonitor

DESCRIPTION
IbcDmMonitor monitors data manager items, including those associated with
IbcCards, and takes appropriate action when they change.

AUTHOR
Tom O'Reilly
*/
class IbcDmMonitor : public DmMonitor
{
  public:

  ///////////////////////////////////////////////////////////////////
  // Constructor
  // [input] name: application name
  // [input] app: Parent IbcApp
  IbcDmMonitor(const char *name, IbcApp *ibcApp);

  ~IbcDmMonitor();
  
  protected:


  ///////////////////////////////////////////////////////////////////
  // Start consuming monitored Datamanager items, including those in 
  // IbcCards.
  virtual int startMonitoring();

  ///////////////////////////////////////////////////////////////////
  // Process micro reset (when sync sem is given by MicroApp)
  virtual int handleResetSemaphore();

  ///////////////////////////////////////////////////////////////////
  // Process any changed DM items, including those in IbcCards. 
  // Override this method if you want to process all item changes in one
  // function (instead of the "callback" method)
  virtual int cmdGroupCallback();
  
  ///////////////////////////////////////////////////////////////////
  // Return status of IBC's power switch
  virtual switchStatus powerSwitchStatus();
  
  IbcApp *_ibcApp;
};


#endif
