Difference between revisions of "Elphel PHP constants"

From ElphelWiki
Jump to: navigation, search
 
Line 4: Line 4:
 
To use [http://us.php.net/manual/en/language.constants.php constants in PHP programs] you may just type in the name (as in  
 
To use [http://us.php.net/manual/en/language.constants.php constants in PHP programs] you may just type in the name (as in  
 
  echo elphel_get_P_value(ELPHEL_SENSOR); // No "$" in front of the constant name!
 
  echo elphel_get_P_value(ELPHEL_SENSOR); // No "$" in front of the constant name!
or dynamically compose the constant name as in
+
or [http://us.php.net/manual/en/function.constant.php dynamically compose the constant name] as in
 
  $elphel_prefix="ELPHEL_"
 
  $elphel_prefix="ELPHEL_"
 
  echo elphel_get_P_value(constant($elphel_prefix . "GAMMA"));
 
  echo elphel_get_P_value(constant($elphel_prefix . "GAMMA"));

Revision as of 17:29, 3 December 2007

You may view all the currently defined constants using the following PHP operator:

print_r (get_defined_constants());

To use constants in PHP programs you may just type in the name (as in

echo elphel_get_P_value(ELPHEL_SENSOR); // No "$" in front of the constant name!

or dynamically compose the constant name as in

$elphel_prefix="ELPHEL_"
echo elphel_get_P_value(constant($elphel_prefix . "GAMMA"));


 
    [ELPHEL_NUMBER] => 1024
    [ELPHEL_UPDATE] => 0
    [ELPHEL_SENSOR] => 1
    [ELPHEL_PARS_CHANGED] => 2
    [ELPHEL_DMA_VALID] => 3
    [ELPHEL_ACTUAL_WIDTH] => 4
    [ELPHEL_ACTUAL_HEIGHT] => 5
    [ELPHEL_LPR] => 6
    [ELPHEL_IMAGE_SIZE] => 7
    [ELPHEL_BAYER] => 8
    [ELPHEL_TRIGGERED] => 9
    [ELPHEL_PERIOD] => 10
    [ELPHEL_FRAME] => 11
    [ELPHEL_JPEG_WP] => 12
    [ELPHEL_CLK_FPGA] => 13
    [ELPHEL_CLK_SENSOR] => 14
    [ELPHEL_FPGA_XTRA] => 15
    [ELPHEL_TRIG] => 16
    [ELPHEL_EXPOS] => 17
    [ELPHEL_BGFRAME] => 18
    [ELPHEL_PAGE_ACQ] => 19
    [ELPHEL_PAGE_READ] => 20
    [ELPHEL_OVERLAP] => 21
    [ELPHEL_VIDEO] => 22
    [ELPHEL_AUXCM] => 23
    [ELPHEL_VIRT_WIDTH] => 24
    [ELPHEL_VIRT_HEIGHT] => 25
    [ELPHEL_WOI_LEFT] => 26
    [ELPHEL_WOI_TOP] => 27
    [ELPHEL_WOI_WIDTH] => 28
    [ELPHEL_WOI_HEIGHT] => 29
    [ELPHEL_FLIP] => 30
    [ELPHEL_FPSLM] => 31
    [ELPHEL_DCM_HOR] => 32
    [ELPHEL_DCM_VERT] => 33
    [ELPHEL_BIN_HOR] => 34
    [ELPHEL_BIN_VERT] => 35
    [ELPHEL_COLOR] => 36
    [ELPHEL_FRAMESYNC_DLY] => 37
    [ELPHEL_MCLK] => 38
    [ELPHEL_PF_HEIGHT] => 39
    [ELPHEL_BITS] => 40
    [ELPHEL_SHIFTL] => 41
    [ELPHEL_FPNS] => 42
    [ELPHEL_FPNM] => 43
    [ELPHEL_VEXPOS] => 44
    [ELPHEL_VIRTTRIG] => 45
    [ELPHEL_GAINR] => 46
    [ELPHEL_GAING] => 47
    [ELPHEL_GAINB] => 48
    [ELPHEL_GAINGB] => 49
    [ELPHEL_FATZERO] => 50
    [ELPHEL_SPEC_KAC_GGA] => 51
    [ELPHEL_SPEC_KAC_GGB] => 52
    [ELPHEL_SPEC_KAC_GGM] => 53
    [ELPHEL_GAIN] => 51
    [ELPHEL_RSCALE] => 52
    [ELPHEL_BSCALE] => 53
    [ELPHEL_QUALITY] => 54
    [ELPHEL_FP100S] => 55
    [ELPHEL_SENSOR_WIDTH] => 56
    [ELPHEL_SENSOR_HEIGHT] => 57
    [ELPHEL_COLOR_SATURATION_BLUE] => 58
    [ELPHEL_COLOR_SATURATION_RED] => 59
    [ELPHEL_GAMMA] => 60
    [ELPHEL_PIXEL_LOW] => 61
    [ELPHEL_PIXEL_HIGH] => 62
    [ELPHEL_DONTCARE] => 63
    [ELPHEL_PGMSENSRSLT] => 64
    [ELPHEL_CAMSEQSTATE] => 65
    [ELPHEL_CAMSEQCOUNT] => 66
    [ELPHEL_CIRCBUFSIZE] => 67
    [ELPHEL_FREECIRCBUF] => 68
    [ELPHEL_CIRCBUFWP] => 69
    [ELPHEL_CIRCBUFRP] => 70
    [ELPHEL_TILES] => 128