versadac  1
versadac - Scalable Recorder Firmware
cloning_interface.h
1 #ifndef CLONING_INTERFACE_H
2 #define CLONING_INTERFACE_H
3 
4 /*****************************************************************************
5 * Copyright (c) 2010 Eurotherm Controls Ltd.
6 *
7 * FILENAME : Cloning_Interface.h
8 * AUTHOR : Adrian Oliver
9 * CREATED : October 2010
10 * DESCRIPTION : Header file for cloning functionality
11 * DESIGN SPEC :
12 *****************************************************************************/
13 
15 
16 //
17 // This #defines need to match the enumeration references in instrument.uef
18 // See ENUM_CLONING_EXCEPTIONS_E_ER
19 //
20 #define CLONING_ERRORCODES_OK 0
21 #define CLONING_ERRORCODES_FILE_NOT_FOUND 1
22 #define CLONING_ERRORCODES_WRONG_FILE_FORMAT 2
23 #define CLONING_ERRORCODES_NO_PARAMETER_DATA_FOUND 3
24 #define CLONING_ERRORCODES_UNSUPPORTED_DEVICE_TYPE 4
25 #define CLONING_ERRORCODES_UNSUPPORTED_DEVICE_VERSION 5
26 #define CLONING_ERRORCODES_FILE_CHECKSUM_FAILED 6
27 #define CLONING_ERRORCODES_SECURE_FEATURES_INCOMPATIBLE 7
28 #define CLONING_ERRORCODES_IO_MISMATCH_IO1 8
29 #define CLONING_ERRORCODES_IO_MISMATCH_OP2 9
30 #define CLONING_ERRORCODES_IO_MISMATCH_OP3 10
31 #define CLONING_ERRORCODES_UNABLE_TO_OPEN_FILE_FOR_WRITE 11
32 #define CLONING_ERRORCODES_INCOMPLETE_LOAD 12
33 #define CLONING_ERRORCODES_INCOMPLETE_SAVE 13
34 
35 
37 
38 #ifdef __cplusplus
39 extern "C" {
40 #endif
41 
42 void Cloning_Task(void);
43 void Cloning_RunTask(int32 z_ms_used);
44 void Cloning_SuspendTask(void);
45 bool Cloning_Busy(void);
46 bool Cloning_LoadFromFile(char* pszFilename);
47 bool Cloning_SaveToFile(char* pszFilename);
48 uint16 Cloning_Exception(void);
49 
50 #ifdef __cplusplus
51 }
52 #endif
53 
54 #endif