All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
CLProtocol::CCLPort Class Reference

Wraps a CameraLink protocol DLL and implements the IPort and the ISerial interface. More...

#include <CLPort.h>

Inheritance diagram for CLProtocol::CCLPort:

Public Member Functions

IPort interface
virtual GENAPI_NAMESPACE::EAccessMode GetAccessMode () const
 Get the access mode of the node. More...
 
virtual void Read (void *pBuffer, int64_t Address, int64_t Length)
 Reads a chunk of bytes from the port. More...
 
virtual void Write (const void *pBuffer, int64_t Address, int64_t Length)
 Writes a chunk of bytes to the port. More...
 
virtual GENAPI_NAMESPACE::EInterfaceType GetPrinicipalInterfaceType () const
 We are an IPort interface. More...
 
CLINT32 GetEvent (void *buffer, CLUINT32 *bufferSize)
 We can get event data. More...
 
- Public Member Functions inherited from GENAPI_NAMESPACE::CPortImpl
 CPortImpl ()
 Constructor. More...
 
virtual EYesNo GetSwapEndianess ()
 Determines if the port adapter must perform an endianess swap. More...
 
void InvalidateNode ()
 
virtual void Replay (IPortWriteList *pPortRecorder, bool Invalidate=true)
 sends the commands to the camera. More...
 
virtual void SetPortImpl (IPort *pPort)
 Sets pointer the real port implementation; this function may called only once. More...
 
virtual ~CPortImpl ()
 Destructor. More...
 

Device discovery and binding

static void GetPortIDs (GENAPI_NAMESPACE::StringList_t &PortIDs)
 Retrieves a list of PortIDs which can be used to create a corresponding port object. More...
 
static ISerialAdapterGetPort (const GENICAM_NAMESPACE::gcstring &PortID)
 Gets a SerialAdapter port. More...
 
static void GetDeviceIDTemplates (GENICAM_NAMESPACE::gcstring_vector &DeviceIDTemplates)
 Retrieves a list of DeviceID templates. More...
 
static GENICAM_NAMESPACE::gcstring ProbeDevice (const GENICAM_NAMESPACE::gcstring &PortID, const GENICAM_NAMESPACE::gcstring &strDeviceIDTemplate, const CLUINT32 SerialTimeout=500)
 Connects a camera and retrieves all information required for the DeviceID. More...
 
static void StopProbing (CLUINT32 toStop)
 Stop all running ProbeDevice. More...
 
static GENICAM_NAMESPACE::gcstring RegisterSerial (const GENICAM_NAMESPACE::gcstring &PortName, ISerialAdapter *pSerialAdapter)
 Register a custom serial port. More...
 
static void UnRegisterSerials ()
 Unregister all resource related to serial port. More...
 
static void Terminate ()
 Cleans up static variables. More...
 
static void UnRegisterSerial (const GENICAM_NAMESPACE::gcstring &PortID)
 Unregister serial serial port. More...
 
void Connect (const GENICAM_NAMESPACE::gcstring &PortID, const GENICAM_NAMESPACE::gcstring &strDeviceID)
 Creates a port object for a given PortID and DeviceID. More...
 
bool Connect (const GENICAM_NAMESPACE::gcstring &PortID)
 Creates a port object for a given PortID taking the DeviceID from a internal cache. More...
 
void GetXMLIDs (GENICAM_NAMESPACE::gcstring_vector &XMLIDs)
 Retrieves a list of XMLID strings. More...
 
GENICAM_NAMESPACE::gcstring GetXML (GENICAM_NAMESPACE::gcstring XMLID, const bool UseMaxBaudrate=true)
 Retrieves an GenApi XML description either from the DLL or the file system. More...
 
void DeleteXMLDownload (GENICAM_NAMESPACE::gcstring XMLID)
 Delete the device xml file from the download folder if the file was downloaded for the camera. More...
 
GENICAM_NAMESPACE::gcstring GetXML (const bool UseMaxBaudrate=true)
 Retrieves the best matching GenApi XML description either from the DLL or the file system. More...
 
GENICAM_NAMESPACE::gcstring MakeURLfromXMLID (GENICAM_NAMESPACE::gcstring &XMLID)
 Creates a file URL for a given XML ID. More...
 

Creation and parameterizing

static void SetDefaultLogLevel (const CLP_LOG_LEVEL_VALUE logLever)
 Set log level that is assigned to the device protocol when the dll is loaded. More...
 
static void StorePortIDDeviceIDPairs (GENICAM_NAMESPACE::gcstring_vector &PortIDs, GENICAM_NAMESPACE::gcstring_vector &DeviceIDs)
 Stores a PortID/DeviceID pair. More...
 
static void RetrievePortIDDeviceIDPairs (GENICAM_NAMESPACE::gcstring_vector &PortIDs, GENICAM_NAMESPACE::gcstring_vector &DeviceIDs)
 Retrieves a PortID/DeviceID pair. More...
 
 CCLPort ()
 Public constructor. More...
 
virtual ~CCLPort ()
 Public destructor. More...
 
void SetSerialTimeOut (const CLUINT32 Timeout)
 Sets the timeout for operations on the serial port. More...
 
