Lines Matching full:index

78 static void update_min_measured(uint16_t obj_inst_id, int index)  in update_min_measured()  argument
80 min_measured_value[index] = sensor_value[index]; in update_min_measured()
84 static void update_max_measured(uint16_t obj_inst_id, int index) in update_max_measured() argument
86 max_measured_value[index] = sensor_value[index]; in update_max_measured()
133 int index, i = 0, j = 0; in humidity_sensor_create() local
136 for (index = 0; index < MAX_INSTANCE_COUNT; index++) { in humidity_sensor_create()
137 if (inst[index].obj && inst[index].obj_inst_id == obj_inst_id) { in humidity_sensor_create()
145 for (index = 0; index < MAX_INSTANCE_COUNT; index++) { in humidity_sensor_create()
146 if (!inst[index].obj) { in humidity_sensor_create()
151 if (index >= MAX_INSTANCE_COUNT) { in humidity_sensor_create()
158 sensor_value[index] = 0; in humidity_sensor_create()
159 units[index][0] = '\0'; in humidity_sensor_create()
160 min_measured_value[index] = INT32_MAX; in humidity_sensor_create()
161 max_measured_value[index] = -INT32_MAX; in humidity_sensor_create()
162 min_range_value[index] = 0; in humidity_sensor_create()
163 max_range_value[index] = 0; in humidity_sensor_create()
165 (void)memset(res[index], 0, in humidity_sensor_create()
166 sizeof(res[index][0]) * ARRAY_SIZE(res[index])); in humidity_sensor_create()
167 init_res_instance(res_inst[index], ARRAY_SIZE(res_inst[index])); in humidity_sensor_create()
170 INIT_OBJ_RES(SENSOR_VALUE_RID, res[index], i, res_inst[index], j, 1, in humidity_sensor_create()
171 false, true, &sensor_value[index], sizeof(*sensor_value), in humidity_sensor_create()
173 INIT_OBJ_RES_DATA_LEN(SENSOR_UNITS_RID, res[index], i, res_inst[index], j, in humidity_sensor_create()
174 units[index], UNIT_STR_MAX_SIZE, 0); in humidity_sensor_create()
175 INIT_OBJ_RES_DATA(MIN_MEASURED_VALUE_RID, res[index], i, in humidity_sensor_create()
176 res_inst[index], j, &min_measured_value[index], in humidity_sensor_create()
178 INIT_OBJ_RES_DATA(MAX_MEASURED_VALUE_RID, res[index], i, in humidity_sensor_create()
179 res_inst[index], j, &max_measured_value[index], in humidity_sensor_create()
181 INIT_OBJ_RES_DATA(MIN_RANGE_VALUE_RID, res[index], i, res_inst[index], in humidity_sensor_create()
182 j, &min_range_value[index], sizeof(*min_range_value)); in humidity_sensor_create()
183 INIT_OBJ_RES_DATA(MAX_RANGE_VALUE_RID, res[index], i, res_inst[index], in humidity_sensor_create()
184 j, &max_range_value[index], sizeof(*max_range_value)); in humidity_sensor_create()
185 INIT_OBJ_RES_EXECUTE(RESET_MIN_MAX_MEASURED_VALUES_RID, res[index], i, in humidity_sensor_create()
188 INIT_OBJ_RES_OPTDATA(APPLICATION_TYPE_RID, res[index], i, in humidity_sensor_create()
189 res_inst[index], j); in humidity_sensor_create()
190 INIT_OBJ_RES_OPTDATA(TIMESTAMP_RID, res[index], i, res_inst[index], j); in humidity_sensor_create()
191 INIT_OBJ_RES_OPTDATA(FRACTIONAL_TIMESTAMP_RID, res[index], i, in humidity_sensor_create()
192 res_inst[index], j); in humidity_sensor_create()
193 INIT_OBJ_RES_OPTDATA(MEASUREMENT_QUALITY_INDICATOR_RID, res[index], in humidity_sensor_create()
194 i, res_inst[index], j); in humidity_sensor_create()
195 INIT_OBJ_RES_OPTDATA(MEASUREMENT_QUALITY_LEVEL_RID, res[index], i, in humidity_sensor_create()
196 res_inst[index], j); in humidity_sensor_create()
199 inst[index].resources = res[index]; in humidity_sensor_create()
200 inst[index].resource_count = i; in humidity_sensor_create()
203 return &inst[index]; in humidity_sensor_create()