![]() |
DLAPI 4.1.1.0
An API for controlling Aluma branded cameras
|
Camera interface class. More...
#include <dlapi.h>
Classes | |
| struct | Info |
| struct | Status |
Public Member Functions | |
| virtual | ~ICamera ()=0 |
| virtual destructor ensuring the class is abstract. | |
| virtual bool | initialize ()=0 |
| Initializes the camera by fetching operational status, and initializing the various peripherals. | |
| virtual IPromisePtr | queryInfo ()=0 |
| Queries the camera's unit information structure (ICamera::Info) | |
| virtual IPromisePtr | queryStatus ()=0 |
| Queries the camera's ICamera::Status structure. | |
| virtual IPromisePtr | queryNetworkSettings ()=0 |
| Queries the camera's network settings. | |
| virtual IPromisePtr | queryCapability (ICamera::Capability key)=0 |
| Queries a camera for a specific capability. | |
| virtual IPromisePtr | pulseGuide (EPulseGuideDirection direction, unsigned int duration, bool abort)=0 |
| Executes or aborts a pulse guide operation of given duration and direction. | |
| virtual IPromisePtr | setNetworkSettings (const TNetworkSettings &cfg)=0 |
| Updates the camera's network settings. | |
| virtual ICamera::Info | getInfo () const =0 |
| Returns the buffered ICamera::Info structure. | |
| virtual void | getSerial (char *buffer, size_t &buffer_length) const =0 |
| Returns a human readable version of the camera's serial number string. e.g. "AL8300M-19010101". | |
| virtual EEndpointType | getConnectionType () const =0 |
| Returns the connection type of the camera (USB, Networked, etc). | |
| virtual void | getConnectionInfo (char *buffer, size_t &buffer_length) const =0 |
| Returns a human readable information string about the camera's connection (IP Address, USB Handle, etc). | |
| virtual ICamera::Status | getStatus () const =0 |
| Returns the buffered status structure. | |
| virtual bool | getCapability (ICamera::Capability key) const =0 |
| Returns the buffered value of a successful call to ICamera::queryCapability() | |
| virtual TNetworkSettings | getNetworkSettings () const =0 |
| Returns the buffered network settings. | |
| virtual ISensorPtr | getSensor (unsigned int id) const =0 |
| Returns a pointer to the indexed sensor (zero is always the primary imaging chip). | |
| virtual ITECPtr | getTEC () const =0 |
| Returns a pointer to the camera's TEC (if one is available). | |
| virtual IAOPtr | getAO () const =0 |
| Returns a pointer to the camera's AO (if one is available). | |
| virtual IFWPtr | getFW () const =0 |
| Returns a pointer to the camera's FW (if one is available). | |
Camera interface class.
An interface to a DLAPI compliant camera providing general access to camera-level functions/settings, and stores references to connected peripherals/imaging sensors. Each instance of ICamera is self-contained, and can safely be used in tandem with other instances of ICamera. Because Camera I/O is threaded at the DLAPI level, the number of ICamera instances you can control simultaneously is limited by the number of active threads your system can have at any given time.
Further to this limitation, each ICamera instance has references to a number of ISensor instances. While these instances are self-contained, DLAPI is not capable of performing simultaneous downloads of two sensors on the same camera at this time. Attempting to call image transport functions for one sensor while another sensor is in the ISensor::ReadyToDownload state will return an error (specifically EStatusCode::ReadoutInProgress).
| enum dl::ICamera::Model |
| enum dl::ICamera::State |
|
pure virtual |
virtual destructor ensuring the class is abstract.
Used to ensure ICamera is pure virtual
|
pure virtual |
Returns a pointer to the camera's AO (if one is available).
Returns a pointer to the camera's adaptive optics unit, or nullptr if no AO is present.
|
pure virtual |
Returns the buffered value of a successful call to ICamera::queryCapability()
| key | the ICamera::Capability key to retrieve. Each key requires a separate call to ICamera::queryCapability(); |
|
pure virtual |
Returns a human readable information string about the camera's connection (IP Address, USB Handle, etc).
| buffer | a buffer to a character array. |
| buffer_length | the maximum size of the supplied buffer, updated to be the length of the information string. |
Returns a human readable string containing connection details about this camera. This is mostly for debug purposes. e.g. "USB: handle=0x1234", or "Net: ip="127.0.0.1"
|
pure virtual |
Returns the connection type of the camera (USB, Networked, etc).
Returns the camera's connection type: USB, Net, etc. See EEndpointType for more details.
|
pure virtual |
Returns a pointer to the camera's FW (if one is available).
Returns a pointer to the camera's filter wheel unit, or nullptr if no FW is present.
|
pure virtual |
Returns the buffered ICamera::Info structure.
Returns the buffered camera info structure, refreshed by ICamera::queryInfo().
|
pure virtual |
Returns the buffered network settings.
Returns the buffered camera network settings structure, refreshed by ICamera::queryNetworkSettings().
|
pure virtual |
Returns a pointer to the indexed sensor (zero is always the primary imaging chip).
| id | the internal index of the sensor to retrieve |
This function retrieves a pointer to the camera's sensor with internal id matching the supplied parameter. The internal sensor id is a zero based index, starting with the main sensor, and increasing with external sensors up to the number of sensors a camera has is stored in the ICamera::Info::numberOfSensors variable. If a user attempts to access a sensor outside that range, or the sensor is otherwise unavailable, the function returns nullptr.
|
pure virtual |
Returns a human readable version of the camera's serial number string. e.g. "AL8300M-19010101".
| buffer | pointer to a character array which receives the serial number string. |
| buffer_length | [IN] the maximum size of the buffer supplied, [OUT] the size of the string returned. |
Returns the human-readable serial number string of the camera, which requires the camera be properly initialized. Normally, this is handled on discovery by the API, but if an error occurs, you can manually initialize the camera by calling the following functions:
or calling ICamera::initialize().
n.b. This differs from the ICamera::Info::serialNumber in that serialNumber contains a subset of the information required to recreate the human-readable serial number string.
e.g.
|
pure virtual |
Returns the buffered status structure.
Returns the buffered camera status structure, refreshed by ICamera::queryStatus().
|
pure virtual |
Returns a pointer to the camera's TEC (if one is available).
Returns a pointer to the camera's thermo-electric cooler, or nullptr if no TEC is present.
|
pure virtual |
Initializes the camera by fetching operational status, and initializing the various peripherals.
A blocking call which queries the camera for all relevant information stuctures:
Throws a std::runtime_error on failure.
|
pure virtual |
Executes or aborts a pulse guide operation of given duration and direction.
| direction | the relay direction to fire. |
| duration | the duration of the pulse guide operation in milliseconds. |
| abort | set to true to abort a previous pulse guide operation, false to execute a new operation. |
Command the guider port output to move the mount in the provided direction, for the provided duration, or abort the current operation if abort is set to true.
The status of the current pulse guide operation is stored in the camera's ICamera::Status structure.
|
pure virtual |
Queries a camera for a specific capability.
| key | the capability you wish to retrieve from the camera. |
Queries the camera for the ICamera::Capability key passed in. Currently, they are used to denote support for specific features (like filter wheels and adaptive optics peripherals), but also for support to various parts of the camera (heat-sink temperature monitoring, or the use of a fan). They can be retrieved via a call to ICamera::getCapability().
e.g.
|
pure virtual |
Queries the camera's unit information structure (ICamera::Info)
Queries the camera for the ICamera::Info structure, retrieve the structure on promise completion with a call to ICamera::getInfo().
|
pure virtual |
Queries the camera's network settings.
Queries the camera for the ICamera::NetworkStettings structure, retrieve the structure on promise completion with a call to ICamera::getStatus().
|
pure virtual |
Queries the camera's ICamera::Status structure.
Queries the camera for the ICamera::Status structure, retrieve the structure on promise completion with a call to ICamera::getStatus().
|
pure virtual |
Updates the camera's network settings.
| cfg | the new network configuration |
Updates the network settings of the camera.