#include "apci3600msg.h"

static const char UNKNOWN_ERROR[] = "unknown error code";
static const char WRONG_BOARD_HANDLE[] = "wrong handle parameter of the board (driver internal error)"; /* this error doesn't relate to the filedescriptor */   
static const char WRONG_MODULE_NUMBER[] = "wrong module number";
static const char MODULE_NOT_INITIALIZED[] = "module is not initialised";
static const char CALIBRATION_RUNNING[] = "a calibration is running on the module";
static const char CYCLIC_ACQUISITION_NOT_STARTED[]= "Cyclic Acquisition not started or started by another process";
static const char CYCLIC_ACQUISITION_NOT_INITIALIZED[] = "Cyclic Acquisition not initialised or not initialised by this process";
static const char WRONG_CHRONOMETER_NUMBER[]="wrong chronometer number";
static const char TIMEOUT[] = "Timeout";
const char WRONG_CHANNEL_NUMBER[]="wrong channel number";
const char WRONG_PORT_NUMBER[]="wrong port number";
const char INITIALIZATION_ERROR[] = "Initialisation Error";
const char CHANNEL_NOT_INITIALIZED[] = "channel not initialised";
const char CHRONOMETER_NOT_INITIALIZED[] = "chronometer not initialised";
const char WRONG_EXTERN_TRIGGER_FLAG[] = "wrong extern trigger flag";
const char WRONG_MODE[] = "wrong mode parameter";
const char CHANNEL_INITIALIZED_AS_SIGNAL_GENERATOR[] ="channel initialised in signal generator mode";
const char EXTERNAL_DIGITAL_TRIGGER_NOT_INITIALIZED[] ="external digital trigger not initialized";
const char NOT_ENOUGH_PLACE_IN_ONBOARD_RAM[] = "not enough place in the on board RAM";
const char BOARD_NOT_INITIALIZED[] = "board not initialized (or initialised by another process)";

//--------------------------------------------------------------------------------
const char* msg_Write32BitPortValue(int nb)
{
	switch (nb)
	{		
		case 1:		
			return WRONG_BOARD_HANDLE;
		case 2:
			return ("Wrong address selection");
		case 3:
			return ("Offset selected not available");
		default:
			return UNKNOWN_ERROR;
	}
}
//--------------------------------------------------------------------------------
const char* msg_Read32BitPortValue(int nb)
{
	switch (nb)
	{
		case 1:
			return WRONG_BOARD_HANDLE;
		case 2:
			return ("Wrong address selection");
		case 3:
			return ("Offset selected not available");
		default:
			return UNKNOWN_ERROR;
	}
}
//--------------------------------------------------------------------------------
const char* msg_InitAnalogInputModule(int nb)
{
	switch (nb)
	{
		case 1:
			return WRONG_BOARD_HANDLE;
		case 2:
			return WRONG_MODULE_NUMBER;
		case 3:
			return ("Wrong Single/Diff Mode selection");
		case 4:
			return ("Wrong coupling selection");
		case 5:
			return ("Wrong Current source flag ");
		case 6:
			return ("Wrong gain selection ");
		case 7:
			return ("Wrong clock selection ");
		case 8:
			return ("wrong Speed mode parameter ");
		case 9:
			return BOARD_NOT_INITIALIZED;
		case 10:
			return ("Speed mode not available ");
		case 11:
			return ("The current source are only available on the 2 first module ");
		case 12:
			return ("When the current source is used, the configuration of the channel must be Sinlge-Ended and AC ");
		case 13:
			return ("The module is already initialised by another process");
		case 14:
			return INITIALIZATION_ERROR;
		default:
			return UNKNOWN_ERROR;
	}
}
//--------------------------------------------------------------------------------
const char* msg_ReleaseAnalogInputModule(int nb)
{
	switch (nb)
	{
		case 1:
			return WRONG_BOARD_HANDLE;
		case 2:
			return WRONG_MODULE_NUMBER;
		case 3:
			return MODULE_NOT_INITIALIZED;
		default:
			return UNKNOWN_ERROR;
	}
}
//--------------------------------------------------------------------------------
const char* msg_StartAnalogInputModuleSingleAcquisition(int nb)
{
	switch (nb)
	{
		case 1:
			return WRONG_BOARD_HANDLE;
		case 2:
			return WRONG_MODULE_NUMBER;
		case 3:
			return MODULE_NOT_INITIALIZED;
		case 4:
			return ("The module is initialised for the cyclic acquisition mode");
		case 5:
			return ("A conversion is already started");
		case 6:
			return CALIBRATION_RUNNING;
		default:
			return UNKNOWN_ERROR;
	}
}
//--------------------------------------------------------------------------------
const char* msg_GetAnalogInputModuleCalibrationStatus(int nb)
{
	switch (nb)
	{
		case 1:		
			return WRONG_BOARD_HANDLE;
		case 2:
			return WRONG_MODULE_NUMBER;
		case 3:
			return MODULE_NOT_INITIALIZED;
		case 4:
			return CALIBRATION_RUNNING;
		default:
			return UNKNOWN_ERROR;
	}
}

