#ifndef _MICROAPP_H
#define _MICROAPP_H

#include "ErrorHandler.h"

class MicroApplication : public ErrorHandler
{
  public:

  MicroApplication(const char *name, 
		   MicroInterface *micro, 
		   TaskControl *taskControl);

  ~MicroApplication();

  // Start group tasks
  virtual void spawnTasks() = 0;
  
  // Loop and wait for SRQs and micro resets
  virtual int run();

  // Wait for and process a single SRQ
  virtual int processSrq() = 0;

  // Call reinit() following a micro reset
  virtual int reinit();
  
  protected:
  MicroInterface *_micro;
  TaskControl *_taskControl;
};



#endif
