73 class CLPROTOCOL_DECL
CCLPort :
public GENAPI_NAMESPACE::CPortImpl,
public ISerial
83 static void GetPortIDs( GENAPI_NAMESPACE::StringList_t &PortIDs );
89 static ISerialAdapter *
GetPort(
const GENICAM_NAMESPACE::gcstring &PortID );
112 static GENICAM_NAMESPACE::gcstring
ProbeDevice(
const GENICAM_NAMESPACE::gcstring &PortID,
const GENICAM_NAMESPACE::gcstring &strDeviceIDTemplate,
const CLUINT32 SerialTimeout = 500);
122 static GENICAM_NAMESPACE::gcstring
RegisterSerial(
const GENICAM_NAMESPACE::gcstring &PortName, ISerialAdapter *pSerialAdapter);
139 void Connect(
const GENICAM_NAMESPACE::gcstring &PortID,
const GENICAM_NAMESPACE::gcstring &strDeviceID );
147 bool Connect(
const GENICAM_NAMESPACE::gcstring &PortID );
161 void GetXMLIDs( GENICAM_NAMESPACE::gcstring_vector &XMLIDs );
168 GENICAM_NAMESPACE::gcstring
GetXML( GENICAM_NAMESPACE::gcstring XMLID,
const bool UseMaxBaudrate =
true );
183 GENICAM_NAMESPACE::gcstring
GetXML(
const bool UseMaxBaudrate =
true );
232 static void StorePortIDDeviceIDPairs( GENICAM_NAMESPACE::gcstring_vector &PortIDs, GENICAM_NAMESPACE::gcstring_vector &DeviceIDs );
246 virtual void Read(
void * pBuffer, int64_t Address, int64_t Length);
249 virtual void Write(
const void * pBuffer, int64_t Address, int64_t Length);
261 CLUINT32 * bufferSize
274 CLUINT32* bufferSize,
275 CLUINT32 serialTimeOut
281 CLUINT32* bufferSize,
285 CLUINT32 serialTimeOut
298 static void InitPortIDs(
void);
301 virtual CLINT32 CLPROTOCOL clSetBaudRate(
308 void CheckError( CLINT32 ErrorCode )
const;
311 static void CheckLastError();
314 void LoadProtocolDriver(
const GENICAM_NAMESPACE::gcstring &PortDriverDLLPath );
317 void UnLoadProtocolDriver( );
320 void CreatePort(
const GENICAM_NAMESPACE::gcstring &PortID,
const GENICAM_NAMESPACE::gcstring &PortDriverDLLPath );
323 static void UpdateCache(
const GENICAM_NAMESPACE::gcstring &PortID,
const GENICAM_NAMESPACE::gcstring &DeviceID );
326 ISerialAdapter *m_pSerialAdapter;
329 static SerialPortMap *s_pSerialList;
332 static SerialPortMap *s_pPrivateSerialList;
335 static bool s_IsSerialListInitialized;
339 lib_handle_t m_hPortDriverDLL;
342 CLUINT32 m_SerialTimeOut;
345 GENICAM_NAMESPACE::gcstring m_DeviceID;
348 GENICAM_NAMESPACE::gcstring m_PortID;
357 CLINT32 (__cdecl *m_clpInitLib)( clp_logger_t logger, CLP_LOG_LEVEL_VALUE logLevel);
360 CLINT32 (__cdecl *m_clpCloseLib)( void );
363 CLINT32 (__cdecl *m_clpGetShortDeviceIDTemplates) (CLINT8* pDeviceTemplates, CLUINT32* pBufferSize );
366 CLINT32 (__cdecl *m_clpProbeDevice) (
ISerial *pSerial,
const CLINT8* pDeviceIDTemplate, CLINT8* pDeviceID, CLUINT32 *pBufferSize, CLUINT32 *pCookie,
const CLUINT32 TimeOut );
369 CLINT32 (__cdecl *m_clpGetXMLIDs) (
ISerial *pSerial,
const CLUINT32 Cookie ,CLINT8* pXMLIDs, CLUINT32* pBufferSize,
const CLUINT32 TimeOut );
372 CLINT32 (__cdecl *m_clpGetXMLDescription) (
ISerial *pSerial,
const CLUINT32 Cookie,
const CLINT8* pDeviceID, CLINT8* pXMLBuffer, CLUINT32* pBufferSize,
const CLUINT32 TimeOut );
375 CLINT32 (__cdecl *m_clpReadRegister) (
ISerial *pSerial,
const CLUINT32 Cookie,
const CLINT64 Address, CLINT8* pBuffer,
const CLINT64 BufferSize,
const CLUINT32 TimeOut );
378 CLINT32 (__cdecl *m_clpWriteRegister) (
ISerial *pSerial,
const CLUINT32 Cookie,
const CLINT64 Address,
const CLINT8* pBuffer,
const CLINT64 BufferSize,
const CLUINT32 TimeOut );
381 CLINT32 (__cdecl *m_clpContinueWriteRegister) (
ISerial *pSerial,
const CLUINT32 Cookie,
const BOOL8 ContinueWaiting,
const CLUINT32 TimeOut );
384 CLINT32 (__cdecl *m_clpGetErrorText) (
const CLINT32 errorCode, CLINT8* errorText, CLUINT32* errorTextSize,
const CLUINT32 Cookie );
387 CLINT32 (__cdecl *m_clpDisconnect) (
const CLUINT32 Cookie );
390 CLINT32 (__cdecl *m_clpGetCLProtocolVersion) (CLUINT32 *pVersionMajor, CLUINT32 *pVersionMinor );
393 CLINT32 (__cdecl *m_clpGetParam) (
ISerial *pSerial, CLP_PARAMS param,
const CLUINT32 Cookie,
const CLINT8* pBuffer,
const CLINT64 BufferSize,
const CLUINT32 TimeOut);
396 CLINT32 (__cdecl *m_clpSetParam) (
ISerial *pSerial, CLP_PARAMS param,
const CLUINT32 Cookie,
const CLINT8* pBuffer,
const CLINT64 BufferSize,
const CLUINT32 TimeOut);
399 CLINT32 (__cdecl *m_clpIsParamSupported) (CLP_PARAMS param);
402 CLINT32 (__cdecl *m_clpGetEventData) (
const CLUINT32 Cookie, CLINT8* pBuffer, CLUINT32* pBufferSize);
406 bool m_protocolHasBaudratePrms;
409 bool m_protocolHasLogLevelPrm;
412 bool m_protocolHasLoggerPrm;
415 bool m_protocolHasStopProbeDevice;
418 static CLP_LOG_LEVEL_VALUE m_defaultloglevel;
421 static CLUINT32 m_stopProbing;