OpcUaCanOpen
CANopen OPC-UA server
CanModule::CanLibLoaderWin Class Reference

#include <CanLibLoaderWin.h>

Inherits CanModule::CanLibLoader.

Public Member Functions

void ErrorExit (LPTSTR lpszFunction)
 Retrieve the system error message for the last-error code this seems to return error code 0 even if lib pointer is NULL. More...
 
 CanLibLoaderWin (const std::string &libName)
 
virtual ~CanLibLoaderWin ()
 
- Public Member Functions inherited from CanModule::CanLibLoader
virtual ~CanLibLoader ()
 
SHARED_LIB_EXPORT_DEFN CanModule::CCanAccessopenCanBus (std::string name, std::string parameters)
 
SHARED_LIB_EXPORT_DEFN void closeCanBus (CanModule::CCanAccess *cca)
 

Protected Member Functions

virtual void dynamicallyLoadLib (const std::string &libName)
 The dll is loaded trough LoadLibrary (Windows API) but error reporting is poor. More...
 
virtual CCanAccesscreateCanAccess ()
 Once the library is loaded, resolve the function getHalAccess, which will give us an instance of the wanted object: "access" One access instance corresponds to one CAN port (and whatever is needed on the computer side: ethernet, USB, whatnot) More...
 
- Protected Member Functions inherited from CanModule::CanLibLoader
 CanLibLoader (const std::string &libName)
 

Private Attributes

HMODULE m_pDynamicLibrary
 

Additional Inherited Members

- Static Public Member Functions inherited from CanModule::CanLibLoader
static SHARED_LIB_EXPORT_DEFN CanLibLoadercreateInstance (const std::string &libName)
 
- Public Attributes inherited from CanModule::CanLibLoader
Log::LogComponentHandle lh
 

Detailed Description

Definition at line 33 of file CanLibLoaderWin.h.

Constructor & Destructor Documentation

◆ CanLibLoaderWin()

CanModule::CanLibLoaderWin::CanLibLoaderWin ( const std::string &  libName)

Definition at line 69 of file CanLibLoaderWin.cpp.

◆ ~CanLibLoaderWin()

CanModule::CanLibLoaderWin::~CanLibLoaderWin ( )
virtual

Definition at line 76 of file CanLibLoaderWin.cpp.

Member Function Documentation

◆ createCanAccess()

CanModule::CCanAccess * CanModule::CanLibLoaderWin::createCanAccess ( )
protectedvirtual

Once the library is loaded, resolve the function getHalAccess, which will give us an instance of the wanted object: "access" One access instance corresponds to one CAN port (and whatever is needed on the computer side: ethernet, USB, whatnot)

Implements CanModule::CanLibLoader.

Definition at line 120 of file CanLibLoaderWin.cpp.

◆ dynamicallyLoadLib()

void CanModule::CanLibLoaderWin::dynamicallyLoadLib ( const std::string &  libName)
protectedvirtual

The dll is loaded trough LoadLibrary (Windows API) but error reporting is poor.

Use extended API method for this to get around the signing at least. ===AnaGate libs are NOT INSTALLED on the system, so make sure the vendor libs in question are in the search path: copy them to the bin exec dir. ===Systec libs are in fact installed into the system C:.dll or so, so for systec nothing has to be done. In fact this is unclean, but that is what they deliver.

Implements CanModule::CanLibLoader.

Definition at line 88 of file CanLibLoaderWin.cpp.

◆ ErrorExit()

void CanModule::CanLibLoaderWin::ErrorExit ( LPTSTR  lpszFunction)

Retrieve the system error message for the last-error code this seems to return error code 0 even if lib pointer is NULL.

Definition at line 38 of file CanLibLoaderWin.cpp.

Member Data Documentation

◆ m_pDynamicLibrary

HMODULE CanModule::CanLibLoaderWin::m_pDynamicLibrary
private

Definition at line 49 of file CanLibLoaderWin.h.


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