With a background in electron beam welding and vacuum
- machines, Evobeam's SLAvam 300 system ventures into Powder Bed Fusion, and offers high temperature
+ machines, Evobeam's SLaVAM 300 system ventures into Powder Bed Fusion, and offers high temperature
processes up to 1000° degree C in a vacuum atmosphere.
+
+
+
+
+
diff --git a/Drivers/BK9xxx/Headers/CppDynamic/libmcdriver_bk9xxx_dynamic.h b/Drivers/BK9xxx/Headers/CppDynamic/libmcdriver_bk9xxx_dynamic.h
index 453aa6790..ad85d2642 100644
--- a/Drivers/BK9xxx/Headers/CppDynamic/libmcdriver_bk9xxx_dynamic.h
+++ b/Drivers/BK9xxx/Headers/CppDynamic/libmcdriver_bk9xxx_dynamic.h
@@ -297,6 +297,16 @@ typedef LibMCDriver_BK9xxxResult (*PLibMCDriver_BK9xxxDriver_BK9xxx_AnalogInputE
*/
typedef LibMCDriver_BK9xxxResult (*PLibMCDriver_BK9xxxDriver_BK9xxx_AnalogOutputExistsPtr) (LibMCDriver_BK9xxx_Driver_BK9xxx pDriver_BK9xxx, const char * pName, bool * pNameExists);
+/**
+* Returns if an analog input is out of bounds. The raw values itself will be clipped to the configured range.
+*
+* @param[in] pDriver_BK9xxx - Driver_BK9xxx instance.
+* @param[in] pName - Name of variable. Fails if Variable does not exist or is not an analog variable.
+* @param[out] pInputIsOutOfBounds - Flag if the raw value is out of bounds and has been clipped to the input window.
+* @return error code or 0 (success)
+*/
+typedef LibMCDriver_BK9xxxResult (*PLibMCDriver_BK9xxxDriver_BK9xxx_AnalogInputIsOutOfBoundsPtr) (LibMCDriver_BK9xxx_Driver_BK9xxx pDriver_BK9xxx, const char * pName, bool * pInputIsOutOfBounds);
+
/**
* Reads a value from an digital input variable. Fails if variable does not exist.
*
@@ -491,6 +501,7 @@ typedef struct {
PLibMCDriver_BK9xxxDriver_BK9xxx_DigitalOutputExistsPtr m_Driver_BK9xxx_DigitalOutputExists;
PLibMCDriver_BK9xxxDriver_BK9xxx_AnalogInputExistsPtr m_Driver_BK9xxx_AnalogInputExists;
PLibMCDriver_BK9xxxDriver_BK9xxx_AnalogOutputExistsPtr m_Driver_BK9xxx_AnalogOutputExists;
+ PLibMCDriver_BK9xxxDriver_BK9xxx_AnalogInputIsOutOfBoundsPtr m_Driver_BK9xxx_AnalogInputIsOutOfBounds;
PLibMCDriver_BK9xxxDriver_BK9xxx_GetDigitalInputPtr m_Driver_BK9xxx_GetDigitalInput;
PLibMCDriver_BK9xxxDriver_BK9xxx_GetDigitalOutputPtr m_Driver_BK9xxx_GetDigitalOutput;
PLibMCDriver_BK9xxxDriver_BK9xxx_GetAnalogInputRawPtr m_Driver_BK9xxx_GetAnalogInputRaw;
diff --git a/Drivers/BK9xxx/Headers/CppDynamic/libmcdriver_bk9xxx_dynamic.hpp b/Drivers/BK9xxx/Headers/CppDynamic/libmcdriver_bk9xxx_dynamic.hpp
index 69436058d..a07ab782b 100644
--- a/Drivers/BK9xxx/Headers/CppDynamic/libmcdriver_bk9xxx_dynamic.hpp
+++ b/Drivers/BK9xxx/Headers/CppDynamic/libmcdriver_bk9xxx_dynamic.hpp
@@ -537,6 +537,7 @@ class CDriver_BK9xxx : public CDriver {
inline bool DigitalOutputExists(const std::string & sName);
inline bool AnalogInputExists(const std::string & sName);
inline bool AnalogOutputExists(const std::string & sName);
+ inline bool AnalogInputIsOutOfBounds(const std::string & sName);
inline bool GetDigitalInput(const std::string & sVariableName);
inline bool GetDigitalOutput(const std::string & sVariableName);
inline LibMCDriver_BK9xxx_uint32 GetAnalogInputRaw(const std::string & sVariableName);
@@ -695,6 +696,7 @@ class CDriver_BK9xxx : public CDriver {
pWrapperTable->m_Driver_BK9xxx_DigitalOutputExists = nullptr;
pWrapperTable->m_Driver_BK9xxx_AnalogInputExists = nullptr;
pWrapperTable->m_Driver_BK9xxx_AnalogOutputExists = nullptr;
+ pWrapperTable->m_Driver_BK9xxx_AnalogInputIsOutOfBounds = nullptr;
pWrapperTable->m_Driver_BK9xxx_GetDigitalInput = nullptr;
pWrapperTable->m_Driver_BK9xxx_GetDigitalOutput = nullptr;
pWrapperTable->m_Driver_BK9xxx_GetAnalogInputRaw = nullptr;
@@ -986,6 +988,15 @@ class CDriver_BK9xxx : public CDriver {
if (pWrapperTable->m_Driver_BK9xxx_AnalogOutputExists == nullptr)
return LIBMCDRIVER_BK9XXX_ERROR_COULDNOTFINDLIBRARYEXPORT;
+ #ifdef _WIN32
+ pWrapperTable->m_Driver_BK9xxx_AnalogInputIsOutOfBounds = (PLibMCDriver_BK9xxxDriver_BK9xxx_AnalogInputIsOutOfBoundsPtr) GetProcAddress(hLibrary, "libmcdriver_bk9xxx_driver_bk9xxx_analoginputisoutofbounds");
+ #else // _WIN32
+ pWrapperTable->m_Driver_BK9xxx_AnalogInputIsOutOfBounds = (PLibMCDriver_BK9xxxDriver_BK9xxx_AnalogInputIsOutOfBoundsPtr) dlsym(hLibrary, "libmcdriver_bk9xxx_driver_bk9xxx_analoginputisoutofbounds");
+ dlerror();
+ #endif // _WIN32
+ if (pWrapperTable->m_Driver_BK9xxx_AnalogInputIsOutOfBounds == nullptr)
+ return LIBMCDRIVER_BK9XXX_ERROR_COULDNOTFINDLIBRARYEXPORT;
+
#ifdef _WIN32
pWrapperTable->m_Driver_BK9xxx_GetDigitalInput = (PLibMCDriver_BK9xxxDriver_BK9xxx_GetDigitalInputPtr) GetProcAddress(hLibrary, "libmcdriver_bk9xxx_driver_bk9xxx_getdigitalinput");
#else // _WIN32
@@ -1246,6 +1257,10 @@ class CDriver_BK9xxx : public CDriver {
if ( (eLookupError != 0) || (pWrapperTable->m_Driver_BK9xxx_AnalogOutputExists == nullptr) )
return LIBMCDRIVER_BK9XXX_ERROR_COULDNOTFINDLIBRARYEXPORT;
+ eLookupError = (*pLookup)("libmcdriver_bk9xxx_driver_bk9xxx_analoginputisoutofbounds", (void**)&(pWrapperTable->m_Driver_BK9xxx_AnalogInputIsOutOfBounds));
+ if ( (eLookupError != 0) || (pWrapperTable->m_Driver_BK9xxx_AnalogInputIsOutOfBounds == nullptr) )
+ return LIBMCDRIVER_BK9XXX_ERROR_COULDNOTFINDLIBRARYEXPORT;
+
eLookupError = (*pLookup)("libmcdriver_bk9xxx_driver_bk9xxx_getdigitalinput", (void**)&(pWrapperTable->m_Driver_BK9xxx_GetDigitalInput));
if ( (eLookupError != 0) || (pWrapperTable->m_Driver_BK9xxx_GetDigitalInput == nullptr) )
return LIBMCDRIVER_BK9XXX_ERROR_COULDNOTFINDLIBRARYEXPORT;
@@ -1617,6 +1632,19 @@ class CDriver_BK9xxx : public CDriver {
return resultNameExists;
}
+ /**
+ * CDriver_BK9xxx::AnalogInputIsOutOfBounds - Returns if an analog input is out of bounds. The raw values itself will be clipped to the configured range.
+ * @param[in] sName - Name of variable. Fails if Variable does not exist or is not an analog variable.
+ * @return Flag if the raw value is out of bounds and has been clipped to the input window.
+ */
+ bool CDriver_BK9xxx::AnalogInputIsOutOfBounds(const std::string & sName)
+ {
+ bool resultInputIsOutOfBounds = 0;
+ CheckError(m_pWrapper->m_WrapperTable.m_Driver_BK9xxx_AnalogInputIsOutOfBounds(m_pHandle, sName.c_str(), &resultInputIsOutOfBounds));
+
+ return resultInputIsOutOfBounds;
+ }
+
/**
* CDriver_BK9xxx::GetDigitalInput - Reads a value from an digital input variable. Fails if variable does not exist.
* @param[in] sVariableName - Name of variable.
diff --git a/Drivers/BK9xxx/Implementation/libmcdriver_bk9xxx_analogio.cpp b/Drivers/BK9xxx/Implementation/libmcdriver_bk9xxx_analogio.cpp
index 515586040..683cc25d7 100644
--- a/Drivers/BK9xxx/Implementation/libmcdriver_bk9xxx_analogio.cpp
+++ b/Drivers/BK9xxx/Implementation/libmcdriver_bk9xxx_analogio.cpp
@@ -52,7 +52,7 @@ using namespace LibMCDriver_BK9xxx::Impl;
CDriver_BK9xxx_AnalogIODefinition::CDriver_BK9xxx_AnalogIODefinition(pugi::xml_node& xmlNode)
- : m_nOffset(0), m_nActualRawValue(0), m_nTargetRawValue (0), m_nRawMin (0), m_nRawMax (65535), m_dScaledMin (0.0), m_dScaledMax (100.0)
+ : m_nOffset(0), m_nActualRawValue(0), m_nTargetRawValue (0), m_nRawMin (0), m_nRawMax (65535), m_dScaledMin (0.0), m_dScaledMax (100.0), m_bActualValueIsOutOfBounds(false)
{
auto offsetAttrib = xmlNode.attribute("offset");
@@ -152,17 +152,25 @@ uint32_t CDriver_BK9xxx_AnalogIODefinition::setActualRawValue(int64_t nRawValue)
{
if (nRawValue < (int64_t)m_nRawMin) {
m_nActualRawValue = m_nRawMin;
+ m_bActualValueIsOutOfBounds = true;
}
else if (nRawValue > (int64_t)m_nRawMax) {
m_nActualRawValue = m_nRawMax;
+ m_bActualValueIsOutOfBounds = true;
}
else {
m_nActualRawValue = (uint32_t) nRawValue;
+ m_bActualValueIsOutOfBounds = false;
}
return m_nActualRawValue;
}
+bool CDriver_BK9xxx_AnalogIODefinition::getActualValueIsOutOfBounds() const
+{
+ return m_bActualValueIsOutOfBounds;
+}
+
uint32_t CDriver_BK9xxx_AnalogIODefinition::setTargetRawValue(int64_t nRawValue)
{
if (nRawValue < (int64_t)m_nRawMin) {
diff --git a/Drivers/BK9xxx/Implementation/libmcdriver_bk9xxx_analogio.hpp b/Drivers/BK9xxx/Implementation/libmcdriver_bk9xxx_analogio.hpp
index 680ea96b2..3d3514c6c 100644
--- a/Drivers/BK9xxx/Implementation/libmcdriver_bk9xxx_analogio.hpp
+++ b/Drivers/BK9xxx/Implementation/libmcdriver_bk9xxx_analogio.hpp
@@ -85,6 +85,8 @@ namespace Impl {
std::string m_sUnits;
+ bool m_bActualValueIsOutOfBounds;
+
public:
@@ -110,6 +112,8 @@ namespace Impl {
// Returns value that has been set as target.
uint32_t setTargetRawValue(int64_t nRawValue);
+ bool getActualValueIsOutOfBounds() const;
+
double rawValueToScaledValue(int64_t nRawValue) const;
uint32_t scaledValueToRawValue(double dScaledValue) const;
diff --git a/Drivers/BK9xxx/Implementation/libmcdriver_bk9xxx_driver_bk9xxx.cpp b/Drivers/BK9xxx/Implementation/libmcdriver_bk9xxx_driver_bk9xxx.cpp
index 8a67f912c..d709e331a 100644
--- a/Drivers/BK9xxx/Implementation/libmcdriver_bk9xxx_driver_bk9xxx.cpp
+++ b/Drivers/BK9xxx/Implementation/libmcdriver_bk9xxx_driver_bk9xxx.cpp
@@ -726,6 +726,17 @@ bool CDriver_BK9xxx::AnalogOutputExists(const std::string & sName)
return iIter != m_AnalogOutputIOMap.end();
}
+bool CDriver_BK9xxx::AnalogInputIsOutOfBounds(const std::string& sName)
+{
+ auto iIter = m_AnalogInputIOMap.find(sName);
+ if (iIter == m_AnalogInputIOMap.end())
+ throw ELibMCDriver_BK9xxxInterfaceException(LIBMCDRIVER_BK9XXX_ERROR_ANALOGIONOTFOUND, "analog IO not found: " + sName);
+
+ return iIter->second->getActualValueIsOutOfBounds ();
+
+}
+
+
bool CDriver_BK9xxx::GetDigitalInput(const std::string & sVariableName)
{
auto iIter = m_DigitalInputIOMap.find(sVariableName);
diff --git a/Drivers/BK9xxx/Implementation/libmcdriver_bk9xxx_driver_bk9xxx.hpp b/Drivers/BK9xxx/Implementation/libmcdriver_bk9xxx_driver_bk9xxx.hpp
index c46751830..2e189ef48 100644
--- a/Drivers/BK9xxx/Implementation/libmcdriver_bk9xxx_driver_bk9xxx.hpp
+++ b/Drivers/BK9xxx/Implementation/libmcdriver_bk9xxx_driver_bk9xxx.hpp
@@ -185,6 +185,8 @@ namespace LibMCDriver_BK9xxx {
bool AnalogOutputExists(const std::string& sName) override;
+ bool AnalogInputIsOutOfBounds(const std::string& sName) override;
+
bool GetDigitalInput(const std::string& sVariableName) override;
bool GetDigitalOutput(const std::string& sVariableName) override;
diff --git a/Drivers/BK9xxx/Interfaces/libmcdriver_bk9xxx_abi.hpp b/Drivers/BK9xxx/Interfaces/libmcdriver_bk9xxx_abi.hpp
index e567e1c8e..867531fb6 100644
--- a/Drivers/BK9xxx/Interfaces/libmcdriver_bk9xxx_abi.hpp
+++ b/Drivers/BK9xxx/Interfaces/libmcdriver_bk9xxx_abi.hpp
@@ -310,6 +310,16 @@ LIBMCDRIVER_BK9XXX_DECLSPEC LibMCDriver_BK9xxxResult libmcdriver_bk9xxx_driver_b
*/
LIBMCDRIVER_BK9XXX_DECLSPEC LibMCDriver_BK9xxxResult libmcdriver_bk9xxx_driver_bk9xxx_analogoutputexists(LibMCDriver_BK9xxx_Driver_BK9xxx pDriver_BK9xxx, const char * pName, bool * pNameExists);
+/**
+* Returns if an analog input is out of bounds. The raw values itself will be clipped to the configured range.
+*
+* @param[in] pDriver_BK9xxx - Driver_BK9xxx instance.
+* @param[in] pName - Name of variable. Fails if Variable does not exist or is not an analog variable.
+* @param[out] pInputIsOutOfBounds - Flag if the raw value is out of bounds and has been clipped to the input window.
+* @return error code or 0 (success)
+*/
+LIBMCDRIVER_BK9XXX_DECLSPEC LibMCDriver_BK9xxxResult libmcdriver_bk9xxx_driver_bk9xxx_analoginputisoutofbounds(LibMCDriver_BK9xxx_Driver_BK9xxx pDriver_BK9xxx, const char * pName, bool * pInputIsOutOfBounds);
+
/**
* Reads a value from an digital input variable. Fails if variable does not exist.
*
diff --git a/Drivers/BK9xxx/Interfaces/libmcdriver_bk9xxx_interfaces.hpp b/Drivers/BK9xxx/Interfaces/libmcdriver_bk9xxx_interfaces.hpp
index 72ded477c..4b4e11266 100644
--- a/Drivers/BK9xxx/Interfaces/libmcdriver_bk9xxx_interfaces.hpp
+++ b/Drivers/BK9xxx/Interfaces/libmcdriver_bk9xxx_interfaces.hpp
@@ -434,6 +434,13 @@ class IDriver_BK9xxx : public virtual IDriver {
*/
virtual bool AnalogOutputExists(const std::string & sName) = 0;
+ /**
+ * IDriver_BK9xxx::AnalogInputIsOutOfBounds - Returns if an analog input is out of bounds. The raw values itself will be clipped to the configured range.
+ * @param[in] sName - Name of variable. Fails if Variable does not exist or is not an analog variable.
+ * @return Flag if the raw value is out of bounds and has been clipped to the input window.
+ */
+ virtual bool AnalogInputIsOutOfBounds(const std::string & sName) = 0;
+
/**
* IDriver_BK9xxx::GetDigitalInput - Reads a value from an digital input variable. Fails if variable does not exist.
* @param[in] sVariableName - Name of variable.
diff --git a/Drivers/BK9xxx/Interfaces/libmcdriver_bk9xxx_interfacewrapper.cpp b/Drivers/BK9xxx/Interfaces/libmcdriver_bk9xxx_interfacewrapper.cpp
index 3c7f23df6..19e081416 100644
--- a/Drivers/BK9xxx/Interfaces/libmcdriver_bk9xxx_interfacewrapper.cpp
+++ b/Drivers/BK9xxx/Interfaces/libmcdriver_bk9xxx_interfacewrapper.cpp
@@ -842,6 +842,35 @@ LibMCDriver_BK9xxxResult libmcdriver_bk9xxx_driver_bk9xxx_analogoutputexists(Lib
}
}
+LibMCDriver_BK9xxxResult libmcdriver_bk9xxx_driver_bk9xxx_analoginputisoutofbounds(LibMCDriver_BK9xxx_Driver_BK9xxx pDriver_BK9xxx, const char * pName, bool * pInputIsOutOfBounds)
+{
+ IBase* pIBaseClass = (IBase *)pDriver_BK9xxx;
+
+ try {
+ if (pName == nullptr)
+ throw ELibMCDriver_BK9xxxInterfaceException (LIBMCDRIVER_BK9XXX_ERROR_INVALIDPARAM);
+ if (pInputIsOutOfBounds == nullptr)
+ throw ELibMCDriver_BK9xxxInterfaceException (LIBMCDRIVER_BK9XXX_ERROR_INVALIDPARAM);
+ std::string sName(pName);
+ IDriver_BK9xxx* pIDriver_BK9xxx = dynamic_cast(pIBaseClass);
+ if (!pIDriver_BK9xxx)
+ throw ELibMCDriver_BK9xxxInterfaceException(LIBMCDRIVER_BK9XXX_ERROR_INVALIDCAST);
+
+ *pInputIsOutOfBounds = pIDriver_BK9xxx->AnalogInputIsOutOfBounds(sName);
+
+ return LIBMCDRIVER_BK9XXX_SUCCESS;
+ }
+ catch (ELibMCDriver_BK9xxxInterfaceException & Exception) {
+ return handleLibMCDriver_BK9xxxException(pIBaseClass, Exception);
+ }
+ catch (std::exception & StdException) {
+ return handleStdException(pIBaseClass, StdException);
+ }
+ catch (...) {
+ return handleUnhandledException(pIBaseClass);
+ }
+}
+
LibMCDriver_BK9xxxResult libmcdriver_bk9xxx_driver_bk9xxx_getdigitalinput(LibMCDriver_BK9xxx_Driver_BK9xxx pDriver_BK9xxx, const char * pVariableName, bool * pValue)
{
IBase* pIBaseClass = (IBase *)pDriver_BK9xxx;
@@ -1162,6 +1191,8 @@ LibMCDriver_BK9xxxResult LibMCDriver_BK9xxx::Impl::LibMCDriver_BK9xxx_GetProcAdd
*ppProcAddress = (void*) &libmcdriver_bk9xxx_driver_bk9xxx_analoginputexists;
if (sProcName == "libmcdriver_bk9xxx_driver_bk9xxx_analogoutputexists")
*ppProcAddress = (void*) &libmcdriver_bk9xxx_driver_bk9xxx_analogoutputexists;
+ if (sProcName == "libmcdriver_bk9xxx_driver_bk9xxx_analoginputisoutofbounds")
+ *ppProcAddress = (void*) &libmcdriver_bk9xxx_driver_bk9xxx_analoginputisoutofbounds;
if (sProcName == "libmcdriver_bk9xxx_driver_bk9xxx_getdigitalinput")
*ppProcAddress = (void*) &libmcdriver_bk9xxx_driver_bk9xxx_getdigitalinput;
if (sProcName == "libmcdriver_bk9xxx_driver_bk9xxx_getdigitaloutput")
diff --git a/Drivers/CMakeLists.txt b/Drivers/CMakeLists.txt
index bc14687b8..2f8a20810 100644
--- a/Drivers/CMakeLists.txt
+++ b/Drivers/CMakeLists.txt
@@ -24,10 +24,12 @@ add_subdirectory(BK9xxx)
add_subdirectory(BuR)
add_subdirectory(CifX)
add_subdirectory(Camera)
+add_subdirectory(Euler)
add_subdirectory(LibOAPC)
add_subdirectory(Marlin)
add_subdirectory(OPCUA)
add_subdirectory(OpenCV)
+add_subdirectory(Pylon)
add_subdirectory(FrameBuffer)
add_subdirectory(UART)
add_subdirectory(Rasterizer)
diff --git a/Drivers/Euler/.gitignore b/Drivers/Euler/.gitignore
new file mode 100644
index 000000000..dfff75f85
--- /dev/null
+++ b/Drivers/Euler/.gitignore
@@ -0,0 +1,2 @@
+ACT/LibMCEnv_component
+ACT/LibMCDriver_ADS_component
\ No newline at end of file
diff --git a/Drivers/Euler/ACT/LibMCDriver_Euler.xml b/Drivers/Euler/ACT/LibMCDriver_Euler.xml
new file mode 100644
index 000000000..ee67ce8a7
--- /dev/null
+++ b/Drivers/Euler/ACT/LibMCDriver_Euler.xml
@@ -0,0 +1,309 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Drivers/Euler/ACT/generateInterfaces.bat b/Drivers/Euler/ACT/generateInterfaces.bat
new file mode 100644
index 000000000..27d5efc13
--- /dev/null
+++ b/Drivers/Euler/ACT/generateInterfaces.bat
@@ -0,0 +1,3 @@
+..\..\..\ACT\act.exe LibMCDriver_Euler.xml -bindings ..\Headers -interfaces ..\Interfaces -suppresssubcomponents -suppresslicense -suppressstub -suppressexamples
+
+pause
\ No newline at end of file
diff --git a/Drivers/Euler/CMakeLists.txt b/Drivers/Euler/CMakeLists.txt
new file mode 100644
index 000000000..a9d0be99a
--- /dev/null
+++ b/Drivers/Euler/CMakeLists.txt
@@ -0,0 +1,44 @@
+#[[++
+
+Copyright (C) 2020 Autodesk Inc.
+
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ * Neither the name of the Autodesk Inc. nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL AUTODESK INC. BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+]]
+
+
+cmake_minimum_required(VERSION 3.10)
+
+##########################################################################################
+### Change the next line for making a new driver
+##########################################################################################
+
+set (DRIVERPROJECT Euler)
+
+include (../CMakeDriverCommon.txt)
+
+
+
+
diff --git a/Drivers/Euler/Headers/CppDynamic/libmcdriver_euler_dynamic.h b/Drivers/Euler/Headers/CppDynamic/libmcdriver_euler_dynamic.h
new file mode 100644
index 000000000..c869b7c9e
--- /dev/null
+++ b/Drivers/Euler/Headers/CppDynamic/libmcdriver_euler_dynamic.h
@@ -0,0 +1,447 @@
+/*++
+
+Copyright (C) 2020 Autodesk Inc.
+
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ * Neither the name of the Autodesk Inc. nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL AUTODESK INC. BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.0-develop.
+
+Abstract: This is an autogenerated C++-Header file in order to allow an easy
+ use of MC Driver Euler
+
+Interface version: 2.0.0
+
+*/
+
+#ifndef __LIBMCDRIVER_EULER_DYNAMICHEADER_CPPTYPES
+#define __LIBMCDRIVER_EULER_DYNAMICHEADER_CPPTYPES
+
+#include "libmcdriver_euler_types.hpp"
+
+#include "libmcenv_types.hpp"
+
+
+/*************************************************************************************************************************
+ Class definition for Base
+**************************************************************************************************************************/
+
+/*************************************************************************************************************************
+ Class definition for Driver
+**************************************************************************************************************************/
+
+/**
+* Configures a driver with its specific configuration data.
+*
+* @param[in] pDriver - Driver instance.
+* @param[in] pConfigurationString - Configuration data of driver.
+* @return error code or 0 (success)
+*/
+typedef LibMCDriver_EulerResult (*PLibMCDriver_EulerDriver_ConfigurePtr) (LibMCDriver_Euler_Driver pDriver, const char * pConfigurationString);
+
+/**
+* returns the name identifier of the driver
+*
+* @param[in] pDriver - Driver instance.
+* @param[in] nNameBufferSize - size of the buffer (including trailing 0)
+* @param[out] pNameNeededChars - will be filled with the count of the written bytes, or needed buffer size.
+* @param[out] pNameBuffer - buffer of Name of the driver., may be NULL
+* @return error code or 0 (success)
+*/
+typedef LibMCDriver_EulerResult (*PLibMCDriver_EulerDriver_GetNamePtr) (LibMCDriver_Euler_Driver pDriver, const LibMCDriver_Euler_uint32 nNameBufferSize, LibMCDriver_Euler_uint32* pNameNeededChars, char * pNameBuffer);
+
+/**
+* returns the type identifier of the driver
+*
+* @param[in] pDriver - Driver instance.
+* @param[in] nTypeBufferSize - size of the buffer (including trailing 0)
+* @param[out] pTypeNeededChars - will be filled with the count of the written bytes, or needed buffer size.
+* @param[out] pTypeBuffer - buffer of Type of the driver., may be NULL
+* @return error code or 0 (success)
+*/
+typedef LibMCDriver_EulerResult (*PLibMCDriver_EulerDriver_GetTypePtr) (LibMCDriver_Euler_Driver pDriver, const LibMCDriver_Euler_uint32 nTypeBufferSize, LibMCDriver_Euler_uint32* pTypeNeededChars, char * pTypeBuffer);
+
+/**
+* returns the version identifiers of the driver
+*
+* @param[in] pDriver - Driver instance.
+* @param[out] pMajor - Major version.
+* @param[out] pMinor - Minor version.
+* @param[out] pMicro - Micro version.
+* @param[in] nBuildBufferSize - size of the buffer (including trailing 0)
+* @param[out] pBuildNeededChars - will be filled with the count of the written bytes, or needed buffer size.
+* @param[out] pBuildBuffer - buffer of Build identifier., may be NULL
+* @return error code or 0 (success)
+*/
+typedef LibMCDriver_EulerResult (*PLibMCDriver_EulerDriver_GetVersionPtr) (LibMCDriver_Euler_Driver pDriver, LibMCDriver_Euler_uint32 * pMajor, LibMCDriver_Euler_uint32 * pMinor, LibMCDriver_Euler_uint32 * pMicro, const LibMCDriver_Euler_uint32 nBuildBufferSize, LibMCDriver_Euler_uint32* pBuildNeededChars, char * pBuildBuffer);
+
+/**
+* Updates the driver parameters in the driver environment. Should only be called in the driver thread.
+*
+* @param[in] pDriver - Driver instance.
+* @return error code or 0 (success)
+*/
+typedef LibMCDriver_EulerResult (*PLibMCDriver_EulerDriver_QueryParametersPtr) (LibMCDriver_Euler_Driver pDriver);
+
+/**
+* Updates the driver parameters in the driver environment. Might be called out of thread. Implementation MUST be able to handle parallel calls.
+*
+* @param[in] pDriver - Driver instance.
+* @param[in] pDriverUpdateInstance - Status update instance.
+* @return error code or 0 (success)
+*/
+typedef LibMCDriver_EulerResult (*PLibMCDriver_EulerDriver_QueryParametersExPtr) (LibMCDriver_Euler_Driver pDriver, LibMCEnv_DriverStatusUpdateSession pDriverUpdateInstance);
+
+/*************************************************************************************************************************
+ Class definition for EulerConnection
+**************************************************************************************************************************/
+
+/**
+* Disconnects the connection. No further call can be handled after.
+*
+* @param[in] pEulerConnection - EulerConnection instance.
+* @return error code or 0 (success)
+*/
+typedef LibMCDriver_EulerResult (*PLibMCDriver_EulerEulerConnection_DisconnectPtr) (LibMCDriver_Euler_EulerConnection pEulerConnection);
+
+/**
+* Returns the connection identifier.
+*
+* @param[in] pEulerConnection - EulerConnection instance.
+* @param[in] nIdentifierBufferSize - size of the buffer (including trailing 0)
+* @param[out] pIdentifierNeededChars - will be filled with the count of the written bytes, or needed buffer size.
+* @param[out] pIdentifierBuffer - buffer of Identifier of the connection., may be NULL
+* @return error code or 0 (success)
+*/
+typedef LibMCDriver_EulerResult (*PLibMCDriver_EulerEulerConnection_GetIdentifierPtr) (LibMCDriver_Euler_EulerConnection pEulerConnection, const LibMCDriver_Euler_uint32 nIdentifierBufferSize, LibMCDriver_Euler_uint32* pIdentifierNeededChars, char * pIdentifierBuffer);
+
+/**
+* Returns the application name.
+*
+* @param[in] pEulerConnection - EulerConnection instance.
+* @param[in] nApplicationNameBufferSize - size of the buffer (including trailing 0)
+* @param[out] pApplicationNameNeededChars - will be filled with the count of the written bytes, or needed buffer size.
+* @param[out] pApplicationNameBuffer - buffer of Application Name in use., may be NULL
+* @return error code or 0 (success)
+*/
+typedef LibMCDriver_EulerResult (*PLibMCDriver_EulerEulerConnection_GetApplicationNamePtr) (LibMCDriver_Euler_EulerConnection pEulerConnection, const LibMCDriver_Euler_uint32 nApplicationNameBufferSize, LibMCDriver_Euler_uint32* pApplicationNameNeededChars, char * pApplicationNameBuffer);
+
+/**
+* Returns the application version.
+*
+* @param[in] pEulerConnection - EulerConnection instance.
+* @param[in] nApplicationVersionBufferSize - size of the buffer (including trailing 0)
+* @param[out] pApplicationVersionNeededChars - will be filled with the count of the written bytes, or needed buffer size.
+* @param[out] pApplicationVersionBuffer - buffer of Application Version in use., may be NULL
+* @return error code or 0 (success)
+*/
+typedef LibMCDriver_EulerResult (*PLibMCDriver_EulerEulerConnection_GetApplicationVersionPtr) (LibMCDriver_Euler_EulerConnection pEulerConnection, const LibMCDriver_Euler_uint32 nApplicationVersionBufferSize, LibMCDriver_Euler_uint32* pApplicationVersionNeededChars, char * pApplicationVersionBuffer);
+
+/**
+* Returns the base URL.
+*
+* @param[in] pEulerConnection - EulerConnection instance.
+* @param[in] nBaseURLBufferSize - size of the buffer (including trailing 0)
+* @param[out] pBaseURLNeededChars - will be filled with the count of the written bytes, or needed buffer size.
+* @param[out] pBaseURLBuffer - buffer of Base URL in use., may be NULL
+* @return error code or 0 (success)
+*/
+typedef LibMCDriver_EulerResult (*PLibMCDriver_EulerEulerConnection_GetBaseURLPtr) (LibMCDriver_Euler_EulerConnection pEulerConnection, const LibMCDriver_Euler_uint32 nBaseURLBufferSize, LibMCDriver_Euler_uint32* pBaseURLNeededChars, char * pBaseURLBuffer);
+
+/**
+* Returns the API Key.
+*
+* @param[in] pEulerConnection - EulerConnection instance.
+* @param[in] nAPIKeyBufferSize - size of the buffer (including trailing 0)
+* @param[out] pAPIKeyNeededChars - will be filled with the count of the written bytes, or needed buffer size.
+* @param[out] pAPIKeyBuffer - buffer of API Key in use., may be NULL
+* @return error code or 0 (success)
+*/
+typedef LibMCDriver_EulerResult (*PLibMCDriver_EulerEulerConnection_GetAPIKeyPtr) (LibMCDriver_Euler_EulerConnection pEulerConnection, const LibMCDriver_Euler_uint32 nAPIKeyBufferSize, LibMCDriver_Euler_uint32* pAPIKeyNeededChars, char * pAPIKeyBuffer);
+
+/**
+* Returns the DeviceID.
+*
+* @param[in] pEulerConnection - EulerConnection instance.
+* @param[in] nDeviceIDBufferSize - size of the buffer (including trailing 0)
+* @param[out] pDeviceIDNeededChars - will be filled with the count of the written bytes, or needed buffer size.
+* @param[out] pDeviceIDBuffer - buffer of DeviceID in use., may be NULL
+* @return error code or 0 (success)
+*/
+typedef LibMCDriver_EulerResult (*PLibMCDriver_EulerEulerConnection_GetDeviceIDPtr) (LibMCDriver_Euler_EulerConnection pEulerConnection, const LibMCDriver_Euler_uint32 nDeviceIDBufferSize, LibMCDriver_Euler_uint32* pDeviceIDNeededChars, char * pDeviceIDBuffer);
+
+/**
+* Starts the heartbeat.
+*
+* @param[in] pEulerConnection - EulerConnection instance.
+* @return error code or 0 (success)
+*/
+typedef LibMCDriver_EulerResult (*PLibMCDriver_EulerEulerConnection_StartHeartBeatPtr) (LibMCDriver_Euler_EulerConnection pEulerConnection);
+
+/**
+* Stops the heartbeat.
+*
+* @param[in] pEulerConnection - EulerConnection instance.
+* @return error code or 0 (success)
+*/
+typedef LibMCDriver_EulerResult (*PLibMCDriver_EulerEulerConnection_StopHeartBeatPtr) (LibMCDriver_Euler_EulerConnection pEulerConnection);
+
+/**
+* Creates a new build job.
+*
+* @param[in] pEulerConnection - EulerConnection instance.
+* @param[in] pJobName - BuildJob Name
+* @param[in] nLayerCount - Layer Count
+* @param[in] nBuildJobIDBufferSize - size of the buffer (including trailing 0)
+* @param[out] pBuildJobIDNeededChars - will be filled with the count of the written bytes, or needed buffer size.
+* @param[out] pBuildJobIDBuffer - buffer of New BuildJob ID, may be NULL
+* @return error code or 0 (success)
+*/
+typedef LibMCDriver_EulerResult (*PLibMCDriver_EulerEulerConnection_CreateBuildPtr) (LibMCDriver_Euler_EulerConnection pEulerConnection, const char * pJobName, LibMCDriver_Euler_uint32 nLayerCount, const LibMCDriver_Euler_uint32 nBuildJobIDBufferSize, LibMCDriver_Euler_uint32* pBuildJobIDNeededChars, char * pBuildJobIDBuffer);
+
+/**
+* Uploads an image to a build job.
+*
+* @param[in] pEulerConnection - EulerConnection instance.
+* @param[in] pBuildJobID - BuildJob ID
+* @param[in] nLayerIndex - Layer Index
+* @param[in] eImageType - Image Type
+* @param[in] pImage - Image Instance
+* @return error code or 0 (success)
+*/
+typedef LibMCDriver_EulerResult (*PLibMCDriver_EulerEulerConnection_UploadImagePtr) (LibMCDriver_Euler_EulerConnection pEulerConnection, const char * pBuildJobID, LibMCDriver_Euler_uint32 nLayerIndex, LibMCDriver_Euler::eEulerImageType eImageType, LibMCEnv_ImageData pImage);
+
+/**
+* Updates a Job's status
+*
+* @param[in] pEulerConnection - EulerConnection instance.
+* @param[in] pBuildJobID - BuildJob ID
+* @param[in] eJobStatus - New Job Status
+* @return error code or 0 (success)
+*/
+typedef LibMCDriver_EulerResult (*PLibMCDriver_EulerEulerConnection_SetJobStatusPtr) (LibMCDriver_Euler_EulerConnection pEulerConnection, const char * pBuildJobID, LibMCDriver_Euler::eEulerJobStatus eJobStatus);
+
+/*************************************************************************************************************************
+ Class definition for Driver_Euler
+**************************************************************************************************************************/
+
+/**
+* Sets the machine resource name of the LibEuler SDK to load. MUST be called before Connect or it has no effect.
+*
+* @param[in] pDriver_Euler - Driver_Euler instance.
+* @param[in] pResourceName - Resource name of core machine package. Empty means standard naming applies.
+* @return error code or 0 (success)
+*/
+typedef LibMCDriver_EulerResult (*PLibMCDriver_EulerDriver_Euler_SetCustomSDKResourcePtr) (LibMCDriver_Euler_Driver_Euler pDriver_Euler, const char * pResourceName);
+
+/**
+* Sets the application details. Will be used for subsequent connections.
+*
+* @param[in] pDriver_Euler - Driver_Euler instance.
+* @param[in] pApplicationName - Application Name to use.
+* @param[in] pApplicationVersion - Application Version to use.
+* @return error code or 0 (success)
+*/
+typedef LibMCDriver_EulerResult (*PLibMCDriver_EulerDriver_Euler_SetApplicationDetailsPtr) (LibMCDriver_Euler_Driver_Euler pDriver_Euler, const char * pApplicationName, const char * pApplicationVersion);
+
+/**
+* Creates a Euler Connection.
+*
+* @param[in] pDriver_Euler - Driver_Euler instance.
+* @param[in] pIdentifier - Identifier for the connection. Fails if identifier is already existing.
+* @param[in] pBaseURL - BaseURL to use.
+* @param[in] pAPIKey - API Key to use.
+* @param[in] pDeviceID - Device ID to use.
+* @param[out] pConnection - Euler Connection Instance.
+* @return error code or 0 (success)
+*/
+typedef LibMCDriver_EulerResult (*PLibMCDriver_EulerDriver_Euler_ConnectPtr) (LibMCDriver_Euler_Driver_Euler pDriver_Euler, const char * pIdentifier, const char * pBaseURL, const char * pAPIKey, const char * pDeviceID, LibMCDriver_Euler_EulerConnection * pConnection);
+
+/**
+* Creates a Euler Connection from a license file data.
+*
+* @param[in] pDriver_Euler - Driver_Euler instance.
+* @param[in] pIdentifier - Identifier for the connection. Fails if identifier is already existing.
+* @param[in] nLicenseDataBufferSize - Number of elements in buffer
+* @param[in] pLicenseDataBuffer - uint8 buffer of License Data file to use.
+* @param[in] pDeviceID - Device ID to use.
+* @param[out] pConnection - Euler Connection Instance.
+* @return error code or 0 (success)
+*/
+typedef LibMCDriver_EulerResult (*PLibMCDriver_EulerDriver_Euler_ConnectWithLicenseDataPtr) (LibMCDriver_Euler_Driver_Euler pDriver_Euler, const char * pIdentifier, LibMCDriver_Euler_uint64 nLicenseDataBufferSize, const LibMCDriver_Euler_uint8 * pLicenseDataBuffer, const char * pDeviceID, LibMCDriver_Euler_EulerConnection * pConnection);
+
+/**
+* Creates a Euler Connection from a license file resource.
+*
+* @param[in] pDriver_Euler - Driver_Euler instance.
+* @param[in] pIdentifier - Identifier for the connection. Fails if identifier is already existing.
+* @param[in] pLicenseResourceName - License Data resource to use.
+* @param[in] pDeviceID - Device ID to use.
+* @param[out] pConnection - Euler Connection Instance.
+* @return error code or 0 (success)
+*/
+typedef LibMCDriver_EulerResult (*PLibMCDriver_EulerDriver_Euler_ConnectWithLicenseResourcePtr) (LibMCDriver_Euler_Driver_Euler pDriver_Euler, const char * pIdentifier, const char * pLicenseResourceName, const char * pDeviceID, LibMCDriver_Euler_EulerConnection * pConnection);
+
+/**
+* Finds a connection. Fails if connection does not exist.
+*
+* @param[in] pDriver_Euler - Driver_Euler instance.
+* @param[in] pIdentifier - Identifier for the connection. Fails if identifier is already existing.
+* @param[out] pConnection - Euler Connection Instance.
+* @return error code or 0 (success)
+*/
+typedef LibMCDriver_EulerResult (*PLibMCDriver_EulerDriver_Euler_FindConnectionPtr) (LibMCDriver_Euler_Driver_Euler pDriver_Euler, const char * pIdentifier, LibMCDriver_Euler_EulerConnection * pConnection);
+
+/**
+* Checks if a connection exists with a certain identifier.
+*
+* @param[in] pDriver_Euler - Driver_Euler instance.
+* @param[in] pIdentifier - Identifier for the connection.
+* @param[out] pExists - Returns true, if the connection exists, false otherwise.
+* @return error code or 0 (success)
+*/
+typedef LibMCDriver_EulerResult (*PLibMCDriver_EulerDriver_Euler_ConnectionExistsPtr) (LibMCDriver_Euler_Driver_Euler pDriver_Euler, const char * pIdentifier, bool * pExists);
+
+/**
+* Closes all connections.
+*
+* @param[in] pDriver_Euler - Driver_Euler instance.
+* @return error code or 0 (success)
+*/
+typedef LibMCDriver_EulerResult (*PLibMCDriver_EulerDriver_Euler_CloseAllConnectionsPtr) (LibMCDriver_Euler_Driver_Euler pDriver_Euler);
+
+/*************************************************************************************************************************
+ Global functions
+**************************************************************************************************************************/
+
+/**
+* retrieves the binary version of this library.
+*
+* @param[out] pMajor - returns the major version of this library
+* @param[out] pMinor - returns the minor version of this library
+* @param[out] pMicro - returns the micro version of this library
+* @return error code or 0 (success)
+*/
+typedef LibMCDriver_EulerResult (*PLibMCDriver_EulerGetVersionPtr) (LibMCDriver_Euler_uint32 * pMajor, LibMCDriver_Euler_uint32 * pMinor, LibMCDriver_Euler_uint32 * pMicro);
+
+/**
+* Returns the last error recorded on this object
+*
+* @param[in] pInstance - Instance Handle
+* @param[in] nErrorMessageBufferSize - size of the buffer (including trailing 0)
+* @param[out] pErrorMessageNeededChars - will be filled with the count of the written bytes, or needed buffer size.
+* @param[out] pErrorMessageBuffer - buffer of Message of the last error, may be NULL
+* @param[out] pHasError - Is there a last error to query
+* @return error code or 0 (success)
+*/
+typedef LibMCDriver_EulerResult (*PLibMCDriver_EulerGetLastErrorPtr) (LibMCDriver_Euler_Base pInstance, const LibMCDriver_Euler_uint32 nErrorMessageBufferSize, LibMCDriver_Euler_uint32* pErrorMessageNeededChars, char * pErrorMessageBuffer, bool * pHasError);
+
+/**
+* Releases shared ownership of an Instance
+*
+* @param[in] pInstance - Instance Handle
+* @return error code or 0 (success)
+*/
+typedef LibMCDriver_EulerResult (*PLibMCDriver_EulerReleaseInstancePtr) (LibMCDriver_Euler_Base pInstance);
+
+/**
+* Acquires shared ownership of an Instance
+*
+* @param[in] pInstance - Instance Handle
+* @return error code or 0 (success)
+*/
+typedef LibMCDriver_EulerResult (*PLibMCDriver_EulerAcquireInstancePtr) (LibMCDriver_Euler_Base pInstance);
+
+/**
+* Injects an imported component for usage within this component
+*
+* @param[in] pNameSpace - NameSpace of the injected component
+* @param[in] pSymbolAddressMethod - Address of the SymbolAddressMethod of the injected component
+* @return error code or 0 (success)
+*/
+typedef LibMCDriver_EulerResult (*PLibMCDriver_EulerInjectComponentPtr) (const char * pNameSpace, LibMCDriver_Euler_pvoid pSymbolAddressMethod);
+
+/**
+* Returns the address of the SymbolLookupMethod
+*
+* @param[out] pSymbolLookupMethod - Address of the SymbolAddressMethod
+* @return error code or 0 (success)
+*/
+typedef LibMCDriver_EulerResult (*PLibMCDriver_EulerGetSymbolLookupMethodPtr) (LibMCDriver_Euler_pvoid * pSymbolLookupMethod);
+
+/**
+* Creates a driver instance with a specific name.
+*
+* @param[in] pName - Name of driver to be created.
+* @param[in] pType - Type of driver to be created.
+* @param[in] pDriverEnvironment - Environment of this driver.
+* @param[out] pInstance - New Driver instance
+* @return error code or 0 (success)
+*/
+typedef LibMCDriver_EulerResult (*PLibMCDriver_EulerCreateDriverPtr) (const char * pName, const char * pType, LibMCEnv_DriverEnvironment pDriverEnvironment, LibMCDriver_Euler_Driver * pInstance);
+
+/*************************************************************************************************************************
+ Function Table Structure
+**************************************************************************************************************************/
+
+typedef struct {
+ void * m_LibraryHandle;
+ PLibMCDriver_EulerDriver_ConfigurePtr m_Driver_Configure;
+ PLibMCDriver_EulerDriver_GetNamePtr m_Driver_GetName;
+ PLibMCDriver_EulerDriver_GetTypePtr m_Driver_GetType;
+ PLibMCDriver_EulerDriver_GetVersionPtr m_Driver_GetVersion;
+ PLibMCDriver_EulerDriver_QueryParametersPtr m_Driver_QueryParameters;
+ PLibMCDriver_EulerDriver_QueryParametersExPtr m_Driver_QueryParametersEx;
+ PLibMCDriver_EulerEulerConnection_DisconnectPtr m_EulerConnection_Disconnect;
+ PLibMCDriver_EulerEulerConnection_GetIdentifierPtr m_EulerConnection_GetIdentifier;
+ PLibMCDriver_EulerEulerConnection_GetApplicationNamePtr m_EulerConnection_GetApplicationName;
+ PLibMCDriver_EulerEulerConnection_GetApplicationVersionPtr m_EulerConnection_GetApplicationVersion;
+ PLibMCDriver_EulerEulerConnection_GetBaseURLPtr m_EulerConnection_GetBaseURL;
+ PLibMCDriver_EulerEulerConnection_GetAPIKeyPtr m_EulerConnection_GetAPIKey;
+ PLibMCDriver_EulerEulerConnection_GetDeviceIDPtr m_EulerConnection_GetDeviceID;
+ PLibMCDriver_EulerEulerConnection_StartHeartBeatPtr m_EulerConnection_StartHeartBeat;
+ PLibMCDriver_EulerEulerConnection_StopHeartBeatPtr m_EulerConnection_StopHeartBeat;
+ PLibMCDriver_EulerEulerConnection_CreateBuildPtr m_EulerConnection_CreateBuild;
+ PLibMCDriver_EulerEulerConnection_UploadImagePtr m_EulerConnection_UploadImage;
+ PLibMCDriver_EulerEulerConnection_SetJobStatusPtr m_EulerConnection_SetJobStatus;
+ PLibMCDriver_EulerDriver_Euler_SetCustomSDKResourcePtr m_Driver_Euler_SetCustomSDKResource;
+ PLibMCDriver_EulerDriver_Euler_SetApplicationDetailsPtr m_Driver_Euler_SetApplicationDetails;
+ PLibMCDriver_EulerDriver_Euler_ConnectPtr m_Driver_Euler_Connect;
+ PLibMCDriver_EulerDriver_Euler_ConnectWithLicenseDataPtr m_Driver_Euler_ConnectWithLicenseData;
+ PLibMCDriver_EulerDriver_Euler_ConnectWithLicenseResourcePtr m_Driver_Euler_ConnectWithLicenseResource;
+ PLibMCDriver_EulerDriver_Euler_FindConnectionPtr m_Driver_Euler_FindConnection;
+ PLibMCDriver_EulerDriver_Euler_ConnectionExistsPtr m_Driver_Euler_ConnectionExists;
+ PLibMCDriver_EulerDriver_Euler_CloseAllConnectionsPtr m_Driver_Euler_CloseAllConnections;
+ PLibMCDriver_EulerGetVersionPtr m_GetVersion;
+ PLibMCDriver_EulerGetLastErrorPtr m_GetLastError;
+ PLibMCDriver_EulerReleaseInstancePtr m_ReleaseInstance;
+ PLibMCDriver_EulerAcquireInstancePtr m_AcquireInstance;
+ PLibMCDriver_EulerInjectComponentPtr m_InjectComponent;
+ PLibMCDriver_EulerGetSymbolLookupMethodPtr m_GetSymbolLookupMethod;
+ PLibMCDriver_EulerCreateDriverPtr m_CreateDriver;
+} sLibMCDriver_EulerDynamicWrapperTable;
+
+#endif // __LIBMCDRIVER_EULER_DYNAMICHEADER_CPPTYPES
+
diff --git a/Drivers/Euler/Headers/CppDynamic/libmcdriver_euler_dynamic.hpp b/Drivers/Euler/Headers/CppDynamic/libmcdriver_euler_dynamic.hpp
new file mode 100644
index 000000000..a792b75ce
--- /dev/null
+++ b/Drivers/Euler/Headers/CppDynamic/libmcdriver_euler_dynamic.hpp
@@ -0,0 +1,1527 @@
+/*++
+
+Copyright (C) 2020 Autodesk Inc.
+
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ * Neither the name of the Autodesk Inc. nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL AUTODESK INC. BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.0-develop.
+
+Abstract: This is an autogenerated C++-Header file in order to allow an easy
+ use of MC Driver Euler
+
+Interface version: 2.0.0
+
+*/
+
+#ifndef __LIBMCDRIVER_EULER_CPPHEADER_DYNAMIC_CPP
+#define __LIBMCDRIVER_EULER_CPPHEADER_DYNAMIC_CPP
+
+#include "libmcdriver_euler_types.hpp"
+#include "libmcdriver_euler_dynamic.h"
+
+#include "libmcenv_dynamic.hpp"
+
+#ifdef _WIN32
+#include
+#else // _WIN32
+#include
+#endif // _WIN32
+#include
+#include
+#include
+#include
+
+namespace LibMCDriver_Euler {
+
+/*************************************************************************************************************************
+ Forward Declaration of all classes
+**************************************************************************************************************************/
+class CWrapper;
+class CBase;
+class CDriver;
+class CEulerConnection;
+class CDriver_Euler;
+
+/*************************************************************************************************************************
+ Declaration of deprecated class types
+**************************************************************************************************************************/
+typedef CWrapper CLibMCDriver_EulerWrapper;
+typedef CBase CLibMCDriver_EulerBase;
+typedef CDriver CLibMCDriver_EulerDriver;
+typedef CEulerConnection CLibMCDriver_EulerEulerConnection;
+typedef CDriver_Euler CLibMCDriver_EulerDriver_Euler;
+
+/*************************************************************************************************************************
+ Declaration of shared pointer types
+**************************************************************************************************************************/
+typedef std::shared_ptr PWrapper;
+typedef std::shared_ptr PBase;
+typedef std::shared_ptr PDriver;
+typedef std::shared_ptr PEulerConnection;
+typedef std::shared_ptr PDriver_Euler;
+
+/*************************************************************************************************************************
+ Declaration of deprecated shared pointer types
+**************************************************************************************************************************/
+typedef PWrapper PLibMCDriver_EulerWrapper;
+typedef PBase PLibMCDriver_EulerBase;
+typedef PDriver PLibMCDriver_EulerDriver;
+typedef PEulerConnection PLibMCDriver_EulerEulerConnection;
+typedef PDriver_Euler PLibMCDriver_EulerDriver_Euler;
+
+
+/*************************************************************************************************************************
+ classParam Definition
+**************************************************************************************************************************/
+
+template class classParam {
+private:
+ const T* m_ptr;
+
+public:
+ classParam(const T* ptr)
+ : m_ptr (ptr)
+ {
+ }
+
+ classParam(std::shared_ptr sharedPtr)
+ : m_ptr (sharedPtr.get())
+ {
+ }
+
+ LibMCDriver_EulerHandle GetHandle()
+ {
+ if (m_ptr != nullptr)
+ return m_ptr->handle();
+ return nullptr;
+ }
+};
+
+/*************************************************************************************************************************
+ Class ELibMCDriver_EulerException
+**************************************************************************************************************************/
+class ELibMCDriver_EulerException : public std::exception {
+protected:
+ /**
+ * Error code for the Exception.
+ */
+ LibMCDriver_EulerResult m_errorCode;
+ /**
+ * Error message for the Exception.
+ */
+ std::string m_errorMessage;
+ std::string m_originalErrorMessage;
+
+public:
+ /**
+ * Exception Constructor.
+ */
+ ELibMCDriver_EulerException(LibMCDriver_EulerResult errorCode, const std::string & sErrorMessage)
+ : m_errorCode(errorCode), m_originalErrorMessage(sErrorMessage)
+ {
+ m_errorMessage = buildErrorMessage();
+ }
+
+ /**
+ * Returns error code
+ */
+ LibMCDriver_EulerResult getErrorCode() const noexcept
+ {
+ return m_errorCode;
+ }
+
+ /**
+ * Returns error message
+ */
+ const char* what() const noexcept
+ {
+ return m_errorMessage.c_str();
+ }
+
+ const char* getErrorMessage() const noexcept
+ {
+ return m_originalErrorMessage.c_str();
+ }
+
+ const char* getErrorName() const noexcept
+ {
+ switch(getErrorCode()) {
+ case LIBMCDRIVER_EULER_SUCCESS: return "SUCCESS";
+ case LIBMCDRIVER_EULER_ERROR_NOTIMPLEMENTED: return "NOTIMPLEMENTED";
+ case LIBMCDRIVER_EULER_ERROR_INVALIDPARAM: return "INVALIDPARAM";
+ case LIBMCDRIVER_EULER_ERROR_INVALIDCAST: return "INVALIDCAST";
+ case LIBMCDRIVER_EULER_ERROR_BUFFERTOOSMALL: return "BUFFERTOOSMALL";
+ case LIBMCDRIVER_EULER_ERROR_GENERICEXCEPTION: return "GENERICEXCEPTION";
+ case LIBMCDRIVER_EULER_ERROR_COULDNOTLOADLIBRARY: return "COULDNOTLOADLIBRARY";
+ case LIBMCDRIVER_EULER_ERROR_COULDNOTFINDLIBRARYEXPORT: return "COULDNOTFINDLIBRARYEXPORT";
+ case LIBMCDRIVER_EULER_ERROR_INCOMPATIBLEBINARYVERSION: return "INCOMPATIBLEBINARYVERSION";
+ case LIBMCDRIVER_EULER_ERROR_DRIVERERROR: return "DRIVERERROR";
+ case LIBMCDRIVER_EULER_ERROR_DRIVERNOTINITIALISED: return "DRIVERNOTINITIALISED";
+ case LIBMCDRIVER_EULER_ERROR_DRIVERNOTCONNECTED: return "DRIVERNOTCONNECTED";
+ case LIBMCDRIVER_EULER_ERROR_INVALIDDRIVERPROTOCOL: return "INVALIDDRIVERPROTOCOL";
+ case LIBMCDRIVER_EULER_ERROR_COULDNOTPARSEDRIVERPROTOCOL: return "COULDNOTPARSEDRIVERPROTOCOL";
+ case LIBMCDRIVER_EULER_ERROR_NOTCONNECTED: return "NOTCONNECTED";
+ case LIBMCDRIVER_EULER_ERROR_INTEGERVALUEOUTOFRANGE: return "INTEGERVALUEOUTOFRANGE";
+ case LIBMCDRIVER_EULER_ERROR_COULDNOTREADDATA: return "COULDNOTREADDATA";
+ case LIBMCDRIVER_EULER_ERROR_COULDNOTREADHANDLEVALUE: return "COULDNOTREADHANDLEVALUE";
+ case LIBMCDRIVER_EULER_ERROR_NAMELENGTHEXCEEDSMAXIMUM: return "NAMELENGTHEXCEEDSMAXIMUM";
+ case LIBMCDRIVER_EULER_ERROR_COULDNOTCONNECT: return "COULDNOTCONNECT";
+ case LIBMCDRIVER_EULER_ERROR_HASBEENDISCONNECTED: return "HASBEENDISCONNECTED";
+ case LIBMCDRIVER_EULER_ERROR_COULDNOTSTARTHEARTBEAT: return "COULDNOTSTARTHEARTBEAT";
+ case LIBMCDRIVER_EULER_ERROR_COULDNOTSTOPHEARTBEAT: return "COULDNOTSTOPHEARTBEAT";
+ case LIBMCDRIVER_EULER_ERROR_EMPTYJOBNAME: return "EMPTYJOBNAME";
+ case LIBMCDRIVER_EULER_ERROR_COULDNOTCREATEBUILD: return "COULDNOTCREATEBUILD";
+ case LIBMCDRIVER_EULER_ERROR_INVALIDIDENTIFIER: return "INVALIDIDENTIFIER";
+ case LIBMCDRIVER_EULER_ERROR_CONNECTIONIDENTIFIERALREADYINUSE: return "CONNECTIONIDENTIFIERALREADYINUSE";
+ case LIBMCDRIVER_EULER_ERROR_CONNECTIONIDENTIFIERNOTFOUND: return "CONNECTIONIDENTIFIERNOTFOUND";
+ case LIBMCDRIVER_EULER_ERROR_LIBEULERDLLNOTSPECIFIED: return "LIBEULERDLLNOTSPECIFIED";
+ case LIBMCDRIVER_EULER_ERROR_INVALIDBUILDJOBID: return "INVALIDBUILDJOBID";
+ case LIBMCDRIVER_EULER_ERROR_INVALIDIMAGETYPE: return "INVALIDIMAGETYPE";
+ case LIBMCDRIVER_EULER_ERROR_COULDNOTUPLOADLAYERIMAGE: return "COULDNOTUPLOADLAYERIMAGE";
+ case LIBMCDRIVER_EULER_ERROR_INVALIDJOBSTATUS: return "INVALIDJOBSTATUS";
+ case LIBMCDRIVER_EULER_ERROR_COULDUPDATEJOBSTATUS: return "COULDUPDATEJOBSTATUS";
+ case LIBMCDRIVER_EULER_ERROR_INVALIDLICENSERESOURCE: return "INVALIDLICENSERESOURCE";
+ case LIBMCDRIVER_EULER_ERROR_COULDNOTENCODEJPEGIMAGE: return "COULDNOTENCODEJPEGIMAGE";
+ case LIBMCDRIVER_EULER_ERROR_COULDNOTREADLICENSEDATA: return "COULDNOTREADLICENSEDATA";
+ case LIBMCDRIVER_EULER_ERROR_INVALIDLICENSEDATA: return "INVALIDLICENSEDATA";
+ }
+ return "UNKNOWN";
+ }
+
+ const char* getErrorDescription() const noexcept
+ {
+ switch(getErrorCode()) {
+ case LIBMCDRIVER_EULER_SUCCESS: return "success";
+ case LIBMCDRIVER_EULER_ERROR_NOTIMPLEMENTED: return "functionality not implemented";
+ case LIBMCDRIVER_EULER_ERROR_INVALIDPARAM: return "an invalid parameter was passed";
+ case LIBMCDRIVER_EULER_ERROR_INVALIDCAST: return "a type cast failed";
+ case LIBMCDRIVER_EULER_ERROR_BUFFERTOOSMALL: return "a provided buffer is too small";
+ case LIBMCDRIVER_EULER_ERROR_GENERICEXCEPTION: return "a generic exception occurred";
+ case LIBMCDRIVER_EULER_ERROR_COULDNOTLOADLIBRARY: return "the library could not be loaded";
+ case LIBMCDRIVER_EULER_ERROR_COULDNOTFINDLIBRARYEXPORT: return "a required exported symbol could not be found in the library";
+ case LIBMCDRIVER_EULER_ERROR_INCOMPATIBLEBINARYVERSION: return "the version of the binary interface does not match the bindings interface";
+ case LIBMCDRIVER_EULER_ERROR_DRIVERERROR: return "a driver error occured";
+ case LIBMCDRIVER_EULER_ERROR_DRIVERNOTINITIALISED: return "the driver is not initialised";
+ case LIBMCDRIVER_EULER_ERROR_DRIVERNOTCONNECTED: return "the driver is not connected";
+ case LIBMCDRIVER_EULER_ERROR_INVALIDDRIVERPROTOCOL: return "invalid driver protocol definition";
+ case LIBMCDRIVER_EULER_ERROR_COULDNOTPARSEDRIVERPROTOCOL: return "could not parse driver protocol";
+ case LIBMCDRIVER_EULER_ERROR_NOTCONNECTED: return "Not connected";
+ case LIBMCDRIVER_EULER_ERROR_INTEGERVALUEOUTOFRANGE: return "Integer value out of range";
+ case LIBMCDRIVER_EULER_ERROR_COULDNOTREADDATA: return "Could not read data";
+ case LIBMCDRIVER_EULER_ERROR_COULDNOTREADHANDLEVALUE: return "Could not read handle value";
+ case LIBMCDRIVER_EULER_ERROR_NAMELENGTHEXCEEDSMAXIMUM: return "Name length exceeds maximum";
+ case LIBMCDRIVER_EULER_ERROR_COULDNOTCONNECT: return "Could not connect";
+ case LIBMCDRIVER_EULER_ERROR_HASBEENDISCONNECTED: return "Has been disconnected";
+ case LIBMCDRIVER_EULER_ERROR_COULDNOTSTARTHEARTBEAT: return "Could not start heartbeat";
+ case LIBMCDRIVER_EULER_ERROR_COULDNOTSTOPHEARTBEAT: return "Could not stop heartbeat";
+ case LIBMCDRIVER_EULER_ERROR_EMPTYJOBNAME: return "Empty job name";
+ case LIBMCDRIVER_EULER_ERROR_COULDNOTCREATEBUILD: return "Could not create build";
+ case LIBMCDRIVER_EULER_ERROR_INVALIDIDENTIFIER: return "Invalid identifier";
+ case LIBMCDRIVER_EULER_ERROR_CONNECTIONIDENTIFIERALREADYINUSE: return "Connection identifier already in use";
+ case LIBMCDRIVER_EULER_ERROR_CONNECTIONIDENTIFIERNOTFOUND: return "Connection identifier not found";
+ case LIBMCDRIVER_EULER_ERROR_LIBEULERDLLNOTSPECIFIED: return "LibEuler dll not specified";
+ case LIBMCDRIVER_EULER_ERROR_INVALIDBUILDJOBID: return "Invalid build job id";
+ case LIBMCDRIVER_EULER_ERROR_INVALIDIMAGETYPE: return "Invalid image type";
+ case LIBMCDRIVER_EULER_ERROR_COULDNOTUPLOADLAYERIMAGE: return "Could not upload layer image";
+ case LIBMCDRIVER_EULER_ERROR_INVALIDJOBSTATUS: return "Invalid job status";
+ case LIBMCDRIVER_EULER_ERROR_COULDUPDATEJOBSTATUS: return "Could not update job status";
+ case LIBMCDRIVER_EULER_ERROR_INVALIDLICENSERESOURCE: return "Invalid license resource";
+ case LIBMCDRIVER_EULER_ERROR_COULDNOTENCODEJPEGIMAGE: return "Could not encode JPEG Image";
+ case LIBMCDRIVER_EULER_ERROR_COULDNOTREADLICENSEDATA: return "Could not read license data";
+ case LIBMCDRIVER_EULER_ERROR_INVALIDLICENSEDATA: return "Invalid license data";
+ }
+ return "unknown error";
+ }
+
+private:
+
+ std::string buildErrorMessage() const noexcept
+ {
+ std::string msg = m_originalErrorMessage;
+ if (msg.empty()) {
+ msg = getErrorDescription();
+ }
+ return std::string("Error: ") + getErrorName() + ": " + msg;
+ }
+};
+
+/*************************************************************************************************************************
+ Class CInputVector
+**************************************************************************************************************************/
+template
+class CInputVector {
+private:
+
+ const T* m_data;
+ size_t m_size;
+
+public:
+
+ CInputVector(const std::vector& vec)
+ : m_data( vec.data() ), m_size( vec.size() )
+ {
+ }
+
+ CInputVector(const T* in_data, size_t in_size)
+ : m_data( in_data ), m_size(in_size )
+ {
+ }
+
+ const T* data() const
+ {
+ return m_data;
+ }
+
+ size_t size() const
+ {
+ return m_size;
+ }
+
+};
+
+// declare deprecated class name
+template
+using CLibMCDriver_EulerInputVector = CInputVector;
+
+/*************************************************************************************************************************
+ Class CWrapper
+**************************************************************************************************************************/
+class CWrapper {
+public:
+
+ explicit CWrapper(void* pSymbolLookupMethod)
+ {
+ CheckError(nullptr, initWrapperTable(&m_WrapperTable));
+ CheckError(nullptr, loadWrapperTableFromSymbolLookupMethod(&m_WrapperTable, pSymbolLookupMethod));
+
+ CheckError(nullptr, checkBinaryVersion());
+ }
+
+ explicit CWrapper(const std::string &sFileName)
+ {
+ CheckError(nullptr, initWrapperTable(&m_WrapperTable));
+ CheckError(nullptr, loadWrapperTable(&m_WrapperTable, sFileName.c_str()));
+
+ CheckError(nullptr, checkBinaryVersion());
+ }
+
+ static PWrapper loadLibrary(const std::string &sFileName)
+ {
+ return std::make_shared(sFileName);
+ }
+
+ static PWrapper loadLibraryFromSymbolLookupMethod(void* pSymbolLookupMethod)
+ {
+ return std::make_shared(pSymbolLookupMethod);
+ }
+
+ ~CWrapper()
+ {
+ releaseWrapperTable(&m_WrapperTable);
+ }
+
+ inline void CheckError(CBase * pBaseClass, LibMCDriver_EulerResult nResult);
+
+ inline void GetVersion(LibMCDriver_Euler_uint32 & nMajor, LibMCDriver_Euler_uint32 & nMinor, LibMCDriver_Euler_uint32 & nMicro);
+ inline bool GetLastError(classParam pInstance, std::string & sErrorMessage);
+ inline void ReleaseInstance(classParam pInstance);
+ inline void AcquireInstance(classParam pInstance);
+ inline void InjectComponent(const std::string & sNameSpace, const LibMCDriver_Euler_pvoid pSymbolAddressMethod);
+ inline LibMCDriver_Euler_pvoid GetSymbolLookupMethod();
+ inline PDriver CreateDriver(const std::string & sName, const std::string & sType, classParam pDriverEnvironment);
+
+private:
+ sLibMCDriver_EulerDynamicWrapperTable m_WrapperTable;
+ // Injected Components
+ LibMCEnv::PWrapper m_pLibMCEnvWrapper;
+
+
+ LibMCDriver_EulerResult checkBinaryVersion()
+ {
+ LibMCDriver_Euler_uint32 nMajor, nMinor, nMicro;
+ GetVersion(nMajor, nMinor, nMicro);
+ if (nMajor != LIBMCDRIVER_EULER_VERSION_MAJOR) {
+ return LIBMCDRIVER_EULER_ERROR_INCOMPATIBLEBINARYVERSION;
+ }
+ return LIBMCDRIVER_EULER_SUCCESS;
+ }
+ LibMCDriver_EulerResult initWrapperTable(sLibMCDriver_EulerDynamicWrapperTable * pWrapperTable);
+ LibMCDriver_EulerResult releaseWrapperTable(sLibMCDriver_EulerDynamicWrapperTable * pWrapperTable);
+ LibMCDriver_EulerResult loadWrapperTable(sLibMCDriver_EulerDynamicWrapperTable * pWrapperTable, const char * pLibraryFileName);
+ LibMCDriver_EulerResult loadWrapperTableFromSymbolLookupMethod(sLibMCDriver_EulerDynamicWrapperTable * pWrapperTable, void* pSymbolLookupMethod);
+
+ friend class CBase;
+ friend class CDriver;
+ friend class CEulerConnection;
+ friend class CDriver_Euler;
+
+};
+
+
+/*************************************************************************************************************************
+ Class CBase
+**************************************************************************************************************************/
+class CBase {
+public:
+
+protected:
+ /* Wrapper Object that created the class. */
+ CWrapper * m_pWrapper;
+ /* Handle to Instance in library*/
+ LibMCDriver_EulerHandle m_pHandle;
+
+ /* Checks for an Error code and raises Exceptions */
+ void CheckError(LibMCDriver_EulerResult nResult)
+ {
+ if (m_pWrapper != nullptr)
+ m_pWrapper->CheckError(this, nResult);
+ }
+public:
+ /**
+ * CBase::CBase - Constructor for Base class.
+ */
+ CBase(CWrapper * pWrapper, LibMCDriver_EulerHandle pHandle)
+ : m_pWrapper(pWrapper), m_pHandle(pHandle)
+ {
+ }
+
+ /**
+ * CBase::~CBase - Destructor for Base class.
+ */
+ virtual ~CBase()
+ {
+ if (m_pWrapper != nullptr)
+ m_pWrapper->ReleaseInstance(this);
+ m_pWrapper = nullptr;
+ }
+
+ /**
+ * CBase::handle - Returns handle to instance.
+ */
+ LibMCDriver_EulerHandle handle() const
+ {
+ return m_pHandle;
+ }
+
+ /**
+ * CBase::wrapper - Returns wrapper instance.
+ */
+ CWrapper * wrapper() const
+ {
+ return m_pWrapper;
+ }
+
+ friend class CWrapper;
+};
+
+/*************************************************************************************************************************
+ Class CDriver
+**************************************************************************************************************************/
+class CDriver : public CBase {
+public:
+
+ /**
+ * CDriver::CDriver - Constructor for Driver class.
+ */
+ CDriver(CWrapper* pWrapper, LibMCDriver_EulerHandle pHandle)
+ : CBase(pWrapper, pHandle)
+ {
+ }
+
+ inline void Configure(const std::string & sConfigurationString);
+ inline std::string GetName();
+ inline std::string GetType();
+ inline void GetVersion(LibMCDriver_Euler_uint32 & nMajor, LibMCDriver_Euler_uint32 & nMinor, LibMCDriver_Euler_uint32 & nMicro, std::string & sBuild);
+ inline void QueryParameters();
+ inline void QueryParametersEx(classParam pDriverUpdateInstance);
+};
+
+/*************************************************************************************************************************
+ Class CEulerConnection
+**************************************************************************************************************************/
+class CEulerConnection : public CBase {
+public:
+
+ /**
+ * CEulerConnection::CEulerConnection - Constructor for EulerConnection class.
+ */
+ CEulerConnection(CWrapper* pWrapper, LibMCDriver_EulerHandle pHandle)
+ : CBase(pWrapper, pHandle)
+ {
+ }
+
+ inline void Disconnect();
+ inline std::string GetIdentifier();
+ inline std::string GetApplicationName();
+ inline std::string GetApplicationVersion();
+ inline std::string GetBaseURL();
+ inline std::string GetAPIKey();
+ inline std::string GetDeviceID();
+ inline void StartHeartBeat();
+ inline void StopHeartBeat();
+ inline std::string CreateBuild(const std::string & sJobName, const LibMCDriver_Euler_uint32 nLayerCount);
+ inline void UploadImage(const std::string & sBuildJobID, const LibMCDriver_Euler_uint32 nLayerIndex, const eEulerImageType eImageType, classParam pImage);
+ inline void SetJobStatus(const std::string & sBuildJobID, const eEulerJobStatus eJobStatus);
+};
+
+/*************************************************************************************************************************
+ Class CDriver_Euler
+**************************************************************************************************************************/
+class CDriver_Euler : public CDriver {
+public:
+
+ /**
+ * CDriver_Euler::CDriver_Euler - Constructor for Driver_Euler class.
+ */
+ CDriver_Euler(CWrapper* pWrapper, LibMCDriver_EulerHandle pHandle)
+ : CDriver(pWrapper, pHandle)
+ {
+ }
+
+ inline void SetCustomSDKResource(const std::string & sResourceName);
+ inline void SetApplicationDetails(const std::string & sApplicationName, const std::string & sApplicationVersion);
+ inline PEulerConnection Connect(const std::string & sIdentifier, const std::string & sBaseURL, const std::string & sAPIKey, const std::string & sDeviceID);
+ inline PEulerConnection ConnectWithLicenseData(const std::string & sIdentifier, const CInputVector & LicenseDataBuffer, const std::string & sDeviceID);
+ inline PEulerConnection ConnectWithLicenseResource(const std::string & sIdentifier, const std::string & sLicenseResourceName, const std::string & sDeviceID);
+ inline PEulerConnection FindConnection(const std::string & sIdentifier);
+ inline bool ConnectionExists(const std::string & sIdentifier);
+ inline void CloseAllConnections();
+};
+
+ /**
+ * CWrapper::GetVersion - retrieves the binary version of this library.
+ * @param[out] nMajor - returns the major version of this library
+ * @param[out] nMinor - returns the minor version of this library
+ * @param[out] nMicro - returns the micro version of this library
+ */
+ inline void CWrapper::GetVersion(LibMCDriver_Euler_uint32 & nMajor, LibMCDriver_Euler_uint32 & nMinor, LibMCDriver_Euler_uint32 & nMicro)
+ {
+ CheckError(nullptr,m_WrapperTable.m_GetVersion(&nMajor, &nMinor, &nMicro));
+ }
+
+ /**
+ * CWrapper::GetLastError - Returns the last error recorded on this object
+ * @param[in] pInstance - Instance Handle
+ * @param[out] sErrorMessage - Message of the last error
+ * @return Is there a last error to query
+ */
+ inline bool CWrapper::GetLastError(classParam pInstance, std::string & sErrorMessage)
+ {
+ LibMCDriver_EulerHandle hInstance = pInstance.GetHandle();
+ LibMCDriver_Euler_uint32 bytesNeededErrorMessage = 0;
+ LibMCDriver_Euler_uint32 bytesWrittenErrorMessage = 0;
+ bool resultHasError = 0;
+ CheckError(nullptr,m_WrapperTable.m_GetLastError(hInstance, 0, &bytesNeededErrorMessage, nullptr, &resultHasError));
+ std::vector bufferErrorMessage(bytesNeededErrorMessage);
+ CheckError(nullptr,m_WrapperTable.m_GetLastError(hInstance, bytesNeededErrorMessage, &bytesWrittenErrorMessage, &bufferErrorMessage[0], &resultHasError));
+ sErrorMessage = std::string(&bufferErrorMessage[0]);
+
+ return resultHasError;
+ }
+
+ /**
+ * CWrapper::ReleaseInstance - Releases shared ownership of an Instance
+ * @param[in] pInstance - Instance Handle
+ */
+ inline void CWrapper::ReleaseInstance(classParam pInstance)
+ {
+ LibMCDriver_EulerHandle hInstance = pInstance.GetHandle();
+ CheckError(nullptr,m_WrapperTable.m_ReleaseInstance(hInstance));
+ }
+
+ /**
+ * CWrapper::AcquireInstance - Acquires shared ownership of an Instance
+ * @param[in] pInstance - Instance Handle
+ */
+ inline void CWrapper::AcquireInstance(classParam pInstance)
+ {
+ LibMCDriver_EulerHandle hInstance = pInstance.GetHandle();
+ CheckError(nullptr,m_WrapperTable.m_AcquireInstance(hInstance));
+ }
+
+ /**
+ * CWrapper::InjectComponent - Injects an imported component for usage within this component
+ * @param[in] sNameSpace - NameSpace of the injected component
+ * @param[in] pSymbolAddressMethod - Address of the SymbolAddressMethod of the injected component
+ */
+ inline void CWrapper::InjectComponent(const std::string & sNameSpace, const LibMCDriver_Euler_pvoid pSymbolAddressMethod)
+ {
+ CheckError(nullptr,m_WrapperTable.m_InjectComponent(sNameSpace.c_str(), pSymbolAddressMethod));
+
+ bool bNameSpaceFound = false;
+ if (sNameSpace == "LibMCEnv") {
+ if (m_pLibMCEnvWrapper != nullptr) {
+ throw ELibMCDriver_EulerException(LIBMCDRIVER_EULER_ERROR_COULDNOTLOADLIBRARY, "Library with namespace " + sNameSpace + " is already registered.");
+ }
+ m_pLibMCEnvWrapper = LibMCEnv::CWrapper::loadLibraryFromSymbolLookupMethod(pSymbolAddressMethod);
+ bNameSpaceFound = true;
+ }
+ if (!bNameSpaceFound)
+ throw ELibMCDriver_EulerException(LIBMCDRIVER_EULER_ERROR_COULDNOTLOADLIBRARY, "Unknown namespace " + sNameSpace);
+ }
+
+ /**
+ * CWrapper::GetSymbolLookupMethod - Returns the address of the SymbolLookupMethod
+ * @return Address of the SymbolAddressMethod
+ */
+ inline LibMCDriver_Euler_pvoid CWrapper::GetSymbolLookupMethod()
+ {
+ LibMCDriver_Euler_pvoid resultSymbolLookupMethod = 0;
+ CheckError(nullptr,m_WrapperTable.m_GetSymbolLookupMethod(&resultSymbolLookupMethod));
+
+ return resultSymbolLookupMethod;
+ }
+
+ /**
+ * CWrapper::CreateDriver - Creates a driver instance with a specific name.
+ * @param[in] sName - Name of driver to be created.
+ * @param[in] sType - Type of driver to be created.
+ * @param[in] pDriverEnvironment - Environment of this driver.
+ * @return New Driver instance
+ */
+ inline PDriver CWrapper::CreateDriver(const std::string & sName, const std::string & sType, classParam pDriverEnvironment)
+ {
+ LibMCEnvHandle hDriverEnvironment = pDriverEnvironment.GetHandle();
+ LibMCDriver_EulerHandle hInstance = nullptr;
+ CheckError(nullptr,m_WrapperTable.m_CreateDriver(sName.c_str(), sType.c_str(), hDriverEnvironment, &hInstance));
+
+ if (hInstance) {
+ return std::make_shared(this, hInstance);
+ } else {
+ return nullptr;
+ }
+ }
+
+ inline void CWrapper::CheckError(CBase * pBaseClass, LibMCDriver_EulerResult nResult)
+ {
+ if (nResult != 0) {
+ std::string sErrorMessage;
+ if (pBaseClass != nullptr) {
+ GetLastError(pBaseClass, sErrorMessage);
+ }
+ throw ELibMCDriver_EulerException(nResult, sErrorMessage);
+ }
+ }
+
+
+ inline LibMCDriver_EulerResult CWrapper::initWrapperTable(sLibMCDriver_EulerDynamicWrapperTable * pWrapperTable)
+ {
+ if (pWrapperTable == nullptr)
+ return LIBMCDRIVER_EULER_ERROR_INVALIDPARAM;
+
+ pWrapperTable->m_LibraryHandle = nullptr;
+ pWrapperTable->m_Driver_Configure = nullptr;
+ pWrapperTable->m_Driver_GetName = nullptr;
+ pWrapperTable->m_Driver_GetType = nullptr;
+ pWrapperTable->m_Driver_GetVersion = nullptr;
+ pWrapperTable->m_Driver_QueryParameters = nullptr;
+ pWrapperTable->m_Driver_QueryParametersEx = nullptr;
+ pWrapperTable->m_EulerConnection_Disconnect = nullptr;
+ pWrapperTable->m_EulerConnection_GetIdentifier = nullptr;
+ pWrapperTable->m_EulerConnection_GetApplicationName = nullptr;
+ pWrapperTable->m_EulerConnection_GetApplicationVersion = nullptr;
+ pWrapperTable->m_EulerConnection_GetBaseURL = nullptr;
+ pWrapperTable->m_EulerConnection_GetAPIKey = nullptr;
+ pWrapperTable->m_EulerConnection_GetDeviceID = nullptr;
+ pWrapperTable->m_EulerConnection_StartHeartBeat = nullptr;
+ pWrapperTable->m_EulerConnection_StopHeartBeat = nullptr;
+ pWrapperTable->m_EulerConnection_CreateBuild = nullptr;
+ pWrapperTable->m_EulerConnection_UploadImage = nullptr;
+ pWrapperTable->m_EulerConnection_SetJobStatus = nullptr;
+ pWrapperTable->m_Driver_Euler_SetCustomSDKResource = nullptr;
+ pWrapperTable->m_Driver_Euler_SetApplicationDetails = nullptr;
+ pWrapperTable->m_Driver_Euler_Connect = nullptr;
+ pWrapperTable->m_Driver_Euler_ConnectWithLicenseData = nullptr;
+ pWrapperTable->m_Driver_Euler_ConnectWithLicenseResource = nullptr;
+ pWrapperTable->m_Driver_Euler_FindConnection = nullptr;
+ pWrapperTable->m_Driver_Euler_ConnectionExists = nullptr;
+ pWrapperTable->m_Driver_Euler_CloseAllConnections = nullptr;
+ pWrapperTable->m_GetVersion = nullptr;
+ pWrapperTable->m_GetLastError = nullptr;
+ pWrapperTable->m_ReleaseInstance = nullptr;
+ pWrapperTable->m_AcquireInstance = nullptr;
+ pWrapperTable->m_InjectComponent = nullptr;
+ pWrapperTable->m_GetSymbolLookupMethod = nullptr;
+ pWrapperTable->m_CreateDriver = nullptr;
+
+ return LIBMCDRIVER_EULER_SUCCESS;
+ }
+
+ inline LibMCDriver_EulerResult CWrapper::releaseWrapperTable(sLibMCDriver_EulerDynamicWrapperTable * pWrapperTable)
+ {
+ if (pWrapperTable == nullptr)
+ return LIBMCDRIVER_EULER_ERROR_INVALIDPARAM;
+
+ if (pWrapperTable->m_LibraryHandle != nullptr) {
+ #ifdef _WIN32
+ HMODULE hModule = (HMODULE) pWrapperTable->m_LibraryHandle;
+ FreeLibrary(hModule);
+ #else // _WIN32
+ dlclose(pWrapperTable->m_LibraryHandle);
+ #endif // _WIN32
+ return initWrapperTable(pWrapperTable);
+ }
+
+ return LIBMCDRIVER_EULER_SUCCESS;
+ }
+
+ inline LibMCDriver_EulerResult CWrapper::loadWrapperTable(sLibMCDriver_EulerDynamicWrapperTable * pWrapperTable, const char * pLibraryFileName)
+ {
+ if (pWrapperTable == nullptr)
+ return LIBMCDRIVER_EULER_ERROR_INVALIDPARAM;
+ if (pLibraryFileName == nullptr)
+ return LIBMCDRIVER_EULER_ERROR_INVALIDPARAM;
+
+ #ifdef _WIN32
+ // Convert filename to UTF16-string
+ int nLength = 0;
+ while ((pLibraryFileName[nLength] != 0) && (nLength < MAX_PATH))
+ nLength++;
+ int nBufferSize = nLength * 2 + 2;
+ std::vector wsLibraryFileName(nBufferSize);
+ int nResult = MultiByteToWideChar(CP_UTF8, 0, pLibraryFileName, nLength, &wsLibraryFileName[0], nBufferSize);
+ if (nResult == 0)
+ return LIBMCDRIVER_EULER_ERROR_COULDNOTLOADLIBRARY;
+
+ HMODULE hLibrary = LoadLibraryW(wsLibraryFileName.data());
+ if (hLibrary == 0)
+ return LIBMCDRIVER_EULER_ERROR_COULDNOTLOADLIBRARY;
+ #else // _WIN32
+ void* hLibrary = dlopen(pLibraryFileName, RTLD_LAZY);
+ if (hLibrary == 0)
+ return LIBMCDRIVER_EULER_ERROR_COULDNOTLOADLIBRARY;
+ dlerror();
+ #endif // _WIN32
+
+ #ifdef _WIN32
+ pWrapperTable->m_Driver_Configure = (PLibMCDriver_EulerDriver_ConfigurePtr) GetProcAddress(hLibrary, "libmcdriver_euler_driver_configure");
+ #else // _WIN32
+ pWrapperTable->m_Driver_Configure = (PLibMCDriver_EulerDriver_ConfigurePtr) dlsym(hLibrary, "libmcdriver_euler_driver_configure");
+ dlerror();
+ #endif // _WIN32
+ if (pWrapperTable->m_Driver_Configure == nullptr)
+ return LIBMCDRIVER_EULER_ERROR_COULDNOTFINDLIBRARYEXPORT;
+
+ #ifdef _WIN32
+ pWrapperTable->m_Driver_GetName = (PLibMCDriver_EulerDriver_GetNamePtr) GetProcAddress(hLibrary, "libmcdriver_euler_driver_getname");
+ #else // _WIN32
+ pWrapperTable->m_Driver_GetName = (PLibMCDriver_EulerDriver_GetNamePtr) dlsym(hLibrary, "libmcdriver_euler_driver_getname");
+ dlerror();
+ #endif // _WIN32
+ if (pWrapperTable->m_Driver_GetName == nullptr)
+ return LIBMCDRIVER_EULER_ERROR_COULDNOTFINDLIBRARYEXPORT;
+
+ #ifdef _WIN32
+ pWrapperTable->m_Driver_GetType = (PLibMCDriver_EulerDriver_GetTypePtr) GetProcAddress(hLibrary, "libmcdriver_euler_driver_gettype");
+ #else // _WIN32
+ pWrapperTable->m_Driver_GetType = (PLibMCDriver_EulerDriver_GetTypePtr) dlsym(hLibrary, "libmcdriver_euler_driver_gettype");
+ dlerror();
+ #endif // _WIN32
+ if (pWrapperTable->m_Driver_GetType == nullptr)
+ return LIBMCDRIVER_EULER_ERROR_COULDNOTFINDLIBRARYEXPORT;
+
+ #ifdef _WIN32
+ pWrapperTable->m_Driver_GetVersion = (PLibMCDriver_EulerDriver_GetVersionPtr) GetProcAddress(hLibrary, "libmcdriver_euler_driver_getversion");
+ #else // _WIN32
+ pWrapperTable->m_Driver_GetVersion = (PLibMCDriver_EulerDriver_GetVersionPtr) dlsym(hLibrary, "libmcdriver_euler_driver_getversion");
+ dlerror();
+ #endif // _WIN32
+ if (pWrapperTable->m_Driver_GetVersion == nullptr)
+ return LIBMCDRIVER_EULER_ERROR_COULDNOTFINDLIBRARYEXPORT;
+
+ #ifdef _WIN32
+ pWrapperTable->m_Driver_QueryParameters = (PLibMCDriver_EulerDriver_QueryParametersPtr) GetProcAddress(hLibrary, "libmcdriver_euler_driver_queryparameters");
+ #else // _WIN32
+ pWrapperTable->m_Driver_QueryParameters = (PLibMCDriver_EulerDriver_QueryParametersPtr) dlsym(hLibrary, "libmcdriver_euler_driver_queryparameters");
+ dlerror();
+ #endif // _WIN32
+ if (pWrapperTable->m_Driver_QueryParameters == nullptr)
+ return LIBMCDRIVER_EULER_ERROR_COULDNOTFINDLIBRARYEXPORT;
+
+ #ifdef _WIN32
+ pWrapperTable->m_Driver_QueryParametersEx = (PLibMCDriver_EulerDriver_QueryParametersExPtr) GetProcAddress(hLibrary, "libmcdriver_euler_driver_queryparametersex");
+ #else // _WIN32
+ pWrapperTable->m_Driver_QueryParametersEx = (PLibMCDriver_EulerDriver_QueryParametersExPtr) dlsym(hLibrary, "libmcdriver_euler_driver_queryparametersex");
+ dlerror();
+ #endif // _WIN32
+ if (pWrapperTable->m_Driver_QueryParametersEx == nullptr)
+ return LIBMCDRIVER_EULER_ERROR_COULDNOTFINDLIBRARYEXPORT;
+
+ #ifdef _WIN32
+ pWrapperTable->m_EulerConnection_Disconnect = (PLibMCDriver_EulerEulerConnection_DisconnectPtr) GetProcAddress(hLibrary, "libmcdriver_euler_eulerconnection_disconnect");
+ #else // _WIN32
+ pWrapperTable->m_EulerConnection_Disconnect = (PLibMCDriver_EulerEulerConnection_DisconnectPtr) dlsym(hLibrary, "libmcdriver_euler_eulerconnection_disconnect");
+ dlerror();
+ #endif // _WIN32
+ if (pWrapperTable->m_EulerConnection_Disconnect == nullptr)
+ return LIBMCDRIVER_EULER_ERROR_COULDNOTFINDLIBRARYEXPORT;
+
+ #ifdef _WIN32
+ pWrapperTable->m_EulerConnection_GetIdentifier = (PLibMCDriver_EulerEulerConnection_GetIdentifierPtr) GetProcAddress(hLibrary, "libmcdriver_euler_eulerconnection_getidentifier");
+ #else // _WIN32
+ pWrapperTable->m_EulerConnection_GetIdentifier = (PLibMCDriver_EulerEulerConnection_GetIdentifierPtr) dlsym(hLibrary, "libmcdriver_euler_eulerconnection_getidentifier");
+ dlerror();
+ #endif // _WIN32
+ if (pWrapperTable->m_EulerConnection_GetIdentifier == nullptr)
+ return LIBMCDRIVER_EULER_ERROR_COULDNOTFINDLIBRARYEXPORT;
+
+ #ifdef _WIN32
+ pWrapperTable->m_EulerConnection_GetApplicationName = (PLibMCDriver_EulerEulerConnection_GetApplicationNamePtr) GetProcAddress(hLibrary, "libmcdriver_euler_eulerconnection_getapplicationname");
+ #else // _WIN32
+ pWrapperTable->m_EulerConnection_GetApplicationName = (PLibMCDriver_EulerEulerConnection_GetApplicationNamePtr) dlsym(hLibrary, "libmcdriver_euler_eulerconnection_getapplicationname");
+ dlerror();
+ #endif // _WIN32
+ if (pWrapperTable->m_EulerConnection_GetApplicationName == nullptr)
+ return LIBMCDRIVER_EULER_ERROR_COULDNOTFINDLIBRARYEXPORT;
+
+ #ifdef _WIN32
+ pWrapperTable->m_EulerConnection_GetApplicationVersion = (PLibMCDriver_EulerEulerConnection_GetApplicationVersionPtr) GetProcAddress(hLibrary, "libmcdriver_euler_eulerconnection_getapplicationversion");
+ #else // _WIN32
+ pWrapperTable->m_EulerConnection_GetApplicationVersion = (PLibMCDriver_EulerEulerConnection_GetApplicationVersionPtr) dlsym(hLibrary, "libmcdriver_euler_eulerconnection_getapplicationversion");
+ dlerror();
+ #endif // _WIN32
+ if (pWrapperTable->m_EulerConnection_GetApplicationVersion == nullptr)
+ return LIBMCDRIVER_EULER_ERROR_COULDNOTFINDLIBRARYEXPORT;
+
+ #ifdef _WIN32
+ pWrapperTable->m_EulerConnection_GetBaseURL = (PLibMCDriver_EulerEulerConnection_GetBaseURLPtr) GetProcAddress(hLibrary, "libmcdriver_euler_eulerconnection_getbaseurl");
+ #else // _WIN32
+ pWrapperTable->m_EulerConnection_GetBaseURL = (PLibMCDriver_EulerEulerConnection_GetBaseURLPtr) dlsym(hLibrary, "libmcdriver_euler_eulerconnection_getbaseurl");
+ dlerror();
+ #endif // _WIN32
+ if (pWrapperTable->m_EulerConnection_GetBaseURL == nullptr)
+ return LIBMCDRIVER_EULER_ERROR_COULDNOTFINDLIBRARYEXPORT;
+
+ #ifdef _WIN32
+ pWrapperTable->m_EulerConnection_GetAPIKey = (PLibMCDriver_EulerEulerConnection_GetAPIKeyPtr) GetProcAddress(hLibrary, "libmcdriver_euler_eulerconnection_getapikey");
+ #else // _WIN32
+ pWrapperTable->m_EulerConnection_GetAPIKey = (PLibMCDriver_EulerEulerConnection_GetAPIKeyPtr) dlsym(hLibrary, "libmcdriver_euler_eulerconnection_getapikey");
+ dlerror();
+ #endif // _WIN32
+ if (pWrapperTable->m_EulerConnection_GetAPIKey == nullptr)
+ return LIBMCDRIVER_EULER_ERROR_COULDNOTFINDLIBRARYEXPORT;
+
+ #ifdef _WIN32
+ pWrapperTable->m_EulerConnection_GetDeviceID = (PLibMCDriver_EulerEulerConnection_GetDeviceIDPtr) GetProcAddress(hLibrary, "libmcdriver_euler_eulerconnection_getdeviceid");
+ #else // _WIN32
+ pWrapperTable->m_EulerConnection_GetDeviceID = (PLibMCDriver_EulerEulerConnection_GetDeviceIDPtr) dlsym(hLibrary, "libmcdriver_euler_eulerconnection_getdeviceid");
+ dlerror();
+ #endif // _WIN32
+ if (pWrapperTable->m_EulerConnection_GetDeviceID == nullptr)
+ return LIBMCDRIVER_EULER_ERROR_COULDNOTFINDLIBRARYEXPORT;
+
+ #ifdef _WIN32
+ pWrapperTable->m_EulerConnection_StartHeartBeat = (PLibMCDriver_EulerEulerConnection_StartHeartBeatPtr) GetProcAddress(hLibrary, "libmcdriver_euler_eulerconnection_startheartbeat");
+ #else // _WIN32
+ pWrapperTable->m_EulerConnection_StartHeartBeat = (PLibMCDriver_EulerEulerConnection_StartHeartBeatPtr) dlsym(hLibrary, "libmcdriver_euler_eulerconnection_startheartbeat");
+ dlerror();
+ #endif // _WIN32
+ if (pWrapperTable->m_EulerConnection_StartHeartBeat == nullptr)
+ return LIBMCDRIVER_EULER_ERROR_COULDNOTFINDLIBRARYEXPORT;
+
+ #ifdef _WIN32
+ pWrapperTable->m_EulerConnection_StopHeartBeat = (PLibMCDriver_EulerEulerConnection_StopHeartBeatPtr) GetProcAddress(hLibrary, "libmcdriver_euler_eulerconnection_stopheartbeat");
+ #else // _WIN32
+ pWrapperTable->m_EulerConnection_StopHeartBeat = (PLibMCDriver_EulerEulerConnection_StopHeartBeatPtr) dlsym(hLibrary, "libmcdriver_euler_eulerconnection_stopheartbeat");
+ dlerror();
+ #endif // _WIN32
+ if (pWrapperTable->m_EulerConnection_StopHeartBeat == nullptr)
+ return LIBMCDRIVER_EULER_ERROR_COULDNOTFINDLIBRARYEXPORT;
+
+ #ifdef _WIN32
+ pWrapperTable->m_EulerConnection_CreateBuild = (PLibMCDriver_EulerEulerConnection_CreateBuildPtr) GetProcAddress(hLibrary, "libmcdriver_euler_eulerconnection_createbuild");
+ #else // _WIN32
+ pWrapperTable->m_EulerConnection_CreateBuild = (PLibMCDriver_EulerEulerConnection_CreateBuildPtr) dlsym(hLibrary, "libmcdriver_euler_eulerconnection_createbuild");
+ dlerror();
+ #endif // _WIN32
+ if (pWrapperTable->m_EulerConnection_CreateBuild == nullptr)
+ return LIBMCDRIVER_EULER_ERROR_COULDNOTFINDLIBRARYEXPORT;
+
+ #ifdef _WIN32
+ pWrapperTable->m_EulerConnection_UploadImage = (PLibMCDriver_EulerEulerConnection_UploadImagePtr) GetProcAddress(hLibrary, "libmcdriver_euler_eulerconnection_uploadimage");
+ #else // _WIN32
+ pWrapperTable->m_EulerConnection_UploadImage = (PLibMCDriver_EulerEulerConnection_UploadImagePtr) dlsym(hLibrary, "libmcdriver_euler_eulerconnection_uploadimage");
+ dlerror();
+ #endif // _WIN32
+ if (pWrapperTable->m_EulerConnection_UploadImage == nullptr)
+ return LIBMCDRIVER_EULER_ERROR_COULDNOTFINDLIBRARYEXPORT;
+
+ #ifdef _WIN32
+ pWrapperTable->m_EulerConnection_SetJobStatus = (PLibMCDriver_EulerEulerConnection_SetJobStatusPtr) GetProcAddress(hLibrary, "libmcdriver_euler_eulerconnection_setjobstatus");
+ #else // _WIN32
+ pWrapperTable->m_EulerConnection_SetJobStatus = (PLibMCDriver_EulerEulerConnection_SetJobStatusPtr) dlsym(hLibrary, "libmcdriver_euler_eulerconnection_setjobstatus");
+ dlerror();
+ #endif // _WIN32
+ if (pWrapperTable->m_EulerConnection_SetJobStatus == nullptr)
+ return LIBMCDRIVER_EULER_ERROR_COULDNOTFINDLIBRARYEXPORT;
+
+ #ifdef _WIN32
+ pWrapperTable->m_Driver_Euler_SetCustomSDKResource = (PLibMCDriver_EulerDriver_Euler_SetCustomSDKResourcePtr) GetProcAddress(hLibrary, "libmcdriver_euler_driver_euler_setcustomsdkresource");
+ #else // _WIN32
+ pWrapperTable->m_Driver_Euler_SetCustomSDKResource = (PLibMCDriver_EulerDriver_Euler_SetCustomSDKResourcePtr) dlsym(hLibrary, "libmcdriver_euler_driver_euler_setcustomsdkresource");
+ dlerror();
+ #endif // _WIN32
+ if (pWrapperTable->m_Driver_Euler_SetCustomSDKResource == nullptr)
+ return LIBMCDRIVER_EULER_ERROR_COULDNOTFINDLIBRARYEXPORT;
+
+ #ifdef _WIN32
+ pWrapperTable->m_Driver_Euler_SetApplicationDetails = (PLibMCDriver_EulerDriver_Euler_SetApplicationDetailsPtr) GetProcAddress(hLibrary, "libmcdriver_euler_driver_euler_setapplicationdetails");
+ #else // _WIN32
+ pWrapperTable->m_Driver_Euler_SetApplicationDetails = (PLibMCDriver_EulerDriver_Euler_SetApplicationDetailsPtr) dlsym(hLibrary, "libmcdriver_euler_driver_euler_setapplicationdetails");
+ dlerror();
+ #endif // _WIN32
+ if (pWrapperTable->m_Driver_Euler_SetApplicationDetails == nullptr)
+ return LIBMCDRIVER_EULER_ERROR_COULDNOTFINDLIBRARYEXPORT;
+
+ #ifdef _WIN32
+ pWrapperTable->m_Driver_Euler_Connect = (PLibMCDriver_EulerDriver_Euler_ConnectPtr) GetProcAddress(hLibrary, "libmcdriver_euler_driver_euler_connect");
+ #else // _WIN32
+ pWrapperTable->m_Driver_Euler_Connect = (PLibMCDriver_EulerDriver_Euler_ConnectPtr) dlsym(hLibrary, "libmcdriver_euler_driver_euler_connect");
+ dlerror();
+ #endif // _WIN32
+ if (pWrapperTable->m_Driver_Euler_Connect == nullptr)
+ return LIBMCDRIVER_EULER_ERROR_COULDNOTFINDLIBRARYEXPORT;
+
+ #ifdef _WIN32
+ pWrapperTable->m_Driver_Euler_ConnectWithLicenseData = (PLibMCDriver_EulerDriver_Euler_ConnectWithLicenseDataPtr) GetProcAddress(hLibrary, "libmcdriver_euler_driver_euler_connectwithlicensedata");
+ #else // _WIN32
+ pWrapperTable->m_Driver_Euler_ConnectWithLicenseData = (PLibMCDriver_EulerDriver_Euler_ConnectWithLicenseDataPtr) dlsym(hLibrary, "libmcdriver_euler_driver_euler_connectwithlicensedata");
+ dlerror();
+ #endif // _WIN32
+ if (pWrapperTable->m_Driver_Euler_ConnectWithLicenseData == nullptr)
+ return LIBMCDRIVER_EULER_ERROR_COULDNOTFINDLIBRARYEXPORT;
+
+ #ifdef _WIN32
+ pWrapperTable->m_Driver_Euler_ConnectWithLicenseResource = (PLibMCDriver_EulerDriver_Euler_ConnectWithLicenseResourcePtr) GetProcAddress(hLibrary, "libmcdriver_euler_driver_euler_connectwithlicenseresource");
+ #else // _WIN32
+ pWrapperTable->m_Driver_Euler_ConnectWithLicenseResource = (PLibMCDriver_EulerDriver_Euler_ConnectWithLicenseResourcePtr) dlsym(hLibrary, "libmcdriver_euler_driver_euler_connectwithlicenseresource");
+ dlerror();
+ #endif // _WIN32
+ if (pWrapperTable->m_Driver_Euler_ConnectWithLicenseResource == nullptr)
+ return LIBMCDRIVER_EULER_ERROR_COULDNOTFINDLIBRARYEXPORT;
+
+ #ifdef _WIN32
+ pWrapperTable->m_Driver_Euler_FindConnection = (PLibMCDriver_EulerDriver_Euler_FindConnectionPtr) GetProcAddress(hLibrary, "libmcdriver_euler_driver_euler_findconnection");
+ #else // _WIN32
+ pWrapperTable->m_Driver_Euler_FindConnection = (PLibMCDriver_EulerDriver_Euler_FindConnectionPtr) dlsym(hLibrary, "libmcdriver_euler_driver_euler_findconnection");
+ dlerror();
+ #endif // _WIN32
+ if (pWrapperTable->m_Driver_Euler_FindConnection == nullptr)
+ return LIBMCDRIVER_EULER_ERROR_COULDNOTFINDLIBRARYEXPORT;
+
+ #ifdef _WIN32
+ pWrapperTable->m_Driver_Euler_ConnectionExists = (PLibMCDriver_EulerDriver_Euler_ConnectionExistsPtr) GetProcAddress(hLibrary, "libmcdriver_euler_driver_euler_connectionexists");
+ #else // _WIN32
+ pWrapperTable->m_Driver_Euler_ConnectionExists = (PLibMCDriver_EulerDriver_Euler_ConnectionExistsPtr) dlsym(hLibrary, "libmcdriver_euler_driver_euler_connectionexists");
+ dlerror();
+ #endif // _WIN32
+ if (pWrapperTable->m_Driver_Euler_ConnectionExists == nullptr)
+ return LIBMCDRIVER_EULER_ERROR_COULDNOTFINDLIBRARYEXPORT;
+
+ #ifdef _WIN32
+ pWrapperTable->m_Driver_Euler_CloseAllConnections = (PLibMCDriver_EulerDriver_Euler_CloseAllConnectionsPtr) GetProcAddress(hLibrary, "libmcdriver_euler_driver_euler_closeallconnections");
+ #else // _WIN32
+ pWrapperTable->m_Driver_Euler_CloseAllConnections = (PLibMCDriver_EulerDriver_Euler_CloseAllConnectionsPtr) dlsym(hLibrary, "libmcdriver_euler_driver_euler_closeallconnections");
+ dlerror();
+ #endif // _WIN32
+ if (pWrapperTable->m_Driver_Euler_CloseAllConnections == nullptr)
+ return LIBMCDRIVER_EULER_ERROR_COULDNOTFINDLIBRARYEXPORT;
+
+ #ifdef _WIN32
+ pWrapperTable->m_GetVersion = (PLibMCDriver_EulerGetVersionPtr) GetProcAddress(hLibrary, "libmcdriver_euler_getversion");
+ #else // _WIN32
+ pWrapperTable->m_GetVersion = (PLibMCDriver_EulerGetVersionPtr) dlsym(hLibrary, "libmcdriver_euler_getversion");
+ dlerror();
+ #endif // _WIN32
+ if (pWrapperTable->m_GetVersion == nullptr)
+ return LIBMCDRIVER_EULER_ERROR_COULDNOTFINDLIBRARYEXPORT;
+
+ #ifdef _WIN32
+ pWrapperTable->m_GetLastError = (PLibMCDriver_EulerGetLastErrorPtr) GetProcAddress(hLibrary, "libmcdriver_euler_getlasterror");
+ #else // _WIN32
+ pWrapperTable->m_GetLastError = (PLibMCDriver_EulerGetLastErrorPtr) dlsym(hLibrary, "libmcdriver_euler_getlasterror");
+ dlerror();
+ #endif // _WIN32
+ if (pWrapperTable->m_GetLastError == nullptr)
+ return LIBMCDRIVER_EULER_ERROR_COULDNOTFINDLIBRARYEXPORT;
+
+ #ifdef _WIN32
+ pWrapperTable->m_ReleaseInstance = (PLibMCDriver_EulerReleaseInstancePtr) GetProcAddress(hLibrary, "libmcdriver_euler_releaseinstance");
+ #else // _WIN32
+ pWrapperTable->m_ReleaseInstance = (PLibMCDriver_EulerReleaseInstancePtr) dlsym(hLibrary, "libmcdriver_euler_releaseinstance");
+ dlerror();
+ #endif // _WIN32
+ if (pWrapperTable->m_ReleaseInstance == nullptr)
+ return LIBMCDRIVER_EULER_ERROR_COULDNOTFINDLIBRARYEXPORT;
+
+ #ifdef _WIN32
+ pWrapperTable->m_AcquireInstance = (PLibMCDriver_EulerAcquireInstancePtr) GetProcAddress(hLibrary, "libmcdriver_euler_acquireinstance");
+ #else // _WIN32
+ pWrapperTable->m_AcquireInstance = (PLibMCDriver_EulerAcquireInstancePtr) dlsym(hLibrary, "libmcdriver_euler_acquireinstance");
+ dlerror();
+ #endif // _WIN32
+ if (pWrapperTable->m_AcquireInstance == nullptr)
+ return LIBMCDRIVER_EULER_ERROR_COULDNOTFINDLIBRARYEXPORT;
+
+ #ifdef _WIN32
+ pWrapperTable->m_InjectComponent = (PLibMCDriver_EulerInjectComponentPtr) GetProcAddress(hLibrary, "libmcdriver_euler_injectcomponent");
+ #else // _WIN32
+ pWrapperTable->m_InjectComponent = (PLibMCDriver_EulerInjectComponentPtr) dlsym(hLibrary, "libmcdriver_euler_injectcomponent");
+ dlerror();
+ #endif // _WIN32
+ if (pWrapperTable->m_InjectComponent == nullptr)
+ return LIBMCDRIVER_EULER_ERROR_COULDNOTFINDLIBRARYEXPORT;
+
+ #ifdef _WIN32
+ pWrapperTable->m_GetSymbolLookupMethod = (PLibMCDriver_EulerGetSymbolLookupMethodPtr) GetProcAddress(hLibrary, "libmcdriver_euler_getsymbollookupmethod");
+ #else // _WIN32
+ pWrapperTable->m_GetSymbolLookupMethod = (PLibMCDriver_EulerGetSymbolLookupMethodPtr) dlsym(hLibrary, "libmcdriver_euler_getsymbollookupmethod");
+ dlerror();
+ #endif // _WIN32
+ if (pWrapperTable->m_GetSymbolLookupMethod == nullptr)
+ return LIBMCDRIVER_EULER_ERROR_COULDNOTFINDLIBRARYEXPORT;
+
+ #ifdef _WIN32
+ pWrapperTable->m_CreateDriver = (PLibMCDriver_EulerCreateDriverPtr) GetProcAddress(hLibrary, "libmcdriver_euler_createdriver");
+ #else // _WIN32
+ pWrapperTable->m_CreateDriver = (PLibMCDriver_EulerCreateDriverPtr) dlsym(hLibrary, "libmcdriver_euler_createdriver");
+ dlerror();
+ #endif // _WIN32
+ if (pWrapperTable->m_CreateDriver == nullptr)
+ return LIBMCDRIVER_EULER_ERROR_COULDNOTFINDLIBRARYEXPORT;
+
+ pWrapperTable->m_LibraryHandle = hLibrary;
+ return LIBMCDRIVER_EULER_SUCCESS;
+ }
+
+ inline LibMCDriver_EulerResult CWrapper::loadWrapperTableFromSymbolLookupMethod(sLibMCDriver_EulerDynamicWrapperTable * pWrapperTable, void* pSymbolLookupMethod)
+{
+ if (pWrapperTable == nullptr)
+ return LIBMCDRIVER_EULER_ERROR_INVALIDPARAM;
+ if (pSymbolLookupMethod == nullptr)
+ return LIBMCDRIVER_EULER_ERROR_INVALIDPARAM;
+
+ typedef LibMCDriver_EulerResult(*SymbolLookupType)(const char*, void**);
+
+ SymbolLookupType pLookup = (SymbolLookupType)pSymbolLookupMethod;
+
+ LibMCDriver_EulerResult eLookupError = LIBMCDRIVER_EULER_SUCCESS;
+ eLookupError = (*pLookup)("libmcdriver_euler_driver_configure", (void**)&(pWrapperTable->m_Driver_Configure));
+ if ( (eLookupError != 0) || (pWrapperTable->m_Driver_Configure == nullptr) )
+ return LIBMCDRIVER_EULER_ERROR_COULDNOTFINDLIBRARYEXPORT;
+
+ eLookupError = (*pLookup)("libmcdriver_euler_driver_getname", (void**)&(pWrapperTable->m_Driver_GetName));
+ if ( (eLookupError != 0) || (pWrapperTable->m_Driver_GetName == nullptr) )
+ return LIBMCDRIVER_EULER_ERROR_COULDNOTFINDLIBRARYEXPORT;
+
+ eLookupError = (*pLookup)("libmcdriver_euler_driver_gettype", (void**)&(pWrapperTable->m_Driver_GetType));
+ if ( (eLookupError != 0) || (pWrapperTable->m_Driver_GetType == nullptr) )
+ return LIBMCDRIVER_EULER_ERROR_COULDNOTFINDLIBRARYEXPORT;
+
+ eLookupError = (*pLookup)("libmcdriver_euler_driver_getversion", (void**)&(pWrapperTable->m_Driver_GetVersion));
+ if ( (eLookupError != 0) || (pWrapperTable->m_Driver_GetVersion == nullptr) )
+ return LIBMCDRIVER_EULER_ERROR_COULDNOTFINDLIBRARYEXPORT;
+
+ eLookupError = (*pLookup)("libmcdriver_euler_driver_queryparameters", (void**)&(pWrapperTable->m_Driver_QueryParameters));
+ if ( (eLookupError != 0) || (pWrapperTable->m_Driver_QueryParameters == nullptr) )
+ return LIBMCDRIVER_EULER_ERROR_COULDNOTFINDLIBRARYEXPORT;
+
+ eLookupError = (*pLookup)("libmcdriver_euler_driver_queryparametersex", (void**)&(pWrapperTable->m_Driver_QueryParametersEx));
+ if ( (eLookupError != 0) || (pWrapperTable->m_Driver_QueryParametersEx == nullptr) )
+ return LIBMCDRIVER_EULER_ERROR_COULDNOTFINDLIBRARYEXPORT;
+
+ eLookupError = (*pLookup)("libmcdriver_euler_eulerconnection_disconnect", (void**)&(pWrapperTable->m_EulerConnection_Disconnect));
+ if ( (eLookupError != 0) || (pWrapperTable->m_EulerConnection_Disconnect == nullptr) )
+ return LIBMCDRIVER_EULER_ERROR_COULDNOTFINDLIBRARYEXPORT;
+
+ eLookupError = (*pLookup)("libmcdriver_euler_eulerconnection_getidentifier", (void**)&(pWrapperTable->m_EulerConnection_GetIdentifier));
+ if ( (eLookupError != 0) || (pWrapperTable->m_EulerConnection_GetIdentifier == nullptr) )
+ return LIBMCDRIVER_EULER_ERROR_COULDNOTFINDLIBRARYEXPORT;
+
+ eLookupError = (*pLookup)("libmcdriver_euler_eulerconnection_getapplicationname", (void**)&(pWrapperTable->m_EulerConnection_GetApplicationName));
+ if ( (eLookupError != 0) || (pWrapperTable->m_EulerConnection_GetApplicationName == nullptr) )
+ return LIBMCDRIVER_EULER_ERROR_COULDNOTFINDLIBRARYEXPORT;
+
+ eLookupError = (*pLookup)("libmcdriver_euler_eulerconnection_getapplicationversion", (void**)&(pWrapperTable->m_EulerConnection_GetApplicationVersion));
+ if ( (eLookupError != 0) || (pWrapperTable->m_EulerConnection_GetApplicationVersion == nullptr) )
+ return LIBMCDRIVER_EULER_ERROR_COULDNOTFINDLIBRARYEXPORT;
+
+ eLookupError = (*pLookup)("libmcdriver_euler_eulerconnection_getbaseurl", (void**)&(pWrapperTable->m_EulerConnection_GetBaseURL));
+ if ( (eLookupError != 0) || (pWrapperTable->m_EulerConnection_GetBaseURL == nullptr) )
+ return LIBMCDRIVER_EULER_ERROR_COULDNOTFINDLIBRARYEXPORT;
+
+ eLookupError = (*pLookup)("libmcdriver_euler_eulerconnection_getapikey", (void**)&(pWrapperTable->m_EulerConnection_GetAPIKey));
+ if ( (eLookupError != 0) || (pWrapperTable->m_EulerConnection_GetAPIKey == nullptr) )
+ return LIBMCDRIVER_EULER_ERROR_COULDNOTFINDLIBRARYEXPORT;
+
+ eLookupError = (*pLookup)("libmcdriver_euler_eulerconnection_getdeviceid", (void**)&(pWrapperTable->m_EulerConnection_GetDeviceID));
+ if ( (eLookupError != 0) || (pWrapperTable->m_EulerConnection_GetDeviceID == nullptr) )
+ return LIBMCDRIVER_EULER_ERROR_COULDNOTFINDLIBRARYEXPORT;
+
+ eLookupError = (*pLookup)("libmcdriver_euler_eulerconnection_startheartbeat", (void**)&(pWrapperTable->m_EulerConnection_StartHeartBeat));
+ if ( (eLookupError != 0) || (pWrapperTable->m_EulerConnection_StartHeartBeat == nullptr) )
+ return LIBMCDRIVER_EULER_ERROR_COULDNOTFINDLIBRARYEXPORT;
+
+ eLookupError = (*pLookup)("libmcdriver_euler_eulerconnection_stopheartbeat", (void**)&(pWrapperTable->m_EulerConnection_StopHeartBeat));
+ if ( (eLookupError != 0) || (pWrapperTable->m_EulerConnection_StopHeartBeat == nullptr) )
+ return LIBMCDRIVER_EULER_ERROR_COULDNOTFINDLIBRARYEXPORT;
+
+ eLookupError = (*pLookup)("libmcdriver_euler_eulerconnection_createbuild", (void**)&(pWrapperTable->m_EulerConnection_CreateBuild));
+ if ( (eLookupError != 0) || (pWrapperTable->m_EulerConnection_CreateBuild == nullptr) )
+ return LIBMCDRIVER_EULER_ERROR_COULDNOTFINDLIBRARYEXPORT;
+
+ eLookupError = (*pLookup)("libmcdriver_euler_eulerconnection_uploadimage", (void**)&(pWrapperTable->m_EulerConnection_UploadImage));
+ if ( (eLookupError != 0) || (pWrapperTable->m_EulerConnection_UploadImage == nullptr) )
+ return LIBMCDRIVER_EULER_ERROR_COULDNOTFINDLIBRARYEXPORT;
+
+ eLookupError = (*pLookup)("libmcdriver_euler_eulerconnection_setjobstatus", (void**)&(pWrapperTable->m_EulerConnection_SetJobStatus));
+ if ( (eLookupError != 0) || (pWrapperTable->m_EulerConnection_SetJobStatus == nullptr) )
+ return LIBMCDRIVER_EULER_ERROR_COULDNOTFINDLIBRARYEXPORT;
+
+ eLookupError = (*pLookup)("libmcdriver_euler_driver_euler_setcustomsdkresource", (void**)&(pWrapperTable->m_Driver_Euler_SetCustomSDKResource));
+ if ( (eLookupError != 0) || (pWrapperTable->m_Driver_Euler_SetCustomSDKResource == nullptr) )
+ return LIBMCDRIVER_EULER_ERROR_COULDNOTFINDLIBRARYEXPORT;
+
+ eLookupError = (*pLookup)("libmcdriver_euler_driver_euler_setapplicationdetails", (void**)&(pWrapperTable->m_Driver_Euler_SetApplicationDetails));
+ if ( (eLookupError != 0) || (pWrapperTable->m_Driver_Euler_SetApplicationDetails == nullptr) )
+ return LIBMCDRIVER_EULER_ERROR_COULDNOTFINDLIBRARYEXPORT;
+
+ eLookupError = (*pLookup)("libmcdriver_euler_driver_euler_connect", (void**)&(pWrapperTable->m_Driver_Euler_Connect));
+ if ( (eLookupError != 0) || (pWrapperTable->m_Driver_Euler_Connect == nullptr) )
+ return LIBMCDRIVER_EULER_ERROR_COULDNOTFINDLIBRARYEXPORT;
+
+ eLookupError = (*pLookup)("libmcdriver_euler_driver_euler_connectwithlicensedata", (void**)&(pWrapperTable->m_Driver_Euler_ConnectWithLicenseData));
+ if ( (eLookupError != 0) || (pWrapperTable->m_Driver_Euler_ConnectWithLicenseData == nullptr) )
+ return LIBMCDRIVER_EULER_ERROR_COULDNOTFINDLIBRARYEXPORT;
+
+ eLookupError = (*pLookup)("libmcdriver_euler_driver_euler_connectwithlicenseresource", (void**)&(pWrapperTable->m_Driver_Euler_ConnectWithLicenseResource));
+ if ( (eLookupError != 0) || (pWrapperTable->m_Driver_Euler_ConnectWithLicenseResource == nullptr) )
+ return LIBMCDRIVER_EULER_ERROR_COULDNOTFINDLIBRARYEXPORT;
+
+ eLookupError = (*pLookup)("libmcdriver_euler_driver_euler_findconnection", (void**)&(pWrapperTable->m_Driver_Euler_FindConnection));
+ if ( (eLookupError != 0) || (pWrapperTable->m_Driver_Euler_FindConnection == nullptr) )
+ return LIBMCDRIVER_EULER_ERROR_COULDNOTFINDLIBRARYEXPORT;
+
+ eLookupError = (*pLookup)("libmcdriver_euler_driver_euler_connectionexists", (void**)&(pWrapperTable->m_Driver_Euler_ConnectionExists));
+ if ( (eLookupError != 0) || (pWrapperTable->m_Driver_Euler_ConnectionExists == nullptr) )
+ return LIBMCDRIVER_EULER_ERROR_COULDNOTFINDLIBRARYEXPORT;
+
+ eLookupError = (*pLookup)("libmcdriver_euler_driver_euler_closeallconnections", (void**)&(pWrapperTable->m_Driver_Euler_CloseAllConnections));
+ if ( (eLookupError != 0) || (pWrapperTable->m_Driver_Euler_CloseAllConnections == nullptr) )
+ return LIBMCDRIVER_EULER_ERROR_COULDNOTFINDLIBRARYEXPORT;
+
+ eLookupError = (*pLookup)("libmcdriver_euler_getversion", (void**)&(pWrapperTable->m_GetVersion));
+ if ( (eLookupError != 0) || (pWrapperTable->m_GetVersion == nullptr) )
+ return LIBMCDRIVER_EULER_ERROR_COULDNOTFINDLIBRARYEXPORT;
+
+ eLookupError = (*pLookup)("libmcdriver_euler_getlasterror", (void**)&(pWrapperTable->m_GetLastError));
+ if ( (eLookupError != 0) || (pWrapperTable->m_GetLastError == nullptr) )
+ return LIBMCDRIVER_EULER_ERROR_COULDNOTFINDLIBRARYEXPORT;
+
+ eLookupError = (*pLookup)("libmcdriver_euler_releaseinstance", (void**)&(pWrapperTable->m_ReleaseInstance));
+ if ( (eLookupError != 0) || (pWrapperTable->m_ReleaseInstance == nullptr) )
+ return LIBMCDRIVER_EULER_ERROR_COULDNOTFINDLIBRARYEXPORT;
+
+ eLookupError = (*pLookup)("libmcdriver_euler_acquireinstance", (void**)&(pWrapperTable->m_AcquireInstance));
+ if ( (eLookupError != 0) || (pWrapperTable->m_AcquireInstance == nullptr) )
+ return LIBMCDRIVER_EULER_ERROR_COULDNOTFINDLIBRARYEXPORT;
+
+ eLookupError = (*pLookup)("libmcdriver_euler_injectcomponent", (void**)&(pWrapperTable->m_InjectComponent));
+ if ( (eLookupError != 0) || (pWrapperTable->m_InjectComponent == nullptr) )
+ return LIBMCDRIVER_EULER_ERROR_COULDNOTFINDLIBRARYEXPORT;
+
+ eLookupError = (*pLookup)("libmcdriver_euler_getsymbollookupmethod", (void**)&(pWrapperTable->m_GetSymbolLookupMethod));
+ if ( (eLookupError != 0) || (pWrapperTable->m_GetSymbolLookupMethod == nullptr) )
+ return LIBMCDRIVER_EULER_ERROR_COULDNOTFINDLIBRARYEXPORT;
+
+ eLookupError = (*pLookup)("libmcdriver_euler_createdriver", (void**)&(pWrapperTable->m_CreateDriver));
+ if ( (eLookupError != 0) || (pWrapperTable->m_CreateDriver == nullptr) )
+ return LIBMCDRIVER_EULER_ERROR_COULDNOTFINDLIBRARYEXPORT;
+
+ return LIBMCDRIVER_EULER_SUCCESS;
+}
+
+
+
+ /**
+ * Method definitions for class CBase
+ */
+
+ /**
+ * Method definitions for class CDriver
+ */
+
+ /**
+ * CDriver::Configure - Configures a driver with its specific configuration data.
+ * @param[in] sConfigurationString - Configuration data of driver.
+ */
+ void CDriver::Configure(const std::string & sConfigurationString)
+ {
+ CheckError(m_pWrapper->m_WrapperTable.m_Driver_Configure(m_pHandle, sConfigurationString.c_str()));
+ }
+
+ /**
+ * CDriver::GetName - returns the name identifier of the driver
+ * @return Name of the driver.
+ */
+ std::string CDriver::GetName()
+ {
+ LibMCDriver_Euler_uint32 bytesNeededName = 0;
+ LibMCDriver_Euler_uint32 bytesWrittenName = 0;
+ CheckError(m_pWrapper->m_WrapperTable.m_Driver_GetName(m_pHandle, 0, &bytesNeededName, nullptr));
+ std::vector bufferName(bytesNeededName);
+ CheckError(m_pWrapper->m_WrapperTable.m_Driver_GetName(m_pHandle, bytesNeededName, &bytesWrittenName, &bufferName[0]));
+
+ return std::string(&bufferName[0]);
+ }
+
+ /**
+ * CDriver::GetType - returns the type identifier of the driver
+ * @return Type of the driver.
+ */
+ std::string CDriver::GetType()
+ {
+ LibMCDriver_Euler_uint32 bytesNeededType = 0;
+ LibMCDriver_Euler_uint32 bytesWrittenType = 0;
+ CheckError(m_pWrapper->m_WrapperTable.m_Driver_GetType(m_pHandle, 0, &bytesNeededType, nullptr));
+ std::vector bufferType(bytesNeededType);
+ CheckError(m_pWrapper->m_WrapperTable.m_Driver_GetType(m_pHandle, bytesNeededType, &bytesWrittenType, &bufferType[0]));
+
+ return std::string(&bufferType[0]);
+ }
+
+ /**
+ * CDriver::GetVersion - returns the version identifiers of the driver
+ * @param[out] nMajor - Major version.
+ * @param[out] nMinor - Minor version.
+ * @param[out] nMicro - Micro version.
+ * @param[out] sBuild - Build identifier.
+ */
+ void CDriver::GetVersion(LibMCDriver_Euler_uint32 & nMajor, LibMCDriver_Euler_uint32 & nMinor, LibMCDriver_Euler_uint32 & nMicro, std::string & sBuild)
+ {
+ LibMCDriver_Euler_uint32 bytesNeededBuild = 0;
+ LibMCDriver_Euler_uint32 bytesWrittenBuild = 0;
+ CheckError(m_pWrapper->m_WrapperTable.m_Driver_GetVersion(m_pHandle, &nMajor, &nMinor, &nMicro, 0, &bytesNeededBuild, nullptr));
+ std::vector bufferBuild(bytesNeededBuild);
+ CheckError(m_pWrapper->m_WrapperTable.m_Driver_GetVersion(m_pHandle, &nMajor, &nMinor, &nMicro, bytesNeededBuild, &bytesWrittenBuild, &bufferBuild[0]));
+ sBuild = std::string(&bufferBuild[0]);
+ }
+
+ /**
+ * CDriver::QueryParameters - Updates the driver parameters in the driver environment. Should only be called in the driver thread.
+ */
+ void CDriver::QueryParameters()
+ {
+ CheckError(m_pWrapper->m_WrapperTable.m_Driver_QueryParameters(m_pHandle));
+ }
+
+ /**
+ * CDriver::QueryParametersEx - Updates the driver parameters in the driver environment. Might be called out of thread. Implementation MUST be able to handle parallel calls.
+ * @param[in] pDriverUpdateInstance - Status update instance.
+ */
+ void CDriver::QueryParametersEx(classParam pDriverUpdateInstance)
+ {
+ LibMCEnvHandle hDriverUpdateInstance = pDriverUpdateInstance.GetHandle();
+ CheckError(m_pWrapper->m_WrapperTable.m_Driver_QueryParametersEx(m_pHandle, hDriverUpdateInstance));
+ }
+
+ /**
+ * Method definitions for class CEulerConnection
+ */
+
+ /**
+ * CEulerConnection::Disconnect - Disconnects the connection. No further call can be handled after.
+ */
+ void CEulerConnection::Disconnect()
+ {
+ CheckError(m_pWrapper->m_WrapperTable.m_EulerConnection_Disconnect(m_pHandle));
+ }
+
+ /**
+ * CEulerConnection::GetIdentifier - Returns the connection identifier.
+ * @return Identifier of the connection.
+ */
+ std::string CEulerConnection::GetIdentifier()
+ {
+ LibMCDriver_Euler_uint32 bytesNeededIdentifier = 0;
+ LibMCDriver_Euler_uint32 bytesWrittenIdentifier = 0;
+ CheckError(m_pWrapper->m_WrapperTable.m_EulerConnection_GetIdentifier(m_pHandle, 0, &bytesNeededIdentifier, nullptr));
+ std::vector bufferIdentifier(bytesNeededIdentifier);
+ CheckError(m_pWrapper->m_WrapperTable.m_EulerConnection_GetIdentifier(m_pHandle, bytesNeededIdentifier, &bytesWrittenIdentifier, &bufferIdentifier[0]));
+
+ return std::string(&bufferIdentifier[0]);
+ }
+
+ /**
+ * CEulerConnection::GetApplicationName - Returns the application name.
+ * @return Application Name in use.
+ */
+ std::string CEulerConnection::GetApplicationName()
+ {
+ LibMCDriver_Euler_uint32 bytesNeededApplicationName = 0;
+ LibMCDriver_Euler_uint32 bytesWrittenApplicationName = 0;
+ CheckError(m_pWrapper->m_WrapperTable.m_EulerConnection_GetApplicationName(m_pHandle, 0, &bytesNeededApplicationName, nullptr));
+ std::vector bufferApplicationName(bytesNeededApplicationName);
+ CheckError(m_pWrapper->m_WrapperTable.m_EulerConnection_GetApplicationName(m_pHandle, bytesNeededApplicationName, &bytesWrittenApplicationName, &bufferApplicationName[0]));
+
+ return std::string(&bufferApplicationName[0]);
+ }
+
+ /**
+ * CEulerConnection::GetApplicationVersion - Returns the application version.
+ * @return Application Version in use.
+ */
+ std::string CEulerConnection::GetApplicationVersion()
+ {
+ LibMCDriver_Euler_uint32 bytesNeededApplicationVersion = 0;
+ LibMCDriver_Euler_uint32 bytesWrittenApplicationVersion = 0;
+ CheckError(m_pWrapper->m_WrapperTable.m_EulerConnection_GetApplicationVersion(m_pHandle, 0, &bytesNeededApplicationVersion, nullptr));
+ std::vector bufferApplicationVersion(bytesNeededApplicationVersion);
+ CheckError(m_pWrapper->m_WrapperTable.m_EulerConnection_GetApplicationVersion(m_pHandle, bytesNeededApplicationVersion, &bytesWrittenApplicationVersion, &bufferApplicationVersion[0]));
+
+ return std::string(&bufferApplicationVersion[0]);
+ }
+
+ /**
+ * CEulerConnection::GetBaseURL - Returns the base URL.
+ * @return Base URL in use.
+ */
+ std::string CEulerConnection::GetBaseURL()
+ {
+ LibMCDriver_Euler_uint32 bytesNeededBaseURL = 0;
+ LibMCDriver_Euler_uint32 bytesWrittenBaseURL = 0;
+ CheckError(m_pWrapper->m_WrapperTable.m_EulerConnection_GetBaseURL(m_pHandle, 0, &bytesNeededBaseURL, nullptr));
+ std::vector bufferBaseURL(bytesNeededBaseURL);
+ CheckError(m_pWrapper->m_WrapperTable.m_EulerConnection_GetBaseURL(m_pHandle, bytesNeededBaseURL, &bytesWrittenBaseURL, &bufferBaseURL[0]));
+
+ return std::string(&bufferBaseURL[0]);
+ }
+
+ /**
+ * CEulerConnection::GetAPIKey - Returns the API Key.
+ * @return API Key in use.
+ */
+ std::string CEulerConnection::GetAPIKey()
+ {
+ LibMCDriver_Euler_uint32 bytesNeededAPIKey = 0;
+ LibMCDriver_Euler_uint32 bytesWrittenAPIKey = 0;
+ CheckError(m_pWrapper->m_WrapperTable.m_EulerConnection_GetAPIKey(m_pHandle, 0, &bytesNeededAPIKey, nullptr));
+ std::vector bufferAPIKey(bytesNeededAPIKey);
+ CheckError(m_pWrapper->m_WrapperTable.m_EulerConnection_GetAPIKey(m_pHandle, bytesNeededAPIKey, &bytesWrittenAPIKey, &bufferAPIKey[0]));
+
+ return std::string(&bufferAPIKey[0]);
+ }
+
+ /**
+ * CEulerConnection::GetDeviceID - Returns the DeviceID.
+ * @return DeviceID in use.
+ */
+ std::string CEulerConnection::GetDeviceID()
+ {
+ LibMCDriver_Euler_uint32 bytesNeededDeviceID = 0;
+ LibMCDriver_Euler_uint32 bytesWrittenDeviceID = 0;
+ CheckError(m_pWrapper->m_WrapperTable.m_EulerConnection_GetDeviceID(m_pHandle, 0, &bytesNeededDeviceID, nullptr));
+ std::vector bufferDeviceID(bytesNeededDeviceID);
+ CheckError(m_pWrapper->m_WrapperTable.m_EulerConnection_GetDeviceID(m_pHandle, bytesNeededDeviceID, &bytesWrittenDeviceID, &bufferDeviceID[0]));
+
+ return std::string(&bufferDeviceID[0]);
+ }
+
+ /**
+ * CEulerConnection::StartHeartBeat - Starts the heartbeat.
+ */
+ void CEulerConnection::StartHeartBeat()
+ {
+ CheckError(m_pWrapper->m_WrapperTable.m_EulerConnection_StartHeartBeat(m_pHandle));
+ }
+
+ /**
+ * CEulerConnection::StopHeartBeat - Stops the heartbeat.
+ */
+ void CEulerConnection::StopHeartBeat()
+ {
+ CheckError(m_pWrapper->m_WrapperTable.m_EulerConnection_StopHeartBeat(m_pHandle));
+ }
+
+ /**
+ * CEulerConnection::CreateBuild - Creates a new build job.
+ * @param[in] sJobName - BuildJob Name
+ * @param[in] nLayerCount - Layer Count
+ * @return New BuildJob ID
+ */
+ std::string CEulerConnection::CreateBuild(const std::string & sJobName, const LibMCDriver_Euler_uint32 nLayerCount)
+ {
+ LibMCDriver_Euler_uint32 bytesNeededBuildJobID = 0;
+ LibMCDriver_Euler_uint32 bytesWrittenBuildJobID = 0;
+ CheckError(m_pWrapper->m_WrapperTable.m_EulerConnection_CreateBuild(m_pHandle, sJobName.c_str(), nLayerCount, 0, &bytesNeededBuildJobID, nullptr));
+ std::vector bufferBuildJobID(bytesNeededBuildJobID);
+ CheckError(m_pWrapper->m_WrapperTable.m_EulerConnection_CreateBuild(m_pHandle, sJobName.c_str(), nLayerCount, bytesNeededBuildJobID, &bytesWrittenBuildJobID, &bufferBuildJobID[0]));
+
+ return std::string(&bufferBuildJobID[0]);
+ }
+
+ /**
+ * CEulerConnection::UploadImage - Uploads an image to a build job.
+ * @param[in] sBuildJobID - BuildJob ID
+ * @param[in] nLayerIndex - Layer Index
+ * @param[in] eImageType - Image Type
+ * @param[in] pImage - Image Instance
+ */
+ void CEulerConnection::UploadImage(const std::string & sBuildJobID, const LibMCDriver_Euler_uint32 nLayerIndex, const eEulerImageType eImageType, classParam pImage)
+ {
+ LibMCEnvHandle hImage = pImage.GetHandle();
+ CheckError(m_pWrapper->m_WrapperTable.m_EulerConnection_UploadImage(m_pHandle, sBuildJobID.c_str(), nLayerIndex, eImageType, hImage));
+ }
+
+ /**
+ * CEulerConnection::SetJobStatus - Updates a Job's status
+ * @param[in] sBuildJobID - BuildJob ID
+ * @param[in] eJobStatus - New Job Status
+ */
+ void CEulerConnection::SetJobStatus(const std::string & sBuildJobID, const eEulerJobStatus eJobStatus)
+ {
+ CheckError(m_pWrapper->m_WrapperTable.m_EulerConnection_SetJobStatus(m_pHandle, sBuildJobID.c_str(), eJobStatus));
+ }
+
+ /**
+ * Method definitions for class CDriver_Euler
+ */
+
+ /**
+ * CDriver_Euler::SetCustomSDKResource - Sets the machine resource name of the LibEuler SDK to load. MUST be called before Connect or it has no effect.
+ * @param[in] sResourceName - Resource name of core machine package. Empty means standard naming applies.
+ */
+ void CDriver_Euler::SetCustomSDKResource(const std::string & sResourceName)
+ {
+ CheckError(m_pWrapper->m_WrapperTable.m_Driver_Euler_SetCustomSDKResource(m_pHandle, sResourceName.c_str()));
+ }
+
+ /**
+ * CDriver_Euler::SetApplicationDetails - Sets the application details. Will be used for subsequent connections.
+ * @param[in] sApplicationName - Application Name to use.
+ * @param[in] sApplicationVersion - Application Version to use.
+ */
+ void CDriver_Euler::SetApplicationDetails(const std::string & sApplicationName, const std::string & sApplicationVersion)
+ {
+ CheckError(m_pWrapper->m_WrapperTable.m_Driver_Euler_SetApplicationDetails(m_pHandle, sApplicationName.c_str(), sApplicationVersion.c_str()));
+ }
+
+ /**
+ * CDriver_Euler::Connect - Creates a Euler Connection.
+ * @param[in] sIdentifier - Identifier for the connection. Fails if identifier is already existing.
+ * @param[in] sBaseURL - BaseURL to use.
+ * @param[in] sAPIKey - API Key to use.
+ * @param[in] sDeviceID - Device ID to use.
+ * @return Euler Connection Instance.
+ */
+ PEulerConnection CDriver_Euler::Connect(const std::string & sIdentifier, const std::string & sBaseURL, const std::string & sAPIKey, const std::string & sDeviceID)
+ {
+ LibMCDriver_EulerHandle hConnection = nullptr;
+ CheckError(m_pWrapper->m_WrapperTable.m_Driver_Euler_Connect(m_pHandle, sIdentifier.c_str(), sBaseURL.c_str(), sAPIKey.c_str(), sDeviceID.c_str(), &hConnection));
+
+ if (!hConnection) {
+ CheckError(LIBMCDRIVER_EULER_ERROR_INVALIDPARAM);
+ }
+ return std::make_shared(m_pWrapper, hConnection);
+ }
+
+ /**
+ * CDriver_Euler::ConnectWithLicenseData - Creates a Euler Connection from a license file data.
+ * @param[in] sIdentifier - Identifier for the connection. Fails if identifier is already existing.
+ * @param[in] LicenseDataBuffer - License Data file to use.
+ * @param[in] sDeviceID - Device ID to use.
+ * @return Euler Connection Instance.
+ */
+ PEulerConnection CDriver_Euler::ConnectWithLicenseData(const std::string & sIdentifier, const CInputVector & LicenseDataBuffer, const std::string & sDeviceID)
+ {
+ LibMCDriver_EulerHandle hConnection = nullptr;
+ CheckError(m_pWrapper->m_WrapperTable.m_Driver_Euler_ConnectWithLicenseData(m_pHandle, sIdentifier.c_str(), (LibMCDriver_Euler_uint64)LicenseDataBuffer.size(), LicenseDataBuffer.data(), sDeviceID.c_str(), &hConnection));
+
+ if (!hConnection) {
+ CheckError(LIBMCDRIVER_EULER_ERROR_INVALIDPARAM);
+ }
+ return std::make_shared(m_pWrapper, hConnection);
+ }
+
+ /**
+ * CDriver_Euler::ConnectWithLicenseResource - Creates a Euler Connection from a license file resource.
+ * @param[in] sIdentifier - Identifier for the connection. Fails if identifier is already existing.
+ * @param[in] sLicenseResourceName - License Data resource to use.
+ * @param[in] sDeviceID - Device ID to use.
+ * @return Euler Connection Instance.
+ */
+ PEulerConnection CDriver_Euler::ConnectWithLicenseResource(const std::string & sIdentifier, const std::string & sLicenseResourceName, const std::string & sDeviceID)
+ {
+ LibMCDriver_EulerHandle hConnection = nullptr;
+ CheckError(m_pWrapper->m_WrapperTable.m_Driver_Euler_ConnectWithLicenseResource(m_pHandle, sIdentifier.c_str(), sLicenseResourceName.c_str(), sDeviceID.c_str(), &hConnection));
+
+ if (!hConnection) {
+ CheckError(LIBMCDRIVER_EULER_ERROR_INVALIDPARAM);
+ }
+ return std::make_shared(m_pWrapper, hConnection);
+ }
+
+ /**
+ * CDriver_Euler::FindConnection - Finds a connection. Fails if connection does not exist.
+ * @param[in] sIdentifier - Identifier for the connection. Fails if identifier is already existing.
+ * @return Euler Connection Instance.
+ */
+ PEulerConnection CDriver_Euler::FindConnection(const std::string & sIdentifier)
+ {
+ LibMCDriver_EulerHandle hConnection = nullptr;
+ CheckError(m_pWrapper->m_WrapperTable.m_Driver_Euler_FindConnection(m_pHandle, sIdentifier.c_str(), &hConnection));
+
+ if (!hConnection) {
+ CheckError(LIBMCDRIVER_EULER_ERROR_INVALIDPARAM);
+ }
+ return std::make_shared(m_pWrapper, hConnection);
+ }
+
+ /**
+ * CDriver_Euler::ConnectionExists - Checks if a connection exists with a certain identifier.
+ * @param[in] sIdentifier - Identifier for the connection.
+ * @return Returns true, if the connection exists, false otherwise.
+ */
+ bool CDriver_Euler::ConnectionExists(const std::string & sIdentifier)
+ {
+ bool resultExists = 0;
+ CheckError(m_pWrapper->m_WrapperTable.m_Driver_Euler_ConnectionExists(m_pHandle, sIdentifier.c_str(), &resultExists));
+
+ return resultExists;
+ }
+
+ /**
+ * CDriver_Euler::CloseAllConnections - Closes all connections.
+ */
+ void CDriver_Euler::CloseAllConnections()
+ {
+ CheckError(m_pWrapper->m_WrapperTable.m_Driver_Euler_CloseAllConnections(m_pHandle));
+ }
+
+} // namespace LibMCDriver_Euler
+
+#endif // __LIBMCDRIVER_EULER_CPPHEADER_DYNAMIC_CPP
+
diff --git a/Drivers/Euler/Headers/CppDynamic/libmcdriver_euler_types.hpp b/Drivers/Euler/Headers/CppDynamic/libmcdriver_euler_types.hpp
new file mode 100644
index 000000000..2bce23cb8
--- /dev/null
+++ b/Drivers/Euler/Headers/CppDynamic/libmcdriver_euler_types.hpp
@@ -0,0 +1,216 @@
+/*++
+
+Copyright (C) 2020 Autodesk Inc.
+
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ * Neither the name of the Autodesk Inc. nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL AUTODESK INC. BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.0-develop.
+
+Abstract: This is an autogenerated C++-Header file with basic types in
+order to allow an easy use of MC Driver Euler
+
+Interface version: 2.0.0
+
+*/
+
+#ifndef __LIBMCDRIVER_EULER_TYPES_HEADER_CPP
+#define __LIBMCDRIVER_EULER_TYPES_HEADER_CPP
+
+
+/*************************************************************************************************************************
+ Scalar types definition
+**************************************************************************************************************************/
+
+#ifdef LIBMCDRIVER_EULER_USELEGACYINTEGERTYPES
+
+typedef unsigned char LibMCDriver_Euler_uint8;
+typedef unsigned short LibMCDriver_Euler_uint16 ;
+typedef unsigned int LibMCDriver_Euler_uint32;
+typedef unsigned long long LibMCDriver_Euler_uint64;
+typedef char LibMCDriver_Euler_int8;
+typedef short LibMCDriver_Euler_int16;
+typedef int LibMCDriver_Euler_int32;
+typedef long long LibMCDriver_Euler_int64;
+
+#else // LIBMCDRIVER_EULER_USELEGACYINTEGERTYPES
+
+#include
+
+typedef uint8_t LibMCDriver_Euler_uint8;
+typedef uint16_t LibMCDriver_Euler_uint16;
+typedef uint32_t LibMCDriver_Euler_uint32;
+typedef uint64_t LibMCDriver_Euler_uint64;
+typedef int8_t LibMCDriver_Euler_int8;
+typedef int16_t LibMCDriver_Euler_int16;
+typedef int32_t LibMCDriver_Euler_int32;
+typedef int64_t LibMCDriver_Euler_int64 ;
+
+#endif // LIBMCDRIVER_EULER_USELEGACYINTEGERTYPES
+
+typedef float LibMCDriver_Euler_single;
+typedef double LibMCDriver_Euler_double;
+
+/*************************************************************************************************************************
+ General type definitions
+**************************************************************************************************************************/
+
+typedef LibMCDriver_Euler_int32 LibMCDriver_EulerResult;
+typedef void * LibMCDriver_EulerHandle;
+typedef void * LibMCDriver_Euler_pvoid;
+
+/*************************************************************************************************************************
+ Version for LibMCDriver_Euler
+**************************************************************************************************************************/
+
+#define LIBMCDRIVER_EULER_VERSION_MAJOR 2
+#define LIBMCDRIVER_EULER_VERSION_MINOR 0
+#define LIBMCDRIVER_EULER_VERSION_MICRO 0
+#define LIBMCDRIVER_EULER_VERSION_PRERELEASEINFO ""
+#define LIBMCDRIVER_EULER_VERSION_BUILDINFO ""
+
+/*************************************************************************************************************************
+ Error constants for LibMCDriver_Euler
+**************************************************************************************************************************/
+
+#define LIBMCDRIVER_EULER_SUCCESS 0
+#define LIBMCDRIVER_EULER_ERROR_NOTIMPLEMENTED 1 /** functionality not implemented */
+#define LIBMCDRIVER_EULER_ERROR_INVALIDPARAM 2 /** an invalid parameter was passed */
+#define LIBMCDRIVER_EULER_ERROR_INVALIDCAST 3 /** a type cast failed */
+#define LIBMCDRIVER_EULER_ERROR_BUFFERTOOSMALL 4 /** a provided buffer is too small */
+#define LIBMCDRIVER_EULER_ERROR_GENERICEXCEPTION 5 /** a generic exception occurred */
+#define LIBMCDRIVER_EULER_ERROR_COULDNOTLOADLIBRARY 6 /** the library could not be loaded */
+#define LIBMCDRIVER_EULER_ERROR_COULDNOTFINDLIBRARYEXPORT 7 /** a required exported symbol could not be found in the library */
+#define LIBMCDRIVER_EULER_ERROR_INCOMPATIBLEBINARYVERSION 8 /** the version of the binary interface does not match the bindings interface */
+#define LIBMCDRIVER_EULER_ERROR_DRIVERERROR 1000 /** a driver error occured */
+#define LIBMCDRIVER_EULER_ERROR_DRIVERNOTINITIALISED 1001 /** the driver is not initialised */
+#define LIBMCDRIVER_EULER_ERROR_DRIVERNOTCONNECTED 1002 /** the driver is not connected */
+#define LIBMCDRIVER_EULER_ERROR_INVALIDDRIVERPROTOCOL 1003 /** invalid driver protocol definition */
+#define LIBMCDRIVER_EULER_ERROR_COULDNOTPARSEDRIVERPROTOCOL 1004 /** could not parse driver protocol */
+#define LIBMCDRIVER_EULER_ERROR_NOTCONNECTED 1005 /** Not connected */
+#define LIBMCDRIVER_EULER_ERROR_INTEGERVALUEOUTOFRANGE 1006 /** Integer value out of range */
+#define LIBMCDRIVER_EULER_ERROR_COULDNOTREADDATA 1007 /** Could not read data */
+#define LIBMCDRIVER_EULER_ERROR_COULDNOTREADHANDLEVALUE 1008 /** Could not read handle value */
+#define LIBMCDRIVER_EULER_ERROR_NAMELENGTHEXCEEDSMAXIMUM 1009 /** Name length exceeds maximum */
+#define LIBMCDRIVER_EULER_ERROR_COULDNOTCONNECT 1010 /** Could not connect */
+#define LIBMCDRIVER_EULER_ERROR_HASBEENDISCONNECTED 1011 /** Has been disconnected */
+#define LIBMCDRIVER_EULER_ERROR_COULDNOTSTARTHEARTBEAT 1012 /** Could not start heartbeat */
+#define LIBMCDRIVER_EULER_ERROR_COULDNOTSTOPHEARTBEAT 1013 /** Could not stop heartbeat */
+#define LIBMCDRIVER_EULER_ERROR_EMPTYJOBNAME 1014 /** Empty job name */
+#define LIBMCDRIVER_EULER_ERROR_COULDNOTCREATEBUILD 1015 /** Could not create build */
+#define LIBMCDRIVER_EULER_ERROR_INVALIDIDENTIFIER 1016 /** Invalid identifier */
+#define LIBMCDRIVER_EULER_ERROR_CONNECTIONIDENTIFIERALREADYINUSE 1017 /** Connection identifier already in use */
+#define LIBMCDRIVER_EULER_ERROR_CONNECTIONIDENTIFIERNOTFOUND 1018 /** Connection identifier not found */
+#define LIBMCDRIVER_EULER_ERROR_LIBEULERDLLNOTSPECIFIED 1019 /** LibEuler dll not specified */
+#define LIBMCDRIVER_EULER_ERROR_INVALIDBUILDJOBID 1020 /** Invalid build job id */
+#define LIBMCDRIVER_EULER_ERROR_INVALIDIMAGETYPE 1021 /** Invalid image type */
+#define LIBMCDRIVER_EULER_ERROR_COULDNOTUPLOADLAYERIMAGE 1022 /** Could not upload layer image */
+#define LIBMCDRIVER_EULER_ERROR_INVALIDJOBSTATUS 1023 /** Invalid job status */
+#define LIBMCDRIVER_EULER_ERROR_COULDUPDATEJOBSTATUS 1024 /** Could not update job status */
+#define LIBMCDRIVER_EULER_ERROR_INVALIDLICENSERESOURCE 1025 /** Invalid license resource */
+#define LIBMCDRIVER_EULER_ERROR_COULDNOTENCODEJPEGIMAGE 1026 /** Could not encode JPEG Image */
+#define LIBMCDRIVER_EULER_ERROR_COULDNOTREADLICENSEDATA 1027 /** Could not read license data */
+#define LIBMCDRIVER_EULER_ERROR_INVALIDLICENSEDATA 1028 /** Invalid license data */
+
+/*************************************************************************************************************************
+ Error strings for LibMCDriver_Euler
+**************************************************************************************************************************/
+
+inline const char * LIBMCDRIVER_EULER_GETERRORSTRING (LibMCDriver_EulerResult nErrorCode) {
+ switch (nErrorCode) {
+ case LIBMCDRIVER_EULER_SUCCESS: return "no error";
+ case LIBMCDRIVER_EULER_ERROR_NOTIMPLEMENTED: return "functionality not implemented";
+ case LIBMCDRIVER_EULER_ERROR_INVALIDPARAM: return "an invalid parameter was passed";
+ case LIBMCDRIVER_EULER_ERROR_INVALIDCAST: return "a type cast failed";
+ case LIBMCDRIVER_EULER_ERROR_BUFFERTOOSMALL: return "a provided buffer is too small";
+ case LIBMCDRIVER_EULER_ERROR_GENERICEXCEPTION: return "a generic exception occurred";
+ case LIBMCDRIVER_EULER_ERROR_COULDNOTLOADLIBRARY: return "the library could not be loaded";
+ case LIBMCDRIVER_EULER_ERROR_COULDNOTFINDLIBRARYEXPORT: return "a required exported symbol could not be found in the library";
+ case LIBMCDRIVER_EULER_ERROR_INCOMPATIBLEBINARYVERSION: return "the version of the binary interface does not match the bindings interface";
+ case LIBMCDRIVER_EULER_ERROR_DRIVERERROR: return "a driver error occured";
+ case LIBMCDRIVER_EULER_ERROR_DRIVERNOTINITIALISED: return "the driver is not initialised";
+ case LIBMCDRIVER_EULER_ERROR_DRIVERNOTCONNECTED: return "the driver is not connected";
+ case LIBMCDRIVER_EULER_ERROR_INVALIDDRIVERPROTOCOL: return "invalid driver protocol definition";
+ case LIBMCDRIVER_EULER_ERROR_COULDNOTPARSEDRIVERPROTOCOL: return "could not parse driver protocol";
+ case LIBMCDRIVER_EULER_ERROR_NOTCONNECTED: return "Not connected";
+ case LIBMCDRIVER_EULER_ERROR_INTEGERVALUEOUTOFRANGE: return "Integer value out of range";
+ case LIBMCDRIVER_EULER_ERROR_COULDNOTREADDATA: return "Could not read data";
+ case LIBMCDRIVER_EULER_ERROR_COULDNOTREADHANDLEVALUE: return "Could not read handle value";
+ case LIBMCDRIVER_EULER_ERROR_NAMELENGTHEXCEEDSMAXIMUM: return "Name length exceeds maximum";
+ case LIBMCDRIVER_EULER_ERROR_COULDNOTCONNECT: return "Could not connect";
+ case LIBMCDRIVER_EULER_ERROR_HASBEENDISCONNECTED: return "Has been disconnected";
+ case LIBMCDRIVER_EULER_ERROR_COULDNOTSTARTHEARTBEAT: return "Could not start heartbeat";
+ case LIBMCDRIVER_EULER_ERROR_COULDNOTSTOPHEARTBEAT: return "Could not stop heartbeat";
+ case LIBMCDRIVER_EULER_ERROR_EMPTYJOBNAME: return "Empty job name";
+ case LIBMCDRIVER_EULER_ERROR_COULDNOTCREATEBUILD: return "Could not create build";
+ case LIBMCDRIVER_EULER_ERROR_INVALIDIDENTIFIER: return "Invalid identifier";
+ case LIBMCDRIVER_EULER_ERROR_CONNECTIONIDENTIFIERALREADYINUSE: return "Connection identifier already in use";
+ case LIBMCDRIVER_EULER_ERROR_CONNECTIONIDENTIFIERNOTFOUND: return "Connection identifier not found";
+ case LIBMCDRIVER_EULER_ERROR_LIBEULERDLLNOTSPECIFIED: return "LibEuler dll not specified";
+ case LIBMCDRIVER_EULER_ERROR_INVALIDBUILDJOBID: return "Invalid build job id";
+ case LIBMCDRIVER_EULER_ERROR_INVALIDIMAGETYPE: return "Invalid image type";
+ case LIBMCDRIVER_EULER_ERROR_COULDNOTUPLOADLAYERIMAGE: return "Could not upload layer image";
+ case LIBMCDRIVER_EULER_ERROR_INVALIDJOBSTATUS: return "Invalid job status";
+ case LIBMCDRIVER_EULER_ERROR_COULDUPDATEJOBSTATUS: return "Could not update job status";
+ case LIBMCDRIVER_EULER_ERROR_INVALIDLICENSERESOURCE: return "Invalid license resource";
+ case LIBMCDRIVER_EULER_ERROR_COULDNOTENCODEJPEGIMAGE: return "Could not encode JPEG Image";
+ case LIBMCDRIVER_EULER_ERROR_COULDNOTREADLICENSEDATA: return "Could not read license data";
+ case LIBMCDRIVER_EULER_ERROR_INVALIDLICENSEDATA: return "Invalid license data";
+ default: return "unknown error";
+ }
+}
+
+/*************************************************************************************************************************
+ Declaration of handle classes
+**************************************************************************************************************************/
+
+typedef LibMCDriver_EulerHandle LibMCDriver_Euler_Base;
+typedef LibMCDriver_EulerHandle LibMCDriver_Euler_Driver;
+typedef LibMCDriver_EulerHandle LibMCDriver_Euler_EulerConnection;
+typedef LibMCDriver_EulerHandle LibMCDriver_Euler_Driver_Euler;
+
+namespace LibMCDriver_Euler {
+
+ /*************************************************************************************************************************
+ Declaration of enums
+ **************************************************************************************************************************/
+
+ enum class eEulerImageType : LibMCDriver_Euler_int32 {
+ Recoat = 0,
+ Exposure = 1
+ };
+
+ enum class eEulerJobStatus : LibMCDriver_Euler_int32 {
+ InProgress = 0,
+ Completed = 1
+ };
+
+} // namespace LibMCDriver_Euler;
+
+// define legacy C-names for enums, structs and function types
+typedef LibMCDriver_Euler::eEulerImageType eLibMCDriver_EulerEulerImageType;
+typedef LibMCDriver_Euler::eEulerJobStatus eLibMCDriver_EulerEulerJobStatus;
+
+#endif // __LIBMCDRIVER_EULER_TYPES_HEADER_CPP
diff --git a/Drivers/Euler/Implementation/libmcdriver_euler.cpp b/Drivers/Euler/Implementation/libmcdriver_euler.cpp
new file mode 100644
index 000000000..3e7c8c981
--- /dev/null
+++ b/Drivers/Euler/Implementation/libmcdriver_euler.cpp
@@ -0,0 +1,84 @@
+/*++
+
+Copyright (C) 2020 Autodesk Inc.
+
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ * Neither the name of the Autodesk Inc. nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL AUTODESK INC. BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.0-develop.
+
+Abstract: This is an autogenerated C++ implementation file in order to allow easy
+development of MC Driver Euler. It needs to be generated only once.
+
+Interface version: 2.0.0
+
+*/
+
+#include "libmcdriver_euler_abi.hpp"
+#include "libmcdriver_euler_interfaces.hpp"
+#include "libmcdriver_euler_interfaceexception.hpp"
+#include "libmcdriver_euler_driver_euler.hpp"
+
+using namespace LibMCDriver_Euler;
+using namespace LibMCDriver_Euler::Impl;
+
+// Injected Components
+LibMCEnv::PWrapper CWrapper::sPLibMCEnvWrapper;
+
+void CWrapper::GetVersion(LibMCDriver_Euler_uint32 & nMajor, LibMCDriver_Euler_uint32 & nMinor, LibMCDriver_Euler_uint32 & nMicro)
+{
+ nMajor = LIBMCDRIVER_EULER_VERSION_MAJOR;
+ nMinor = LIBMCDRIVER_EULER_VERSION_MINOR;
+ nMicro = LIBMCDRIVER_EULER_VERSION_MICRO;
+}
+
+bool CWrapper::GetLastError(IBase* pInstance, std::string & sErrorMessage)
+{
+ if (pInstance) {
+ return pInstance->GetLastErrorMessage (sErrorMessage);
+ } else {
+ return false;
+ }
+}
+
+void CWrapper::ReleaseInstance(IBase* pInstance)
+{
+ IBase::ReleaseBaseClassInterface(pInstance);
+}
+
+void CWrapper::AcquireInstance(IBase* pInstance)
+{
+ IBase::AcquireBaseClassInterface(pInstance);
+}
+
+IDriver * CWrapper::CreateDriver(const std::string & sName, const std::string & sType, LibMCEnv::PDriverEnvironment pDriverEnvironment)
+{
+ if (sType == "libeuler-0.1")
+ return new CDriver_Euler(sName, pDriverEnvironment, eulerDriverType::libEuler_0_1);
+
+ return nullptr;
+}
+
+
diff --git a/Drivers/Euler/Implementation/libmcdriver_euler_base.cpp b/Drivers/Euler/Implementation/libmcdriver_euler_base.cpp
new file mode 100644
index 000000000..35ab13c1d
--- /dev/null
+++ b/Drivers/Euler/Implementation/libmcdriver_euler_base.cpp
@@ -0,0 +1,84 @@
+/*++
+
+Copyright (C) 2020 Autodesk Inc.
+
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ * Neither the name of the Autodesk Inc. nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL AUTODESK INC. BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+Abstract: This is a stub class definition of CBase
+
+*/
+
+#include "libmcdriver_euler_base.hpp"
+#include "libmcdriver_euler_interfaceexception.hpp"
+
+// Include custom headers here.
+
+
+using namespace LibMCDriver_Euler::Impl;
+
+/*************************************************************************************************************************
+ Class definition of CBase
+**************************************************************************************************************************/
+
+bool CBase::GetLastErrorMessage(std::string & sErrorMessage)
+{
+ if (m_pLastError.get() != nullptr) {
+ sErrorMessage = *m_pLastError;
+ return true;
+ } else {
+ sErrorMessage = "";
+ return false;
+ }
+}
+
+void CBase::ClearErrorMessages()
+{
+ m_pLastError.reset();
+}
+
+void CBase::RegisterErrorMessage(const std::string & sErrorMessage)
+{
+ if (m_pLastError.get() == nullptr) {
+ m_pLastError.reset(new std::string());
+ }
+ *m_pLastError = sErrorMessage;
+}
+
+void CBase::IncRefCount()
+{
+ ++m_nReferenceCount;
+}
+
+bool CBase::DecRefCount()
+{
+ m_nReferenceCount--;
+ if (!m_nReferenceCount) {
+ delete this;
+ return true;
+ }
+ return false;
+}
+
diff --git a/Drivers/Euler/Implementation/libmcdriver_euler_base.hpp b/Drivers/Euler/Implementation/libmcdriver_euler_base.hpp
new file mode 100644
index 000000000..4b92f229d
--- /dev/null
+++ b/Drivers/Euler/Implementation/libmcdriver_euler_base.hpp
@@ -0,0 +1,97 @@
+/*++
+
+Copyright (C) 2020 Autodesk Inc.
+
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ * Neither the name of the Autodesk Inc. nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL AUTODESK INC. BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+Abstract: This is the class declaration of CBase
+
+*/
+
+
+#ifndef __LIBMCDRIVER_EULER_BASE
+#define __LIBMCDRIVER_EULER_BASE
+
+#include "libmcdriver_euler_interfaces.hpp"
+#include
+#include
+#include
+
+
+// Include custom headers here.
+
+
+namespace LibMCDriver_Euler {
+namespace Impl {
+
+
+/*************************************************************************************************************************
+ Class declaration of CBase
+**************************************************************************************************************************/
+
+class CBase : public virtual IBase {
+private:
+
+ std::unique_ptr m_pLastError;
+ uint32_t m_nReferenceCount = 1;
+
+ /**
+ * Put private members here.
+ */
+
+protected:
+
+ /**
+ * Put protected members here.
+ */
+
+public:
+
+ /**
+ * Put additional public members here. They will not be visible in the external API.
+ */
+
+ bool GetLastErrorMessage(std::string & sErrorMessage) override;
+
+ void ClearErrorMessages() override;
+
+ void RegisterErrorMessage(const std::string & sErrorMessage) override;
+
+ void IncRefCount() override;
+
+ bool DecRefCount() override;
+
+
+ /**
+ * Public member functions to implement.
+ */
+
+};
+
+} // namespace Impl
+} // namespace LibMCDriver_Euler
+
+#endif // __LIBMCDRIVER_EULER_BASE
diff --git a/Drivers/Euler/Implementation/libmcdriver_euler_connectioninstance.cpp b/Drivers/Euler/Implementation/libmcdriver_euler_connectioninstance.cpp
new file mode 100644
index 000000000..69df07d77
--- /dev/null
+++ b/Drivers/Euler/Implementation/libmcdriver_euler_connectioninstance.cpp
@@ -0,0 +1,230 @@
+/*++
+
+Copyright (C) 2025 Autodesk Inc.
+
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ * Neither the name of the Autodesk Inc. nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL AUTODESK INC. BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+*/
+
+#include "libmcdriver_euler_connectioninstance.hpp"
+#include "libmcdriver_euler_interfaceexception.hpp"
+
+// Include custom headers here.
+#include
+
+using namespace LibMCDriver_Euler::Impl;
+
+
+CEulerConnectionInstance::CEulerConnectionInstance(PLibEulerSDK pLibEulerSDK, const std::string& sIdentifier, const std::string& sApplicationName, const std::string& sApplicationVersion, const std::string& sBaseURL, const std::string& sAPIKey, const std::string& sDeviceID)
+ : m_pLibEulerSDK (pLibEulerSDK), m_hConnectionHandle (nullptr)
+{
+ if (pLibEulerSDK.get() == nullptr)
+ throw ELibMCDriver_EulerInterfaceException(LIBMCENV_ERROR_INVALIDPARAM);
+
+ m_sIdentifier = sIdentifier;
+
+ m_sApplicationName = sApplicationName;
+
+ m_sApplicationVersion = sApplicationVersion;
+
+ m_sBaseURL = sBaseURL;
+
+ m_sAPIKey = sAPIKey;
+
+ m_sDeviceID = sDeviceID;
+
+ memset((void*)&m_ConnectConfig, 0, sizeof(m_ConnectConfig));
+
+ m_ConnectConfig.m_pszApplicationName = m_sApplicationName.c_str();
+ m_ConnectConfig.m_pszApplicationVersion = m_sApplicationVersion.c_str();
+ m_ConnectConfig.m_pszAPIKey = m_sAPIKey.c_str();
+ m_ConnectConfig.m_pszBaseURL = m_sBaseURL.c_str();
+ m_ConnectConfig.m_pszDeviceID = m_sDeviceID.c_str();
+ m_ConnectConfig.m_bEnabledStdOutLogging = 0;
+
+ m_hConnectionHandle = m_pLibEulerSDK->euler_connect_new(&m_ConnectConfig);
+
+ if (m_hConnectionHandle == nullptr)
+ throw ELibMCDriver_EulerInterfaceException(LIBMCDRIVER_EULER_ERROR_COULDNOTCONNECT);
+}
+
+CEulerConnectionInstance::~CEulerConnectionInstance()
+{
+ closeConnection();
+
+ m_pLibEulerSDK = nullptr;
+
+}
+
+std::string CEulerConnectionInstance::getIdentifier()
+{
+ return m_sIdentifier;
+}
+
+std::string CEulerConnectionInstance::getApplicationName()
+{
+ return m_sApplicationName;
+}
+
+std::string CEulerConnectionInstance::getApplicationVersion()
+{
+ return m_sApplicationVersion;
+}
+
+std::string CEulerConnectionInstance::getBaseURL()
+{
+ return m_sBaseURL;
+}
+
+std::string CEulerConnectionInstance::getAPIKey()
+{
+ return m_sAPIKey;
+}
+
+std::string CEulerConnectionInstance::getDeviceID()
+{
+ return m_sDeviceID;
+}
+
+void CEulerConnectionInstance::startHeartBeat()
+{
+ if (m_hConnectionHandle == nullptr)
+ throw ELibMCDriver_EulerInterfaceException(LIBMCDRIVER_EULER_ERROR_HASBEENDISCONNECTED);
+
+ bool bSuccess = m_pLibEulerSDK->euler_connect_start_heartbeat(m_hConnectionHandle);
+ if (!bSuccess)
+ throw ELibMCDriver_EulerInterfaceException(LIBMCDRIVER_EULER_ERROR_COULDNOTSTARTHEARTBEAT);
+
+}
+
+void CEulerConnectionInstance::stopHeartBeat()
+{
+ if (m_hConnectionHandle == nullptr)
+ throw ELibMCDriver_EulerInterfaceException(LIBMCDRIVER_EULER_ERROR_HASBEENDISCONNECTED);
+
+ bool bSuccess = m_pLibEulerSDK->euler_connect_stop_heartbeat(m_hConnectionHandle);
+ if (!bSuccess)
+ throw ELibMCDriver_EulerInterfaceException(LIBMCDRIVER_EULER_ERROR_COULDNOTSTOPHEARTBEAT);
+
+}
+
+std::string CEulerConnectionInstance::createBuild(const std::string& sJobName, const LibMCDriver_Euler_uint32 nLayerCount)
+{
+ if (sJobName.empty ())
+ throw ELibMCDriver_EulerInterfaceException(LIBMCDRIVER_EULER_ERROR_EMPTYJOBNAME);
+
+ if (m_hConnectionHandle == nullptr)
+ throw ELibMCDriver_EulerInterfaceException(LIBMCDRIVER_EULER_ERROR_HASBEENDISCONNECTED);
+
+ char * pszNewJobID = m_pLibEulerSDK->euler_connect_new_build_job(m_hConnectionHandle, sJobName.c_str(), nLayerCount);
+ if (pszNewJobID != nullptr) {
+ std::string sNewJobID (pszNewJobID);
+
+ return sNewJobID;
+ } else
+ throw ELibMCDriver_EulerInterfaceException(LIBMCDRIVER_EULER_ERROR_COULDNOTCREATEBUILD, "could not create build: " + sJobName);
+
+
+
+}
+
+void CEulerConnectionInstance::uploadImage(const std::string& sBuildJobID, const LibMCDriver_Euler_uint32 nLayerIndex, const LibMCDriver_Euler::eEulerImageType eImageType, LibMCEnv::PImageData pImage)
+{
+ if (m_hConnectionHandle == nullptr)
+ throw ELibMCDriver_EulerInterfaceException(LIBMCDRIVER_EULER_ERROR_HASBEENDISCONNECTED);
+
+ if (sBuildJobID.empty ())
+ throw ELibMCDriver_EulerInterfaceException(LIBMCDRIVER_EULER_ERROR_INVALIDBUILDJOBID);
+
+ if (pImage.get() == nullptr)
+ throw ELibMCDriver_EulerInterfaceException(LIBMCDRIVER_EULER_ERROR_HASBEENDISCONNECTED);
+
+ auto pJPEGOptions = pImage->CreateJPEGOptions();
+ pJPEGOptions->ResetToDefaults();
+
+ auto pJPEGImage = pImage->CreateJPEGImage(pJPEGOptions);
+
+ std::vector jpegBuffer;
+ pJPEGImage->GetJPEGDataStream(jpegBuffer);
+
+ if (jpegBuffer.size() == 0)
+ throw ELibMCDriver_EulerInterfaceException(LIBMCDRIVER_EULER_ERROR_COULDNOTENCODEJPEGIMAGE);
+
+ uint32_t imageTypeConst = 0;
+ switch (eImageType) {
+ case LibMCDriver_Euler::eEulerImageType::Recoat:
+ imageTypeConst = EULERSDK_IMAGETYPE_RECOAT;
+ break;
+ case LibMCDriver_Euler::eEulerImageType::Exposure:
+ imageTypeConst = EULERSDK_IMAGETYPE_EXPOSURE;
+ break;
+ default:
+ throw ELibMCDriver_EulerInterfaceException(LIBMCDRIVER_EULER_ERROR_INVALIDIMAGETYPE);
+ }
+
+ bool bSuccess = m_pLibEulerSDK->euler_connect_upload_layer_image(m_hConnectionHandle, sBuildJobID.c_str(), nLayerIndex, imageTypeConst, jpegBuffer.data(), jpegBuffer.size());
+ if (!bSuccess)
+ throw ELibMCDriver_EulerInterfaceException(LIBMCDRIVER_EULER_ERROR_COULDNOTUPLOADLAYERIMAGE);
+
+}
+
+void CEulerConnectionInstance::setJobStatus(const std::string& sBuildJobID, const LibMCDriver_Euler::eEulerJobStatus eJobStatus)
+{
+ if (m_hConnectionHandle == nullptr)
+ throw ELibMCDriver_EulerInterfaceException(LIBMCDRIVER_EULER_ERROR_HASBEENDISCONNECTED);
+
+ if (sBuildJobID.empty())
+ throw ELibMCDriver_EulerInterfaceException(LIBMCDRIVER_EULER_ERROR_INVALIDBUILDJOBID);
+
+ uint32_t jobStatusConst = 0;
+ switch (eJobStatus) {
+ case LibMCDriver_Euler::eEulerJobStatus::InProgress:
+ jobStatusConst = EULERSDK_JOBSTATUS_INPROGRESS;
+ break;
+ case LibMCDriver_Euler::eEulerJobStatus::Completed:
+ jobStatusConst = EULERSDK_JOBSTATUS_COMPLETED;
+ break;
+ default:
+ throw ELibMCDriver_EulerInterfaceException(LIBMCDRIVER_EULER_ERROR_INVALIDJOBSTATUS);
+ }
+
+
+ bool bSuccess = m_pLibEulerSDK->euler_connect_set_job_status(m_hConnectionHandle, sBuildJobID.c_str(), jobStatusConst);
+ if (!bSuccess)
+ throw ELibMCDriver_EulerInterfaceException(LIBMCDRIVER_EULER_ERROR_COULDUPDATEJOBSTATUS);
+
+}
+
+
+void CEulerConnectionInstance::closeConnection()
+{
+ if (m_pLibEulerSDK.get() != nullptr) {
+ if (m_hConnectionHandle != nullptr)
+ m_pLibEulerSDK->euler_connect_destroy(m_hConnectionHandle);
+ }
+
+ m_hConnectionHandle = nullptr;
+}
+
diff --git a/Drivers/Euler/Implementation/libmcdriver_euler_connectioninstance.hpp b/Drivers/Euler/Implementation/libmcdriver_euler_connectioninstance.hpp
new file mode 100644
index 000000000..5cc19fe36
--- /dev/null
+++ b/Drivers/Euler/Implementation/libmcdriver_euler_connectioninstance.hpp
@@ -0,0 +1,110 @@
+/*++
+
+Copyright (C) 2025 Autodesk Inc.
+
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ * Neither the name of the Autodesk Inc. nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL AUTODESK INC. BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+Abstract: This is the class declaration of CEulerConnection
+
+*/
+
+
+#ifndef __LIBMCDRIVER_EULER_CONNECTIONINSTANCE
+#define __LIBMCDRIVER_EULER_CONNECTIONINSTANCE
+
+#include "libmcdriver_euler_interfaces.hpp"
+#include "libmcdriver_euler_sdk.hpp"
+
+namespace LibMCDriver_Euler {
+namespace Impl {
+
+
+/*************************************************************************************************************************
+ Class declaration of CEulerConnectionInstance
+**************************************************************************************************************************/
+
+class CEulerConnectionInstance {
+private:
+
+ PLibEulerSDK m_pLibEulerSDK;
+
+ std::string m_sIdentifier;
+
+ std::string m_sApplicationName;
+
+ std::string m_sApplicationVersion;
+
+ std::string m_sBaseURL;
+
+ std::string m_sAPIKey;
+
+ std::string m_sDeviceID;
+
+ libEulerHandle m_hConnectionHandle;
+
+ sLibEulerConnectConfig m_ConnectConfig;
+
+public:
+
+ CEulerConnectionInstance(PLibEulerSDK pLibEulerSDK, const std::string & sIdentifier, const std::string & sApplicationName, const std::string & sApplicationVersion, const std::string & sBaseURL, const std::string &sAPIKey, const std::string & sDeviceID);
+
+ virtual ~CEulerConnectionInstance();
+
+ static bool checkIdentifier(const std::string & sIdentifier);
+
+ std::string getIdentifier();
+
+ std::string getApplicationName();
+
+ std::string getApplicationVersion();
+
+ std::string getBaseURL();
+
+ std::string getAPIKey();
+
+ std::string getDeviceID();
+
+ void startHeartBeat();
+
+ void stopHeartBeat();
+
+ std::string createBuild(const std::string & sJobName, const LibMCDriver_Euler_uint32 nLayerCount);
+
+ void uploadImage(const std::string & sBuildJobID, const LibMCDriver_Euler_uint32 nLayerIndex, const LibMCDriver_Euler::eEulerImageType eImageType, LibMCEnv::PImageData pImage);
+
+ void setJobStatus(const std::string & sBuildJobID, const LibMCDriver_Euler::eEulerJobStatus eJobStatus);
+
+ void closeConnection();
+
+};
+
+typedef std::shared_ptr PEulerConnectionInstance;
+
+} // namespace Impl
+} // namespace LibMCDriver_Euler
+
+
+#endif // __LIBMCDRIVER_EULER_CONNECTIONINSTANCE
diff --git a/Drivers/Euler/Implementation/libmcdriver_euler_driver.cpp b/Drivers/Euler/Implementation/libmcdriver_euler_driver.cpp
new file mode 100644
index 000000000..1bb657b74
--- /dev/null
+++ b/Drivers/Euler/Implementation/libmcdriver_euler_driver.cpp
@@ -0,0 +1,41 @@
+/*++
+
+Copyright (C) 2020 Autodesk Inc.
+
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ * Neither the name of the Autodesk Inc. nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL AUTODESK INC. BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+Abstract: This is a stub class definition of CDriver
+
+*/
+
+#include "libmcdriver_euler_driver.hpp"
+#include "libmcdriver_euler_interfaceexception.hpp"
+
+// Include custom headers here.
+
+
+using namespace LibMCDriver_Euler::Impl;
+
diff --git a/Drivers/Euler/Implementation/libmcdriver_euler_driver.hpp b/Drivers/Euler/Implementation/libmcdriver_euler_driver.hpp
new file mode 100644
index 000000000..52ffc6327
--- /dev/null
+++ b/Drivers/Euler/Implementation/libmcdriver_euler_driver.hpp
@@ -0,0 +1,73 @@
+/*++
+
+Copyright (C) 2020 Autodesk Inc.
+
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ * Neither the name of the Autodesk Inc. nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL AUTODESK INC. BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+Abstract: This is the class declaration of CDriver
+
+*/
+
+
+#ifndef __LIBMCDRIVER_EULER_DRIVER
+#define __LIBMCDRIVER_EULER_DRIVER
+
+#include "libmcdriver_euler_interfaces.hpp"
+
+// Parent classes
+#include "libmcdriver_euler_base.hpp"
+#ifdef _MSC_VER
+#pragma warning(push)
+#pragma warning(disable : 4250)
+#endif
+
+// Include custom headers here.
+
+
+namespace LibMCDriver_Euler {
+namespace Impl {
+
+
+/*************************************************************************************************************************
+ Class declaration of CDriver
+**************************************************************************************************************************/
+
+class CDriver : public virtual IDriver, public virtual CBase {
+private:
+
+public:
+
+
+
+};
+
+} // namespace Impl
+} // namespace LibMCDriver_Euler
+
+#ifdef _MSC_VER
+#pragma warning(pop)
+#endif
+#endif // __LIBMCDRIVER_EULER_DRIVER
diff --git a/Drivers/Euler/Implementation/libmcdriver_euler_driver_euler.cpp b/Drivers/Euler/Implementation/libmcdriver_euler_driver_euler.cpp
new file mode 100644
index 000000000..b4b5e4586
--- /dev/null
+++ b/Drivers/Euler/Implementation/libmcdriver_euler_driver_euler.cpp
@@ -0,0 +1,221 @@
+/*++
+
+Copyright (C) 2020 Autodesk Inc.
+
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ * Neither the name of the Autodesk Inc. nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL AUTODESK INC. BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+Abstract: This is a stub class definition of CDriver_Euler
+
+*/
+
+#include "libmcdriver_euler_driver_euler.hpp"
+#include "libmcdriver_euler_interfaceexception.hpp"
+#include "libmcdriver_euler_eulerconnection.hpp"
+
+// Include custom headers here.
+#define __STRINGIZE(x) #x
+#define __STRINGIZE_VALUE_OF(x) __STRINGIZE(x)
+
+
+using namespace LibMCDriver_Euler::Impl;
+
+/*************************************************************************************************************************
+ Class definition of CDriver_Euler
+**************************************************************************************************************************/
+
+
+CDriver_Euler::CDriver_Euler(const std::string& sName, LibMCEnv::PDriverEnvironment pDriverEnvironment, eulerDriverType driverType)
+ : m_sName(sName), m_pDriverEnvironment(pDriverEnvironment), m_DriverType(driverType)
+{
+ m_sApplicationName = "AMCF_LibEuler";
+ m_sApplicationVersion = __STRINGIZE_VALUE_OF(__GITHASH);
+}
+
+CDriver_Euler::~CDriver_Euler()
+{
+ m_pLibEulerSDK = nullptr;
+ m_pLibEulerDLLFile = nullptr;
+ m_pWorkingDirectory = nullptr;
+}
+
+void CDriver_Euler::Configure(const std::string& sConfigurationString)
+{
+
+
+}
+
+std::string CDriver_Euler::GetName()
+{
+ return m_sName;
+}
+
+std::string CDriver_Euler::GetType()
+{
+ switch (m_DriverType) {
+ case eulerDriverType::libEuler_0_1:
+ return "libeuler-0.1";
+ default:
+ return "unknown";
+ }
+
+}
+
+void CDriver_Euler::GetVersion(LibMCDriver_Euler_uint32& nMajor, LibMCDriver_Euler_uint32& nMinor, LibMCDriver_Euler_uint32& nMicro, std::string& sBuild)
+{
+ nMajor = LIBMCDRIVER_EULER_VERSION_MAJOR;
+ nMinor = LIBMCDRIVER_EULER_VERSION_MINOR;
+ nMicro = LIBMCDRIVER_EULER_VERSION_MICRO;
+ sBuild = __STRINGIZE_VALUE_OF(__GITHASH);
+}
+
+void CDriver_Euler::QueryParameters()
+{
+}
+
+void CDriver_Euler::QueryParametersEx(LibMCEnv::PDriverStatusUpdateSession pDriverUpdateInstance)
+{
+}
+
+
+void CDriver_Euler::SetCustomSDKResource(const std::string & sResourceName)
+{
+ m_pDriverEnvironment->RetrieveMachineResourceData(sResourceName, m_LibEulerDLLData);
+}
+
+void CDriver_Euler::SetApplicationDetails(const std::string & sApplicationName, const std::string & sApplicationVersion)
+{
+ m_sApplicationName = sApplicationName;
+ m_sApplicationVersion = sApplicationVersion;
+}
+
+IEulerConnection * CDriver_Euler::Connect(const std::string & sIdentifier, const std::string & sBaseURL, const std::string & sAPIKey, const std::string & sDeviceID)
+{
+ if (sIdentifier.empty ())
+ throw ELibMCDriver_EulerInterfaceException(LIBMCDRIVER_EULER_ERROR_INVALIDIDENTIFIER);
+
+ auto iIter = m_Connections.find(sIdentifier);
+ if (iIter != m_Connections.end ())
+ throw ELibMCDriver_EulerInterfaceException(LIBMCDRIVER_EULER_ERROR_CONNECTIONIDENTIFIERALREADYINUSE, "connection identifier already in use: " + sIdentifier);
+
+ LoadSDK();
+
+ auto pInstance = std::make_shared(m_pLibEulerSDK, sIdentifier, m_sApplicationName, m_sApplicationVersion, sBaseURL, sAPIKey, sDeviceID);
+ m_Connections.insert(std::make_pair (pInstance->getIdentifier (), pInstance));
+
+ return new CEulerConnection(pInstance);
+
+}
+
+IEulerConnection* CDriver_Euler::ConnectWithLicenseData(const std::string& sIdentifier, const LibMCDriver_Euler_uint64 nLicenseDataBufferSize, const LibMCDriver_Euler_uint8* pLicenseDataBuffer, const std::string& sDeviceID)
+{
+ if (pLicenseDataBuffer == nullptr)
+ throw ELibMCDriver_EulerInterfaceException(LIBMCDRIVER_EULER_ERROR_INVALIDPARAM);
+ if (nLicenseDataBufferSize == 0)
+ throw ELibMCDriver_EulerInterfaceException(LIBMCDRIVER_EULER_ERROR_INVALIDPARAM);
+
+ LoadSDK();
+
+ auto pLicenseTempFile = m_pWorkingDirectory->StoreCustomDataInTempFile("lic", LibMCEnv::CInputVector(pLicenseDataBuffer, nLicenseDataBufferSize));
+ std::string sLicenseFilePath = pLicenseTempFile->GetAbsoluteFileName();
+
+ auto licenseInfo = m_pLibEulerSDK->euler_connect_read_license(sLicenseFilePath.c_str ());
+ if (licenseInfo == nullptr)
+ throw ELibMCDriver_EulerInterfaceException(LIBMCDRIVER_EULER_ERROR_COULDNOTREADLICENSEDATA);
+
+ std::string sBaseURL;
+ if (licenseInfo->m_pszBaseURL != nullptr)
+ sBaseURL = std::string(licenseInfo->m_pszBaseURL);
+
+ std::string sAPIKey;
+ if (licenseInfo->m_pszAPIKey != nullptr)
+ sAPIKey = std::string(licenseInfo->m_pszAPIKey);
+
+ std::string sErrorMessage;
+ if (licenseInfo->m_pszErrorMessage != nullptr)
+ sErrorMessage = std::string(licenseInfo->m_pszErrorMessage);
+
+ bool bSuccess = (licenseInfo->m_pszBaseURL != nullptr) && (licenseInfo->m_pszAPIKey != nullptr);
+
+ m_pLibEulerSDK->euler_connect_free_license_info(licenseInfo);
+
+ if (!bSuccess)
+ throw ELibMCDriver_EulerInterfaceException(LIBMCDRIVER_EULER_ERROR_INVALIDLICENSEDATA, "invalid euler license data:" + sErrorMessage);
+
+ return Connect(sIdentifier, sBaseURL, sAPIKey, sDeviceID);
+}
+
+IEulerConnection* CDriver_Euler::ConnectWithLicenseResource(const std::string& sIdentifier, const std::string& sLicenseResourceName, const std::string& sDeviceID)
+{
+ std::vector resourceData;
+ m_pDriverEnvironment->RetrieveMachineResourceData(sLicenseResourceName, resourceData);
+
+ if (resourceData.size() == 0)
+ throw ELibMCDriver_EulerInterfaceException(LIBMCDRIVER_EULER_ERROR_INVALIDLICENSERESOURCE, "license resource is empty: " + sLicenseResourceName);
+
+ return ConnectWithLicenseData(sIdentifier, resourceData.size(), resourceData.data(), sDeviceID);
+
+}
+
+
+IEulerConnection * CDriver_Euler::FindConnection(const std::string & sIdentifier)
+{
+ auto iIter = m_Connections.find(sIdentifier);
+ if (iIter == m_Connections.end())
+ throw ELibMCDriver_EulerInterfaceException(LIBMCDRIVER_EULER_ERROR_CONNECTIONIDENTIFIERNOTFOUND, "connection identifier not found: " + sIdentifier);
+
+ return new CEulerConnection(iIter->second);
+}
+
+bool CDriver_Euler::ConnectionExists(const std::string & sIdentifier)
+{
+ auto iIter = m_Connections.find(sIdentifier);
+ return (iIter != m_Connections.end());
+}
+
+void CDriver_Euler::CloseAllConnections()
+{
+ for (auto iIter : m_Connections)
+ iIter.second->closeConnection();
+
+ m_Connections.clear();
+}
+
+void CDriver_Euler::LoadSDK()
+{
+ if (m_LibEulerDLLData.empty())
+ throw ELibMCDriver_EulerInterfaceException(LIBMCDRIVER_EULER_ERROR_LIBEULERDLLNOTSPECIFIED);
+
+ if (m_pWorkingDirectory.get() == nullptr)
+ m_pWorkingDirectory = m_pDriverEnvironment->CreateWorkingDirectory();
+
+ if (m_pLibEulerSDK.get() == nullptr) {
+ m_pLibEulerDLLFile = m_pWorkingDirectory->StoreCustomData("libeuler.dll", m_LibEulerDLLData);
+
+ m_pLibEulerSDK = std::make_shared(m_pLibEulerDLLFile->GetAbsoluteFileName());
+ }
+}
+
+
diff --git a/Drivers/Euler/Implementation/libmcdriver_euler_driver_euler.hpp b/Drivers/Euler/Implementation/libmcdriver_euler_driver_euler.hpp
new file mode 100644
index 000000000..23e44d8fe
--- /dev/null
+++ b/Drivers/Euler/Implementation/libmcdriver_euler_driver_euler.hpp
@@ -0,0 +1,130 @@
+/*++
+
+Copyright (C) 2020 Autodesk Inc.
+
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ * Neither the name of the Autodesk Inc. nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL AUTODESK INC. BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+Abstract: This is the class declaration of CDriver_Euler
+
+*/
+
+
+#ifndef __LIBMCDRIVER_EULER_DRIVER_EULER
+#define __LIBMCDRIVER_EULER_DRIVER_EULER
+
+#include "libmcdriver_euler_interfaces.hpp"
+#include "libmcdriver_euler_connectioninstance.hpp"
+
+// Parent classes
+#include "libmcdriver_euler_driver.hpp"
+#ifdef _MSC_VER
+#pragma warning(push)
+#pragma warning(disable : 4250)
+#endif
+
+// Include custom headers here.
+#include