versadac  1
versadac - Scalable Recorder Firmware
par_access.h
1 #ifndef PAR_ACCESS_H
2 #define PAR_ACCESS_H
3 
4 /*****************************************************************************
5 * Copyright (c) 2001 Eurotherm Controls Ltd.
6 *
7 * FILENAME : par_access.h
8 * AUTHOR : Steve Robinson
9 * CREATED : Feb 2009
10 * DESCRIPTION : Header file for par_access - ported functions
11 * from 3500
12 * DESIGN SPEC :
13 *****************************************************************************/
14 extern const uint16 g_pow2[16];
15 
16 #define PA_WRITE_OK 0
17 #define PA_TYPE_CONVERSION_ERR 1 /* Source type cannot be written to destination type */
18 #define PA_SRC_OUT_OF_RANGE 2 /* Source value will not fit into destination type */
19 #define PA_ILLEGAL_VALUE 3 /* Value outside parameter limits */
20 #define PA_NOT_AVAILABLE 4
21 #define PA_NOT_ALTERABLE 5
22 
23 #ifndef WIN32
24 #define DB_SEMA4_TEST_EN 0
25 #define NVOL_SEMA4_TEST 0
26 #if (DB_SEMA4_TEST_EN | NVOL_SEMA4_TEST)
27 void list_pending_tasks_for_ParameterDBSem(void);
28 #endif
29 #endif
30 
31 #define INST_MODE_CONFIG 2
32 
33 bool isNVol (CISP_t z_cisp);
34 uint8 GetMaxParameters (CISP_t z_cisp);
35 uint8 GetMaxSubclasses (uint8 z_cisp);
36 uint16 GetParameterAvail (CISP_t z_cisp);
37 uint16 GetParameterAlt (CISP_t z_cisp);
38 uint16 GetSubClassAvail (CISP_t z_cisp);
39 bool GetProhibitWiring(CISP_t z_cisp, bool test_oper_rw);
40 uint8 Get_Number_Format (CISP_t z_cisp);
41 bool isAlterable (CISP_t z_cisp, uint8 z_access_level, uint8 z_task, uint8 z_connectionNumber);
42 bool isAvailable (CISP_t z_cisp, uint8 z_access_level, uint8 z_task, uint8 z_connectionNumber);
43 bool isSensitiveParameter (CISP_t z_cisp);
44 bool is_value_enumerated (CISP_t z_cisp, int32 z_val);
45 bool isLogicORInputParam(CISP_t z_cisp);
46 bool isWireOnlyParameter(CISP_t z_cisp);
47 uint8 PA_Get_Type (CISP_t z_cisp);
48 void * PA_Get_Value_Pointer (CISP_t z_cisp, uint8 z_task);
49 uint8 PA_Get_Edge_Type (CISP_t z_cisp);
50 float32 PA_Get_Value (CISP_t z_cisp);
51 void * PA_Get_High_Limit (CISP_t z_cisp);
52 void * PA_Get_Low_Limit (CISP_t z_cisp);
53 uint8 PA_Get_Temp_Type (CISP_t z_cisp);
54 bool pa_clip_to_limits (CISP_t z_cisp, bool z_always_run_effect, uint8 z_task, uint8 z_connectionNumber);
55 uint8 pa_write_long (int32 z_val, uint8 z_type, CISP_t z_dst, uint8 z_task, bool z_ignore_limits, uint8 z_connectionNumber);
56 uint8 pa_write_float (float32 z_val, uint8 z_type, CISP_t z_dst, uint8 z_task, bool z_ignore_limits, uint8 z_connectionNumber);
57 uint8 pa_write_value (void *z_val_p, uint8 z_type, CISP_t z_dst, uint8 z_task, bool z_ignore_limits, uint8 z_connectionNumber);
58 uint8 pa_write_unicode_char(unicode_c z_val, uint8 z_type, CISP_t z_dst, uint8 z_task, uint8 z_offset, uint8 z_connectionNumber);
59 bool isValid (CISP_t z_cisp, void *z_value_p, uint8 z_task);
60 void write_last_value (CISP_t z_cisp, void *z_value_p, uint8 z_task, uint8 z_connectionNumber);
61 void pa_write_uint8_conn (CISP_t z_cisp, uint8 z_val, uint8 z_task, bool z_runeffects, uint8 z_connectionNumber);
62 void pa_write_int16_conn (CISP_t z_cisp, int16 z_val, uint8 z_task, bool z_runeffects, uint8 z_connectionNumber);
63 void pa_write_int32_conn (CISP_t z_cisp, int32 z_val, uint8 z_task, bool z_runeffects, uint8 z_connectionNumber);
64 void pa_write_float32_conn (CISP_t z_cisp, float32 z_val, uint8 z_task, bool z_runeffects /* if true, runs the effects... */, uint8 z_connectionNumber);
65 void pa_write_f32_s_conn (CISP_t z_cisp, f32_status_t z_val, uint8 z_task, bool z_runeffects /* if true, runs the effects... */, uint8 z_connectionNumber);
66 bool PA_InvalidParameter (CISP_t z_cisp);
67 bool sparse_enum (const EnumStruct_t *z_enums);
68 EnumRef_t GetParameterEnumRef (CISP_t z_cisp);
69 uint16 ui_get_num_enums (CISP_t z_cisp);
70 bool ConfigParameterOnly (CISP_t z_cisp);
71 bool CanWriteInOper (CISP_t z_cisp);
72 int find_enum_pair (const EnumStruct_t *z_enums, int32 z_val, bool z_signed);
73 int32 ui_round_to_nearest_int(float32 z_float);
74 void run_effects_rule (CISP_t z_cisp, uint8 z_task, uint8 z_connectionNumber);
75 int32 ui_change_enum_val (CISP_t z_cisp, int32 z_value, bool z_is_raise, uint8 z_task);
76 uint8 ui_get_num_fields (CISP_t z_cisp, uint8 z_resolution);
77 void get_ParameterDBSem(void);
78 void release_ParameterDBSem(void);
79 void lock_all_parameters_for_device_upgrade(bool lock);
80 bool get_parameter_lock_status();
81 extern bool inConfigMode(void);
82 extern bool inStandbyMode(void);
83 extern bool inInstModeConfig(void);
84 extern bool inUIConfig(void);
85 extern bool inErrorStandbyMode(void);
86 extern void setErrorStandbyMode(void);
87 extern void clrErrorStandbyMode(void);
88 #endif
Definition: stdtypes.h:116