$QS="INSERT INTO `lrf_detection_profiles`(`aux_id`,`profile_id`,`master`,`order`,`offset`,`delta`,`flip`,`width`,`sst`,`sun`,`gp`,`spikes`) VALUES({$SNID},{$PID},1,{$ORD},{$OFF},{$DEL},{$FLI},{$WIZ},{$SST},{$SUN},16,1 ) ON CONFLICT(`aux_id`,`lrf_id`,`master`) DO UPDATE SET `order`={$ORD},`offset`={$OFF},`delta`={$DEL},`flip`={$FLI},`width`={$WIZ},`sst`={$SST},`sun`={$SUN}";
$ORD=intval($_POST['MORD']);
$OFF=intval($_POST['MOFF']);
$SST=intval($_POST['MSST']);
$FLI=intval($_POST['MFLI']);
$SUN=intval($_POST['MSUN']);
$WIZ=intval($_POST['MWIZ']);
$DEL=intval($_POST['MDEL']);
$QS="INSERT INTO `lrf_detection_profiles`(`aux_id`,`profile_id`,`master`,`order`,`offset`,`delta`,`flip`,`width`,`sst`,`sun`,`gp`,`spikes`) VALUES({$SNID},{$PID},1,{$ORD},{$OFF},{$DEL},{$FLI},{$WIZ},{$SST},{$SUN},16,1 ) ON CONFLICT(`aux_id`,`lrf_id`,`master`) DO UPDATE SET `order`={$ORD},`offset`={$OFF},`delta`={$DEL},`flip`={$FLI},`width`={$WIZ},`sst`={$SST},`sun`={$SUN}";
$DATABASE->Query($QS,false);
$ORD=intval($_POST['SORD']);
$OFF=intval($_POST['SOFF']);
$SST=intval($_POST['SSST']);
$FLI=intval($_POST['SFLI']);
$SUN=intval($_POST['SSUN']);
$WIZ=intval($_POST['SWIZ']);
$DEL=intval($_POST['SDEL']);
$QS="INSERT INTO `lrf_detection_profiles`(`aux_id`,`profile_id`,`master`,`order`,`offset`,`delta`,`flip`,`width`,`sst`,`sun`,`gp`,`spikes`) VALUES({$SNID},{$PID},0,{$ORD},{$OFF},{$DEL},{$FLI},{$WIZ},{$SST},{$SUN},16,1 ) ON CONFLICT(`aux_id`,`lrf_id`,`master`) DO UPDATE SET `order`={$ORD},`offset`={$OFF},`delta`={$DEL},`flip`={$FLI},`width`={$WIZ},`sst`={$SST},`sun`={$SUN}";
$DATABASE->Query($QS,false);
//Parameter Send to device
$RBASE=newSQLite_DB('/dev/shm/argus/mem_db.db');
$QS="INSERT INTO `nodes_qcq`(`node_id`,`cmd`,`status`,`parameter`) VALUES({$CN['id']},131,0,'')";
$RBASE->Query($QS,false);
$QS='';
$Data['success']=true;
break;
};
case20:{
@ -190,6 +200,7 @@
$QS="INSERT INTO `nodes_qcq`(`node_id`,`cmd`,`status`,`parameter`) VALUES({$CN['id']},130,0,'')";
$RBASE->Query($QS,false);
$QS='';
$Data['success']=true;
break;
};
case21:{
@ -200,6 +211,7 @@
$QS="INSERT INTO `nodes_qcq`(`node_id`,`cmd`,`status`,`parameter`) VALUES({$CN['id']},130,0,'')";
$RBASE->Query($QS,false);
$QS='';
$Data['success']=true;
break;
};
case22:{
@ -210,6 +222,7 @@
$QS="INSERT INTO `nodes_qcq`(`node_id`,`cmd`,`status`,`parameter`) VALUES({$CN['id']},130,0,'')";
$RBASE->Query($QS,false);
$QS='';
$Data['success']=true;
break;
};
case23:{
@ -220,6 +233,7 @@
$QS="INSERT INTO `nodes_qcq`(`node_id`,`cmd`,`status`,`parameter`) VALUES({$CN['id']},130,0,'')";
$RBASE->Query($QS,false);
$QS='';
$Data['success']=true;
break;
};
case24:{
@ -228,15 +242,44 @@
$QS="INSERT INTO `nodes_qcq`(`node_id`,`cmd`,`status`,`parameter`) VALUES({$CN['id']},1,0,'')";
$RBASE->Query($QS,false);
$QS='';
$Data['success']=true;
break;
};
case25:{
// Create Ack Masking
// Clear ACK Masking
// Select Current Events Targets
// Create Polygone
// Update Device masks
// Set ACK masking Shape
$OPCODE=intval($_POST['OPCODE']);
$QS="UPDATE `lrf_sensors` SET `ack_mask_type`={$OPCODE} WHERE `id`={$SNID}";
$Data['success']=true;
break;
};
case26:{
// Set ACK masking Size
$OPCODE=intval($_POST['OPCODE']);
$SIZES=array(10,20,30,40,50,60,70);
$VAL=$SIZES[$OPCODE]/1;
$QS="UPDATE `lrf_sensors` SET `ack_mask_size`={$VAL} WHERE `id`={$SNID}";
$Data['success']=true;
break;
};
case27:{
// Enable Relay Mode
$OPCODE=intval($_POST['OPCODE']);
$QS="UPDATE `lrf_sensors` SET `dc_auto`={$OPCODE} WHERE `id`={$SNID}";
$Data['success']=true;
break;
};
case28:{
// Set Relay Mode
$OPCODE=intval($_POST['OPCODE']);
$QS="UPDATE `lrf_sensors` SET `dc_no`={$OPCODE} WHERE `id`={$SNID}";
$Data['success']=true;
break;
};
case29:{
// Set Relay Delay
$OPCODE=intval($_POST['OPCODE']);
$QS="UPDATE `lrf_sensors` SET `dc_window`={$OPCODE} WHERE `id`={$SNID}";