libapogee  3.0.2865
Public Member Functions | Protected Member Functions
Alta Class Reference

Derived class for the alta apogee cameras. More...

#include <Alta.h>

Inheritance diagram for Alta:
ApogeeCam

List of all members.

Public Member Functions

void OpenConnection (const std::string &ioType, const std::string &DeviceAddr, const uint16_t FirmwareRev, const uint16_t Id)
void CloseConnection ()
void Init ()
void StartExposure (double Duration, bool IsLight)
CameraStatusRegs GetStatus ()
Apg::Status GetImagingStatus ()
void GetImage (std::vector< uint16_t > &out)
void StopExposure (bool Digitize)
uint32_t GetAvailableMemory ()
void SetCcdAdc12BitGain (uint16_t gain)
void SetCcdAdc12BitOffset (uint16_t offset)
uint16_t GetCcdAdc12BitGain ()
uint16_t GetCcdAdc12BitOffset ()
double GetCcdAdc16BitGain ()
int32_t GetNumAds ()
int32_t GetNumAdChannels ()
double GetCoolerDrive ()
void SetFanMode (Apg::FanMode mode, bool PreCondCheck=true)
Apg::FanMode GetFanMode ()
double GetTempHeatsink ()
std::string GetMacAddress ()
void OpenSerial (uint16_t PortId)
void CloseSerial (uint16_t PortId)
void SetSerialBaudRate (uint16_t PortId, uint32_t BaudRate)
uint32_t GetSerialBaudRate (uint16_t PortId)
Apg::SerialFC GetSerialFlowControl (uint16_t PortId)
void SetSerialFlowControl (uint16_t PortId, Apg::SerialFC FlowControl)
Apg::SerialParity GetSerialParity (uint16_t PortId)
void SetSerialParity (uint16_t PortId, Apg::SerialParity Parity)
std::string ReadSerial (uint16_t PortId)
void WriteSerial (uint16_t PortId, const std::string &buffer)

Protected Member Functions

 Alta (const std::string &ioType, const std::string &DeviceAddr)
void ExposureAndGetImgRC (uint16_t &r, uint16_t &c)
uint16_t ExposureZ ()
uint16_t GetImageZ ()
uint16_t GetIlluminationMask ()
void CreateCamIo (const std::string &ioType, const std::string &DeviceAddr)
void FixImgFromCamera (const std::vector< uint16_t > &data, std::vector< uint16_t > &out, int32_t rows, int32_t cols)

Detailed Description

Derived class for the alta apogee cameras.

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.

Copyright(c) 2009 Apogee Instruments, Inc.


Member Function Documentation

void Alta::CloseConnection ( ) [virtual]

Closes the IO connection to the camera. IMPORTANT: If this call is made if camera is in an error condition, then the function will try to reset the interface. Thus it is not guaranteed that the address for the camera will be the same after this function is called.

Exceptions:
std::runtime_error

Implements ApogeeCam.

void Alta::CloseSerial ( uint16_t  PortId)

Closes the connection to serial port on the AltaU/E camera

Parameters:
[in]PortIdport A = 0, port B = 1
Exceptions:
std::runtime_error
uint32_t Alta::GetAvailableMemory ( ) [virtual]

Returns the amount of available memory for storing images in terms of kilobytes (KB).

Exceptions:
std::runtime_error

Implements ApogeeCam.

Returns the analog to digital converter gain value for the 12 bit ADC. Calling ApogeeCam::GetAdcGain( 1, 0 ) is equivalent to this function and is recommended for use.

Exceptions:
std::runtime_error

Returns the analog to digital converter offset value for the 12 bit ADC. Calling ApogeeCam::GetAdcOffset( 1, 0 ) is equivalent to this function and is recommended for use.

Exceptions:
std::runtime_error

Returns the analog to digital converter gain value for the 16 bit ADC. Calling ApogeeCam::GetAdcOffset( 0, 0 ) is equivalent to this function and is recommended for use.

Exceptions:
std::runtime_error
double Alta::GetCoolerDrive ( ) [virtual]

Drive level applied to the temp controller. Expressed as a percentage from 0% to 100%.

Exceptions:
std::runtime_error

Implements ApogeeCam.

Exceptions:
std::runtime_error

Implements ApogeeCam.

void Alta::GetImage ( std::vector< uint16_t > &  out) [virtual]

Downloads the image data from the camera.

Parameters:
[out]outVector that will recieve the image data
Exceptions:
std::runtime_error

Implements ApogeeCam.

Returns the current imaging state of the camera.

Exceptions:
std::runtime_error

Implements ApogeeCam.

std::string Alta::GetMacAddress ( )

Returns an ethernet's camera MAC address. Will throw an std::runtime_error exception if the call is made on a USB camera.

Exceptions:
std::runtime_error
int32_t Alta::GetNumAdChannels ( ) [virtual]

Returns the number of channels on the camera's AD converters.

Exceptions:
std::runtime_error

Implements ApogeeCam.

int32_t Alta::GetNumAds ( ) [virtual]

Returns the number of analog to digital (AD) converters on the camera.

Exceptions:
std::runtime_error

Implements ApogeeCam.

uint32_t Alta::GetSerialBaudRate ( uint16_t  PortId)

Returns the serial port's baud rate

