#ifndef _FAKEMICRO_H
#define _FAKEMICRO_H

#include "DeviceInterface.h"
#include "DataManager.h"

class FakeMicro : public DeviceInterface
{
  public:

  FakeMicro(const char *name, Nat16 channelNo, const char *dmPowerStatusName);
  ~FakeMicro();
  
  // Read SRQ packet from device. Output buffer has bytes in 
  // device-native endian-ness.
  virtual int readSRQ(Byte *packet,       // o: buffer to hold packet
		      Int16 maxBytes,     // i: bytes in packet buffer
		      Int32 timeout       // i: timeout
		      );
  
  // Get word from buffer read device, perform any necessary byte-swapping
  virtual Word getWord(Void *packet, Int32 index);
  
  // Send enable command to device
  virtual STATUS enable();
  
  // Send reset command to micro
  virtual STATUS reset();

  // Return serial channel structure
  Int32 channel();

  // Return id string
  virtual STATUS id(Char *string); 

  // Return serial number
  virtual STATUS serialNo(Char *string);
  
  // Return software rev
  virtual STATUS softwareRev(Char *string);

  // Return RAM test status
  STATUS ramTest(MBool *passed);

  protected:
  
  DmInt16Object *_dmSrqCode;
  SEM_ID _srqSem;
  
};



#endif