//--------------------------------------------------------------------------------
const char* msg_GetAnalogInputModuleSingleAcquisitionStatus(int nb)
{
	switch (nb)
	{
		case 1:
			return WRONG_BOARD_HANDLE;
		case 2:
			return WRONG_MODULE_NUMBER;
		case 3:
			return MODULE_NOT_INITIALIZED;
		case 4:
			return CALIBRATION_RUNNING;
default:
			return UNKNOWN_ERROR;
	}
}

//--------------------------------------------------------------------------------
const char* msg_ReadAnalogInputSingleAcquisitionValues(int nb)
{
	switch (nb)
	{
		case 1:
			return WRONG_BOARD_HANDLE;
		case 2:
			return WRONG_MODULE_NUMBER;
		case 3:
			return MODULE_NOT_INITIALIZED;
		case 4:
			return ("The values are not available");
		case 5:
			return CALIBRATION_RUNNING;
		default:
			return UNKNOWN_ERROR;
	}
}
//--------------------------------------------------------------------------------
const char* msg_GetAnalogInputModuleValues(int nb)
{
	switch (nb)
	{
		case 1:
			return WRONG_BOARD_HANDLE;
		case 2:
			return WRONG_MODULE_NUMBER;
		case 3:
			return MODULE_NOT_INITIALIZED;
		case 4:
			return ("Start analog input module acquisition error");
		case 5:
			return ("Time function error");
		case 6:
			return ("Get analog input module status error");
		case 7:
			return ("Read analog input module values error");
		case 8:
			return TIMEOUT;
		default:
			return UNKNOWN_ERROR;
	}
}
//--------------------------------------------------------------------------------
const char* msg_InitAnalogInputModuleCyclicAcquisition(int nb)
{
	switch (nb)
	{
		case 1:
			return WRONG_BOARD_HANDLE;
		case 2:
			return WRONG_MODULE_NUMBER;
		case 3:
			return WRONG_MODE;
		case 4:
 			return MODULE_NOT_INITIALIZED;
  		case 5:
			return ("No computer buffer available");
		case 6:
			return ("The compare value cannot be greater that the size of the on board buffer in Auto Stop mode OR greater or equal that the size of the on board buffer in Ring Buffer mode OR zero");
		case 7:
			return ("The cyclic acquisition is already initialised by another process");
		case 8:
			return ("The cyclic acquisition is running");
		case 9:
			return NOT_ENOUGH_PLACE_IN_ONBOARD_RAM;
		case 10:
			return ("The interrupt routine is not installed");
		case 11:
			return ("Primary Init Error");
		case 12:
			return CALIBRATION_RUNNING;
		default:
			return UNKNOWN_ERROR;
	}
}
//--------------------------------------------------------------------------------
const char* msg_StartAnalogInputModuleCyclicAcquisition(int nb)
{
	switch (nb)
	{
		case 1:
			return WRONG_BOARD_HANDLE;
		case 2:
			return WRONG_MODULE_NUMBER;
		case 3:
			return BOARD_NOT_INITIALIZED;
		default:
			return UNKNOWN_ERROR;
	}
}
//--------------------------------------------------------------------------------
const char* msg_GetAnalogInputModuleCyclicAcquisitionStatus(int nb)
{
	switch (nb)
	{
		case 1:
			return WRONG_BOARD_HANDLE;
		case 2:
			return WRONG_MODULE_NUMBER;
		case 3:
			return MODULE_NOT_INITIALIZED;
		default:
			return UNKNOWN_ERROR;
	}
}
//--------------------------------------------------------------------------------
const char* msg_IncrementAnalogInputCyclicAcquisitionBufferReadPointer(int nb)
{
	switch (nb)
	{
		case 1:
			return WRONG_BOARD_HANDLE;
		default:
			return UNKNOWN_ERROR;
	}
}
//--------------------------------------------------------------------------------
const char* msg_StopAnalogInputModuleCyclicAcquisition(int nb)
{
	switch (nb)
	{
		case 1:
			return WRONG_BOARD_HANDLE;
		case 2:
			return WRONG_MODULE_NUMBER;
		case 3:
			return CYCLIC_ACQUISITION_NOT_STARTED;
		default:
			return UNKNOWN_ERROR;
	}
}
//--------------------------------------------------------------------------------
const char* msg_ReleaseAnalogInputModuleCyclicAcquisition(int nb)
{
	switch (nb)
	{
		case 1:
			return WRONG_BOARD_HANDLE;
		case 2:
			return WRONG_MODULE_NUMBER;
		case 3:
			return MODULE_NOT_INITIALIZED;
		default:
			return UNKNOWN_ERROR;
	}
}
//--------------------------------------------------------------------------------
const char* msg_AnalogInput_EnableDisableDigitalInputExternalTrigger(int nb)
{
	switch (nb)
	{
		case 1:
			return WRONG_BOARD_HANDLE;
		case 2:
			return WRONG_MODULE_NUMBER;
		case 3:
			return WRONG_EXTERN_TRIGGER_FLAG;
		case 4:
			return MODULE_NOT_INITIALIZED;
		case 5:
			return EXTERNAL_DIGITAL_TRIGGER_NOT_INITIALIZED;
		default:
			return UNKNOWN_ERROR;
	}
}
//--------------------------------------------------------------------------------
const char* msg_AnalogInput_EnableDisableMasterTrigger(int nb)
{
	switch (nb)
	{
		case 1:
			return WRONG_BOARD_HANDLE;
		case 2:
			return WRONG_MODULE_NUMBER;
		case 3:
			return WRONG_EXTERN_TRIGGER_FLAG;
		case 4:
			return MODULE_NOT_INITIALIZED;
		default:
			return UNKNOWN_ERROR;
	}
 }
//--------------------------------------------------------------------------------
const char* msg_InitAnalogOutputChannel(int nb)
{
	switch (nb)
	{
		case 1:
			return WRONG_BOARD_HANDLE;
		case 2:
			return WRONG_CHANNEL_NUMBER;
		case 3:
			return ("Wrong clock selection");
		case 4:
			return ("Wrong Speed mode parameter");
		case 5:
			return BOARD_NOT_INITIALIZED;
		case 6:
			return ("Speed mode not available");
		case 7:
			return ("The channel is already initialised by another process");
		case 8:
			return ("Initialisation Error");
		default:
			return UNKNOWN_ERROR;
	}
}
//--------------------------------------------------------------------------------
const char* msg_ReleaseAnalogOutputChannel(int nb)
{
	switch (nb)
	{
		case 1:
			return WRONG_BOARD_HANDLE;
		case 2:
			return WRONG_CHANNEL_NUMBER;
		case 3:
			return ("The channel is not initialised or initialised by another process");
		default:
			return UNKNOWN_ERROR;
	}
}
//--------------------------------------------------------------------------------
const char* msg_GetAnalogOutputReadyBitStatus(int nb)
{
	switch (nb)
	{
		case 1:
			return WRONG_BOARD_HANDLE;
		case 2:
			return WRONG_CHANNEL_NUMBER;
		case 3:
			return CHANNEL_NOT_INITIALIZED;
		case 4:
			return CHANNEL_INITIALIZED_AS_SIGNAL_GENERATOR;
		default:
			return UNKNOWN_ERROR;
	}
}
//--------------------------------------------------------------------------------
const char* msg_WriteAnalogOutputValue(int nb)
{
	switch (nb)
	{
		case 1:
			return WRONG_BOARD_HANDLE;
		case 2:
			return WRONG_CHANNEL_NUMBER;
		case 3:
			return CHANNEL_NOT_INITIALIZED;
		case 4:
			return ("This function cannot work if the digital external trigger is enabled");
		case 5:
			return CHANNEL_INITIALIZED_AS_SIGNAL_GENERATOR;
		case 6:
			return ("The channel is not ready to receive a new value");
		default:
			return UNKNOWN_ERROR;
	}
}
//--------------------------------------------------------------------------------
const char* msg_Set1AnalogOutputChannel(int nb)
{
	switch (nb)
	{
		case 1:
			return WRONG_BOARD_HANDLE;
		case 2:
			return WRONG_CHANNEL_NUMBER;
		case 3:
			return CHANNEL_NOT_INITIALIZED;
		case 4:
			return ("This function cannot work if the digital external trigger is enabled");
		case 5:
			return CHANNEL_INITIALIZED_AS_SIGNAL_GENERATOR;
		case 6:
			return ("Time function error");
		case 7:
			return TIMEOUT;
		default:
			return UNKNOWN_ERROR;
	}
}
//--------------------------------------------------------------------------------
const char* msg_ReserveAnalogOutputSignalGeneratorComputerBuffer(int nb)
{
	switch (nb)
	{
		case 1:
			return WRONG_BOARD_HANDLE;
		case 2:
			return WRONG_CHANNEL_NUMBER;
		case 3:
			return ("Buffer Size error");
		case 4:
			return ("The buffer is already reserved by another process");
		case 5:
			return ("The PC DMA Buffer is in use ");
		case 6:
			return ("The channel is initialised in signal generator mode");
		default:
			return UNKNOWN_ERROR;
	}
}
//--------------------------------------------------------------------------------
const char* msg_FreeAnalogOutputSignalGeneratorComputerBuffer(int nb)
{
	switch (nb)
	{
		case 1:
			return WRONG_BOARD_HANDLE;
		case 2:
			return WRONG_CHANNEL_NUMBER;
		case 3:
			return ("The buffer is not reserved or reserved by another process");
		case 4:
			return ("The channel is initialised in signal generator mode");
		default:
			return UNKNOWN_ERROR;
	}
}
//--------------------------------------------------------------------------------
const char* msg_WriteAnalogOutputSignalGeneratorComputerBufferValues(int nb)
{
	switch (nb)
	{
		case 1:
			return WRONG_BOARD_HANDLE;
		case 2:
			return WRONG_CHANNEL_NUMBER;
		case 3:
			return ("The buffer is not reserved");
		case 4:
			return ("The buffer is full");
		default:
			return UNKNOWN_ERROR;
	}
}
//--------------------------------------------------------------------------------
const char* msg_InitAnalogOutputSignalGenerator(int nb)
{
	switch (nb)
	{
		case 1:
			return WRONG_BOARD_HANDLE;
		case 2:
			return WRONG_CHANNEL_NUMBER;
		case 3:
			return WRONG_MODE;
		case 4:
			return CHANNEL_NOT_INITIALIZED;
		case 5:
			return ("The buffer is not reserved");
		case 6:
			return ("The compare value cannot be greater that the size of the on board buffer and cannot be null");
		case 7:
			return ("The Signal generator is already initialised by another process");
		case 8:
			return ("The signal generator is running");
		case 9:
			return NOT_ENOUGH_PLACE_IN_ONBOARD_RAM;
		case 10:
			return ("A cycle acquisition or a signal generator is running");
		case 11:
			return ("The compare value must be greater than the actual free place in the on board RAM.");
		case 12:
			return ("The size of the PC RAM buffer must be the same that the On Board Buffer size and it must be full");
		case 13:
			return ("The interrupt routine is not installed");
		case 14:
			return ("Time function error");
		case 15:
			return TIMEOUT;
		case 16:
			return ("Prepare DMA transfer Error");
		default:
			return UNKNOWN_ERROR;
	}
}
//--------------------------------------------------------------------------------
const char* msg_StartAnalogOutputSignalGenerator(int nb)
{
	switch (nb)
	{
		case 1:
			return WRONG_BOARD_HANDLE;
		case 2:
			return WRONG_CHANNEL_NUMBER;
		case 3:
			return ("The signal generator is not initialised or not by this process");
		case 4:
			return ("The signal generator is already started");
		default:
			return UNKNOWN_ERROR;
	}
}
//--------------------------------------------------------------------------------
const char* msg_GetAnalogOutputSignalGeneratorStatus(int nb)
{
	switch (nb)
	{
		case 1:
			return WRONG_BOARD_HANDLE;
		case 2:
			return WRONG_CHANNEL_NUMBER;
		case 3:
			return ("The signal generator is not started or started by another process");
		default:
			return UNKNOWN_ERROR;
	}
}
//--------------------------------------------------------------------------------
const char* msg_StopAnalogOutputSignalGenerator(int nb)
{
	switch (nb)
	{
		case 1:
			return WRONG_BOARD_HANDLE;
		case 2:
			return WRONG_CHANNEL_NUMBER;
		case 3:
			return ("The signal generator is not started or started by another process");
		default:
			return UNKNOWN_ERROR;
	}
}
//--------------------------------------------------------------------------------
const char* msg_ReleaseAnalogOutputSignalGenerator(int nb)
{
	switch (nb)
	{
		case 1:
			return WRONG_BOARD_HANDLE;
		case 2:
			return WRONG_CHANNEL_NUMBER;
		case 3:
			return ("The signal generator is not initialised or not initialised by this process");
		default:
			return UNKNOWN_ERROR;
	}
}
//--------------------------------------------------------------------------------
const char* msg_AnalogOutput_EnableDisableDigitalInputExternalTrigger(int nb)
{
	switch (nb)
	{
		case 1:
			return WRONG_BOARD_HANDLE;
		case 2:
			return WRONG_CHANNEL_NUMBER;
		case 3:
			return WRONG_EXTERN_TRIGGER_FLAG;
		case 4:
			return CHANNEL_NOT_INITIALIZED;
		case 5:
			return EXTERNAL_DIGITAL_TRIGGER_NOT_INITIALIZED;
		default:
			return UNKNOWN_ERROR;
	}
}
//--------------------------------------------------------------------------------
const char* msg_AnalogOutput_EnableDisableMasterTrigger(int nb)
{
	switch (nb)
	{
		case 1:
			return WRONG_BOARD_HANDLE;
		case 2:
			return WRONG_CHANNEL_NUMBER;
		case 3:
			return WRONG_EXTERN_TRIGGER_FLAG;
		case 4:
			return CHANNEL_NOT_INITIALIZED;
		default:
			return UNKNOWN_ERROR;
	}
}
//--------------------------------------------------------------------------------
const char* msg_InitChronometerModule(int nb)
{
	switch (nb)
	{
		case 1:
			return WRONG_BOARD_HANDLE;
		case 2:
			return WRONG_CHRONOMETER_NUMBER;
		case 3:
			return ("Wrong clock divisor selection");
		case 4:
			return ("The Chronometer is already initialised by another process");
		case 5:
			return ("Initialisation Error");
		default:
			return UNKNOWN_ERROR;
	}
}
//--------------------------------------------------------------------------------
const char* msg_ReleaseChronometerModule(int nb)
{
	switch (nb)
	{
		case 1:
			return WRONG_BOARD_HANDLE;
		case 2:
			return WRONG_CHRONOMETER_NUMBER;
		case 3:
			return ("The Chronometer is not initialised or initialised by another process");
		default:
			return UNKNOWN_ERROR;
	}
}
//--------------------------------------------------------------------------------
const char* msg_StartChronometerModuleAcquisition(int nb)
{
	switch (nb)
	{
		case 1:
			return WRONG_BOARD_HANDLE;
		case 2:
			return WRONG_CHRONOMETER_NUMBER;
		case 3:
			return CHRONOMETER_NOT_INITIALIZED;
		case 4:
			return ("The acquisition is already started");
		default:
			return UNKNOWN_ERROR;
	}
}
//--------------------------------------------------------------------------------
const char* msg_GetChronometerModuleFIFOStatus(int nb)
{
	switch (nb)
	{
		case 1:
			return WRONG_BOARD_HANDLE;
		case 2:
			return WRONG_CHRONOMETER_NUMBER;
		case 3:
			return CHRONOMETER_NOT_INITIALIZED;
		default:
			return UNKNOWN_ERROR;
	}
}
//--------------------------------------------------------------------------------
const char* msg_ReadChronometerModuleValue(int nb)
{
	switch (nb)
	{
		case 1:
			return WRONG_BOARD_HANDLE;
		case 2:
			return WRONG_CHRONOMETER_NUMBER;
		case 3:
			return CHRONOMETER_NOT_INITIALIZED;
		case 4:
			return ("FIFO is empty");
		default:
			return UNKNOWN_ERROR;
	}
}
//--------------------------------------------------------------------------------
const char* msg_StopChronometerModuleAcquisition(int nb)
{
	switch (nb)
	{
		case 1:
			return WRONG_BOARD_HANDLE;
		case 2:
			return WRONG_CHRONOMETER_NUMBER;
		case 3:
			return ("The Chronometer is not initialised or not initialised by this process");
		default:
			return UNKNOWN_ERROR;
	}
}
//--------------------------------------------------------------------------------
const char* msg_InitChronometerModuleCyclicAcquisition(int nb)
{
	switch (nb)
	{
		case 1:
			return WRONG_BOARD_HANDLE;
		case 2:
			return WRONG_CHRONOMETER_NUMBER;
		case 3:
			return WRONG_MODE;
		case 4:
			return MODULE_NOT_INITIALIZED;
		case 5:
			return ("No computer buffer available");
		case 6:
			return ("The compare value cannot be :");
			return ("\n  - greater that the size of the on board buffer in Auto Stop mode");
			return ("\n  - greater or equal that the size of the on board buffer in Ring Buffer mode");
			return ("\n  - null");
		case 7:
			return ("The cyclic acquisition is already initialised by another process");
		case 8:
			return ("The cyclic acquisition is running");
		case 9:
			return NOT_ENOUGH_PLACE_IN_ONBOARD_RAM;
		case 10:
			return ("The interrupt routine is not installed");
		case 11:
			return ("Init Chronometer Error");
		default:
			return UNKNOWN_ERROR;
	}
}
//--------------------------------------------------------------------------------
const char* msg_StartChronometerModuleCyclicAcquisition(int nb)
{
	switch (nb)
	{
		case 1:
			return WRONG_BOARD_HANDLE;
		case 2:
			return WRONG_CHRONOMETER_NUMBER;
		case 3:
			return ("The Cyclic acquisition is not initialised or not by this process");
		case 4:
			return ("The Cyclic acquisition is already started ");
		default:
			return UNKNOWN_ERROR;
	}
}
//--------------------------------------------------------------------------------
const char* msg_GetChronometerModuleCyclicAcquisitionStatus(int nb)
{
	switch (nb)
	{
		case 1:
			return WRONG_BOARD_HANDLE;
		case 2:
			return WRONG_CHRONOMETER_NUMBER;
		case 3:
			return ("The Cyclic Acquisition is not started or started by another Process.");
		default:
			return UNKNOWN_ERROR;
	}
}
//--------------------------------------------------------------------------------
const char* msg_IncrementChronometerCyclicAcquisitionBufferReadPointer(int nb)
{
	switch (nb)
	{
		case 1:
			return WRONG_BOARD_HANDLE;
		default:
			return UNKNOWN_ERROR;
	}
}
//--------------------------------------------------------------------------------
const char* msg_StopChronometerModuleContinuousAcquisition(int nb)
{
	switch (nb)
	{
		case 1:
			return WRONG_BOARD_HANDLE;
		case 2:
			return WRONG_MODULE_NUMBER;
		case 3:
			return CYCLIC_ACQUISITION_NOT_STARTED;
		default:
			return UNKNOWN_ERROR;
	}
}
//--------------------------------------------------------------------------------
const char* msg_ReleaseChronometerModuleCyclicAcquisition(int nb)
{
	switch (nb)
	{
		case 1:
			return WRONG_BOARD_HANDLE;
		case 2:
			return WRONG_MODULE_NUMBER;
		case 3:
			return CYCLIC_ACQUISITION_NOT_INITIALIZED;
		default:
			return UNKNOWN_ERROR;
	}
}
//--------------------------------------------------------------------------------
const char* msg_Chronometer_EnableDisableDigitalInputExternalTrigger(int nb)
{
	switch (nb)
	{
		case 1:
			return WRONG_BOARD_HANDLE;
		case 2:
			return WRONG_CHRONOMETER_NUMBER;
		case 3:
			return WRONG_EXTERN_TRIGGER_FLAG;
		case 4:
			return CHRONOMETER_NOT_INITIALIZED;
		case 5:
			return EXTERNAL_DIGITAL_TRIGGER_NOT_INITIALIZED;
		default:
			return UNKNOWN_ERROR;
	}
}
//--------------------------------------------------------------------------------
const char* msg_Chronometer_EnableDisableMasterTrigger(int nb)
{
	switch (nb)
	{
		case 1:
			return WRONG_BOARD_HANDLE;
		case 2:
			return WRONG_CHRONOMETER_NUMBER;
		case 3:
			return WRONG_EXTERN_TRIGGER_FLAG;
		case 4:
			return CHRONOMETER_NOT_INITIALIZED;
		default:
			return UNKNOWN_ERROR;
	}
}
//--------------------------------------------------------------------------------
const char* msg_Read1DigitalInput(int nb)
{
	switch (nb)
	{
		case 1:
			return WRONG_BOARD_HANDLE;
		case 2:
			return WRONG_CHANNEL_NUMBER;
		default:
			return UNKNOWN_ERROR;
	}
}
//--------------------------------------------------------------------------------
const char* msg_Read4DigitalInputs(int nb)
{
	switch (nb)
	{
		case 1:
			return WRONG_BOARD_HANDLE;
		case 2:
			return WRONG_CHANNEL_NUMBER;
		default:
			return UNKNOWN_ERROR;
	}
}
//--------------------------------------------------------------------------------
const char* msg_Read8DigitalInputs(int nb)
{
	switch (nb)
	{
		case 1:
			return WRONG_BOARD_HANDLE;
		default:
			return UNKNOWN_ERROR;
	}
}
//--------------------------------------------------------------------------------
const char* msg_EnableDisableDigitalOutputMemory(int nb)
{
	switch (nb)
	{
		case 1:
			return WRONG_BOARD_HANDLE;
		default:
			return UNKNOWN_ERROR;
	}
}
//--------------------------------------------------------------------------------
const char* msg_Set1DigitalOutputOn(int nb)
{
	switch (nb)
	{
		case 1:
			return WRONG_BOARD_HANDLE;
		case 2:
			return ("The channel number is not between 0 and 7");
		default:
			return UNKNOWN_ERROR;
	}
}
//--------------------------------------------------------------------------------
const char* msg_Set1DigitalOutputOff(int nb)
{
	switch (nb)
	{
		case 1:
			return WRONG_BOARD_HANDLE;
		case 2:
			return WRONG_CHANNEL_NUMBER;
		case 3:
			return ("Digital output memory is not on");
		default:
			return UNKNOWN_ERROR;
	}
}
//--------------------------------------------------------------------------------
const char* msg_Set4DigitalOutputsOn(int nb)
{
	switch (nb)
	{
		case 1:
			return WRONG_BOARD_HANDLE;
		case 2:
			return WRONG_PORT_NUMBER;
		case 3:
			return WRONG_PORT_NUMBER;
		default:
			return UNKNOWN_ERROR;
	}
}
//--------------------------------------------------------------------------------
const char* msg_Set4DigitalOutputsOff(int nb)
{
	switch (nb)
	{
		case 1:
			return WRONG_BOARD_HANDLE;
		case 2:
			return ("Digital output memory is not on");
		case 3:
			return WRONG_PORT_NUMBER;
		case 4:
			return WRONG_PORT_NUMBER;
		default:
			return UNKNOWN_ERROR;
	}
}
//--------------------------------------------------------------------------------
const char* msg_Set8DigitalOutputsOn(int nb)
{
	switch (nb)
	{
		case 1:
			return WRONG_BOARD_HANDLE;
		default:
			return UNKNOWN_ERROR;
	}
}
//--------------------------------------------------------------------------------
const char* msg_Set8DigitalOutputsOff(int nb)
{
	switch (nb)
	{
		case 1:
			return WRONG_BOARD_HANDLE;
		case 2:
			return ("The digital output memory is not on");
		default:
			return UNKNOWN_ERROR;
	}
}
//--------------------------------------------------------------------------------
const char* msg_InitDigitalInputExternalTrigger(int nb)
{
	switch (nb)
	{
		case 1:
			return WRONG_BOARD_HANDLE;
		case 2:
			return ("Wrong trigger level selection");
		case 3:
			return ("Wrong trigger count value");
		case 4:
			return ("The external trigger is already initialised by another process");
		default:
			return UNKNOWN_ERROR;
	}
}
//--------------------------------------------------------------------------------
const char* msg_MasterTrigger(int nb)
{
	switch (nb)
	{
		case 1:
			return WRONG_BOARD_HANDLE;
		case 2:
			return BOARD_NOT_INITIALIZED;
		default:
			return UNKNOWN_ERROR;
	}
}
//--------------------------------------------------------------------------------
const char* msg_GetBoardInitialisation(int nb)
{
	switch (nb)
	{
		case 1:
			return WRONG_BOARD_HANDLE;
		case 2:
			return BOARD_NOT_INITIALIZED;
		default:
			return UNKNOWN_ERROR;
	}
}
//--------------------------------------------------------------------------------
const char* msg_InitBoard(int nb)
{
	switch (nb)
	{
		case 1:
			return WRONG_BOARD_HANDLE;
		case 2:
			return "Wrong Master,Slave mode parameter";
		case 3 : 
			return "wrong selected bus clock divisor parameter";
		case 4 : 
			return "wrong clock selection";
		case 5 :
			return "wrong slave sampling clock selection";
		case 6 : 
			return "wrong chronometer master clock divisor parameter";
		case 7:
			return "The board is already initialised by another process";
		case 8:
			return "The board is in use : Release all channels to reinitialise it";
		default:
			return UNKNOWN_ERROR;
	}
}
//--------------------------------------------------------------------------------
const char* msg_QueryAnalogInputCyclicAcquisitionBufferSize(int nb)
{
	switch (nb)
	{
		case 1:
			return WRONG_BOARD_HANDLE;
		default:
			return UNKNOWN_ERROR;
	}
}
//--------------------------------------------------------------------------------
const char* msg_EventEmpty(int nb)
{
	return UNKNOWN_ERROR;
}
//--------------------------------------------------------------------------------
const char* msg_EventWait(int nb)
{
	return UNKNOWN_ERROR;
}
//--------------------------------------------------------------------------------
const char* msg_GetAnalogInputCyclicAcquisitionBufferReadPointer(int nb)
{
	switch (nb)
	{
		case 1:
			return WRONG_BOARD_HANDLE;
		default:
			return UNKNOWN_ERROR;
	}
}
//--------------------------------------------------------------------------------
const char* msg_ResetAcquisitionBuffer(int nb)
{
	switch (nb)
	{
		case 1:
			return WRONG_BOARD_HANDLE;
		default:
			return UNKNOWN_ERROR;
	}
}
//--------------------------------------------------------------------------------
const char* msg_QueryAnalogInputCyclicAcquisitionNumberOfData(int nb)
{
	switch (nb)
	{
		case 1:
			return WRONG_BOARD_HANDLE;
		default:
			return UNKNOWN_ERROR;
	}
}
