76 * @param string $_POST['UUID'] The simulator UUID |
76 * @param string $_POST['UUID'] The simulator UUID |
77 * @param string $_POST['Name'] The simulator name |
77 * @param string $_POST['Name'] The simulator name |
78 * @param string $_POST['VolumeAir'] The simulator Air volume |
78 * @param string $_POST['VolumeAir'] The simulator Air volume |
79 * @param string $_POST['VolumeBeer'] The simulator Beer volume |
79 * @param string $_POST['VolumeBeer'] The simulator Beer volume |
80 * @param string $_POST['RoomTemperature'] The simulator room temp |
80 * @param string $_POST['RoomTemperature'] The simulator room temp |
|
81 * @param string $_POST['RoomHumidity'] The simulator room humidity |
81 * @param string $_POST['CoolerTemp'] The simulator cold temp |
82 * @param string $_POST['CoolerTemp'] The simulator cold temp |
82 * @param string $_POST['CoolerTime'] The simulator time to reach this |
83 * @param string $_POST['CoolerTime'] The simulator time to reach this |
83 * @param string $_POST['CoolerSize'] The simulator plate size |
84 * @param string $_POST['CoolerSize'] The simulator plate size |
84 * @param string $_POST['HeaterTemp'] The simulator heater temp |
85 * @param string $_POST['HeaterTemp'] The simulator heater temp |
85 * @param string $_POST['HeaterTime'] The simulator time to reach this |
86 * @param string $_POST['HeaterTime'] The simulator time to reach this |
99 $cmd = array("SIMULATOR PUT ".$_POST['UUID']); |
100 $cmd = array("SIMULATOR PUT ".$_POST['UUID']); |
100 $cmd[] = "NAME,".$_POST['Name']; |
101 $cmd[] = "NAME,".$_POST['Name']; |
101 $cmd[] = "VOLUME_AIR,".$_POST['VolumeAir']; |
102 $cmd[] = "VOLUME_AIR,".$_POST['VolumeAir']; |
102 $cmd[] = "VOLUME_BEER,".$_POST['VolumeBeer']; |
103 $cmd[] = "VOLUME_BEER,".$_POST['VolumeBeer']; |
103 $cmd[] = "ROOM_TEMPERATURE,".$_POST['RoomTemperature']; |
104 $cmd[] = "ROOM_TEMPERATURE,".$_POST['RoomTemperature']; |
|
105 $cmd[] = "ROOM_HUMIDITY,".$_POST['RoomHumidity']; |
104 $cmd[] = "COOLER_TEMP,".$_POST['CoolerTemp']; |
106 $cmd[] = "COOLER_TEMP,".$_POST['CoolerTemp']; |
105 $cmd[] = "COOLER_TIME,".$_POST['CoolerTime']; |
107 $cmd[] = "COOLER_TIME,".$_POST['CoolerTime']; |
106 $cmd[] = "COOLER_SIZE,".$_POST['CoolerSize']; |
108 $cmd[] = "COOLER_SIZE,".$_POST['CoolerSize']; |
107 $cmd[] = "HEATER_TEMP,".$_POST['HeaterTemp']; |
109 $cmd[] = "HEATER_TEMP,".$_POST['HeaterTemp']; |
108 $cmd[] = "HEATER_TIME,".$_POST['HeaterTime']; |
110 $cmd[] = "HEATER_TIME,".$_POST['HeaterTime']; |
115 unset($_POST['UUID']); |
117 unset($_POST['UUID']); |
116 unset($_POST['Name']); |
118 unset($_POST['Name']); |
117 unset($_POST['VolumeAir']); |
119 unset($_POST['VolumeAir']); |
118 unset($_POST['VolumeBeer']); |
120 unset($_POST['VolumeBeer']); |
119 unset($_POST['RoomTemperature']); |
121 unset($_POST['RoomTemperature']); |
|
122 unset($_POST['RoomHumidity']); |
120 unset($_POST['CoolerTemp']); |
123 unset($_POST['CoolerTemp']); |
121 unset($_POST['CoolerTime']); |
124 unset($_POST['CoolerTime']); |
122 unset($_POST['CoolerSize']); |
125 unset($_POST['CoolerSize']); |
123 unset($_POST['HeaterTemp']); |
126 unset($_POST['HeaterTemp']); |
124 unset($_POST['HeaterTime']); |
127 unset($_POST['HeaterTime']); |
137 * @param string $_POST['UUID'] Unique record UUID |
140 * @param string $_POST['UUID'] Unique record UUID |
138 * @param string $_POST['Name'] The simulator name |
141 * @param string $_POST['Name'] The simulator name |
139 * @param string $_POST['VolumeAir'] The simulator Air volume |
142 * @param string $_POST['VolumeAir'] The simulator Air volume |
140 * @param string $_POST['VolumeBeer'] The simulator Beer volume |
143 * @param string $_POST['VolumeBeer'] The simulator Beer volume |
141 * @param string $_POST['RoomTemperature'] The simulator room temp |
144 * @param string $_POST['RoomTemperature'] The simulator room temp |
|
145 * @param string $_POST['RoomHumidity'] The simulator room humidity |
142 * @param string $_POST['CoolerTemp'] The simulator cold temp |
146 * @param string $_POST['CoolerTemp'] The simulator cold temp |
143 * @param string $_POST['CoolerTime'] The simulator time to reach this |
147 * @param string $_POST['CoolerTime'] The simulator time to reach this |
144 * @param string $_POST['CoolerSize'] The simulator plate size |
148 * @param string $_POST['CoolerSize'] The simulator plate size |
145 * @param string $_POST['HeaterTemp'] The simulator heater temp |
149 * @param string $_POST['HeaterTemp'] The simulator heater temp |
146 * @param string $_POST['HeaterTime'] The simulator time to reach this |
150 * @param string $_POST['HeaterTime'] The simulator time to reach this |
158 function test_thedata() { |
162 function test_thedata() { |
159 |
163 |
160 global $arr; |
164 global $arr; |
161 |
165 |
162 if (isset($_POST['UUID']) && isset($_POST['Name']) && isset($_POST['VolumeAir']) && isset($_POST['VolumeBeer']) && |
166 if (isset($_POST['UUID']) && isset($_POST['Name']) && isset($_POST['VolumeAir']) && isset($_POST['VolumeBeer']) && |
163 isset($_POST['RoomTemperature']) && isset($_POST['CoolerTemp']) && isset($_POST['CoolerTime']) && |
167 isset($_POST['RoomTemperature']) && isset($_POST['RoomHumidity']) && isset($_POST['CoolerTemp']) && isset($_POST['CoolerTime']) && |
164 isset($_POST['CoolerSize']) && isset($_POST['HeaterTemp']) && isset($_POST['HeaterTime']) && isset($_POST['HeaterSize']) && |
168 isset($_POST['CoolerSize']) && isset($_POST['HeaterTemp']) && isset($_POST['HeaterTime']) && isset($_POST['HeaterSize']) && |
165 isset($_POST['FrigoIsolation']) && isset($_POST['key']) && isset($_POST['command'])) { |
169 isset($_POST['FrigoIsolation']) && isset($_POST['key']) && isset($_POST['command'])) { |
166 |
170 |
167 if ($_POST['key'] == 'Cancel') |
171 if ($_POST['key'] == 'Cancel') |
168 return 99; |
172 return 99; |
278 } |
282 } |
279 if ($f[0] == "ROOM_TEMPERATURE") { |
283 if ($f[0] == "ROOM_TEMPERATURE") { |
280 $outstr .= ' <tr class="editor">'.PHP_EOL; |
284 $outstr .= ' <tr class="editor">'.PHP_EOL; |
281 $outstr .= ' <td class="editname">Room Temperature</td>'.PHP_EOL; |
285 $outstr .= ' <td class="editname">Room Temperature</td>'.PHP_EOL; |
282 $outstr .= ' <td class="editfield"><input type="text" name="RoomTemperature" size="5" value="'.$f[1].'"></td>'.PHP_EOL; |
286 $outstr .= ' <td class="editfield"><input type="text" name="RoomTemperature" size="5" value="'.$f[1].'"></td>'.PHP_EOL; |
|
287 $outstr .= ' </tr>'.PHP_EOL; |
|
288 } |
|
289 if ($f[0] == "ROOM_HUMIDITY") { |
|
290 $outstr .= ' <tr class="editor">'.PHP_EOL; |
|
291 $outstr .= ' <td class="editname">Room Humidity</td>'.PHP_EOL; |
|
292 $outstr .= ' <td class="editfield"><input type="text" name="RoomHumidity" size="5" value="'.$f[1].'"></td>'.PHP_EOL; |
283 $outstr .= ' </tr>'.PHP_EOL; |
293 $outstr .= ' </tr>'.PHP_EOL; |
284 } |
294 } |
285 if ($f[0] == "COOLER_TEMP") { |
295 if ($f[0] == "COOLER_TEMP") { |
286 $outstr .= ' <tr class="editor">'.PHP_EOL; |
296 $outstr .= ' <tr class="editor">'.PHP_EOL; |
287 $outstr .= ' <td class="editname">Cooler Temperature</td>'.PHP_EOL; |
297 $outstr .= ' <td class="editname">Cooler Temperature</td>'.PHP_EOL; |
415 $outstr .= '<input type="hidden" value="add" name="command">'; |
425 $outstr .= '<input type="hidden" value="add" name="command">'; |
416 $outstr .= '<input type="hidden" value="00000000-0000-0000-0000-000000000000" name="UUID">'; |
426 $outstr .= '<input type="hidden" value="00000000-0000-0000-0000-000000000000" name="UUID">'; |
417 $outstr .= '<input type="hidden" value="150" name="VolumeAir">'; |
427 $outstr .= '<input type="hidden" value="150" name="VolumeAir">'; |
418 $outstr .= '<input type="hidden" value="50" name="VolumeBeer">'; |
428 $outstr .= '<input type="hidden" value="50" name="VolumeBeer">'; |
419 $outstr .= '<input type="hidden" value="20.0" name="RoomTemperature">'; |
429 $outstr .= '<input type="hidden" value="20.0" name="RoomTemperature">'; |
|
430 $outstr .= '<input type="hidden" value="48.5" name="RoomHumidity">'; |
420 $outstr .= '<input type="hidden" value="-3.0" name="CoolerTemp">'; |
431 $outstr .= '<input type="hidden" value="-3.0" name="CoolerTemp">'; |
421 $outstr .= '<input type="hidden" value="720" name="CoolerTime">'; |
432 $outstr .= '<input type="hidden" value="720" name="CoolerTime">'; |
422 $outstr .= '<input type="hidden" value="0.8" name="CoolerSize">'; |
433 $outstr .= '<input type="hidden" value="0.8" name="CoolerSize">'; |
423 $outstr .= '<input type="hidden" value="150" name="HeaterTemp">'; |
434 $outstr .= '<input type="hidden" value="150" name="HeaterTemp">'; |
424 $outstr .= '<input type="hidden" value="12" name="HeaterTime">'; |
435 $outstr .= '<input type="hidden" value="12" name="HeaterTime">'; |