Lines Matching full:index

102 static void update(uint16_t obj_inst_id, uint16_t res_id, int index)  in update()  argument
107 full = actual_fill_percentage[index] > high_threshold[index]; in update()
108 if (container_full[index] != full) { in update()
109 container_full[index] = full; in update()
114 empty = actual_fill_percentage[index] < low_threshold[index]; in update()
115 if (container_empty[index] != empty) { in update()
116 container_empty[index] = empty; in update()
139 int index, i = 0, j = 0; in filling_sensor_create() local
142 for (index = 0; index < MAX_INSTANCE_COUNT; index++) { in filling_sensor_create()
143 if (inst[index].obj && inst[index].obj_inst_id == obj_inst_id) { in filling_sensor_create()
151 for (index = 0; index < MAX_INSTANCE_COUNT; index++) { in filling_sensor_create()
152 if (!inst[index].obj) { in filling_sensor_create()
157 if (index >= MAX_INSTANCE_COUNT) { in filling_sensor_create()
164 container_height[index] = 0; in filling_sensor_create()
165 actual_fill_percentage[index] = 0; in filling_sensor_create()
166 actual_fill_level[index] = 0; in filling_sensor_create()
167 high_threshold[index] = 0; in filling_sensor_create()
168 container_full[index] = false; in filling_sensor_create()
169 low_threshold[index] = 0; in filling_sensor_create()
170 container_empty[index] = false; in filling_sensor_create()
171 average_fill_speed[index] = 0; in filling_sensor_create()
172 forecast_full_date[index] = 0; in filling_sensor_create()
173 forecast_empty_date[index] = 0; in filling_sensor_create()
174 container_out_of_location[index] = false; in filling_sensor_create()
175 container_out_of_position[index] = false; in filling_sensor_create()
177 (void)memset(res[index], 0, in filling_sensor_create()
178 sizeof(res[index][0]) * ARRAY_SIZE(res[index])); in filling_sensor_create()
179 init_res_instance(res_inst[index], ARRAY_SIZE(res_inst[index])); in filling_sensor_create()
182 INIT_OBJ_RES(CONTAINER_HEIGHT_FILLING_SENSOR_RID, res[index], i, in filling_sensor_create()
183 res_inst[index], j, 1, false, true, in filling_sensor_create()
184 &container_height[index], sizeof(*container_height), NULL, in filling_sensor_create()
186 INIT_OBJ_RES(ACTUAL_FILL_PERCENTAGE_FILLING_SENSOR_RID, res[index], i, in filling_sensor_create()
187 res_inst[index], j, 1, false, true, in filling_sensor_create()
188 &actual_fill_percentage[index], sizeof(*actual_fill_percentage), in filling_sensor_create()
190 INIT_OBJ_RES_DATA(ACTUAL_FILL_LEVEL_FILLING_SENSOR_RID, res[index], in filling_sensor_create()
191 i, res_inst[index], j, &actual_fill_level[index], in filling_sensor_create()
193 INIT_OBJ_RES(HIGH_THRESHOLD_PERCENTAGE_FILLING_SENSOR_RID, res[index], in filling_sensor_create()
194 i, res_inst[index], j, 1, false, true, in filling_sensor_create()
195 &high_threshold[index], sizeof(*high_threshold), NULL, in filling_sensor_create()
197 INIT_OBJ_RES_DATA(CONTAINER_FULL_FILLING_SENSOR_RID, res[index], i, in filling_sensor_create()
198 res_inst[index], j, &container_full[index], in filling_sensor_create()
200 INIT_OBJ_RES(LOW_THRESHOLD_PERCENTAGE_FILLING_SENSOR_RID, res[index], i, in filling_sensor_create()
201 res_inst[index], j, 1, false, true, &low_threshold[index], in filling_sensor_create()
203 INIT_OBJ_RES_DATA(CONTAINER_EMPTY_FILLING_SENSOR_RID, res[index], i, in filling_sensor_create()
204 res_inst[index], j, &container_empty[index], in filling_sensor_create()
206 INIT_OBJ_RES_DATA(AVERAGE_FILL_SPEED_FILLING_SENSOR_RID, res[index], i, in filling_sensor_create()
207 res_inst[index], j, &average_fill_speed[index], in filling_sensor_create()
210 res[index], i, reset_average_fill_speed_cb); in filling_sensor_create()
211 INIT_OBJ_RES_DATA(FORECAST_FULL_DATE_FILLING_SENSOR_RID, res[index], i, in filling_sensor_create()
212 res_inst[index], j, &forecast_full_date[index], in filling_sensor_create()
214 INIT_OBJ_RES_DATA(FORECAST_EMPTY_DATE_FILLING_SENSOR_RID, res[index], i, in filling_sensor_create()
215 res_inst[index], j, &forecast_empty_date[index], in filling_sensor_create()
218 res[index], i, res_inst[index], j, in filling_sensor_create()
219 &container_out_of_location[index], in filling_sensor_create()
222 res[index], i, res_inst[index], j, in filling_sensor_create()
223 &container_out_of_position[index], in filling_sensor_create()
225 inst[index].resources = res[index]; in filling_sensor_create()
226 inst[index].resource_count = i; in filling_sensor_create()
228 return &inst[index]; in filling_sensor_create()