Exemple #1
0
//}
// Special for me
$waterIn_sid = 3;
// 3
$waterOut_sid = 1;
// 1
$waterOut = lib_getLatestValue($waterOut_sid);
if ($waterOut == SXN_NO_VALUE) {
    lib_log("CSH", "No value for WaterOut\n");
    lib_log("CSH", "-----End-----\n");
    //return;
}
$waterIn = lib_getLatestValue($waterIn_sid);
if ($waterIn == SXN_NO_VALUE) {
    lib_log("CSH", "No value for WaterIn\n");
    lib_log("CSH", "-----End-----\n");
    //return;
}
$tdelta = $waterOut - $waterIn;
echo "{$waterOut} {$waterIn} delta={$tdelta}<br>";
system("ls *.ip > ipList.work");
lib_listIpFiles(1, "ipList.work");
lib_readDataTypes();
$g_dbM1->selectAllFromTable(SXN_ADMIN_TABLE_STREAMS, "");
//$numRes = $g_dbM1->retrieveNumberOfResults();
//echo("<br>Number of SIDs: $numRes<br>");
echo "<table border=\"1\">";
echo "<tr>";
echo "<td>SID</td> ";
echo "<td>TYPE</td>";
echo "<td>UNIT</td>";
Exemple #2
0
 function doIt()
 {
     $sid_lat = 801;
     $sid_lon = 802;
     $sid_battery_status = 803;
     $latitude = lib_getLatestValue($sid_lat);
     if ($latitude == SXN_NO_VALUE) {
         lib_log("CSH", "No value for latitud t\n");
         lib_log("CSH", "-----End-----\n");
     }
     $longitude = lib_getLatestValue($sid_lon);
     if ($longitude == SXN_NO_VALUE) {
         lib_log("CSH", "No value for longitude t\n");
         lib_log("CSH", "-----End-----\n");
     }
     $battery_status = lib_getLatestValue($sid_battery_status);
     if ($battery_status == SXN_NO_VALUE) {
         lib_log("CSH", "No value for battery status t\n");
         lib_log("CSH", "-----End-----\n");
     }
     echo "Mapping ";
 }