SDK - Querying camera information

From edgertronic high speed video camera
Jump to navigation Jump to search


Home

Camera Operation details




Overview

If you are writing software to control the camera, a question the software developer is often curious about is "what is the camera state?" From a simple viewpoint, the camera state is just the value of the camera state variable returned by CAMAPI get_camstatus(). A more in-depth description would include the level of what ever is being filled and the status flags (also returned by get_camstatus()). Example status flags include missing storage device, storage full, and genlock no signal. Other values are changing as well, such as the temperature of the image sensor, amount of available storage space, either in the RAM holding frames to be saved or available space on the storage device. With burst capture, the state information gets more complex as you want information on which burst buffer is active.

CAMAPI camera state, status, and information reporting support

There are three APIs support by CAMAPI that return camera state, status, and information.

CAMAPI get_camstatus()

The CAMAPI get_camstatus() method returns the current camera state information in a dictionary. Refer to http://10.11.12.13/static/host/camconstants.py for enumeration binding. The returned dictionary contains the following entries:

Entry type Range Description
state enum 1 .. 8 Current camera state:

1 = UNCONFIGURED
2 = CALIBRATING
3 = RUNNING
4 = TRIGGERED
5 = SAVING
6 = RUNNING_PRETRIGGER_FULL
7 = TRIGGER_CANCELED
8 = SAVE_CANCELED

level int 0 .. 100 Percentage complete for the current state. Has meaning for states RUNNING, TRIGGERED, and SAVING.
flags collection
(bit field)
bits
0 .. 31
Status flags:

0: STORAGE_FULL
1: STORAGE_MISSING_OR_UNMOUNTED
2: USB_STORAGE_INSTALLED
3: SD_CARD_STORAGE_INSTALLED
4: USB_STORAGE_FULL
5: SD_CARD_STORAGE_FULL
6: STORAGE_BAD
18: GENLOCK_NO_SIGNAL
19: GENLOCK_CONFIG_ERROR

fpga_temp int FPGA internal temperature in degrees Celsius.
is_temp int Image sensor internal temperature in degrees Celsius.
dacvrefadc int 0x00 .. 0xFF Internal calibration value. Not intended for customer use.
camera_time int Seconds since 1970.

CAMAPI get_storage_info()

The CAMAPI get_storage_info() method returns the current camera removable storage information in a dictionary with the following entries:

Entry type Range Description
storage_size int Number of total storage bytes reported by the file system on the active partition.
mount_point string Location where video files and metadata files are stored (unless overridden via the trigger() method base_filename parameter). Useful when accessing the files via the http://10.11.12.13/static URL with the mount point appended.
available_space int Number of bytes reported by the file system on the active partition available to store user data.

replacing 10.11.12.13 with your camera's IP address as necessary.

CAMAPI get_caminfo()

The CAMAPI get_caminfo() method returns camera information that will not change until the camera is power cycled (and likely won't change then either). The get_caminfo() method returns a dictionary with the following entries:

Entry type Range Description
sw_build_date
fpga_initialized
home_dir
serial_console_enabled
fpga_version Optional, only present if FPGA has been initialized.
model_number
serial_number
hardware_revision
hardware_configuration
build_date
ir_filter
mac_addr




Home

Camera Operation details