Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
eyesis4pi-393-gui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Elphel
eyesis4pi-393-gui
Commits
358d2e79
Commit
358d2e79
authored
Apr 12, 2017
by
Oleg Dzhimiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
turned off multi curl requests
parent
33eaf7e5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
10 deletions
+41
-10
eyesis4pi_control.php
eyesis4pi_control.php
+41
-10
No files found.
eyesis4pi_control.php
View file @
358d2e79
...
...
@@ -157,12 +157,22 @@ if ($test) {
if
(
$set_parameter
)
{
/*
$rqs = array();
foreach($cams as $cam){
$rqstr = "http://{$cam['ip']}/parsedit.php?immediate&sensor_port={$cam['channel']}&$pname=$pvalue";
array_push($rqs,$rqstr);
}
$res_xmls
=
curl_multi_finish
(
curl_multi_start
(
$rqs
),
false
);
$res_xmls = curl_multi_finish(curl_multi_start($rqs),false);
*/
$res_xmls
=
array
();
for
(
$i
=
0
;
$i
<
count
(
$cams
);
$i
++
){
$rqstr
=
"http://
{
$cams
[
$i
][
'ip'
]
}
/parsedit.php?immediate&sensor_port=
{
$cams
[
$i
][
'channel'
]
}
&
$pname
=
$pvalue
"
;
$content
=
file_get_contents
(
$rqstr
);
array_push
(
$res_xmls
,
$content
);
}
$res_xml
=
implode
(
""
,
$res_xmls
);
$res_xml
=
"<?xml version='1.0'?>
\n
<Document>
\n
$res_xml
</Document>
\n
"
;
...
...
@@ -175,12 +185,22 @@ if ($set_parameter) {
if
(
$get_parameter
)
{
/*
$rqs = array();
foreach($cams as $cam){
$rqstr = "http://{$cam['ip']}/parsedit.php?immediate&sensor_port={$cam['channel']}&$pname";
array_push($rqs,$rqstr);
}
$res_xmls = curl_multi_finish(curl_multi_start($rqs),false);
*/
$res_xmls
=
array
();
for
(
$i
=
0
;
$i
<
count
(
$cams
);
$i
++
){
$rqstr
=
"http://
{
$cams
[
$i
][
'ip'
]
}
/parsedit.php?immediate&sensor_port=
{
$cams
[
$i
][
'channel'
]
}
&
$pname
"
;
$content
=
file_get_contents
(
$rqstr
);
array_push
(
$res_xmls
,
$content
);
}
$res_xml
=
implode
(
""
,
$res_xmls
);
$res_xml
=
"<?xml version='1.0'?>
\n
<Document>
\n
$res_xml
</Document>
\n
"
;
...
...
@@ -193,12 +213,23 @@ if ($get_parameter) {
}
if
(
$get_temperature
)
{
/*
$rqs = array();
foreach($unique_cams as $cam){
$rqstr = "http://{$cam['ip']}/hwmon.php?cmd=t";
array_push($rqs,$rqstr);
}
$res_xmls
=
curl_multi_finish
(
curl_multi_start
(
$rqs
),
false
);
$res_xmls = curl_multi_finish(curl_multi_start($rqs),false);
*/
$res_xmls
=
array
();
for
(
$i
=
0
;
$i
<
count
(
$unique_cams
);
$i
++
){
$rqstr
=
"http://
{
$unique_cams
[
$i
][
'ip'
]
}
/hwmon.php?cmd=t"
;
$content
=
file_get_contents
(
$rqstr
);
array_push
(
$res_xmls
,
$content
);
}
$res_xml
=
"<result>"
.
implode
(
"</result><result>"
,
$res_xmls
)
.
"</result>"
;
$res_xml
=
"<?xml version='1.0'?>
\n
<Document>
\n
$res_xml
</Document>
\n
"
;
...
...
@@ -215,28 +246,28 @@ if ($system_reboot){
if
(
$rec_reset
){
for
(
$i
=
0
;
$i
<
count
(
$unique_cams
);
$i
++
)
{
f
ile_get_contents
(
"http://
{
$unique_cams
[
$i
][
'ip'
]
}
/eyesis4pi_interface.php?cmd=reset_camogm_fastrec"
,
'r'
);
f
open
(
"http://
{
$unique_cams
[
$i
][
'ip'
]
}
/eyesis4pi_interface.php?cmd=reset_camogm_fastrec"
,
'r'
);
}
print
(
"ok"
);
}
if
(
$rec_refresh
){
for
(
$i
=
0
;
$i
<
count
(
$unique_cams
);
$i
++
)
{
f
ile_get_contents
(
"http://
{
$unique_cams
[
$i
][
'ip'
]
}
/eyesis4pi_interface.php?cmd=refresh_camogm_fastrec"
,
'r'
);
f
open
(
"http://
{
$unique_cams
[
$i
][
'ip'
]
}
/eyesis4pi_interface.php?cmd=refresh_camogm_fastrec"
,
'r'
);
}
print
(
"ok"
);
}
if
(
$internal_ssds
){
for
(
$i
=
0
;
$i
<
count
(
$unique_cams
);
$i
++
)
{
f
ile_get_contents
(
"http://
{
$unique_cams
[
$i
][
'ip'
]
}
/eyesis4pi_interface.php?cmd=internal_drive"
,
'r'
);
f
open
(
"http://
{
$unique_cams
[
$i
][
'ip'
]
}
/eyesis4pi_interface.php?cmd=internal_drive"
,
'r'
);
}
print
(
"ok"
);
}
if
(
$external_ssds
){
for
(
$i
=
0
;
$i
<
count
(
$unique_cams
);
$i
++
)
{
f
ile_get_contents
(
"http://
{
$unique_cams
[
$i
][
'ip'
]
}
/eyesis4pi_interface.php?cmd=external_drive"
,
'r'
);
f
open
(
"http://
{
$unique_cams
[
$i
][
'ip'
]
}
/eyesis4pi_interface.php?cmd=external_drive"
,
'r'
);
}
print
(
"ok"
);
}
...
...
@@ -276,7 +307,7 @@ function start_camogm($ip){
if
(
$camogm_log_en
){
for
(
$i
=
0
;
$i
<
count
(
$unique_cams
);
$i
++
)
{
f
ile_get_contents
(
"http://
{
$unique_cams
[
$i
][
'ip'
]
}
/eyesis4pi_interface.php?cmd=camogm_debug&debug=/tmp/camogm.log&debuglev=
$debuglev
"
,
'r'
);
f
open
(
"http://
{
$unique_cams
[
$i
][
'ip'
]
}
/eyesis4pi_interface.php?cmd=camogm_debug&debug=/tmp/camogm.log&debuglev=
$debuglev
"
,
'r'
);
}
print
(
"ok"
);
}
...
...
@@ -352,7 +383,7 @@ if ($unmount) {
}
if
(
$get_free_space
)
{
/*
$rqs = array();
foreach($unique_cams as $cam){
$rqstr = "http://{$cam['ip']}/eyesis4pi_interface.php?cmd=free_space";
...
...
@@ -360,14 +391,14 @@ if ($get_free_space) {
}
$hnd = curl_multi_start($rqs);
$res_xmls = curl_multi_finish($hnd,false);
*/
/*
$res_xmls
=
array
();
foreach
(
$unique_cams
as
$cam
){
$rqstr
=
file_get_contents
(
"http://
{
$cam
[
'ip'
]
}
/eyesis4pi_interface.php?cmd=free_space"
);
array_push
(
$res_xmls
,
$rqstr
);
}
*/
$res_xml
=
implode
(
""
,
$res_xmls
);
$res_xml
=
"<?xml version='1.0'?>
\n
<Document>
\n
$res_xml
</Document>
\n
"
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment