libdc1394: API version 2: System

NOTE: the camera detection API will change to allow hotplug support.


dc1394_new()

Arguments:
Returns:   dc1394_t*

dc1394_free()

Arguments:
dc1394_t:*dc1394:
Returns:   (nothing)

dc1394_reset_bus()

Arguments:
dc1394camera_t:*camera:A pointer to an initialized camera structure
Returns:   dc1394error_t (error code)

dc1394_read_cycle_timer()

Arguments:
:camera:
uint32_t*:cycle_timer:
uint64_t*:local_time:
Returns:   dc1394error_t (error code)

dc1394_camera_get_node()

Arguments:
dc1394camera_t:*camera:A pointer to an initialized camera structure
uint32_t:*node:
uint32_t:*generation:
Returns:   dc1394error_t (error code)

dc1394_camera_enumerate()

Arguments:
dc1394_t:*dc1394:
dc1394camera_list_t:**list:
Returns:   dc1394error_t (error code)

dc1394_camera_free_list()

Arguments:
dc1394camera_list_t:*list:
Returns:   (nothing)

dc1394_camera_new()

Arguments:
dc1394_t:*dc1394:
uint64_t:guid:
Returns:   dc1394camera_t*

dc1394_camera_new_unit()

Arguments:
dc1394_t:*dc1394:
uint64_t:guid:
int:unit:
Returns:   dc1394camera_t*

dc1394_camera_free()

Arguments:
dc1394camera_t:*camera:A pointer to an initialized camera structure
Returns:   (nothing)

dc1394_camera_print_info()

Arguments:
dc1394camera_t:*camera:A pointer to an initialized camera structure
FILE:*fd:
Returns:   dc1394error_t (error code)

A simple function for printing basic camera information to the supplied file descriptor.


dc1394_reset_camera()

Arguments:
dc1394camera_t:*camera:A pointer to an initialized camera structure
Returns:   dc1394error_t (error code)

Resets the camera using the IIDC reset function. This is not a power cycle.


dc1394_camera_set_power()

Arguments:
dc1394camera_t:*camera:A pointer to an initialized camera structure
dc1394switch_t:pwr:the desired state of the camera: DC1394_ON or DC1394_OFF
Returns:   dc1394error_t (error code)

Sets the camera power. This is very close to (un)plugging the camera power but note that there is a difference as some circuits in the camera must be continuously powered in order to respond to a power-up command.


dc1394_memory_busy()

Arguments:
dc1394camera_t:*camera:A pointer to an initialized camera structure
dc1394bool_t:*value:a boolean reflecting whether the camera save operation is still ongoining or not.
Returns:   dc1394error_t (error code)

You need to allow the camera some time to finish the saving operation. This function can be used in a loop to check when the operation finished. This could be integrated in the save function in the future.


dc1394_memory_save()

Arguments:
dc1394camera_t:*camera:A pointer to an initialized camera structure
uint32_t:channel:the channel in which you wish to save the camera settings
Returns:   dc1394error_t (error code)

This effectively saves the camera settings in the camera memory bank specified by the channel argument. The number of available channels is specified in the dc1394camera_t struct. You should wait until the save operation if finished before changing camera registers. You cannot write in channel zero as it is read-only and contains factory defaults.


dc1394_memory_load()

Arguments:
dc1394camera_t:*camera:A pointer to an initialized camera structure
uint32_t:channel:the channel in which you wish to load the camera settings
Returns:   dc1394error_t (error code)

Loads the settings stored in the specified channel. Channel zero is the factory defaults.


dc1394_camera_set_broadcast()

Arguments:
dc1394camera_t:*camera:A pointer to an initialized camera structure
dc1394bool_t:pwr:
Returns:   dc1394error_t (error code)

dc1394_camera_get_broadcast()

Arguments:
dc1394camera_t:*camera:A pointer to an initialized camera structure
dc1394bool_t:*pwr:
Returns:   dc1394error_t (error code)

If the broadcast flag is set, all devices on the bus will execute the command. Useful to sync ISO start commands or setting a bunch of cameras at the same time. Broadcast only works with identical devices (brand/model). If the devices are not identical your mileage may vary. Some cameras may not answer broadcast commands at all. Also, this only works with cameras on the SAME bus (IOW, the same port).