Difference between revisions of "Parsedit.php"

From ElphelWiki
Jump to: navigation, search
 
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
parsedit.php is designed to provide access to the camera acquisition related parameters through the web browser. It is easy to create customized parameter view/edit form with specially configured URL. Arguments included in the URL instruct parsedit.php:
+
==<font color="blue">Description</font>==
 +
'''parsedit.php''' provides access to read/change the camera/sensor acquisition related parameters. The list of the parameters to be accessed is defined and can be edited in the URL.
 +
Operation modes:
 +
* through a web interface (HTTP POST requests) - group access to parameters through a form, debug of the parameter application, view check image sequences
 +
* HTTP GET request - access parameters with a single request that returns XML.
 +
 
 +
10393 has 4 sensor ports - parameters for each port are individual and read separately but can be applied at the same time using a broadcast mask.
 +
 
 +
==<font color="blue">Details</font>==
 +
It is easy to create customized parameter view/edit form with specially configured URL. Arguments included in the URL instruct parsedit.php:
 
* optional page title
 
* optional page title
* optional image preview and it size
+
* optional image preview and its size
 
* optional "test" checkbox (and the default state of this checkbox). When enabled the camera compressor will start before the parameter change sequence and stop after the sequence is over so the acquired images will not be overwritten in the circular buffer and could be analyzed
 
* optional "test" checkbox (and the default state of this checkbox). When enabled the camera compressor will start before the parameter change sequence and stop after the sequence is over so the acquired images will not be overwritten in the circular buffer and could be analyzed
 
* optional "showseq" checkbox (and its state) that enables debug information output during application of the sequence to the camera and the sensor.
 
* optional "showseq" checkbox (and its state) that enables debug information output during application of the sequence to the camera and the sensor.
 
* optional annotated image sequence (useful to see the latencies of the different parameter changes)
 
* optional annotated image sequence (useful to see the latencies of the different parameter changes)
 
* what parameters are to be included in the page and what to do with them:
 
* what parameters are to be included in the page and what to do with them:
** show them in readonly mode
+
** show them in read only mode
 
** include the current parameter value as the default in the input field(s)
 
** include the current parameter value as the default in the input field(s)
 
** specify the new parameter value as the default in the input field(s)
 
** specify the new parameter value as the default in the input field(s)
Line 14: Line 23:
  
 
When you open the parsedit.php with no parameters it shows some usage examples - you may view them why hovering mouse pointer over the links or copy those links and edit them to match your particular application.
 
When you open the parsedit.php with no parameters it shows some usage examples - you may view them why hovering mouse pointer over the links or copy those links and edit them to match your particular application.
 
  
 
All URL parameters belong to one of the two groups - special directives and the actual camera parameters. Here are the directives:
 
All URL parameters belong to one of the two groups - special directives and the actual camera parameters. Here are the directives:
Line 20: Line 28:
 
* '''title='''''some+page+title'' - specify page title (parsing escaped special characters, "+" may be used instead of spaces)
 
* '''title='''''some+page+title'' - specify page title (parsing escaped special characters, "+" may be used instead of spaces)
 
* '''shownumbers''' - if present, each parameter number is shown in addition to the symbolic name
 
* '''shownumbers''' - if present, each parameter number is shown in addition to the symbolic name
* '''embed'''or '''embed=0.1''' - include preview image, with optional image size relative to page width (10% in the example)
+
* '''embed''' or '''embed=0.1''' - include preview image, with optional image size relative to page width (10% in the example)
 
* '''test''' ('''test=0''' or  '''test=1''') include check box for the test mode, set the default state to off (0) or on (1)
 
* '''test''' ('''test=0''' or  '''test=1''') include check box for the test mode, set the default state to off (0) or on (1)
 
* '''showseq''' ('''showseq=0''' or  '''showseq=1''') include check box for the debug (show sequence) mode, set the default state to off (0) or on (1)
 
* '''showseq''' ('''showseq=0''' or  '''showseq=1''') include check box for the debug (show sequence) mode, set the default state to off (0) or on (1)
 
* '''images''' ('''images='''''numer_of_images:number_per_row:image_scale'') - normally this directive is used from inside the generated page, but it is possible to provide it manually also. In that case it will open the page with the table with the last acquired images and annotate them using the Exif data.
 
