@@ -64,6 +64,7 @@ class CBase;
6464class CDriver ;
6565class CRaylaseCommandLog ;
6666class CNLightDriverBoard ;
67+ class CRaylaseCycle ;
6768class CRaylaseCard ;
6869class CDriver_Raylase ;
6970
@@ -75,6 +76,7 @@ typedef CBase CLibMCDriver_RaylaseBase;
7576typedef CDriver CLibMCDriver_RaylaseDriver;
7677typedef CRaylaseCommandLog CLibMCDriver_RaylaseRaylaseCommandLog;
7778typedef CNLightDriverBoard CLibMCDriver_RaylaseNLightDriverBoard;
79+ typedef CRaylaseCycle CLibMCDriver_RaylaseRaylaseCycle;
7880typedef CRaylaseCard CLibMCDriver_RaylaseRaylaseCard;
7981typedef CDriver_Raylase CLibMCDriver_RaylaseDriver_Raylase;
8082
@@ -86,6 +88,7 @@ typedef std::shared_ptr<CBase> PBase;
8688typedef std::shared_ptr<CDriver> PDriver;
8789typedef std::shared_ptr<CRaylaseCommandLog> PRaylaseCommandLog;
8890typedef std::shared_ptr<CNLightDriverBoard> PNLightDriverBoard;
91+ typedef std::shared_ptr<CRaylaseCycle> PRaylaseCycle;
8992typedef std::shared_ptr<CRaylaseCard> PRaylaseCard;
9093typedef std::shared_ptr<CDriver_Raylase> PDriver_Raylase;
9194
@@ -97,6 +100,7 @@ typedef PBase PLibMCDriver_RaylaseBase;
97100typedef PDriver PLibMCDriver_RaylaseDriver;
98101typedef PRaylaseCommandLog PLibMCDriver_RaylaseRaylaseCommandLog;
99102typedef PNLightDriverBoard PLibMCDriver_RaylaseNLightDriverBoard;
103+ typedef PRaylaseCycle PLibMCDriver_RaylaseRaylaseCycle;
100104typedef PRaylaseCard PLibMCDriver_RaylaseRaylaseCard;
101105typedef PDriver_Raylase PLibMCDriver_RaylaseDriver_Raylase;
102106
@@ -419,6 +423,7 @@ class CWrapper {
419423 friend class CDriver ;
420424 friend class CRaylaseCommandLog ;
421425 friend class CNLightDriverBoard ;
426+ friend class CRaylaseCycle ;
422427 friend class CRaylaseCard ;
423428 friend class CDriver_Raylase ;
424429
@@ -556,6 +561,26 @@ class CNLightDriverBoard : public CBase {
556561 inline void GetModeChangeDelays (LibMCDriver_Raylase_uint32 & nModeChangeSignalDelayInMicroseconds, LibMCDriver_Raylase_uint32 & nModeChangeApplyDelayInMicroseconds);
557562};
558563
564+ /* ************************************************************************************************************************
565+ Class CRaylaseCycle
566+ **************************************************************************************************************************/
567+ class CRaylaseCycle : public CBase {
568+ public:
569+
570+ /* *
571+ * CRaylaseCycle::CRaylaseCycle - Constructor for RaylaseCycle class.
572+ */
573+ CRaylaseCycle (CWrapper* pWrapper, LibMCDriver_RaylaseHandle pHandle)
574+ : CBase(pWrapper, pHandle)
575+ {
576+ }
577+
578+ inline void GetCycleID (const LibMCDriver_Raylase_uint32 nCycleID);
579+ inline void AddSignalOut (const eIOPort eIOPort, const LibMCDriver_Raylase_uint32 nIOPin);
580+ inline void AddWaitForSignal (const eIOPort eIOPort, const LibMCDriver_Raylase_uint32 nIOPin, const LibMCDriver_Raylase_uint32 nTimeoutInMicroseconds);
581+ inline void AddDelay (const LibMCDriver_Raylase_uint32 nDelayInMicroseconds);
582+ };
583+
559584/* ************************************************************************************************************************
560585 Class CRaylaseCard
561586**************************************************************************************************************************/
@@ -772,6 +797,10 @@ class CDriver_Raylase : public CDriver {
772797 pWrapperTable->m_NLightDriverBoard_IsWaterFlow = nullptr ;
773798 pWrapperTable->m_NLightDriverBoard_SetModeChangeDelays = nullptr ;
774799 pWrapperTable->m_NLightDriverBoard_GetModeChangeDelays = nullptr ;
800+ pWrapperTable->m_RaylaseCycle_GetCycleID = nullptr ;
801+ pWrapperTable->m_RaylaseCycle_AddSignalOut = nullptr ;
802+ pWrapperTable->m_RaylaseCycle_AddWaitForSignal = nullptr ;
803+ pWrapperTable->m_RaylaseCycle_AddDelay = nullptr ;
775804 pWrapperTable->m_RaylaseCard_IsConnected = nullptr ;
776805 pWrapperTable->m_RaylaseCard_ResetToSystemDefaults = nullptr ;
777806 pWrapperTable->m_RaylaseCard_EnableCommandLogging = nullptr ;
@@ -1107,6 +1136,42 @@ class CDriver_Raylase : public CDriver {
11071136 if (pWrapperTable->m_NLightDriverBoard_GetModeChangeDelays == nullptr )
11081137 return LIBMCDRIVER_RAYLASE_ERROR_COULDNOTFINDLIBRARYEXPORT;
11091138
1139+ #ifdef _WIN32
1140+ pWrapperTable->m_RaylaseCycle_GetCycleID = (PLibMCDriver_RaylaseRaylaseCycle_GetCycleIDPtr) GetProcAddress (hLibrary, " libmcdriver_raylase_raylasecycle_getcycleid" );
1141+ #else // _WIN32
1142+ pWrapperTable->m_RaylaseCycle_GetCycleID = (PLibMCDriver_RaylaseRaylaseCycle_GetCycleIDPtr) dlsym (hLibrary, " libmcdriver_raylase_raylasecycle_getcycleid" );
1143+ dlerror ();
1144+ #endif // _WIN32
1145+ if (pWrapperTable->m_RaylaseCycle_GetCycleID == nullptr )
1146+ return LIBMCDRIVER_RAYLASE_ERROR_COULDNOTFINDLIBRARYEXPORT;
1147+
1148+ #ifdef _WIN32
1149+ pWrapperTable->m_RaylaseCycle_AddSignalOut = (PLibMCDriver_RaylaseRaylaseCycle_AddSignalOutPtr) GetProcAddress (hLibrary, " libmcdriver_raylase_raylasecycle_addsignalout" );
1150+ #else // _WIN32
1151+ pWrapperTable->m_RaylaseCycle_AddSignalOut = (PLibMCDriver_RaylaseRaylaseCycle_AddSignalOutPtr) dlsym (hLibrary, " libmcdriver_raylase_raylasecycle_addsignalout" );
1152+ dlerror ();
1153+ #endif // _WIN32
1154+ if (pWrapperTable->m_RaylaseCycle_AddSignalOut == nullptr )
1155+ return LIBMCDRIVER_RAYLASE_ERROR_COULDNOTFINDLIBRARYEXPORT;
1156+
1157+ #ifdef _WIN32
1158+ pWrapperTable->m_RaylaseCycle_AddWaitForSignal = (PLibMCDriver_RaylaseRaylaseCycle_AddWaitForSignalPtr) GetProcAddress (hLibrary, " libmcdriver_raylase_raylasecycle_addwaitforsignal" );
1159+ #else // _WIN32
1160+ pWrapperTable->m_RaylaseCycle_AddWaitForSignal = (PLibMCDriver_RaylaseRaylaseCycle_AddWaitForSignalPtr) dlsym (hLibrary, " libmcdriver_raylase_raylasecycle_addwaitforsignal" );
1161+ dlerror ();
1162+ #endif // _WIN32
1163+ if (pWrapperTable->m_RaylaseCycle_AddWaitForSignal == nullptr )
1164+ return LIBMCDRIVER_RAYLASE_ERROR_COULDNOTFINDLIBRARYEXPORT;
1165+
1166+ #ifdef _WIN32
1167+ pWrapperTable->m_RaylaseCycle_AddDelay = (PLibMCDriver_RaylaseRaylaseCycle_AddDelayPtr) GetProcAddress (hLibrary, " libmcdriver_raylase_raylasecycle_adddelay" );
1168+ #else // _WIN32
1169+ pWrapperTable->m_RaylaseCycle_AddDelay = (PLibMCDriver_RaylaseRaylaseCycle_AddDelayPtr) dlsym (hLibrary, " libmcdriver_raylase_raylasecycle_adddelay" );
1170+ dlerror ();
1171+ #endif // _WIN32
1172+ if (pWrapperTable->m_RaylaseCycle_AddDelay == nullptr )
1173+ return LIBMCDRIVER_RAYLASE_ERROR_COULDNOTFINDLIBRARYEXPORT;
1174+
11101175 #ifdef _WIN32
11111176 pWrapperTable->m_RaylaseCard_IsConnected = (PLibMCDriver_RaylaseRaylaseCard_IsConnectedPtr) GetProcAddress (hLibrary, " libmcdriver_raylase_raylasecard_isconnected" );
11121177 #else // _WIN32
@@ -1609,6 +1674,22 @@ class CDriver_Raylase : public CDriver {
16091674 if ( (eLookupError != 0 ) || (pWrapperTable->m_NLightDriverBoard_GetModeChangeDelays == nullptr ) )
16101675 return LIBMCDRIVER_RAYLASE_ERROR_COULDNOTFINDLIBRARYEXPORT;
16111676
1677+ eLookupError = (*pLookup)(" libmcdriver_raylase_raylasecycle_getcycleid" , (void **)&(pWrapperTable->m_RaylaseCycle_GetCycleID ));
1678+ if ( (eLookupError != 0 ) || (pWrapperTable->m_RaylaseCycle_GetCycleID == nullptr ) )
1679+ return LIBMCDRIVER_RAYLASE_ERROR_COULDNOTFINDLIBRARYEXPORT;
1680+
1681+ eLookupError = (*pLookup)(" libmcdriver_raylase_raylasecycle_addsignalout" , (void **)&(pWrapperTable->m_RaylaseCycle_AddSignalOut ));
1682+ if ( (eLookupError != 0 ) || (pWrapperTable->m_RaylaseCycle_AddSignalOut == nullptr ) )
1683+ return LIBMCDRIVER_RAYLASE_ERROR_COULDNOTFINDLIBRARYEXPORT;
1684+
1685+ eLookupError = (*pLookup)(" libmcdriver_raylase_raylasecycle_addwaitforsignal" , (void **)&(pWrapperTable->m_RaylaseCycle_AddWaitForSignal ));
1686+ if ( (eLookupError != 0 ) || (pWrapperTable->m_RaylaseCycle_AddWaitForSignal == nullptr ) )
1687+ return LIBMCDRIVER_RAYLASE_ERROR_COULDNOTFINDLIBRARYEXPORT;
1688+
1689+ eLookupError = (*pLookup)(" libmcdriver_raylase_raylasecycle_adddelay" , (void **)&(pWrapperTable->m_RaylaseCycle_AddDelay ));
1690+ if ( (eLookupError != 0 ) || (pWrapperTable->m_RaylaseCycle_AddDelay == nullptr ) )
1691+ return LIBMCDRIVER_RAYLASE_ERROR_COULDNOTFINDLIBRARYEXPORT;
1692+
16121693 eLookupError = (*pLookup)(" libmcdriver_raylase_raylasecard_isconnected" , (void **)&(pWrapperTable->m_RaylaseCard_IsConnected ));
16131694 if ( (eLookupError != 0 ) || (pWrapperTable->m_RaylaseCard_IsConnected == nullptr ) )
16141695 return LIBMCDRIVER_RAYLASE_ERROR_COULDNOTFINDLIBRARYEXPORT;
@@ -2093,6 +2174,49 @@ class CDriver_Raylase : public CDriver {
20932174 CheckError (m_pWrapper->m_WrapperTable .m_NLightDriverBoard_GetModeChangeDelays (m_pHandle, &nModeChangeSignalDelayInMicroseconds, &nModeChangeApplyDelayInMicroseconds));
20942175 }
20952176
2177+ /* *
2178+ * Method definitions for class CRaylaseCycle
2179+ */
2180+
2181+ /* *
2182+ * CRaylaseCycle::GetCycleID - Returns the cycle ID as Integer.
2183+ * @param[in] nCycleID - Cycle ID. MUST NOT be 0.
2184+ */
2185+ void CRaylaseCycle::GetCycleID (const LibMCDriver_Raylase_uint32 nCycleID)
2186+ {
2187+ CheckError (m_pWrapper->m_WrapperTable .m_RaylaseCycle_GetCycleID (m_pHandle, nCycleID));
2188+ }
2189+
2190+ /* *
2191+ * CRaylaseCycle::AddSignalOut - Enables a GPIO Output signal during the list cycle.
2192+ * @param[in] eIOPort - IO Port to write out to. MUST be configured as output pin.
2193+ * @param[in] nIOPin - IO Pin to write out to. MUST be configured as output pin.
2194+ */
2195+ void CRaylaseCycle::AddSignalOut (const eIOPort eIOPort, const LibMCDriver_Raylase_uint32 nIOPin)
2196+ {
2197+ CheckError (m_pWrapper->m_WrapperTable .m_RaylaseCycle_AddSignalOut (m_pHandle, eIOPort, nIOPin));
2198+ }
2199+
2200+ /* *
2201+ * CRaylaseCycle::AddWaitForSignal - Enables to wait for an Input signal during the list cycle.
2202+ * @param[in] eIOPort - IO Port to read from. MUST be configured as input pin.
2203+ * @param[in] nIOPin - IO Pin to read from. MUST be configured as input pin.
2204+ * @param[in] nTimeoutInMicroseconds - Timeout in Microseconds.
2205+ */
2206+ void CRaylaseCycle::AddWaitForSignal (const eIOPort eIOPort, const LibMCDriver_Raylase_uint32 nIOPin, const LibMCDriver_Raylase_uint32 nTimeoutInMicroseconds)
2207+ {
2208+ CheckError (m_pWrapper->m_WrapperTable .m_RaylaseCycle_AddWaitForSignal (m_pHandle, eIOPort, nIOPin, nTimeoutInMicroseconds));
2209+ }
2210+
2211+ /* *
2212+ * CRaylaseCycle::AddDelay - Adds a delay to the list cycle.
2213+ * @param[in] nDelayInMicroseconds - Delay in Microseconds.
2214+ */
2215+ void CRaylaseCycle::AddDelay (const LibMCDriver_Raylase_uint32 nDelayInMicroseconds)
2216+ {
2217+ CheckError (m_pWrapper->m_WrapperTable .m_RaylaseCycle_AddDelay (m_pHandle, nDelayInMicroseconds));
2218+ }
2219+
20962220 /* *
20972221 * Method definitions for class CRaylaseCard
20982222 */
0 commit comments