263 xmlTextWriterWriteFormatElement(writer, BAD_CAST "UUID", "%s", tmp3->uuid); |
263 xmlTextWriterWriteFormatElement(writer, BAD_CAST "UUID", "%s", tmp3->uuid); |
264 xmlTextWriterWriteFormatElement(writer, BAD_CAST "PRODUCT_UUID", "%s", tmp3->product_uuid); |
264 xmlTextWriterWriteFormatElement(writer, BAD_CAST "PRODUCT_UUID", "%s", tmp3->product_uuid); |
265 xmlTextWriterWriteFormatElement(writer, BAD_CAST "PRODUCT_CODE", "%s", tmp3->product_code); |
265 xmlTextWriterWriteFormatElement(writer, BAD_CAST "PRODUCT_CODE", "%s", tmp3->product_code); |
266 xmlTextWriterWriteFormatElement(writer, BAD_CAST "PRODUCT_NAME", "%s", tmp3->product_name); |
266 xmlTextWriterWriteFormatElement(writer, BAD_CAST "PRODUCT_NAME", "%s", tmp3->product_name); |
267 xmlTextWriterWriteFormatElement(writer, BAD_CAST "ALIAS", "%s", tmp3->alias); |
267 xmlTextWriterWriteFormatElement(writer, BAD_CAST "ALIAS", "%s", tmp3->alias); |
268 xmlTextWriterWriteFormatElement(writer, BAD_CAST "VOLUME", "%.1f", tmp3->volume); |
|
269 |
268 |
270 if (tmp3->air_address) { |
269 if (tmp3->air_address) { |
271 xmlTextWriterWriteFormatElement(writer, BAD_CAST "AIR_ADDRESS", "%s", tmp3->air_address); |
270 xmlTextWriterWriteFormatElement(writer, BAD_CAST "AIR_ADDRESS", "%s", tmp3->air_address); |
272 xmlTextWriterWriteFormatElement(writer, BAD_CAST "AIR_STATE", "%d", tmp3->air_state); |
271 xmlTextWriterWriteFormatElement(writer, BAD_CAST "AIR_STATE", "%d", tmp3->air_state); |
273 xmlTextWriterWriteFormatElement(writer, BAD_CAST "AIR_TEMPERATURE", "%d", tmp3->air_temperature); |
272 xmlTextWriterWriteFormatElement(writer, BAD_CAST "AIR_TEMPERATURE", "%d", tmp3->air_temperature); |
572 unit->next = NULL; |
571 unit->next = NULL; |
573 unit->uuid = unit->product_uuid = unit->product_code = unit->product_name = unit->event_msg = \ |
572 unit->uuid = unit->product_uuid = unit->product_code = unit->product_name = unit->event_msg = \ |
574 unit->alias = unit->air_address = unit->beer_address = unit->beer_address2 = unit->chiller_address = \ |
573 unit->alias = unit->air_address = unit->beer_address = unit->beer_address2 = unit->chiller_address = \ |
575 unit->heater_address = unit->cooler_address = unit->fan_address = unit->door_address = \ |
574 unit->heater_address = unit->cooler_address = unit->fan_address = unit->door_address = \ |
576 unit->light_address = unit->psu_address = unit->profile_uuid = unit->profile_name = NULL; |
575 unit->light_address = unit->psu_address = unit->profile_uuid = unit->profile_name = NULL; |
577 unit->volume = unit->prof_peak_abs = unit->prof_peak_rel = 0.0; |
576 unit->prof_peak_abs = unit->prof_peak_rel = 0.0; |
578 unit->air_temperature = unit->beer_temperature = unit->chiller_temperature = unit->beer_set_lo = unit->beer_set_hi = \ |
577 unit->air_temperature = unit->beer_temperature = unit->chiller_temperature = unit->beer_set_lo = unit->beer_set_hi = \ |
579 unit->fridge_set_lo = unit->fridge_set_hi = unit->profile_inittemp_lo = unit->profile_inittemp_hi = 20.0; |
578 unit->fridge_set_lo = unit->fridge_set_hi = unit->profile_inittemp_lo = unit->profile_inittemp_hi = 20.0; |
580 unit->air_state = unit->beer_state = unit->chiller_state = DEVPRESENT_NO; // missing |
579 unit->air_state = unit->beer_state = unit->chiller_state = DEVPRESENT_NO; // missing |
581 unit->heater_state = unit->cooler_state = unit->fan_state = unit->door_state = \ |
580 unit->heater_state = unit->cooler_state = unit->fan_state = unit->door_state = \ |
582 unit->light_state = unit->light_timer = unit->psu_state = unit->mode = unit->prof_state = unit->stage = 0; |
581 unit->light_state = unit->light_timer = unit->psu_state = unit->mode = unit->prof_state = unit->stage = 0; |
614 unit->product_name = (char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); |
613 unit->product_name = (char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); |
615 } |
614 } |
616 if ((!xmlStrcmp(cur->name, (const xmlChar *)"ALIAS"))) { |
615 if ((!xmlStrcmp(cur->name, (const xmlChar *)"ALIAS"))) { |
617 unit->alias = (char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); |
616 unit->alias = (char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); |
618 } |
617 } |
619 if ((!xmlStrcmp(cur->name, (const xmlChar *)"VOLUME"))) { |
|
620 key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); |
|
621 if (sscanf((const char *)key, "%f", &val) == 1) |
|
622 unit->volume = val; |
|
623 xmlFree(key); |
|
624 } |
|
625 if ((!xmlStrcmp(cur->name, (const xmlChar *)"AIR_ADDRESS"))) { |
618 if ((!xmlStrcmp(cur->name, (const xmlChar *)"AIR_ADDRESS"))) { |
626 unit->air_address = (char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); |
619 unit->air_address = (char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); |
627 } |
620 } |
628 if ((!xmlStrcmp(cur->name, (const xmlChar *)"AIR_STATE"))) { |
621 if ((!xmlStrcmp(cur->name, (const xmlChar *)"AIR_STATE"))) { |
629 key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); |
622 key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); |