| 1 | /*! |
| 2 | * This Source Code Form is subject to the terms of the Mozilla Public |
| 3 | * License, v. 2.0. If a copy of the MPL was not distributed with this file, |
| 4 | * You can obtain one at http://mozilla.org/MPL/2.0/. |
| 5 | * |
| 6 | * Copyright(c) 2009 Apogee Instruments, Inc. |
| 7 | * \class AspenEthernetIo |
| 8 | * \brief Class for talking with apsen generation cameras with libcurl |
| 9 | * |
| 10 | */ |
| 11 | |
| 12 | |
| 13 | #ifndef ASPENETHERNETIO_INCLUDE_H__ |
| 14 | #define ASPENETHERNETIO_INCLUDE_H__cxx . . $ `AspenEthernetIo.h:14:9`! |
| 15 | |
| 16 | |
| 17 | #include "ICamIo.h"cxx . . $ `<file>/ICamIo.h`/ |
| 18 | #include <string> |
| 19 | #include <vector> |
| 20 | |
| 21 | #include <memory> |
| 22 | |
| 23 | class CLibCurlWrapcxx . . $ CLibCurlWrap#; |
| 24 | |
| 25 | class AspenEthernetIocxx . . $ AspenEthernetIo# : public ICamIocxx . . $ ICamIo# |
| 26 | { |
| 27 | public: |
| 28 | AspenEthernetIocxx . . $ AspenEthernetIo#AspenEthernetIo(8d4ab0a187bf9331).( const stdcxx . . $ std/::stringcxx . . $ std/string# url ); |
| 29 | virtual ~cxx . . $ AspenEthernetIo#`~AspenEthernetIo`(49f6e7a06ebc5aa8).AspenEthernetIocxx . . $ AspenEthernetIo#(); |
| 30 | |
| 31 | |
| 32 | uint16_tcxx . . $ uint16_t# ReadRegcxx . . $ AspenEthernetIo#ReadReg(c1ccd8b0fe723753).( uint16_tcxx . . $ uint16_t# reg ) const; |
| 33 | void WriteRegcxx . . $ AspenEthernetIo#WriteReg(161476d40f03fa8c).( uint16_tcxx . . $ uint16_t# reg, uint16_tcxx . . $ uint16_t# val ) ; |
| 34 | |
| 35 | void GetImageDatacxx . . $ AspenEthernetIo#GetImageData(f25c7a91f506be74).( stdcxx . . $ std/::vectorcxx . . $ std/vector#<uint16_tcxx . . $ uint16_t#> & data ); |
| 36 | |
| 37 | void SetupImgXfercxx . . $ AspenEthernetIo#SetupImgXfer(d74ba82c91777c42).(uint16_tcxx . . $ uint16_t# Rows, |
| 38 | uint16_tcxx . . $ uint16_t# Cols, |
| 39 | uint16_tcxx . . $ uint16_t# NumOfImages, bool IsBulkSeq); |
| 40 | |
| 41 | void CancelImgXfercxx . . $ AspenEthernetIo#CancelImgXfer(49f6e7a06ebc5aa8).(); |
| 42 | |
| 43 | void GetStatuscxx . . $ AspenEthernetIo#GetStatus(9079ec6027e8c4ba).(CameraStatusRegscxx . . $ CameraStatusRegs#::AdvStatuscxx . . $ CameraStatusRegs#AdvStatus# & status); |
| 44 | void GetStatuscxx . . $ AspenEthernetIo#GetStatus(8d97bb5020bb8001).(CameraStatusRegscxx . . $ CameraStatusRegs#::BasicStatuscxx . . $ CameraStatusRegs#BasicStatus# & status); |
| 45 | |
| 46 | //Functions unique to the second generation of the |
| 47 | //ethernet interface |
| 48 | uint8_tcxx . . $ uint8_t# ReadRegBufConcxx . . $ AspenEthernetIo#ReadRegBufCon(6699a9687259e5ab).(uint16_tcxx . . $ uint16_t# Reg); |
| 49 | void WriteRegBufConcxx . . $ AspenEthernetIo#WriteRegBufCon(ba68e383a1bcad56).(uint16_tcxx . . $ uint16_t# Reg, uint8_tcxx . . $ uint8_t# & Val); |
| 50 | |
| 51 | uint8_tcxx . . $ uint8_t# ReadRegPhycxx . . $ AspenEthernetIo#ReadRegPhy(6699a9687259e5ab).(uint16_tcxx . . $ uint16_t# Reg); |
| 52 | void WriteConPhycxx . . $ AspenEthernetIo#WriteConPhy(ba68e383a1bcad56).(uint16_tcxx . . $ uint16_t# Reg, uint8_tcxx . . $ uint8_t# & Val); |
| 53 | |
| 54 | void GetMacAddresscxx . . $ AspenEthernetIo#GetMacAddress(80d0450aec2fd74).( stdcxx . . $ std/::stringcxx . . $ std/string# & Mac ); |
| 55 | |
| 56 | void WriteSRMDcxx . . $ AspenEthernetIo#WriteSRMD(17b9d32c6dc79ae8).( uint16_tcxx . . $ uint16_t# reg, const stdcxx . . $ std/::vectorcxx . . $ std/vector#<uint16_tcxx . . $ uint16_t#> & data ); |
| 57 | |
| 58 | void WriteMRMDcxx . . $ AspenEthernetIo#WriteMRMD(17b9d32c6dc79ae8).( uint16_tcxx . . $ uint16_t# reg, const stdcxx . . $ std/::vectorcxx . . $ std/vector#<uint16_tcxx . . $ uint16_t#> & data ); |
| 59 | |
| 60 | stdcxx . . $ std/::stringcxx . . $ std/string# GetNetworkSettingscxx . . $ AspenEthernetIo#GetNetworkSettings(efd28698952f529a).(); |
| 61 | |
| 62 | stdcxx . . $ std/::stringcxx . . $ std/string# GetDriverVersioncxx . . $ AspenEthernetIo#GetDriverVersion(efd28698952f529a).(); |
| 63 | |
| 64 | uint16_tcxx . . $ uint16_t# GetFirmwareRevcxx . . $ AspenEthernetIo#GetFirmwareRev(32a7769d58713265).(); |
| 65 | stdcxx . . $ std/::stringcxx . . $ std/string# GetInfocxx . . $ AspenEthernetIo#GetInfo(efd28698952f529a).(); |
| 66 | |
| 67 | stdcxx . . $ std/::vectorcxx . . $ std/vector#<stdcxx . . $ std/::stringcxx . . $ std/string#> ReadStrDatabasecxx . . $ AspenEthernetIo#ReadStrDatabase(c1a9bfb60daa162d).(); |
| 68 | |
| 69 | // TODO - see if we can do same error |
| 70 | // trapping we do in USB |
| 71 | bool IsErrorcxx . . $ AspenEthernetIo#IsError(c9857a73d68e59ba).() { return false; } |
| 72 | |
| 73 | private: |
| 74 | const stdcxx . . $ std/::stringcxx . . $ std/string# m_urlcxx . . $ AspenEthernetIo#m_url.; |
| 75 | const stdcxx . . $ std/::stringcxx . . $ std/string# m_fileNamecxx . . $ AspenEthernetIo#m_fileName.; |
| 76 | stdcxx . . $ std/::stringcxx . . $ std/string# m_sessionKeycxx . . $ AspenEthernetIo#m_sessionKey.; |
| 77 | stdcxx . . $ std/::stringcxx . . $ std/string# m_sessionKeyUrlStrcxx . . $ AspenEthernetIo#m_sessionKeyUrlStr.; |
| 78 | |
| 79 | unsigned int getLastExposureTimecxx . . $ AspenEthernetIo#getLastExposureTime(db52760e79bf9054).(); |
| 80 | uint16_tcxx . . $ uint16_t# m_lastExposureTimeRegHighcxx . . $ AspenEthernetIo#m_lastExposureTimeRegHigh.; |
| 81 | uint16_tcxx . . $ uint16_t# m_lastExposureTimeRegLowcxx . . $ AspenEthernetIo#m_lastExposureTimeRegLow.; |
| 82 | |
| 83 | void StartSessioncxx . . $ AspenEthernetIo#StartSession(49f6e7a06ebc5aa8).(); |
| 84 | void EndSessioncxx . . $ AspenEthernetIo#EndSession(49f6e7a06ebc5aa8).(); |
| 85 | bool ReadStrDatabasecxx . . $ AspenEthernetIo#ReadStrDatabase(72d59c525aeafa1).( const uint32_tcxx . . $ uint32_t# offset, const uint32_tcxx . . $ uint32_t# size2Read, |
| 86 | stdcxx . . $ std/::vectorcxx . . $ std/vector#<uint8_tcxx . . $ uint8_t#> & out ); |
| 87 | |
| 88 | stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<CLibCurlWrapcxx . . $ CLibCurlWrap#> m_libcurlcxx . . $ AspenEthernetIo#m_libcurl.; |
| 89 | //disable the copy ctor and assignment operator |
| 90 | //generated by the compiler |
| 91 | //Effective C++ Item 6 |
| 92 | AspenEthernetIocxx . . $ AspenEthernetIo#AspenEthernetIo(53c2808a1cae7e16).(const AspenEthernetIocxx . . $ AspenEthernetIo#&); |
| 93 | AspenEthernetIocxx . . $ AspenEthernetIo#& operatorcxx . . $ AspenEthernetIo#`operator=`(617c775710b34cff).=(AspenEthernetIocxx . . $ AspenEthernetIo#&); |
| 94 | }; |
| 95 | |
| 96 | #endif |