CLUINT32 GetSerialTimeOut () const
 Gets the timeout for operations on the serial port. More...
 
GENICAM_NAMESPACE::gcstring GetDeviceID () const
 Returns the Device ID the object has been created with. More...
 
void SetProtocolLogLevel (const CLP_LOG_LEVEL_VALUE logLever)
 Set device protocol log lever. More...
 
void SetDeviceBauderate (const CLUINT32 baudrate)
 Set device bauderate using one of the CL_BAUDRATE_XXXX value. More...
 
CLUINT32 GetDeviceBauderate ()
 Returns the current device bauderate, using one of the CL_BAUDRATE_XXXX value. More...
 
CLUINT32 SupportedBaudrates ()
 Sed supported bauderates of the combined device and host interface. More...
 

ISerial interface

ISerialAdapterm_pSerialAdapter
 A proxy to the serial port used by the CCLPort object. More...
 
lib_handle_t m_hPortDriverDLL
 handle to the port driver DLL loaded More...
 
CLUINT32 m_SerialTimeOut
 Timeout in [ms]. More...
 
GENICAM_NAMESPACE::gcstring m_DeviceID
 the DeviceID of the connected device More...
 
GENICAM_NAMESPACE::gcstring m_PortID
 the PortID of the connected device More...
 
CLUINT32 m_Cookie
 Cookie. More...
 
CLP_LOG_LEVEL_VALUE logLevel
 
CLUINT32pBufferSize
 
const CLINT8pDeviceIDTemplate
 
const CLINT8 CLINT8pDeviceID
 
const CLINT8 CLINT8 CLUINT32pBufferSize
 
const CLINT8 CLINT8 CLUINT32 CLUINT32pCookie
 
const CLINT8 CLINT8 CLUINT32 CLUINT32 const CLUINT32 TimeOut
 
const CLUINT32 Cookie
 
const CLUINT32 CLINT8pXMLIDs
 
const CLUINT32 CLINT8 CLUINT32pBufferSize
 
const CLUINT32 CLINT8 CLUINT32 const CLUINT32 TimeOut
 
const CLUINT32 const CLINT8pDeviceID
 
const CLUINT32 const CLINT8 CLINT8pXMLBuffer
 
const CLUINT32 const CLINT8 CLINT8 CLUINT32pBufferSize
 
const CLUINT32 const CLINT8 CLINT8 CLUINT32 const CLUINT32 TimeOut
 
const CLUINT32 const CLINT64 Address
 
const CLUINT32 const CLINT64 CLINT8pBuffer
 
const CLUINT32 const CLINT64 CLINT8 const CLINT64 BufferSize
 
const CLUINT32 const CLINT64 CLINT8 const CLINT64 const CLUINT32 TimeOut
 
const CLUINT32 const CLINT64 const CLINT8pBuffer
 
const CLUINT32 const CLINT64 const CLINT8 const CLINT64 BufferSize
 
const CLUINT32 const CLINT64 const CLINT8 const CLINT64 const CLUINT32 TimeOut
 
const CLUINT32 const BOOL8 ContinueWaiting
 
const CLUINT32 const BOOL8 const CLUINT32 TimeOut
 
CLINT8errorText
 
CLINT8 CLUINT32errorTextSize
 
CLINT8 CLUINT32 const CLUINT32 Cookie
 
CLUINT32pVersionMinor
 
CLP_PARAMS param
 
CLP_PARAMS const CLUINT32 Cookie
 
CLP_PARAMS const CLUINT32 const CLINT8pBuffer
 
CLP_PARAMS const CLUINT32 const CLINT8 const CLINT64 BufferSize
 
CLP_PARAMS const CLUINT32 const CLINT8 const CLINT64 const CLUINT32 TimeOut
 
CLINT8pBuffer
 
CLINT8 CLUINT32pBufferSize
 
bool m_protocolHasBaudratePrms
 true if you can set baud rate via the CLProtocol's function interface More...
 
bool m_protocolHasLogLevelPrm
 true if you can set the log level More...
 
bool m_protocolHasLoggerPrm
 true if you can set the logger More...
 
bool m_protocolHasStopProbeDevice
 true if you can set stop probing More...
 
static SerialPortMaps_pSerialList
 A list of all available proxies in the system. More...
 
static SerialPortMaps_pPrivateSerialList
 A list of all available proxies registers manually. More...
 
static bool s_IsSerialListInitialized
 indicates if s_pSerialList is initialized More...
 
static CLP_LOG_LEVEL_VALUE m_defaultloglevel
 Default log level. More...
 
static CLUINT32 m_stopProbing
 probe of device is stopped More...
 
virtual CLINT32 CLPROTOCOL clSerialRead (CLINT8 *buffer, CLUINT32 *bufferSize, CLUINT32 serialTimeOut)
 calls clSerialRead as defined by the camera link standard More...
 
virtual CLINT32 CLPROTOCOL clSerialWrite (CLINT8 *buffer, CLUINT32 *bufferSize, CLUINT32 serialTimeOut)
 calls clSerialWrite as defined by the camera link standard More...
 
virtual CLINT32 CLPROTOCOL clGetSupportedBaudRates (CLUINT32 *baudRates)
 returns the valid baud rates of the current interface. More...
 
static void InitPortIDs (void)
 Initialize the PortID list. More...
 
static void CheckLastError ()
 helper retrieving error messages More...
 
static void UpdateCache (const GENICAM_NAMESPACE::gcstring &PortID, const GENICAM_NAMESPACE::gcstring &DeviceID)
 updates the DeviceID cache More...
 
virtual CLINT32 CLPROTOCOL clSetBaudRate (CLUINT32 baudRate)
 This function sets the baud rate for the serial port of the selected device. More...
 
void CheckError (CLINT32 ErrorCode) const
 Helper retrieving error messages. More...
 
void LoadProtocolDriver (const GENICAM_NAMESPACE::gcstring &PortDriverDLLPath)
 loads the protocol driver DLL More...
 
void UnLoadProtocolDriver ()
 unloads the driver DLL More...
 
void CreatePort (const GENICAM_NAMESPACE::gcstring &PortID, const GENICAM_NAMESPACE::gcstring &PortDriverDLLPath)
 Creates a CLProtocol driver and connects it a a port identified by PortID. More...
 
 CLINT32 (__cdecl *m_clpInitLib)(clp_logger_t logger
 Function pointer to clpInitLib. More...
 
 CLINT32 (__cdecl *m_clpCloseLib)(void)
 Function pointer to clpCloseLib. More...
 
 CLINT32 (__cdecl *m_clpGetShortDeviceIDTemplates)(CLINT8 *pDeviceTemplates
 Function pointer to clpGetShortDeviceIDTemplates. More...
 
 CLINT32 (__cdecl *m_clpProbeDevice)(ISerial *pSerial
 Function pointer to clpProbeDevice. More...
 
 CLINT32 (__cdecl *m_clpGetXMLIDs)(ISerial *pSerial
 Function pointer to clpGetXMLIDs. More...
 
 CLINT32 (__cdecl *m_clpGetXMLDescription)(ISerial *pSerial
 Function pointer to m_clpGetXMLDescription. More...
 
 CLINT32 (__cdecl *m_clpReadRegister)(ISerial *pSerial
 Function pointer to clpReadRegister. More...
 
 CLINT32 (__cdecl *m_clpWriteRegister)(ISerial *pSerial
 Function pointer to clpWriteRegister. More...
 
 CLINT32 (__cdecl *m_clpContinueWriteRegister)(ISerial *pSerial
 Function pointer to clpContinueWriteRegister. More...
 
 CLINT32 (__cdecl *m_clpGetErrorText)(const CLINT32 errorCode
 Function pointer to clpGetErrorText. More...
 
 CLINT32 (__cdecl *m_clpDisconnect)(const CLUINT32 Cookie)
 Function pointer to clpDisconnect. More...
 
 CLINT32 (__cdecl *m_clpGetCLProtocolVersion)(CLUINT32 *pVersionMajor
 Function pointer to clpGetCLProtocolVersion. More...
 
 CLINT32 (__cdecl *m_clpGetParam)(ISerial *pSerial
 Function pointer to clpGetParam. More...
 
 CLINT32 (__cdecl *m_clpSetParam)(ISerial *pSerial
 Function pointer to clpSetParam. More...
 
 CLINT32 (__cdecl *m_clpIsParamSupported)(CLP_PARAMS param)
 Function pointer to clpIsParamSupported. More...
 
 CLINT32 (__cdecl *m_clpGetEventData)(const CLUINT32 Cookie
 Function pointer to clpgetEventData. More...
 
 CCLPort (CCLPort &)
 must not be used More...
 
CCLPortoperator= (CCLPort &)
 must not be used More...
 

Detailed Description

Wraps a CameraLink protocol DLL and implements the IPort and the ISerial interface.

The class dynamically loads a protocol driver DLL and binds it to a given port. It implements the IPort and the ISerial interface.

The class can enumerate

  • the PortIDs of all frame grabbers installed in the system
  • the DeviceID templates of all CLProtocol drivers installed in the system The class can probe a port and retrieve the DeviceID of the attached camera. The class can retrieve the GenApi XML file for a camera.

Definition at line 73 of file CLPort.h.

Constructor & Destructor Documentation

◆ CCLPort() [1/2]

CLProtocol::CCLPort::CCLPort ( )

Public constructor.

◆ ~CCLPort()

virtual CLProtocol::CCLPort::~CCLPort ( )
virtual

Public destructor.

◆ CCLPort() [2/2]

CLProtocol::CCLPort::CCLPort ( CCLPort )
private

must not be used

Member Function Documentation

◆ CheckError()

void CLProtocol::CCLPort::CheckError ( CLINT32  ErrorCode) const
private

Helper retrieving error messages.

◆ CheckLastError()

static void CLProtocol::CCLPort::CheckLastError ( )
staticprivate

helper retrieving error messages

◆ clGetSupportedBaudRates()

virtual CLINT32 CLPROTOCOL CLProtocol::CCLPort::clGetSupportedBaudRates ( CLUINT32 baudRates)
virtual

returns the valid baud rates of the current interface.

Parameters
baudRatesBitfield that describes all supported baud rates of the serial port as described by serialRefPtr. See Table B-2 of the Camera Link documentation for more information on constants.

Implements ISerial.

◆ CLINT32() [1/16]

CLProtocol::CCLPort::CLINT32 ( __cdecl m_clpCloseLib)
private

Function pointer to clpCloseLib.

◆ CLINT32() [2/16]

CLProtocol::CCLPort::CLINT32 ( __cdecl m_clpContinueWriteRegister)
private

Function pointer to clpContinueWriteRegister.

◆ CLINT32() [3/16]

CLProtocol::CCLPort::CLINT32 ( __cdecl m_clpDisconnect) const
private

Function pointer to clpDisconnect.

◆ CLINT32() [4/16]

CLProtocol::CCLPort::CLINT32 ( __cdecl m_clpGetCLProtocolVersion)
private

Function pointer to clpGetCLProtocolVersion.

◆ CLINT32() [5/16]

CLProtocol::CCLPort::CLINT32 ( __cdecl m_clpGetErrorText) const
private

Function pointer to clpGetErrorText.

◆ CLINT32() [6/16]

CLProtocol::CCLPort::CLINT32 ( __cdecl m_clpGetEventData) const
private

Function pointer to clpgetEventData.

◆ CLINT32() [7/16]

CLProtocol::CCLPort::CLINT32 ( __cdecl m_clpGetParam)
private

Function pointer to clpGetParam.

◆ CLINT32() [8/16]

CLProtocol::CCLPort::CLINT32 ( __cdecl m_clpGetShortDeviceIDTemplates)
private

Function pointer to clpGetShortDeviceIDTemplates.

◆ CLINT32() [9/16]

CLProtocol::CCLPort::CLINT32 ( __cdecl m_clpGetXMLDescription)
private

Function pointer to m_clpGetXMLDescription.

◆ CLINT32() [10/16]

CLProtocol::CCLPort::CLINT32 ( __cdecl m_clpGetXMLIDs)
private

Function pointer to clpGetXMLIDs.

◆ CLINT32() [11/16]

CLProtocol::CCLPort::CLINT32 ( __cdecl m_clpInitLib)
private

Function pointer to clpInitLib.

◆ CLINT32() [12/16]

CLProtocol::CCLPort::CLINT32 ( __cdecl m_clpIsParamSupported)
private

Function pointer to clpIsParamSupported.

◆ CLINT32() [13/16]

CLProtocol::CCLPort::CLINT32 ( __cdecl m_clpProbeDevice)
private

Function pointer to clpProbeDevice.

◆ CLINT32() [14/16]

CLProtocol::CCLPort::CLINT32 ( __cdecl m_clpReadRegister)
private

Function pointer to clpReadRegister.

◆ CLINT32() [15/16]

CLProtocol::CCLPort::CLINT32 ( __cdecl m_clpSetParam)
private

Function pointer to clpSetParam.

◆ CLINT32() [16/16]

CLProtocol::CCLPort::CLINT32 ( __cdecl m_clpWriteRegister)
private

Function pointer to clpWriteRegister.

◆ clSerialRead()

virtual CLINT32 CLPROTOCOL CLProtocol::CCLPort::clSerialRead ( CLINT8 buffer,
CLUINT32 bufferSize,
CLUINT32  serialTimeOut 
)
virtual

calls clSerialRead as defined by the camera link standard

Parameters
bufferPoints to a user-allocated buffer. Upon a successful call, buffer contains the data read from the serial device. Upon failure, this buffer is not affected. Caller should ensure that buffer is at least numBytes in size.
bufferSizeThis is the number of bytes requested by the caller.
serialTimeOutIndicates the timeout in milliseconds.

Implements ISerial.

◆ clSerialWrite()

virtual CLINT32 CLPROTOCOL CLProtocol::CCLPort::clSerialWrite ( CLINT8 buffer,
CLUINT32 bufferSize,
CLUINT32  serialTimeOut 
)
virtual

calls clSerialWrite as defined by the camera link standard

Parameters
bufferContains data to write to the serial device.
bufferSizeContains the buffer size indicating the number of bytes to be written. Upon a successful call, bufferSize contains the number of bytes written to the serial device.
serialTimeOutIndicates the timeout in milliseconds.

Implements ISerial.

◆ clSetBaudRate()

virtual CLINT32 CLPROTOCOL CLProtocol::CCLPort::clSetBaudRate ( CLUINT32  baudRate)
privatevirtual

This function sets the baud rate for the serial port of the selected device.

Parameters
baudRateThe baud rate you want to use. This parameter expects the values represented by the CL_BAUDRATE constants in table B-2. By default, the baud rate for serial communication is 9600.;

Implements ISerial.

◆ Connect() [1/2]

bool CLProtocol::CCLPort::Connect ( const GENICAM_NAMESPACE::gcstring PortID)

Creates a port object for a given PortID taking the DeviceID from a internal cache.

Parameters
[in]PortIDIdentifies the port to use for connection.
Returns
false, if the cache doesn't contain a DeviceID for the PortID; true, if the cache contains a corresponding DeviceID and if a matching device is connected Throws an exception if there is a cache entry but no matching device is connected

◆ Connect() [2/2]

void CLProtocol::CCLPort::Connect ( const GENICAM_NAMESPACE::gcstring PortID,
const GENICAM_NAMESPACE::gcstring strDeviceID 
)

Creates a port object for a given PortID and DeviceID.

Parameters
[in]PortIDIdentifies the port to use for connection.
[in]strDeviceIDIdentifies the device to connect. Can be optionally a DeviceID template.

◆ CreatePort()

void CLProtocol::CCLPort::CreatePort ( const GENICAM_NAMESPACE::gcstring PortID,
const GENICAM_NAMESPACE::gcstring PortDriverDLLPath 
)
private

Creates a CLProtocol driver and connects it a a port identified by PortID.

◆ DeleteXMLDownload()

void CLProtocol::CCLPort::DeleteXMLDownload ( GENICAM_NAMESPACE::gcstring  XMLID)

Delete the device xml file from the download folder if the file was downloaded for the camera.

This can be use to remove a corrupted file. File can easily be corrupted if the download is aborted.

Parameters
[in]XMLIDThe XML ID identifying the XML file whose data is to be received

◆ GetAccessMode()

virtual GENAPI_NAMESPACE::EAccessMode CLProtocol::CCLPort::GetAccessMode ( ) const
virtual

Get the access mode of the node.

Implements GENAPI_NAMESPACE::CPortImpl.

◆ GetDeviceBauderate()

CLUINT32 CLProtocol::CCLPort::GetDeviceBauderate ( )

Returns the current device bauderate, using one of the CL_BAUDRATE_XXXX value.

◆ GetDeviceID()

GENICAM_NAMESPACE::gcstring CLProtocol::CCLPort::GetDeviceID ( ) const

Returns the Device ID the object has been created with.

◆ GetDeviceIDTemplates()

static void CLProtocol::CCLPort::GetDeviceIDTemplates ( GENICAM_NAMESPACE::gcstring_vector &  DeviceIDTemplates)
static

Retrieves a list of DeviceID templates.

Retrieves all DLLs found in the subdirectories of , loads the dlls, asks them for their supported DeviceIDTemplates, and returns a list of the combined DeviceIDTemplate strings of all dlls.

Parameters
[out]DeviceIDTemplatesA list of DeviceID templates

◆ GetEvent()

CLINT32 CLProtocol::CCLPort::GetEvent ( void *  buffer,
CLUINT32 bufferSize 
)

We can get event data.

Parameters
bufferPoints to a user-allocated buffer. Upon a successful call, buffer contains the data read from the serial device. Upon failure, this buffer is not affected. if buffersize is too small result is CL_ERR_BUFFER_TOO_SMALL.
bufferSizeinput is the size of the buffer, output is the size of event data in buffer.

◆ GetPort()

static ISerialAdapter* CLProtocol::CCLPort::GetPort ( const GENICAM_NAMESPACE::gcstring PortID)
static

Gets a SerialAdapter port.

Parameters
[in]PortIDPortID of the serial port
Returns
ISerialAdapter interface belonging to the PortID; NULL if PortID is not valid

◆ GetPortIDs()

static void CLProtocol::CCLPort::GetPortIDs ( GENAPI_NAMESPACE::StringList_t PortIDs)
static

Retrieves a list of PortIDs which can be used to create a corresponding port object.

Parameters
[out]PortIDsA list of PortIDs which each has the form 'ManufacturerName::PortName'

◆ GetPrinicipalInterfaceType()

virtual GENAPI_NAMESPACE::EInterfaceType CLProtocol::CCLPort::GetPrinicipalInterfaceType ( ) const
virtual

We are an IPort interface.

◆ GetSerialTimeOut()

CLUINT32 CLProtocol::CCLPort::GetSerialTimeOut ( ) const

Gets the timeout for operations on the serial port.

◆ GetXML() [1/2]

GENICAM_NAMESPACE::gcstring CLProtocol::CCLPort::GetXML ( const bool  UseMaxBaudrate = true)

Retrieves the best matching GenApi XML description either from the DLL or the file system.

Parameters
[in]UseMaxBaudrateif true the baud rate is set to maximum while downloading the XML file and reset afterwards
Returns
GenApi compliant camera description code ready to instantiate a node map.

◆ GetXML() [2/2]

GENICAM_NAMESPACE::gcstring CLProtocol::CCLPort::GetXML ( GENICAM_NAMESPACE::gcstring  XMLID,
const bool  UseMaxBaudrate = true 
)

Retrieves an GenApi XML description either from the DLL or the file system.

Parameters
[in]XMLIDThe XML ID identifying the XML file whose data is to be received
[in]UseMaxBaudrateif true the baud rate is set to maximum while downloading the XML file and reset afterwards
Returns
GenApi compliant camera XML description code ready to instantiate a node map.

◆ GetXMLIDs()

void CLProtocol::CCLPort::GetXMLIDs ( GENICAM_NAMESPACE::gcstring_vector &  XMLIDs)

Retrieves a list of XMLID strings.

Retrieves a list of XML IDs from the file system and the CLProtocol.dll which in turn may ask the camera, e.g. by reading a Manifest register

The list contains only XML ID which would match the DeviceID and whose schema version can be interpreted by the current GenICam version.

The XML ID are order best matching first.

Parameters
[out]XMLIDsA list of XML IDs templates

◆ InitPortIDs()

static void CLProtocol::CCLPort::InitPortIDs ( void  )
staticprivate

Initialize the PortID list.

◆ LoadProtocolDriver()

void CLProtocol::CCLPort::LoadProtocolDriver ( const GENICAM_NAMESPACE::gcstring PortDriverDLLPath)
private

loads the protocol driver DLL

◆ MakeURLfromXMLID()

GENICAM_NAMESPACE::gcstring CLProtocol::CCLPort::MakeURLfromXMLID ( GENICAM_NAMESPACE::gcstring XMLID)

Creates a file URL for a given XML ID.

The URL has the following format: "file:///filepath.xml"

Returns
file URL to a XML file as described in the GenTL module

◆ operator=()

CCLPort& CLProtocol::CCLPort::operator= ( CCLPort )
private

must not be used

◆ ProbeDevice()

static GENICAM_NAMESPACE::gcstring CLProtocol::CCLPort::ProbeDevice ( const GENICAM_NAMESPACE::gcstring PortID,
const GENICAM_NAMESPACE::gcstring strDeviceIDTemplate,
const CLUINT32  SerialTimeout = 500 
)
static

Connects a camera and retrieves all information required for the DeviceID.

Connects the camera with 9600 Baud (= CL standard baud rate after power up) and identifies the camera attached to the port given by PortID. The DeviceIDTemplate helps with the identification whose result is returned as DeviceID.

Parameters
[in]PortIDIdentifies the port the camera to be probed is connected to
[in]strDeviceIDTemplateThe DeviceID templates helping the protocol driver dll to identify the camera
[in]SerialTimeoutThe timeout in milliseconds when probing the port (see SetSerialTimeOut).
Returns
A DeviceID containing a unique description of the camera found. If the DeviceID is an empty string no device was found.

◆ Read()

virtual void CLProtocol::CCLPort::Read ( void *  pBuffer,
int64_t  Address,
int64_t  Length 
)
virtual

Reads a chunk of bytes from the port.

Implements GENAPI_NAMESPACE::CPortImpl.

◆ RegisterSerial()

static GENICAM_NAMESPACE::gcstring CLProtocol::CCLPort::RegisterSerial ( const GENICAM_NAMESPACE::gcstring PortName,
ISerialAdapter pSerialAdapter 
)
static

Register a custom serial port.

Parameters
[in]PortNameIdentifies the port to use for connection.
[in]pSerialAdapterAn interface that allow CCLPort to access the serial port.
Returns
PortID a portId of the form "Local#<PortName>"

◆ RetrievePortIDDeviceIDPairs()

static void CLProtocol::CCLPort::RetrievePortIDDeviceIDPairs ( GENICAM_NAMESPACE::gcstring_vector &  PortIDs,
GENICAM_NAMESPACE::gcstring_vector &  DeviceIDs 
)
static

Retrieves a PortID/DeviceID pair.

◆ SetDefaultLogLevel()

static void CLProtocol::CCLPort::SetDefaultLogLevel ( const CLP_LOG_LEVEL_VALUE  logLever)
static

Set log level that is assigned to the device protocol when the dll is loaded.

◆ SetDeviceBauderate()

void CLProtocol::CCLPort::SetDeviceBauderate ( const CLUINT32  baudrate)

Set device bauderate using one of the CL_BAUDRATE_XXXX value.

◆ SetProtocolLogLevel()

void CLProtocol::CCLPort::SetProtocolLogLevel ( const CLP_LOG_LEVEL_VALUE  logLever)

Set device protocol log lever.

◆ SetSerialTimeOut()

void CLProtocol::CCLPort::SetSerialTimeOut ( const CLUINT32  Timeout)

Sets the timeout for operations on the serial port.

Parameters
[in]TimeoutTimeout in [ms] for operations on the serial port.

◆ StopProbing()

static void CLProtocol::CCLPort::StopProbing ( CLUINT32  toStop)
static

Stop all running ProbeDevice.

◆ StorePortIDDeviceIDPairs()

static void CLProtocol::CCLPort::StorePortIDDeviceIDPairs ( GENICAM_NAMESPACE::gcstring_vector &  PortIDs,
GENICAM_NAMESPACE::gcstring_vector &  DeviceIDs 
)
static

Stores a PortID/DeviceID pair.

◆ SupportedBaudrates()

CLUINT32 CLProtocol::CCLPort::SupportedBaudrates ( )

Sed supported bauderates of the combined device and host interface.

◆ Terminate()

static void CLProtocol::CCLPort::Terminate ( )
static

Cleans up static variables.

◆ UnLoadProtocolDriver()

void CLProtocol::CCLPort::UnLoadProtocolDriver ( )
private

unloads the driver DLL

◆ UnRegisterSerial()

static void CLProtocol::CCLPort::UnRegisterSerial ( const GENICAM_NAMESPACE::gcstring PortID)
static

Unregister serial serial port.

Parameters
[in]PortIDIdentifies the port that need to be disconnected

◆ UnRegisterSerials()

static void CLProtocol::CCLPort::UnRegisterSerials ( )
static

Unregister all resource related to serial port.

◆ UpdateCache()

static void CLProtocol::CCLPort::UpdateCache ( const GENICAM_NAMESPACE::gcstring PortID,
const GENICAM_NAMESPACE::gcstring DeviceID 
)
staticprivate

updates the DeviceID cache

◆ Write()

virtual void CLProtocol::CCLPort::Write ( const void *  pBuffer,
int64_t  Address,
int64_t  Length 
)
virtual

Writes a chunk of bytes to the port.

Implements GENAPI_NAMESPACE::CPortImpl.

Member Data Documentation

◆ Address

const CLUINT32 const CLINT64 CLProtocol::CCLPort::Address
private

Definition at line 375 of file CLPort.h.

◆ BufferSize [1/3]

CLP_PARAMS const CLUINT32 const CLINT8 const CLINT64 CLProtocol::CCLPort::BufferSize
private

Definition at line 375 of file CLPort.h.

◆ BufferSize [2/3]

const CLUINT32 const CLINT64 const CLINT8 const CLINT64 CLProtocol::CCLPort::BufferSize
private

Definition at line 378 of file CLPort.h.

◆ BufferSize [3/3]

CLP_PARAMS const CLUINT32 const CLINT8 const CLINT64 CLProtocol::CCLPort::BufferSize
private

Definition at line 393 of file CLPort.h.

◆ ContinueWaiting

const CLUINT32 const BOOL8 CLProtocol::CCLPort::ContinueWaiting
private

Definition at line 381 of file CLPort.h.

◆ Cookie [1/3]

CLP_PARAMS const CLUINT32 CLProtocol::CCLPort::Cookie
private

Definition at line 369 of file CLPort.h.

◆ Cookie [2/3]

CLINT8 CLUINT32 const CLUINT32 CLProtocol::CCLPort::Cookie
private

Definition at line 384 of file CLPort.h.

◆ Cookie [3/3]

CLP_PARAMS const CLUINT32 CLProtocol::CCLPort::Cookie
private

Definition at line 393 of file CLPort.h.

◆ errorText

CLINT8* CLProtocol::CCLPort::errorText
private

Definition at line 384 of file CLPort.h.

◆ errorTextSize

CLINT8 CLUINT32* CLProtocol::CCLPort::errorTextSize
private

Definition at line 384 of file CLPort.h.

◆ logLevel

CLP_LOG_LEVEL_VALUE CLProtocol::CCLPort::logLevel
private

Definition at line 357 of file CLPort.h.

◆ m_Cookie

CLUINT32 CLProtocol::CCLPort::m_Cookie
private

Cookie.

Definition at line 351 of file CLPort.h.

◆ m_defaultloglevel

CLP_LOG_LEVEL_VALUE CLProtocol::CCLPort::m_defaultloglevel
staticprivate

Default log level.

Definition at line 418 of file CLPort.h.

◆ m_DeviceID

GENICAM_NAMESPACE::gcstring CLProtocol::CCLPort::m_DeviceID
private

the DeviceID of the connected device

Definition at line 345 of file CLPort.h.

◆ m_hPortDriverDLL

lib_handle_t CLProtocol::CCLPort::m_hPortDriverDLL
private

handle to the port driver DLL loaded

Definition at line 339 of file CLPort.h.

◆ m_PortID

GENICAM_NAMESPACE::gcstring CLProtocol::CCLPort::m_PortID
private

the PortID of the connected device

Definition at line 348 of file CLPort.h.

◆ m_protocolHasBaudratePrms

bool CLProtocol::CCLPort::m_protocolHasBaudratePrms
private

true if you can set baud rate via the CLProtocol's function interface

Definition at line 406 of file CLPort.h.

◆ m_protocolHasLoggerPrm

bool CLProtocol::CCLPort::m_protocolHasLoggerPrm
private

true if you can set the logger

Definition at line 412 of file CLPort.h.

◆ m_protocolHasLogLevelPrm

bool CLProtocol::CCLPort::m_protocolHasLogLevelPrm
private

true if you can set the log level

Definition at line 409 of file CLPort.h.

◆ m_protocolHasStopProbeDevice

bool CLProtocol::CCLPort::m_protocolHasStopProbeDevice
private

true if you can set stop probing

Definition at line 415 of file CLPort.h.

◆ m_pSerialAdapter

ISerialAdapter* CLProtocol::CCLPort::m_pSerialAdapter
private

A proxy to the serial port used by the CCLPort object.

Definition at line 326 of file CLPort.h.

◆ m_SerialTimeOut

CLUINT32 CLProtocol::CCLPort::m_SerialTimeOut
private

Timeout in [ms].

Definition at line 342 of file CLPort.h.

◆ m_stopProbing

CLUINT32 CLProtocol::CCLPort::m_stopProbing
staticprivate

probe of device is stopped

Definition at line 421 of file CLPort.h.

◆ param

CLP_PARAMS CLProtocol::CCLPort::param
private

Definition at line 393 of file CLPort.h.

◆ pBuffer [1/4]

CLP_PARAMS const CLUINT32 const CLINT8 * CLProtocol::CCLPort::pBuffer
private

Definition at line 375 of file CLPort.h.

◆ pBuffer [2/4]

const CLUINT32 const CLINT64 const CLINT8* CLProtocol::CCLPort::pBuffer
private

Definition at line 378 of file CLPort.h.

◆ pBuffer [3/4]

CLP_PARAMS const CLUINT32 const CLINT8* CLProtocol::CCLPort::pBuffer
private

Definition at line 393 of file CLPort.h.

◆ pBuffer [4/4]

CLINT8* CLProtocol::CCLPort::pBuffer
private

Definition at line 402 of file CLPort.h.

◆ pBufferSize [1/5]

CLUINT32* CLProtocol::CCLPort::pBufferSize
private

Definition at line 363 of file CLPort.h.

◆ pBufferSize [2/5]

const CLINT8 CLINT8 CLUINT32* CLProtocol::CCLPort::pBufferSize
private

Definition at line 366 of file CLPort.h.

◆ pBufferSize [3/5]

const CLUINT32 CLINT8 CLUINT32* CLProtocol::CCLPort::pBufferSize
private

Definition at line 369 of file CLPort.h.

◆ pBufferSize [4/5]

const CLUINT32 const CLINT8 CLINT8 CLUINT32* CLProtocol::CCLPort::pBufferSize
private

Definition at line 372 of file CLPort.h.

◆ pBufferSize [5/5]

CLINT8 CLUINT32* CLProtocol::CCLPort::pBufferSize
private

Definition at line 402 of file CLPort.h.

◆ pCookie

const CLINT8 CLINT8 CLUINT32 CLUINT32* CLProtocol::CCLPort::pCookie
private

Definition at line 366 of file CLPort.h.

◆ pDeviceID [1/2]

const CLINT8 CLINT8* CLProtocol::CCLPort::pDeviceID
private

Definition at line 366 of file CLPort.h.

◆ pDeviceID [2/2]

const CLUINT32 const CLINT8* CLProtocol::CCLPort::pDeviceID
private

Definition at line 372 of file CLPort.h.

◆ pDeviceIDTemplate

const CLINT8* CLProtocol::CCLPort::pDeviceIDTemplate
private

Definition at line 366 of file CLPort.h.

◆ pVersionMinor

CLUINT32* CLProtocol::CCLPort::pVersionMinor
private

Definition at line 390 of file CLPort.h.

◆ pXMLBuffer

const CLUINT32 const CLINT8 CLINT8* CLProtocol::CCLPort::pXMLBuffer
private

Definition at line 372 of file CLPort.h.

◆ pXMLIDs

const CLUINT32 CLINT8* CLProtocol::CCLPort::pXMLIDs
private

Definition at line 369 of file CLPort.h.

◆ s_IsSerialListInitialized

bool CLProtocol::CCLPort::s_IsSerialListInitialized
staticprivate

indicates if s_pSerialList is initialized

Definition at line 335 of file CLPort.h.

◆ s_pPrivateSerialList

SerialPortMap* CLProtocol::CCLPort::s_pPrivateSerialList
staticprivate

A list of all available proxies registers manually.

Definition at line 332 of file CLPort.h.

◆ s_pSerialList

SerialPortMap* CLProtocol::CCLPort::s_pSerialList
staticprivate

A list of all available proxies in the system.

Definition at line 329 of file CLPort.h.

◆ TimeOut [1/7]

CLP_PARAMS const CLUINT32 const CLINT8 const CLINT64 const CLUINT32 CLProtocol::CCLPort::TimeOut
private

Definition at line 366 of file CLPort.h.

◆ TimeOut [2/7]

const CLUINT32 CLINT8 CLUINT32 const CLUINT32 CLProtocol::CCLPort::TimeOut
private

Definition at line 369 of file CLPort.h.

◆ TimeOut [3/7]

const CLUINT32 const CLINT8 CLINT8 CLUINT32 const CLUINT32 CLProtocol::CCLPort::TimeOut
private

Definition at line 372 of file CLPort.h.

◆ TimeOut [4/7]

const CLUINT32 const CLINT64 CLINT8 const CLINT64 const CLUINT32 CLProtocol::CCLPort::TimeOut
private

Definition at line 375 of file CLPort.h.

◆ TimeOut [5/7]

const CLUINT32 const CLINT64 const CLINT8 const CLINT64 const CLUINT32 CLProtocol::CCLPort::TimeOut
private

Definition at line 378 of file CLPort.h.

◆ TimeOut [6/7]

const CLUINT32 const BOOL8 const CLUINT32 CLProtocol::CCLPort::TimeOut
private

Definition at line 381 of file CLPort.h.

◆ TimeOut [7/7]

CLP_PARAMS const CLUINT32 const CLINT8 const CLINT64 const CLUINT32 CLProtocol::CCLPort::TimeOut
private

Definition at line 393 of file CLPort.h.


The documentation for this class was generated from the following file:


rc_genicam_api
Author(s): Heiko Hirschmueller
autogenerated on Wed Dec 4 2024 03:10:12