* '''images''' ('''images='''''numer_of_images:number_per_row:image_scale'') - normally this directive is used from inside the generated page, but it is possible to provide it manually also. In that case it will open the page with the table with the last acquired images and annotate them using the Exif data.
 +
* '''sensor_port=''' - 0..3 - access parameters of an individual camera port.
 +
 +
The rest of the parsedit.php URL parameters deal with the actual camera parameters.
 +
 +
==<font color="blue">Examples</font>==
 +
[[File:Autocampars screenshot.png|thumb|600px|Fig.1 autocampars.php web interface]]
 +
[[File:Parsedit screenshot 1.png|thumb|600px|Fig.2 parsedit.php form]]
 +
====Parameter groups in autocampars.php====
 +
* http://192.168.0.9/autocampars.php. [[Autocampars_393|More info]] about autocampars.php
 +
* The top table (Fig.1) lists groups of parameters - select the ones of interest then follow ''View/Edit current'' link which jumps to the parsedit.php interface.
 +
* Edit the URL address.
 +
* Parameters form table columns (Fig.2):
 +
** mouse over row for a tooltip
 +
** '''current value'''
 +
** '''new value''' can be changed in dec or hex
 +
** '''Program ahead''' - the parameter will be set in '''n''' frames from the current frame.
 +
** '''Broadcast mask''':
 +
0x1 - port 0 bit
 +
0x2 - port 1 bit
 +
0x4 - port 2 bit
 +
0x8 - port 3 bit
 +
 +
====Parameters in parsedit.php links====
 +
* http://192.168.0.9/parsedit.php
 +
