#include "NonRegisterHardwareAccessClass.h"
#include "NDTS2100Internal.h"
#include "NDTSError.h"

using namespace NDTS::SCO;
using namespace NDTS::NDTS2100;



DoNothing::DoNothing(int card, int step, int gate) 
{
	this->card = card;
	this->step = step;
	this->gate = gate;
}

DoNothing::~DoNothing(void) 
{
}

// Implementation of the HardwareAccessClass interface - does nothing
bool DoNothing::setValue(int newValue) 
{ 
	return true; 
}

int DoNothing::getValue() 
{ 
	return -1; 
}

int DoNothing::getCardNumber() 
{
	return card;
}

int DoNothing::getStepNumber() 
{
	return step;
}

int DoNothing::getGateNumber() 
{
	return gate;
}


TakeSnapshot::TakeSnapshot(SnapshotInternal *pSnapshot, int card)
{
	this->pSnapshot = pSnapshot;
	this->card = card;
}
TakeSnapshot::~TakeSnapshot()
{
}

bool TakeSnapshot::setValue(int newValue)
{
	newValue; // Parameter not required as this is an event property
	pSnapshot->takeSnapshot(card);
	return true;
}

int TakeSnapshot::getValue()
{
	_ASSERTE(0);
	return 0;
}
int TakeSnapshot::getCardNumber() 
{
	return card;
}

int TakeSnapshot::getStepNumber() 
{
	return 0;
}

int TakeSnapshot::getGateNumber() 
{
	return 0;
}



GetNumberOfBScansInSnapshot::GetNumberOfBScansInSnapshot(SnapshotInternal *pSnapshot, int card)
{
	this->card = card;
	this->pSnapshot = pSnapshot;
}

GetNumberOfBScansInSnapshot::~GetNumberOfBScansInSnapshot()
{
}

bool GetNumberOfBScansInSnapshot::setValue(int newValue)
{
	_ASSERTE(0);
	return false;
}

int GetNumberOfBScansInSnapshot::getValue()
{
	return pSnapshot->GetNumberOfBScansInSnapshot(card);
}


int GetNumberOfBScansInSnapshot::getCardNumber() 
{
	return card;
}

int GetNumberOfBScansInSnapshot::getStepNumber() 
{
	return 0;
}

int GetNumberOfBScansInSnapshot::getGateNumber() 
{
	return 0;
}

ClearErrorLog::ClearErrorLog()
{
}

ClearErrorLog::~ClearErrorLog()
{
};

int ClearErrorLog::getCardNumber() 
{
	return 0;
}

int ClearErrorLog::getStepNumber() 
{
	return 0;
}

int ClearErrorLog::getGateNumber() 
{
	return 0;
}


bool ClearErrorLog::setValue(int newValue) 
{
	newValue; // Event so newValue isn't used
	return (NDTS_ClearErrorLog() == NDTS_BTrue); 
}; 
int ClearErrorLog::getValue() 
{
	_ASSERTE(0); 
	return -1;
}

GetNumberOfErrorLogLines::GetNumberOfErrorLogLines() 
{
};
GetNumberOfErrorLogLines::~GetNumberOfErrorLogLines()
{
}
// Implementation of the HardwareAccessClass interface
bool GetNumberOfErrorLogLines::setValue(int newValue)  
{
	_ASSERTE(0); 
	return false;
}
int GetNumberOfErrorLogLines::getValue() 
{ 
	return NDTS2100_ReturnNumberOfErrorLogLines(); 
}
int GetNumberOfErrorLogLines::getCardNumber() 
{
	return 0;
}

int GetNumberOfErrorLogLines::getStepNumber() 
{
	return 0;
}
int GetNumberOfErrorLogLines::getGateNumber() 
{
	return 0;
}
