/** \file pfASCII.h
 *
 * This is the replacement for camdll.h. It will provide the API for
 * the property protocol only.
 * 
 *
 */


 #ifndef EXTERN_C
	#ifdef __cplusplus
		#define EXTERN_C extern "C"
	#else
		#define EXTERN_C
	#endif
#endif

typedef enum{
	PF_INT,		//32bit signed integer
	PF_FLOAT,	//IEEE 754 32bit float, single precision
	PF_BOOL,	//boolean value (1: true, 0: false), handled as PF_INT
	PF_MODE,	//mode value, handled as PF_INT
	PF_COMMAND,	//command, handled as PF_INT
	PF_STRING,	//not yet supported
	PF_BUFFER	//not yet supported
}pfASCII_PropertyType;


EXTERN_C int pfASCII_PortInit(int *numOfPorts);
EXTERN_C int pfASCII_PortInfo(int port, char *manu, int *mBytes, char *name, int *nBytes, int *version, int *type);

EXTERN_C int pfASCII_DeviceOpen(int port);
EXTERN_C int pfASCII_DeviceClose(int port);

EXTERN_C int pfASCII_IsBaudRateSupported(int port, int baudrate);
EXTERN_C int pfASCII_GetBaudRate(int port, int *baudrate);
EXTERN_C int pfASCII_SetBaudRate(int port, int baudrate);

EXTERN_C int pfASCII_SetPropertyInt(int port, char *propertyName, int propertyValue);
EXTERN_C int pfASCII_SetPropertyFloat(int port, char *propertyName, float propertyValue);
EXTERN_C int pfASCII_SetPropertyString(int port, char *propertyName, char *propertyValue);
EXTERN_C int pfASCII_GetPropertyInt(int port, char *propertyName, int *propertyValue);
EXTERN_C int pfASCII_GetPropertyFloat(int port, char *propertyName, float *propertyValue);
EXTERN_C int pfASCII_GetPropertyString(int port, char *propertyName, char *propertyValue);
EXTERN_C int pfASCII_GetPropertyType(char *propertyName, pfASCII_PropertyType *propertyType);
