diff --git a/README.md b/README.md index 14e0e91..55d5b42 100644 --- a/README.md +++ b/README.md @@ -56,3 +56,18 @@ C:\Qt\6.6.0\msvc2019_64\bin\windeployqt.exe solum.exe ``` This copies all required dependencies into the same folder. **The solum.dll file though needs to be copied manually in addition.** + +## Developer startup + + +### Windows + +1. Download and install Qt creator +2. Ensure you use a msvc compiler (Qt.bluetooth is not supported with the mingw + compiler) + - I none is installed on your machine download it via the microsoft build + tools +3. Open the `solum_qt.pro` with qt creator +4. Run the application +5. Make sure that you add the necessary certificates. You can find the + necessary token to claim them on the [clarius user website](https://cloud.clarius.com/login/) diff --git a/examples/solum_qt/solum/main.cpp b/examples/solum_qt/solum/main.cpp index fe1da0b..b950bee 100644 --- a/examples/solum_qt/solum/main.cpp +++ b/examples/solum_qt/solum/main.cpp @@ -57,132 +57,126 @@ int main(int argc, char *argv[]) _solum = std::make_unique(); - if (solumInit(argc, argv, QStandardPaths::writableLocation(QStandardPaths::AppDataLocation).toStdString().c_str(), - // connection callback - [](CusConnection res, int port, const char* msg) - { - QApplication::postEvent(_solum.get(), new event::Connection(res, port, QString::fromLatin1(msg))); - }, - // cert callback - [](int daysValid) - { - QApplication::postEvent(_solum.get(), new event::Cert(daysValid)); - }, - // power down callback - [](CusPowerDown res, int tm) - { - QApplication::postEvent(_solum.get(), new event::PowerDown(res, tm)); - }, - // new image callback - [](const void* img, const CusProcessedImageInfo* nfo, int npos, const CusPosInfo* pos) - { - size_t sz = nfo->imageSize; - // we need to perform a deep copy of the image data since we have to post the event (yes this happens a lot with this api) - if (_image.size() < static_cast(sz)) - _image.resize(sz); - memcpy(_image.data(), img, sz); - QQuaternion imu; - if (npos && pos) - imu = QQuaternion(static_cast(pos[0].qw), static_cast(pos[0].qx), static_cast(pos[0].qy), static_cast(pos[0].qz)); - - SolumImage solumImage = { - .img_ = { reinterpret_cast(_image.data()), sz }, - .width_ = nfo->width, - .height_ = nfo->height, - .bpp_ = nfo->bitsPerPixel, - .format_ = nfo->format, - }; - - QApplication::postEvent(_solum.get(), new event::ProcessedImage( - IMAGE_EVENT, solumImage, nfo->overlay, imu, nfo->micronsPerPixel, nfo->originX, nfo->originY - )); - }, - // new raw data callback - [](const void* data, const CusRawImageInfo* nfo, int, const CusPosInfo*) - { - SolumImage solumImage = { - .width_ = nfo->lines, - .height_ = nfo->samples, - .bpp_ = nfo->bitsPerSample, - .format_ = nfo->jpeg ? Jpeg : Uncompressed8Bit, - }; - - // we need to perform a deep copy of the image data since we have to post the event (yes this happens a lot with this api) - size_t sz = nfo->lines * nfo->samples * (nfo->bitsPerSample / 8); - if (nfo->rf) - { - if (_rfData.size() < static_cast(sz)) - _rfData.resize(sz); - memcpy(_rfData.data(), data, sz); - solumImage.img_ = { reinterpret_cast(_rfData.data()), sz }, + CusInitParams initParams = solumDefaultInitParams(); + initParams.args = {argc, argv}; + + const std::string security_key_dir = QStandardPaths::writableLocation(QStandardPaths::AppDataLocation).toStdString(); + initParams.storeDir = security_key_dir.c_str(); + + initParams.connectFn = [](CusConnection res, int port, const char* msg) { + QApplication::postEvent(_solum.get(), new event::Connection(res, port, QString::fromLatin1(msg))); + }; + + initParams.certFn = [](int daysValid) { + QApplication::postEvent(_solum.get(), new event::Cert(daysValid)); + }; + + initParams.powerDownFn = [](CusPowerDown res, int tm) { + QApplication::postEvent(_solum.get(), new event::PowerDown(res, tm)); + }; + + initParams.newProcessedImageFn = + [](const void* img, const CusProcessedImageInfo* nfo, int npos, const CusPosInfo* pos) { + size_t sz = nfo->imageSize; + // we need to perform a deep copy of the image data since we have to post the event (yes this happens a lot with this api) + if (_image.size() < static_cast(sz)) + _image.resize(sz); + memcpy(_image.data(), img, sz); + QQuaternion imu; + if (npos && pos) + imu = QQuaternion(static_cast(pos[0].qw), static_cast(pos[0].qx), static_cast(pos[0].qy), static_cast(pos[0].qz)); + + SolumImage solumImage = { + .img_ = { reinterpret_cast(_image.data()), sz }, + .width_ = nfo->width, + .height_ = nfo->height, + .bpp_ = nfo->bitsPerPixel, + .format_ = nfo->format, + }; + + QApplication::postEvent(_solum.get(), new event::ProcessedImage( + IMAGE_EVENT, solumImage, nfo->overlay, imu, nfo->micronsPerPixel, nfo->originX, nfo->originY + )); + }; + + + initParams.buttonFn = [](CusButton btn, int clicks) { + // post event here, as the gui (statusbar) will be updated directly, and it needs to come from the application thread + QApplication::postEvent(_solum.get(), new event::Button(btn, clicks)); + }; + + initParams.errorFn = [](CusErrorCode code, const char* msg) { + // post event here, as the gui (statusbar) will be updated directly, and it needs to come from the application thread + QApplication::postEvent(_solum.get(), new event::Error(msg)); + }; + + initParams.imagingFn = [](CusImagingState state, int imaging) { + // post event here, as the gui (statusbar) will be updated directly, and it needs to come from the application thread + QApplication::postEvent(_solum.get(), new event::Imaging(state, imaging ? true : false)); + }; + + + initParams.newRawImageFn = [](const void* data, const CusRawImageInfo* nfo, int, const CusPosInfo*) { + SolumImage solumImage = { + .width_ = nfo->lines, + .height_ = nfo->samples, + .bpp_ = nfo->bitsPerSample, + .format_ = nfo->jpeg ? Jpeg : Uncompressed8Bit, + }; + + // we need to perform a deep copy of the image data since we have to post the event (yes this happens a lot with this api) + size_t sz = nfo->lines * nfo->samples * (nfo->bitsPerSample / 8); + if (nfo->rf) { + if (_rfData.size() < static_cast(sz)) + _rfData.resize(sz); + memcpy(_rfData.data(), data, sz); + solumImage.img_ = { reinterpret_cast(_rfData.data()), sz }, QApplication::postEvent(_solum.get(), new event::RfImage(solumImage, nfo->lateralSize, nfo->axialSize)); - } - else - { - // image may be a jpeg, adjust the size - if (nfo->jpeg) - sz = nfo->jpeg; - if (_prescanImage.size() < static_cast(sz)) - _prescanImage.resize(sz); - memcpy(_prescanImage.data(), data, sz); - solumImage.img_ = { reinterpret_cast(_prescanImage.data()), sz }, + } + else { + // image may be a jpeg, adjust the size + if (nfo->jpeg) { sz = nfo->jpeg; } + if (_prescanImage.size() < static_cast(sz)) + _prescanImage.resize(sz); + memcpy(_prescanImage.data(), data, sz); + solumImage.img_ = { reinterpret_cast(_prescanImage.data()), sz }, QApplication::postEvent(_solum.get(), new event::Image(PRESCAN_EVENT, solumImage, false)); - } - }, - // new spectrum callback - [](const void* img, const CusSpectralImageInfo* nfo) - { - size_t sz = nfo->lines * nfo->samples * (nfo->bitsPerSample / 8); - // we need to perform a deep copy of the spectrum data since we have to post the event (yes this happens a lot with this api) - if (_spectrum.size() < sz) - _spectrum.resize(sz); - memcpy(_spectrum.data(), img, sz); - QApplication::postEvent(_solum.get(), new event::SpectrumImage(_spectrum.data(), nfo->lines, nfo->samples, nfo->bitsPerSample)); - }, - // new imu port callback - [](int port) - { - QApplication::postEvent(_solum.get(), new event::ImuPort(port)); - }, - // new imu data callback - [](const CusPosInfo* pos) - { - QQuaternion imu; - if (pos) - imu = QQuaternion(static_cast(pos->qw), static_cast(pos->qx), static_cast(pos->qy), static_cast(pos->qz)); - QApplication::postEvent(_solum.get(), new event::Imu(IMU_EVENT, imu)); - }, - // imaging state change callback - [](CusImagingState state, int imaging) - { - // post event here, as the gui (statusbar) will be updated directly, and it needs to come from the application thread - QApplication::postEvent(_solum.get(), new event::Imaging(state, imaging ? true : false)); - }, - // button press callback - [](CusButton btn, int clicks) - { - // post event here, as the gui (statusbar) will be updated directly, and it needs to come from the application thread - QApplication::postEvent(_solum.get(), new event::Button(btn, clicks)); - }, - // error message callback - [](const char* err) - { - // post event here, as the gui (statusbar) will be updated directly, and it needs to come from the application thread - QApplication::postEvent(_solum.get(), new event::Error(err)); - }, - width, height) != 0) + } + }; + + initParams.newSpectralImageFn = [](const void* img, const CusSpectralImageInfo* nfo) { + size_t sz = nfo->lines * nfo->samples * (nfo->bitsPerSample / 8); + // we need to perform a deep copy of the spectrum data since we have to post the event (yes this happens a lot with this api) + if (_spectrum.size() < sz) { _spectrum.resize(sz); } + memcpy(_spectrum.data(), img, sz); + QApplication::postEvent(_solum.get(), new event::SpectrumImage(_spectrum.data(), nfo->lines, nfo->samples, nfo->bitsPerSample)); + }; + + initParams.newImuPortFn = [](int port) { + QApplication::postEvent(_solum.get(), new event::ImuPort(port)); + }; + + initParams.newImuDataFn = [](const CusPosInfo* pos) { + QQuaternion imu; + if (pos) + imu = QQuaternion(static_cast(pos->qw), static_cast(pos->qx), static_cast(pos->qy), static_cast(pos->qz)); + QApplication::postEvent(_solum.get(), new event::Imu(IMU_EVENT, imu)); + }; + + initParams.width = width; + initParams.height = height; + + if (solumInit(&initParams) != 0) { qDebug() << "error initializing listener"; return -1; } - solumSetTeeFn( - [](bool connected, const char* serial, double timeRemaining, const char* id, const char* name, const char* exam) - { - // post event here, as the gui (statusbar) will be updated directly, and it needs to come from the application thread - QApplication::postEvent(_solum.get(), new event::Tee(connected, QString::fromLatin1(serial), timeRemaining, - QString::fromLatin1(id), QString::fromLatin1(name), QString::fromLatin1(exam))); - }); + solumSetTeeFn( [](bool connected, const char* serial, double timeRemaining, const char* id, const char* name, const char* exam) { + // post event here, as the gui (statusbar) will be updated directly, and it needs to come from the application thread + QApplication::postEvent(_solum.get(), new event::Tee(connected, QString::fromLatin1(serial), timeRemaining, + QString::fromLatin1(id), QString::fromLatin1(name), QString::fromLatin1(exam))); + }); print_firmware_version(); diff --git a/examples/solum_qt/solum/solumqt.cpp b/examples/solum_qt/solum/solumqt.cpp index 59a11a2..39e6d6d 100644 --- a/examples/solum_qt/solum/solumqt.cpp +++ b/examples/solum_qt/solum/solumqt.cpp @@ -2,6 +2,7 @@ #include "display.h" #include "3d.h" #include +#include static Solum* _me; @@ -843,7 +844,15 @@ void Solum::onTcpConnect() { if (!tcpConnected_) { - if (solumConnect(ui_.ip->text().toStdString().c_str(), ui_.port->text().toInt()) < 0) + + const std::string ip = ui_.ip->text().toStdString(); + const CusConnectionParams connectionParams = { + ip.c_str(), + ui_.port->text().toUInt(), + 0 + }; + + if (solumConnect(&connectionParams) < 0) addStatus(tr("Connection failed")); else addStatus(tr("Trying connection")); diff --git a/include/solum/solum.h b/include/solum/solum.h index 707d0bf..b6821c4 100644 --- a/include/solum/solum.h +++ b/include/solum/solum.h @@ -1,59 +1,64 @@ #pragma once + #include "solum_export.h" #include "solum_cb.h" -extern "C" +/// probe connection parameters for solumConnect +typedef struct _CusConnectionParams +{ + const char* ipAddress; ///< the ip address of the probe + unsigned int port; ///< the probe's tcp port to connect to + long long int networkId; ///< the wifi network id obtained when auto-joining wifi on android. optional, 0 by default + +} CusConnectionParams; + +/// initialization parameters for solumInit +typedef struct _CusInitParams { + struct Args + { + int argc; ///< the argument count for input parameters to pass to the library + char** argv; ///< the arguments to pass to the library, possibly required for qt graphics buffer initialization + } + args; + const char* storeDir; ///< the directory to store security keys + CusConnectFn connectFn; ///< connection status callback + CusCertFn certFn; ///< certificate status callback + CusPowerDownFn powerDownFn; ///< probe power down callback + CusImagingFn imagingFn; ///< imaging state callback + CusButtonFn buttonFn; ///< button press callback + CusErrorFn errorFn; ///< error message callback + CusNewProcessedImageFn newProcessedImageFn; ///< new processed image callback (scan-converted image) + CusNewRawImageFn newRawImageFn; ///< new raw image callback (pre scan-converted image or rf data) + CusNewSpectralImageFn newSpectralImageFn; ///< new processed spectral image callback + CusNewImuPortFn newImuPortFn; ///< new imu udp port callback + CusNewImuDataFn newImuDataFn; ///< new imu data callback + int width; ///< the width of the output buffer + int height; ///< the height of the output buffer + +} CusInitParams; + +#ifdef __cplusplus +extern "C" { +#endif + /// initializes the solum module - /// @param[in] argc the argument count for input parameters to pass to the library - /// @param[in] argv the arguments to pass to the library, possibly required for qt graphics buffer initialization - /// @param[in] dir the directory to store security keys - /// @param[in] connect connection status callback - /// @param[in] cert certificate status callback - /// @param[in] power probe power down callback - /// @param[in] newProcessedImage new processed image callback (scan-converted image) - /// @param[in] newRawImage new raw image callback - (pre scan-converted image) - /// @param[in] newSpectralImage new processed spectral image callback - /// @param[in] newImuPort new imu UDP port callback - /// @param[in] newImuData new imu data callback - /// @param[in] imaging imaging state callback - /// @param[in] btn button press callback - /// @param[in] err error message callback - /// @param[in] width the width of the output buffer - /// @param[in] height the height of the output buffer - /// @return success of the call - /// @retval 0 the initialization was successful - /// @retval -1 the initialization was not successful - /// @note must be called before any other functions will succeed - SOLUM_EXPORT int solumInit(int argc, char** argv, const char* dir, - CusConnectFn connect, CusCertFn cert, CusPowerDownFn power, - CusNewProcessedImageFn newProcessedImage, CusNewRawImageFn newRawImage, - CusNewSpectralImageFn newSpectralImage, CusNewImuPortFn newImuPort, CusNewImuDataFn newImuData, - CusImagingFn imaging, CusButtonFn btn, CusErrorFn err, - int width, int height); - - /// initializes the solum module with a minimal set of callbacks - /// @param[in] connect connection status callback - /// @param[in] cert certificate status callback - /// @param[in] power probe power down callback - /// @param[in] imaging imaging state callback - /// @param[in] btn button press callback - /// @param[in] err error message callback - /// @param[in] newProcessedImage new processed image callback (scan-converted image) - /// @param[in] width the width of the output buffer - /// @param[in] height the height of the output buffer + /// @param[in] params the sdk configuration parameters /// @return success of the call /// @retval 0 the initialization was successful /// @retval -1 the initialization was not successful /// @note must be called before any other functions will succeed - SOLUM_EXPORT int solumInitMinimal(CusConnectFn connect, CusCertFn cert, CusPowerDownFn power, CusImagingFn imaging, CusButtonFn btn, CusErrorFn err, - CusNewProcessedImageFn newProcessedImage, int width, int height); + SOLUM_EXPORT int solumInit(const CusInitParams* params); + + /// get init params with default values + /// @return a zero initialized struct + SOLUM_EXPORT CusInitParams solumDefaultInitParams(void); /// cleans up memory allocated by the solum module /// @retval 0 the destroy attempt was successful /// @retval -1 the destroy attempt was not successful /// @note should be called prior to exiting the application - SOLUM_EXPORT int solumDestroy(); + SOLUM_EXPORT int solumDestroy(void); /// sets a callback for the tee connectivity function /// @param[in] tee the callback function @@ -67,32 +72,35 @@ extern "C" /// use this string to download the firmware binary from clarius cloud and update the probe /// @param[in] platform the platform to retrieve the firmware version for /// @param[out] version holds the firmware version for the given platform - /// @param[in] sz size of the version string buffer, suggest at least 32 bytes allocated + /// @param[in] sz size of the version string buffer, with at least 128 bytes allocated /// @return success of the call /// @retval 0 the information was retrieved /// @retval -1 the information could not be retrieved SOLUM_EXPORT int solumFwVersion(CusPlatform platform, char* version, int sz); + /// get connection params with default values + /// @return a zero initialized struct + SOLUM_EXPORT CusConnectionParams solumDefaultConnectionParams(void); + /// connects to a probe that is on the same network as the caller - /// @param[in] ipAddress the ip address of the probe - /// @param[in] port the probe's tcp port to connect to + /// @param[in] params the connection parameters /// @return success of the call /// @retval 0 the connection attempt was successful /// @retval -1 the connection attempt was not successful - SOLUM_EXPORT int solumConnect(const char* ipAddress, unsigned int port); + SOLUM_EXPORT int solumConnect(const CusConnectionParams* params); /// disconnects from an existing connection /// @return success of the call /// @retval 0 disconnection was successful /// @retval -1 the disconnection was unsuccessful - SOLUM_EXPORT int solumDisconnect(); + SOLUM_EXPORT int solumDisconnect(void); /// retrieves the current connected state of the module /// @return the connected state of the module /// @retval 0 there is currently no connection /// @retval 1 there is currently a connection /// @retval -1 the module is not initialized - SOLUM_EXPORT int solumIsConnected(); + SOLUM_EXPORT int solumIsConnected(void); /// sets the certificate for the probe to be connected with /// @param[in] cert the certificate provided by clarius @@ -180,7 +188,7 @@ extern "C" /// @retval -1 the shutdown request could not be made /// @note it is typically desirable to disconnect from bluetooth once the tcp connection has been established /// instead of relying on the power service, this function can be used to power down the probe over tcp - SOLUM_EXPORT int solumPowerDown(); + SOLUM_EXPORT int solumPowerDown(void); /// sets the internal probe settings to be applied upon a connection or when an existing connection exists /// @param[in] settings the structure containing the probe settings @@ -254,7 +262,7 @@ extern "C" /// @return success of the call /// @retval 0 roi could be adjusted /// @retval -1 roi could not be adjusted - SOLUM_EXPORT int solumMaximizeRoi(); + SOLUM_EXPORT int solumMaximizeRoi(void); /// retrieves the gate for the current mode if valid /// @param[out] lines holds the lines that can be drawn to portray the gate on the image @@ -280,7 +288,7 @@ extern "C" /// retrieves the current imaging mode /// @return the current imaging mode - SOLUM_EXPORT CusMode solumGetMode(); + SOLUM_EXPORT CusMode solumGetMode(void); /// enables the 5v output on or off /// @param[in] en the enable state, set to 1 to turn 5v on, or 0 to turn off @@ -395,4 +403,7 @@ extern "C" /// @retval 0 the function was successful /// @retval -1 the function was not successful SOLUM_EXPORT int solumSetTeeExamInfo(const char* id, const char* name, const char* exam); + +#ifdef __cplusplus } +#endif diff --git a/include/solum/solum_cb.h b/include/solum/solum_cb.h index 8087bf8..5044a1b 100644 --- a/include/solum/solum_cb.h +++ b/include/solum/solum_cb.h @@ -1,6 +1,7 @@ #pragma once #include "solum_def.h" +#include /// string list callback function /// @param[in] list the string list @@ -38,7 +39,12 @@ typedef void (*CusNewProcessedImageFn)(const void* img, const CusProcessedImageI /// @param[in] nfo image information associated with the image data typedef void (*CusNewSpectralImageFn)(const void* img, const CusSpectralImageInfo* nfo); /// imaging callback function -/// @param[in] state the imaging ready state +/// used primarily to denote 4 different scenarios: +/// 1. when imaging is ready after an application load or parameter update (ImagingReady state) +/// 2. when there is an error after trying to load an application or updating a parameter (ImagingNotReady state) +/// 3. when the low bandwidth flag has changed to denote that imaging has been re-optimized for the network performance (LowBandwidth state) +/// 4. when the probe has frozen or unfrozen due to an internal state change (all other states) +/// @param[in] state the imaging state /// @param[in] imaging 1 = running , 0 = stopped typedef void (*CusImagingFn)(CusImagingState state, int imaging); /// button callback function @@ -63,8 +69,9 @@ typedef void (*CusRawRequestFn)(int res, const char* extension); /// @param[in] res the raw data result, typically the size of the data package requested or actually downloaded typedef void (*CusRawFn)(int res); /// error callback function +/// @param[in] code error code to associate with the error /// @param[in] msg the error message with associated error that occurred -typedef void (*CusErrorFn)(const char* msg); +typedef void (*CusErrorFn)(CusErrorCode code, const char* msg); /// tee connection callback function /// @param[in] connected flag associated with the tee having a disposable probe connection /// @param[in] serial if a probe is connected, the serial number of the probe diff --git a/include/solum/solum_def.h b/include/solum/solum_def.h index 753633c..78c66bd 100644 --- a/include/solum/solum_def.h +++ b/include/solum/solum_def.h @@ -1,7 +1,7 @@ #pragma once // SDK: solum -// Version: 11.3.0 +// Version: 12.0.2 #define CUS_MAXTGC 10 #define CUS_SUCCESS 0 @@ -84,6 +84,7 @@ typedef enum _CusConnection ProbeDisconnected, ///< Disconnected from probe ConnectionFailed, ///< Failed to connect to probe SwUpdateRequired, ///< Software update required + OSUpdateRequired, ///< Scanner O/S update required } CusConnection; @@ -182,6 +183,8 @@ typedef enum _CusPowerDown TooHot, ///< Probe got too hot LowBattery, ///< Low battery ButtonOff, ///< User held button to shut down probe + ChargingInDock, ///< Probe was docked in charger + SoftwareShutdown, ///< Solum software sent shutdown command } CusPowerDown; @@ -205,6 +208,19 @@ typedef enum _CusSwUpdate } CusSwUpdate; +/// Error codes +typedef enum _CusErrorCode +{ + ErrorGeneric, ///< Generic error + ErrorSetup, ///< Setup error + ErrorProbe, ///< Probe error + ErrorApplication, ///< Application load error + ErrorSwUpdate, ///< Software update error + ErrorGl, ///< GL error + ErrorRawData, ///< Raw data error + +} CusErrorCode; + /// Wireless optimization methods /// /// Available channels differ based on locale. @@ -367,7 +383,9 @@ typedef struct _CusProbeSettings int autoFreeze; ///< The number of seconds to engage freezing imaging after no contact mode has been engaged, valid range is 0 - 120, where 0 turns the function off int keepAwake; ///< The number of minutes to power down the device once imaging has been frozen, valid range is 0 - 120, where 0 turns the function off int deepSleep; ///< The number of hours for probe to go into deep sleep, valid range is 0 - 96, where 0 disables deep sleep - int stationary; ///< The number of seconds to engage freezing imaging after being stationary for a specific time frame + int stationary; ///< The number of seconds to engage freezing imaging after being stationary for a specific time frame, valid range is 0 - 120, where 0 turns the function off + int powerFan; ///< Flag for the ability to use the power fan + int autoBoot; ///< Auto boot probe when it comes out of deep sleep int wifiOptimization; ///< Flag allowing the probe to automatically freeze when poor wifi connectivity is detected int wifiSearch; ///< Flag to force the probe to scan the networks and choose the appropriate channel before bringing up its Wi-Fi int htWifi; ///< Flag to enable 40 MHz bands for the probe's Wi-Fi network @@ -377,6 +395,8 @@ typedef struct _CusProbeSettings int wakeOnShake; ///< Flag allowing the probe to start imaging when it is picked up while frozen int bandwidthOptimization; ///< Flag allowing the system to adjust bandwidth parameters automatically when lag or dropped frames are determined int forceLogSend; ///< Flag allowing the probe to send logs while imaging + int imageOnUndock; ///< Start imaging when probe comes out of charging dock + int alarmOnUndock; ///< Sound an alarm when probe comes out of charging dock CusButtonSetting up; ///< Button up setting CusButtonSetting down; ///< Button down setting CusButtonSetting handle; ///< Button handle setting diff --git a/include/solum/solum_export.h b/include/solum/solum_export.h index 6269680..dba8175 100644 --- a/include/solum/solum_export.h +++ b/include/solum/solum_export.h @@ -9,20 +9,36 @@ # ifndef SOLUM_EXPORT # ifdef solum_EXPORTS /* We are building this library */ -# define SOLUM_EXPORT __declspec(dllexport) +# if defined(_WIN32) +# define SOLUM_EXPORT __declspec(dllexport) +# elif defined(__APPLE__) +# define SOLUM_EXPORT __attribute__((visibility("default"))) +# endif # else /* We are using this library */ -# define SOLUM_EXPORT __declspec(dllimport) +# if defined(_WIN32) +# define SOLUM_EXPORT __declspec(dllimport) +# elif defined(__APPLE__) +# define SOLUM_EXPORT __attribute__((visibility("default"))) +# endif # endif # endif # ifndef SOLUM_NO_EXPORT -# define SOLUM_NO_EXPORT +# if defined(_WIN32) +# define SOLUM_NO_EXPORT +# elif defined(__APPLE__) +# define SOLUM_NO_EXPORT __attribute__((visibility("hidden"))) +# endif # endif #endif #ifndef SOLUM_DEPRECATED -# define SOLUM_DEPRECATED __declspec(deprecated) +# if defined(_WIN32) +# define SOLUM_DEPRECATED __declspec(deprecated) +# elif defined(__APPLE__) +# define SOLUM_DEPRECATED __attribute__ ((__deprecated__)) +# endif #endif #ifndef SOLUM_DEPRECATED_EXPORT @@ -33,6 +49,7 @@ # define SOLUM_DEPRECATED_NO_EXPORT SOLUM_NO_EXPORT SOLUM_DEPRECATED #endif +/* NOLINTNEXTLINE(readability-avoid-unconditional-preprocessor-if) */ #if 0 /* DEFINE_NO_DEPRECATED */ # ifndef SOLUM_NO_DEPRECATED # define SOLUM_NO_DEPRECATED diff --git a/include/solum/solum_export_macOSX_11.3.0.h b/include/solum/solum_export_12.0.2_macos.arm64.h similarity index 93% rename from include/solum/solum_export_macOSX_11.3.0.h rename to include/solum/solum_export_12.0.2_macos.arm64.h index 59714eb..269b2d1 100644 --- a/include/solum/solum_export_macOSX_11.3.0.h +++ b/include/solum/solum_export_12.0.2_macos.arm64.h @@ -33,6 +33,7 @@ # define SOLUM_DEPRECATED_NO_EXPORT SOLUM_NO_EXPORT SOLUM_DEPRECATED #endif +/* NOLINTNEXTLINE(readability-avoid-unconditional-preprocessor-if) */ #if 0 /* DEFINE_NO_DEPRECATED */ # ifndef SOLUM_NO_DEPRECATED # define SOLUM_NO_DEPRECATED diff --git a/include/solum/solum_export_winX64_11.3.0.h b/include/solum/solum_export_winX64_12.0.2.h similarity index 89% rename from include/solum/solum_export_winX64_11.3.0.h rename to include/solum/solum_export_winX64_12.0.2.h index 6269680..bd2eb16 100644 --- a/include/solum/solum_export_winX64_11.3.0.h +++ b/include/solum/solum_export_winX64_12.0.2.h @@ -17,7 +17,7 @@ # endif # ifndef SOLUM_NO_EXPORT -# define SOLUM_NO_EXPORT +# define SOLUM_NO_EXPORT # endif #endif @@ -33,6 +33,7 @@ # define SOLUM_DEPRECATED_NO_EXPORT SOLUM_NO_EXPORT SOLUM_DEPRECATED #endif +/* NOLINTNEXTLINE(readability-avoid-unconditional-preprocessor-if) */ #if 0 /* DEFINE_NO_DEPRECATED */ # ifndef SOLUM_NO_DEPRECATED # define SOLUM_NO_DEPRECATED diff --git a/lib/libsolum.dylib b/lib/libsolum.dylib index 5c0fc36..2086aab 100755 Binary files a/lib/libsolum.dylib and b/lib/libsolum.dylib differ diff --git a/lib/solum.dll b/lib/solum.dll index 418c1c8..36a29e3 100644 Binary files a/lib/solum.dll and b/lib/solum.dll differ diff --git a/lib/solum.lib b/lib/solum.lib index 592147d..16e25f3 100644 Binary files a/lib/solum.lib and b/lib/solum.lib differ