TwiceAsNice  2019-02-18
Public Types | Public Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
ApogeeFilterWheel Class Reference

class for apogee's usb filter wheel More...

#include <ApogeeFilterWheel.h>

Collaboration diagram for ApogeeFilterWheel:
Collaboration graph

Public Types

enum  Type {
  UNKNOWN_TYPE = 0, FW50_9R = 1, FW50_7S = 2, AFW50_10S = 6,
  AFW31_17R = 9
}
 
enum  Status { UNKNOWN_STATUS, NOT_CONNECTED, READY, ACTIVE }
 

Public Member Functions

 ApogeeFilterWheel ()
 
virtual ~ApogeeFilterWheel ()
 
void Init (const ApogeeFilterWheel::Type type, const std::string &DeviceAddr)
 
void Close ()
 
uint16_t GetVendorId ()
 
uint16_t GetProductId ()
 
uint16_t GetDeviceId ()
 
std::string GetUsbFirmwareRev ()
 
ApogeeFilterWheel::Type GetType ()
 
std::string GetName ()
 
ApogeeFilterWheel::Status GetStatus ()
 
uint16_t GetMaxPositions ()
 
void SetPosition (uint16_t Position)
 
uint16_t GetPosition ()
 

Protected Attributes

std::shared_ptr< FilterWheelIom_Usb
 

Private Member Functions

bool IsConnected ()
 
 ApogeeFilterWheel (const ApogeeFilterWheel &)
 
ApogeeFilterWheeloperator= (ApogeeFilterWheel &)
 

Private Attributes

ApogeeFilterWheel::Type m_type
 
bool m_connected
 

Detailed Description

class for apogee's usb filter wheel

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) 2011 Apogee Imaging Systems, Inc.

Member Enumeration Documentation

◆ Status

Current filter wheel state

Enumerator
UNKNOWN_STATUS 

Error status

NOT_CONNECTED 

Filter wheel is not connected either physically or the ApogeeFilterWheel::Init function has not been called

READY 

Filter wheel is at the desired position

ACTIVE 

Filter wheel is moving to desired postion

◆ Type

Enumerator
UNKNOWN_TYPE 
FW50_9R 
FW50_7S 
AFW50_10S 
AFW31_17R 

Constructor & Destructor Documentation

◆ ApogeeFilterWheel() [1/2]

ApogeeFilterWheel::ApogeeFilterWheel ( )

◆ ~ApogeeFilterWheel()

ApogeeFilterWheel::~ApogeeFilterWheel ( )
virtual

◆ ApogeeFilterWheel() [2/2]

ApogeeFilterWheel::ApogeeFilterWheel ( const ApogeeFilterWheel )
private

Member Function Documentation

◆ Close()

void ApogeeFilterWheel::Close ( )

Closes the USB connection to the filter wheel

Exceptions
std::runtime_error

◆ GetDeviceId()

uint16_t ApogeeFilterWheel::GetDeviceId ( )

Returns USB device id

Exceptions
std::runtime_error

◆ GetMaxPositions()

uint16_t ApogeeFilterWheel::GetMaxPositions ( )

Returns The maximum number of filter wheel position

Exceptions
std::runtime_error

◆ GetName()

std::string ApogeeFilterWheel::GetName ( )

Returns Current filter wheel name

Exceptions
std::runtime_error

◆ GetPosition()

uint16_t ApogeeFilterWheel::GetPosition ( )

Returns the current filter wheel position

Exceptions
std::runtime_error

◆ GetProductId()

uint16_t ApogeeFilterWheel::GetProductId ( )

Returns USB product id

Exceptions
std::runtime_error

◆ GetStatus()

ApogeeFilterWheel::Status ApogeeFilterWheel::GetStatus ( )

Returns the current status of the filter wheel

Exceptions
std::runtime_error

◆ GetType()

ApogeeFilterWheel::Type ApogeeFilterWheel::GetType ( )
inline

Returns Current filter wheel type

◆ GetUsbFirmwareRev()

std::string ApogeeFilterWheel::GetUsbFirmwareRev ( )

Returns USB firmware version

Exceptions
std::runtime_error

◆ GetVendorId()

uint16_t ApogeeFilterWheel::GetVendorId ( )

Returns USB vendor id

Exceptions
std::runtime_error

◆ Init()

void ApogeeFilterWheel::Init ( const ApogeeFilterWheel::Type  type,
const std::string &  DeviceAddr 
)

Initizes the USB connection from the PC to the filter wheel. The results strings from the FindDeviceUsb::Find() provide the input into this function.

Parameters
[in]Usersupplied ApogeeFilterWheel::Type
[in]DeviceAddrspecifies the address of the filter wheel on the USB buss
Exceptions
std::runtime_error

◆ IsConnected()

bool ApogeeFilterWheel::IsConnected ( )
private

◆ operator=()

ApogeeFilterWheel& ApogeeFilterWheel::operator= ( ApogeeFilterWheel )
private

◆ SetPosition()

void ApogeeFilterWheel::SetPosition ( uint16_t  Position)

Sets filter wheel positon

Parameters
[in]PositionDesired position. Valid range is 1 to GetMaxPositions()
Exceptions
std::runtime_error

Member Data Documentation

◆ m_connected

bool ApogeeFilterWheel::m_connected
private

◆ m_type

ApogeeFilterWheel::Type ApogeeFilterWheel::m_type
private

◆ m_Usb

std::shared_ptr<FilterWheelIo> ApogeeFilterWheel::m_Usb
protected

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