BPNGClientLib
Library for accessing the Telemotive data logger devices
Classes | Functions
IBPNGClient.h File Reference

Interface class for the BPNGClient DLL. More...

#include "BPNGDefines.h"
#include "RdbDefines.h"
#include "IClientProperties.h"
#include "IBPNGClientListener.h"

Go to the source code of this file.

Classes

struct  IBPNGClient
 Interface class for the Telemotive Client Library. More...
 

Functions

DECLDIR const char *WINAPI getLibVersion ()
 Returns the current client library version.
 
DECLDIR IBPNGClient *WINAPI getBPNGClient (const char *name="")
 Factory function that creates instances of BPNGClient giving away ownership. More...
 
DECLDIR BPNGErrCode WINAPI getNumTSLMemberFromOfflineDataSet (const char *offlinePath, int *numMember)
 
DECLDIR void WINAPI setTempDir (const char *tmp)
 Sets the directory where all temporary files are created. If not called, the default system's tmp dir is used.
 
DECLDIR const char *WINAPI getTempDir ()
 
DECLDIR void WINAPI setLanguageID (LanguageID id)
 Sets the language for status messages.
 
DECLDIR IConversionSet *WINAPI createNewConversionSet ()
 returns a new created conversionset
 
DECLDIR void WINAPI freeConversionSetMemory (IConversionSet *convSet)
 
DECLDIR IClientProperties *WINAPI createNewClientProperties ()
 
DECLDIR void WINAPI freeClientPropertiesMemory (IClientProperties *prop)
 
DECLDIR void WINAPI writeLogFile (const char *path, int maxSizeInByte, int numBackupFiles)
 
DECLDIR void WINAPI writeLogToCout (bool flag)
 
DECLDIR void WINAPI writeLogToDebugView (bool flag)
 
DECLDIR void WINAPI addLogListener (onLogRequest logFunc)
 Adds a log listener to the library. More...
 
DECLDIR void WINAPI removeLogListener (onLogRequest logFunc)
 Removes a log listener from the library.
 
DECLDIR OnlineLoggerInfo createEmptyOnlineLoggerInfo ()
 

Detailed Description

Interface class for the BPNGClient DLL.

Author
Markus van Pinxteren
Date
21.04.2010

Function Documentation

◆ addLogListener()

DECLDIR void WINAPI addLogListener ( onLogRequest  logFunc)

Adds a log listener to the library.

If you want to receive the debug outputs from the client library, you can set a log listener to the lib. All set listeners get the log outputs from all BPNGClient instances.

All log outputs are forwarded to the registered listeners by calling the onLogRequest function that was added.

See also
onLogRequest

◆ createEmptyOnlineLoggerInfo()

DECLDIR OnlineLoggerInfo createEmptyOnlineLoggerInfo ( )

Creates an empty OnlineLoggerInfo. Use this function for devices if the LoggerDetector won't work in your network.

Don't forget to fill the neccessary fields.

See also
OnlineLoggerInfo

◆ createNewClientProperties()

DECLDIR IClientProperties* WINAPI createNewClientProperties ( )

After modifying the properties, you can set them to an instance of IBPNGClient with setClientProperties();

See also
IClientProperties, setClientProperties()

◆ freeClientPropertiesMemory()

DECLDIR void WINAPI freeClientPropertiesMemory ( IClientProperties prop)

To free memory of IClientProperties, use this method. Otherwise the memory will be freed when detaching the DLL from process. Never call any function of an IClientProperties pointer after passing the pointer to the freeClientPropertiesMemory function. This would cause a heap corruptions.

◆ freeConversionSetMemory()

DECLDIR void WINAPI freeConversionSetMemory ( IConversionSet convSet)

To free memory of a IConversionSet, use this method. Otherwise the memory will be freed when detaching the DLL from process. Never call any function of an IConversionSet after passing the pointer to the freeConversionSetMemory function. This would cause a heap corruptions.

◆ getBPNGClient()

DECLDIR IBPNGClient* WINAPI getBPNGClient ( const char *  name = "")

Factory function that creates instances of BPNGClient giving away ownership.

The instance is created on the heap and the allocated memory must be freed by the calling application. You can pass a name to this function. This will be the name of the created instance.

See also
IBPNGClient::release(), IBPNGClient::getInstanceName()

◆ getNumTSLMemberFromOfflineDataSet()

DECLDIR BPNGErrCode WINAPI getNumTSLMemberFromOfflineDataSet ( const char *  offlinePath,
int *  numMember 
)

Read out the number of TSL members from a offline data set.

◆ writeLogFile()

DECLDIR void WINAPI writeLogFile ( const char *  path,
int  maxSizeInByte,
int  numBackupFiles 
)

From version 2.1.1 on the client library doesn't write log messages to std::cout by default. The lib actually doesn't write a log at all unless this function is called. A log file is created under the passed path. If the file already exists, the logs will be appended. The file will be closed when the DLL is detached from the process.

◆ writeLogToCout()

DECLDIR void WINAPI writeLogToCout ( bool  flag)

The library's log output can also be written to std::cout. If this is required activate cout log with this function. Default is no cout ouput.