* Follow the [http://192.168.0.9/parsedit.php?sensor_port=0&embed=0.1&title=Autoexposure+controls&COMPRESSOR_RUN=2&DAEMON_EN=1&AUTOEXP_ON=1&AEXP_FRACPIX=0xff80&AEXP_LEVEL=0xf800&AE_PERIOD=4&AE_THRESH=500&THIS_FRAME=@&NEXT_AE_FRAME=@&VEXPOS&EXPOS&HIST_DIM_01=0x0a000a00&HIST_DIM_23=0x0a000a00&EXP_AHEAD=3&HISTWND_RWIDTH&HISTWND_RHEIGHT&HISTWND_RLEFT&HISTWND_RTOP&HISTWND_WIDTH=@&HISTWND_HEIGHT=@&HISTWND_LEFT=@&HISTWND_TOP=@&AE_INTEGERR=@ Controls related to autoexposure] link (Fig.2)
 +
* Edit the URL address
 +
 +
====HTTP GET request====
 +
=====read=====
 +
* read image format parameters (COLOR & AUTOEXP_ON):
 +
http://192.168.0.9/parsedit.php?immediate&sensor_port=0&COLOR&AUTOEXP_ON
 +
{|
 +
| [[File:Parsedit screenshot 2.png|thumb|Fig.3 HTTP GET response]]
 +
|}
 +
=====change=====
 +
* change image format (COLOR) to JP4, read AUTOEXP_ON
 +
http://192.168.0.9/parsedit.php?immediate&sensor_port=0&COLOR=5&AUTOEXP_ON
 +
* the response will have an old value of the parameter - read again
 +
 +
=====change multiple ports=====
 +
* change image format (COLOR) to JP4 for ports 0 & 2:
 +
http://192.168.0.9/parsedit.php?immediate&sensor_port=0&COLOR=5&*COLOR=0x5
 +
* change image format (COLOR) to JP4 for all ports:
 +
http://192.168.0.9/parsedit.php?immediate&sensor_port=0&COLOR=5&*COLOR=0xf
 +
 +
====Program FPS====
 +
Read [[Trigger 393]]
 +
 +
[[Category:353]]
 +
[[Category:393]]

Latest revision as of 10:52, 21 December 2016

Description

parsedit.php provides access to read/change the camera/sensor acquisition related parameters. The list of the parameters to be accessed is defined and can be edited in the URL. Operation modes:

  • through a web interface (HTTP POST requests) - group access to parameters through a form, debug of the parameter application, view check image sequences
  • HTTP GET request - access parameters with a single request that returns XML.

10393 has 4 sensor ports - parameters for each port are individual and read separately but can be applied at the same time using a broadcast mask.

Details

It is easy to create customized parameter view/edit form with specially configured URL. Arguments included in the URL instruct parsedit.php:

  • optional page title
  • optional image preview and its size
  • optional "test" checkbox (and the default state of this checkbox). When enabled the camera compressor will start before the parameter change sequence and stop after the sequence is over so the acquired images will not be overwritten in the circular buffer and could be analyzed
  • optional "showseq" checkbox (and its state) that enables debug information output during application of the sequence to the camera and the sensor.
  • optional annotated image sequence (useful to see the latencies of the different parameter changes)
  • what parameters are to be included in the page and what to do with them:
    • show them in read only mode
    • include the current parameter value as the default in the input field(s)
    • specify the new parameter value as the default in the input field(s)
    • specify when (to what frame number in the future) the parameter change should be applied. It is possible to schedule several changes to the same parameter.

Parameters are specified in the URL, starting with the "?" before the first parameter, separated by "&". Each parameter may be just a name or a name=value pair. When the page opens, it includes multiple input fields and several control buttons, pressing button "apply" submits the form to the same parsedit.php in POST mode - this is when the new parameter values are applied to the camera. Most controls and parameter names have "tooltips" - short help messages that open when you hold mouse pointer over those page elements.

When you open the parsedit.php with no parameters it shows some usage examples - you may view them why hovering mouse pointer over the links or copy those links and edit them to match your particular application.

All URL parameters belong to one of the two groups - special directives and the actual camera parameters. Here are the directives:

  • title=some+page+title - specify page title (parsing escaped special characters, "+" may be used instead of spaces)
  • shownumbers - if present, each parameter number is shown in addition to the symbolic name
  • embed or embed=0.1 - include preview image, with optional image size relative to page width (10% in the example)
  • test (test=0 or test=1) include check box for the test mode, set the default state to off (0) or on (1)
  • showseq (showseq=0 or showseq=1) include check box for the debug (show sequence) mode, set the default state to off (0) or on (1)
  • images (images=numer_of_images:number_per_row:image_scale) - normally this directive is used from inside the generated page, but it is possible to provide it manually also. In that case it will open the page with the table with the last acquired images and annotate them using the Exif data.
  • sensor_port= - 0..3 - access parameters of an individual camera port.

The rest of the parsedit.php URL parameters deal with the actual camera parameters.

Examples

Fig.1 autocampars.php web interface
Fig.2 parsedit.php form

Parameter groups in autocampars.php

  • http://192.168.0.9/autocampars.php. More info about autocampars.php
  • The top table (Fig.1) lists groups of parameters - select the ones of interest then follow View/Edit current link which jumps to the parsedit.php interface.
  • Edit the URL address.
  • Parameters form table columns (Fig.2):
    • mouse over row for a tooltip
    • current value
    • new value can be changed in dec or hex
    • Program ahead - the parameter will be set in n frames from the current frame.
    • Broadcast mask:
0x1 - port 0 bit
0x2 - port 1 bit
0x4 - port 2 bit
0x8 - port 3 bit

Parameters in parsedit.php links

HTTP GET request

read
  • read image format parameters (COLOR & AUTOEXP_ON):
http://192.168.0.9/parsedit.php?immediate&sensor_port=0&COLOR&AUTOEXP_ON
Fig.3 HTTP GET response
change
  • change image format (COLOR) to JP4, read AUTOEXP_ON
http://192.168.0.9/parsedit.php?immediate&sensor_port=0&COLOR=5&AUTOEXP_ON
  • the response will have an old value of the parameter - read again
change multiple ports
  • change image format (COLOR) to JP4 for ports 0 & 2:
http://192.168.0.9/parsedit.php?immediate&sensor_port=0&COLOR=5&*COLOR=0x5
  • change image format (COLOR) to JP4 for all ports:
http://192.168.0.9/parsedit.php?immediate&sensor_port=0&COLOR=5&*COLOR=0xf

Program FPS

Read Trigger 393