Parameters:
[in]PortIdport A = 0, port B = 1
Returns:
baud rate
Exceptions:
std::runtime_error

Returns serial port's flow control type

Parameters:
[in]PortIdport A = 0, port B = 1
Returns:
current flow control type
Exceptions:
std::runtime_error

Get serial port's parity

Parameters:
[in]PortIdport A = 0, port B = 1
Returns:
Input port's current parity type to set
Exceptions:
std::runtime_error

Returns the camera's status registers as a CameraStatusRegs class.

Exceptions:
std::runtime_error

Implements ApogeeCam.

double Alta::GetTempHeatsink ( ) [virtual]

Returns the current Heatsink temperature in degrees Celsius. The Ascent camera platform does not support reading the heatsink temperature, and this property will return -255.

Exceptions:
std::runtime_error

Implements ApogeeCam.

void Alta::Init ( ) [virtual]

Method for initializing the Apogee camera system. Must be called once before image acquisition.

Exceptions:
std::runtime_error

Implements ApogeeCam.

void Alta::OpenConnection ( const std::string &  ioType,
const std::string &  DeviceAddr,
const uint16_t  FirmwareRev,
const uint16_t  Id 
) [virtual]

Opens a connection from the PC to the camera. The results strings from the FindDeviceUsb::Find() and the FindDeviceEthernet::Find() functions. provide the input into this function.

Parameters:
[in]ioTypespecifies camera IO interface 'usb' or 'ethernet'
[in]DeviceAddrspecifies the address of the camera on the interface
[in]FirmwareRevCamera's firmware revision. Used to verify interface connection.
[in]IdCamera's ID. Used to verify interface connection and setup camera specfic parameters.
Exceptions:
std::runtime_error

Implements ApogeeCam.

void Alta::OpenSerial ( uint16_t  PortId)

Open the connection to serial port on the AltaU/E camera with a default baud rate of 9600.

Parameters:
[in]PortIdport A = 0, port B = 1
Exceptions:
std::runtime_error
std::string Alta::ReadSerial ( uint16_t  PortId)

Read data from the camera's serial port

Parameters:
[in]PortIdport A = 0, port B = 1
Exceptions:
std::runtime_error
void Alta::SetCcdAdc12BitGain ( uint16_t  gain)

Sets the analog to digital converter gain value for the 12 bit ADC.

Parameters:
[in]gainThe new gain value. 0-1023 is a valid range. Calling ApogeeCam::SetAdcGain( gain, 1, 0 ) is equivalent to this function and is recommended for use.
Exceptions:
std::runtime_error
void Alta::SetCcdAdc12BitOffset ( uint16_t  offset)

Sets the analog to digital converter offset vaule for the 12 bit ADC.

Parameters:
[in]gainThe new offset value. 0-255 is a valid range. Calling ApogeeCam::SetAdcOffset( offset, 1, 0 ) is equivalent to this function and is recommended for use.
Exceptions:
std::runtime_error
void Alta::SetFanMode ( Apg::FanMode  mode,
bool  PreCondCheck = true 
) [virtual]
Exceptions:
std::runtime_error

Implements ApogeeCam.

void Alta::SetSerialBaudRate ( uint16_t  PortId,
uint32_t  BaudRate 
)

Sets the serial port's baud rate

Parameters:
[in]PortIdport A = 0, port B = 1
[in]BaudRateValid values are 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200
Exceptions:
std::runtime_error
void Alta::SetSerialFlowControl ( uint16_t  PortId,
Apg::SerialFC  FlowControl 
)

Sets serial port's flow control type

Parameters:
[in]PortIdport A = 0, port B = 1
[in]FlowControlflow control type to set
Exceptions:
std::runtime_error
void Alta::SetSerialParity ( uint16_t  PortId,
Apg::SerialParity  Parity 
)

Sets serial port's parity

Parameters:
[in]PortIdport A = 0, port B = 1
[in]Parityparity type to set
Exceptions:
std::runtime_error
void Alta::StartExposure ( double  Duration,
bool  IsLight 
) [virtual]

This method begins the imaging process. The type of exposure taken is depends on various state variables including the CameraMode and TriggerMode.

Parameters:
[in]DurationLength of the exposure(s), in seconds. The valid range for this parameter is GetMinExposureTime() to GetMaxExposureTime().
[in]Determineswhether the exposure is a light or dark/bias frame. A light frame requires this parameter to be set to true, while a dark frame requires this parameter to be false.
Exceptions:
std::runtime_error

Implements ApogeeCam.

void Alta::StopExposure ( bool  Digitize) [virtual]

This method halts an in progress exposure. If this method is called and there is no exposure in progress a std::runtime_error exception is thrown.

Parameters:
[in]DigitizeIf set to true, then the application must call GetImage() to retrieve the image data and to put the camera in a good state for the next exposure. If set to false, then an application should not call GetImage().
Exceptions:
std::runtime_error

Implements ApogeeCam.

void Alta::WriteSerial ( uint16_t  PortId,
const std::string &  buffer 
)

Data to sent out of the camera's serial port

Parameters:
[in]PortIdport A = 0, port B = 1 [in] buffer data to send out of the serial port
Exceptions:
std::runtime_error

The documentation for this class was generated from the following file: