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

Class for talking with apsen generation cameras with libcurl. More...

#include <AspenEthernetIo.h>

Inheritance diagram for AspenEthernetIo:
Inheritance graph
Collaboration diagram for AspenEthernetIo:
Collaboration graph

Public Member Functions

 AspenEthernetIo (const std::string url)
 
virtual ~AspenEthernetIo ()
 
uint16_t ReadReg (uint16_t reg) const
 
void WriteReg (uint16_t reg, uint16_t val)
 
void GetImageData (std::vector< uint16_t > &data)
 
void SetupImgXfer (uint16_t Rows, uint16_t Cols, uint16_t NumOfImages, bool IsBulkSeq)
 
void CancelImgXfer ()
 
void GetStatus (CameraStatusRegs::AdvStatus &status)
 
void GetStatus (CameraStatusRegs::BasicStatus &status)
 
uint8_t ReadRegBufCon (uint16_t Reg)
 
void WriteRegBufCon (uint16_t Reg, uint8_t &Val)
 
uint8_t ReadRegPhy (uint16_t Reg)
 
void WriteConPhy (uint16_t Reg, uint8_t &Val)
 
void GetMacAddress (std::string &Mac)
 
void WriteSRMD (uint16_t reg, const std::vector< uint16_t > &data)
 
void WriteMRMD (uint16_t reg, const std::vector< uint16_t > &data)
 
std::string GetNetworkSettings ()
 
std::string GetDriverVersion ()
 
uint16_t GetFirmwareRev ()
 
std::string GetInfo ()
 
std::vector< std::string > ReadStrDatabase ()
 
bool IsError ()
 
- Public Member Functions inherited from ICamIo
virtual ~ICamIo ()
 

Private Member Functions

unsigned int getLastExposureTime ()
 
void StartSession ()
 
void EndSession ()
 
bool ReadStrDatabase (const uint32_t offset, const uint32_t size2Read, std::vector< uint8_t > &out)
 
 AspenEthernetIo (const AspenEthernetIo &)
 
AspenEthernetIooperator= (AspenEthernetIo &)
 

Private Attributes

const std::string m_url
 
const std::string m_fileName
 
std::string m_sessionKey
 
std::string m_sessionKeyUrlStr
 
uint16_t m_lastExposureTimeRegHigh
 
uint16_t m_lastExposureTimeRegLow
 
std::shared_ptr< CLibCurlWrapm_libcurl
 

Additional Inherited Members

- Protected Member Functions inherited from ICamIo
 ICamIo ()
 

Detailed Description

Class for talking with apsen generation cameras with libcurl.

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.

Constructor & Destructor Documentation

◆ AspenEthernetIo() [1/2]

AspenEthernetIo::AspenEthernetIo ( const std::string  url)

◆ ~AspenEthernetIo()

AspenEthernetIo::~AspenEthernetIo ( )
virtual

◆ AspenEthernetIo() [2/2]

AspenEthernetIo::AspenEthernetIo ( const AspenEthernetIo )
private

Member Function Documentation

◆ CancelImgXfer()

void AspenEthernetIo::CancelImgXfer ( )
virtual

Cancel the pending image transfer.

Implements ICamIo.

◆ EndSession()

void AspenEthernetIo::EndSession ( )
private

◆ GetDriverVersion()

std::string AspenEthernetIo::GetDriverVersion ( )
virtual

Implements ICamIo.

◆ GetFirmwareRev()

uint16_t AspenEthernetIo::GetFirmwareRev ( )
virtual

Implements ICamIo.

◆ GetImageData()

void AspenEthernetIo::GetImageData ( std::vector< uint16_t > &  data)
virtual

Moves the data from the camera to the host PC. Called at different times depending on the cameras acquistion mode

Parameters
[in]NumberOfPixelsTotal number of pixels to transfer from the camera to host
Returns
ImageData Image from the camera

Implements ICamIo.

◆ GetInfo()

std::string AspenEthernetIo::GetInfo ( )
virtual

Implements ICamIo.

◆ getLastExposureTime()

unsigned int AspenEthernetIo::getLastExposureTime ( )
private

◆ GetMacAddress()

void AspenEthernetIo::GetMacAddress ( std::string &  Mac)

◆ GetNetworkSettings()

std::string AspenEthernetIo::GetNetworkSettings ( )

◆ GetStatus() [1/2]

void AspenEthernetIo::GetStatus ( CameraStatusRegs::AdvStatus status)
virtual

Fetches the camera's status. This function should be used on rev 16 firmware and higher

Parameters
[out]statusAdvanced status structure

Implements ICamIo.

◆ GetStatus() [2/2]

void AspenEthernetIo::GetStatus ( CameraStatusRegs::BasicStatus status)
virtual

Fetches the camera's status. This function should be used on rev 15 firmware or lower

Parameters
[out]statusBasic status structure

Implements ICamIo.

◆ IsError()

bool AspenEthernetIo::IsError ( )
inlinevirtual

Implements ICamIo.

◆ operator=()

AspenEthernetIo& AspenEthernetIo::operator= ( AspenEthernetIo )
private

◆ ReadReg()

uint16_t AspenEthernetIo::ReadReg ( uint16_t  reg) const
virtual

Reads camera control registers

Parameters
[in]regRegister to read.

Implements ICamIo.

◆ ReadRegBufCon()

uint8_t AspenEthernetIo::ReadRegBufCon ( uint16_t  Reg)

◆ ReadRegPhy()

uint8_t AspenEthernetIo::ReadRegPhy ( uint16_t  Reg)

◆ ReadStrDatabase() [1/2]

std::vector< std::string > AspenEthernetIo::ReadStrDatabase ( )

◆ ReadStrDatabase() [2/2]

bool AspenEthernetIo::ReadStrDatabase ( const uint32_t  offset,
const uint32_t  size2Read,
std::vector< uint8_t > &  out 
)
private

◆ SetupImgXfer()

void AspenEthernetIo::SetupImgXfer ( uint16_t  Rows,
uint16_t  Cols,
uint16_t  NumOfImages,
bool  IsBulkSeq 
)
virtual

Prime the IO interface for an upcoming image transfer.

Parameters
[in]RowsImage height in pixels
[in]ColsImage width in pixels
[in]NumOfImagesNumber of images in the set

Implements ICamIo.

◆ StartSession()

void AspenEthernetIo::StartSession ( )
private

◆ WriteConPhy()

void AspenEthernetIo::WriteConPhy ( uint16_t  Reg,
uint8_t Val 
)

◆ WriteMRMD()

void AspenEthernetIo::WriteMRMD ( uint16_t  reg,
const std::vector< uint16_t > &  data 
)
virtual

Writes data to a Multiple Request Multiple Data (MRMD) controller on the camera

Parameters
[in]regRegister to write to.
[out]dataData vector

Implements ICamIo.

◆ WriteReg()

void AspenEthernetIo::WriteReg ( uint16_t  reg,
uint16_t  val 
)
virtual

Writes data to camera control registers

Parameters
[in]regRegister to write to.
[out]valData value in the register

Implements ICamIo.

◆ WriteRegBufCon()

void AspenEthernetIo::WriteRegBufCon ( uint16_t  Reg,
uint8_t Val 
)

◆ WriteSRMD()

void AspenEthernetIo::WriteSRMD ( uint16_t  reg,
const std::vector< uint16_t > &  data 
)
virtual

Writes data to a Single Request Multiple Data (SRMD) controller on the camera

Parameters
[in]regRegister to write to.
[out]dataData vector

Implements ICamIo.

Member Data Documentation

◆ m_fileName

const std::string AspenEthernetIo::m_fileName
private

◆ m_lastExposureTimeRegHigh

uint16_t AspenEthernetIo::m_lastExposureTimeRegHigh
private

◆ m_lastExposureTimeRegLow

uint16_t AspenEthernetIo::m_lastExposureTimeRegLow
private

◆ m_libcurl

std::shared_ptr<CLibCurlWrap> AspenEthernetIo::m_libcurl
private

◆ m_sessionKey

std::string AspenEthernetIo::m_sessionKey
private

◆ m_sessionKeyUrlStr

std::string AspenEthernetIo::m_sessionKeyUrlStr
private

◆ m_url

const std::string AspenEthernetIo::m_url
private

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