BPNGClientLib
Library for accessing the Telemotive data logger devices
Public Member Functions | List of all members
IBPNGClient Struct Referenceabstract

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

#include <IBPNGClient.h>

Public Member Functions

virtual void WINAPI scanNetworkForLogger ()=0
 Scan network for logger. More...
 
virtual void WINAPI activateGatewayLoggerDetection ()=0
 Activates the detection of devices connected to a different subnet. More...
 
virtual void WINAPI setDevice (const OnlineLoggerInfo &device)=0
 Sets the device, the IBPNGClient instance should operate with (download data, change configuration, update firmware, etc.) More...
 
virtual void WINAPI setTSLCluster (TSLCluster cluster)=0
 Sets the TSL cluster, the IBPNGClient instance should operate with (download data, change configuration, update firmware, etc.) More...
 
virtual BOOL WINAPI setOfflineData (const char *path)=0
 Sets the path to offline data set the IBPNGClient instance should operate with (conversion) More...
 
virtual BOOL WINAPI connect ()=0
 Connect to device or TSL set by setDevice() or setTSLCluster()
 
virtual BOOL WINAPI connectLogger (int numLogger, OnlineLoggerInfo *devices)=0
 Connect to passed loggers. More...
 
virtual void WINAPI disconnectLogger ()=0
 Disconnect the currently connected logger.
 
virtual BOOL WINAPI isConnected ()=0
 Check the logger connection, returns 1 for valid connection and 0 for no or broken connection.
 
virtual void WINAPI registerAll ()=0
 Static registration of all messages and formats.
 
virtual BOOL WINAPI initialize ()=0
 Initialization of download and conversion process. More...
 
virtual int WINAPI downloadDataSpans (uint16_t numSpans, DataSpan *dataSpans, const char *target, BOOL doSorting)=0
 Download trace data. More...
 
virtual int WINAPI startLiveDownload (uint64_t startTimeStamp, const char *target)=0
 
virtual IConversionSet *WINAPI createNewConversionSet ()=0
 Returns the pointer to a new conversion set. More...
 
virtual int WINAPI convertData (IConversionSet *conversionSet, const char *target)=0
 Convert all data specified by conversionSet. More...
 
virtual BOOL WINAPI getConfig (const char *path)=0
 Download the current logger configuration to the passed path. More...
 
virtual BOOL WINAPI reconfigLogger (int numLogger, OnlineLoggerInfoStringPair *loggerConfigPathPairs, const char *xsdVersionOfConfig=nullptr)=0
 Reconfig logger with the zipped new configuration. More...
 
virtual BOOL WINAPI setDefaultConfig ()=0
 Reconfig logger/TSL with the default configuration. More...
 
virtual IRdbEventList *WINAPI getEventList ()=0
 Get list of all events from the RDB. More...
 
virtual IRdbTraceBlockList *WINAPI getTraceBlockList ()=0
 Get list of all trace blocks from the RDB. More...
 
virtual BOOL WINAPI synchronizeRdb ()=0
 Synchronizes the RDB. More...
 
virtual const char *WINAPI getInstanceName ()=0
 Return the instance name passed to the getBPNGClient() function.
 
virtual int WINAPI getInstanceId ()=0
 Returns the instance ID that is unique for all IBPNGClient instances in one process.
 
virtual const char *WINAPI getReferenceDataBasePath ()=0
 Get path to the reference data base. More...
 
virtual const char *WINAPI getConfigPath ()=0
 Get path to the config directory (after calling one of the init functions) More...
 
virtual const char *WINAPI getDeviceName ()=0
 Get name of device. More...
 
virtual const IChannelList *WINAPI getLoggerChannels ()=0
 Returns pointer to a channel list interface. More...
 
virtual const ITesttoolsChannelList *WINAPI getLoggerTesttoolsChannels ()=0
 
virtual BOOL WINAPI getVersions (OnlineLoggerInfoStringPair *versionPairs)=0
 Get the firmware and hardware version. More...
 
virtual const char *WINAPI getTMTVersion ()=0
 Get the current tmt version string.
 
virtual BOOL WINAPI updateFirmware (OnlineLoggerInfoStringPair *loggerFirmwareUpdatePacketPair, BOOL force)=0
 Update firmware. More...
 
virtual BOOL WINAPI updatePBFirmware (OnlineLoggerInfoStringPair *loggerFirmwareUpdatePacketPair, BOOL force)=0
 
virtual const char *WINAPI getInternalPBVersion (OnlineLoggerInfoStringPair *loggerFirmwareUpdatePacketPair)=0
 
virtual BOOL WINAPI isUserAuthentificated (PwdPrivilegesFuncId actionName)=0
 
virtual BOOL WINAPI updateLicenses (OnlineLoggerInfoStringPair *loggerLicenseFilePair)=0
 Update licenses. More...
 
virtual const char *WINAPI getLicenses (unsigned deviceMbnr)=0
 Returns the license file's content of the specified device as string. More...
 
virtual BOOL WINAPI removeAllLicenses ()=0
 Removes the current license file from the logger. More...
 
virtual int WINAPI deleteSectionsByStartUpIds (uint16_t numStartUpIds, uint64_t *startupIds)=0
 Delete trace data. More...
 
virtual int WINAPI deleteAllData ()=0
 Delete all trace data on the logger. More...
 
virtual BOOL WINAPI setInfoEvent (const char *msg)=0
 Set an info event with the passed string on the connected logger. More...
 
virtual BOOL WINAPI setMarker ()=0
 Set a marker on the connected logger. Returns 0 on error. More...
 
virtual int WINAPI getCurrentLoggerTime ()=0
 Returns the current loggertime in seconds since 01.01.1970 UTC.
 
virtual int WINAPI setTime (int time)=0
 Set logger time and date to the passed UTC time stamp. More...
 
virtual void WINAPI keepLoggerAlive (const char *ip)=0
 Call this to keep logger alive. More...
 
virtual void WINAPI stopKeepLoggerAlive (const char *ip)=0
 Called to stop sending keep alive pings to the logger specified via the passed ip.
 
virtual OnlineLoggerInfo *WINAPI getOnlineLoggerInfo (const char *ip)=0
 Retreive an OnlineLoggerInfo for a particular IP address.
 
virtual IFormatList *WINAPI getAvailableFormats ()=0
 Return pointer to a format list interface. Returns null in case of error. More...
 
virtual void WINAPI flashDeviceLED ()=0
 Let the connected device blink its front LEDs for identification. More...
 
virtual int WINAPI createCCPXCPSeqFile (const char *xsdDir, const char *xmlDir, bool forceFlag)=0
 Parse CCPXCPMeasurement.xml and CCPXCPConfiguration.xml and create CCPXCPSequence.xml.
 
virtual int WINAPI createCCPXCPDbcFiles (const char *dbcDir, const char *xsdDir, const char *xmlDir)=0
 Parse CCPXCPMeasurement.xml and CCPXCPConfiguration.xml and create a Vector DBC file for each device.
 
virtual const IFalseMeasureSignalList *WINAPI getFalseMeasureSignals ()=0
 Return pointer to a false measure signal list interface. More...
 
virtual void WINAPI addListener (IBPNGClientListener *listener)=0
 Add a listener.
 
virtual void WINAPI removeListener (IBPNGClientListener *listener)=0
 Remove a listener.
 
virtual BPNGError WINAPI getLastError ()=0
 Get last error code. More...
 
virtual int WINAPI getNumConversionErrors ()=0
 Returns the number of errors occured during the last conversion process. More...
 
virtual BPNGError WINAPI getConversionError (int index)=0
 Returns the conversion error at index. More...
 
virtual int WINAPI getNumDownloadErrors ()=0
 Returns the number of errors occured during the last download process. More...
 
virtual BPNGError WINAPI getDownloadError (int index)=0
 Returns the download error at index. More...
 
virtual const char *WINAPI getFWVersion ()=0
 Returns the current fw version.
 
virtual void WINAPI release ()=0
 Free memory of this IBPNGClient instance. More...
 
virtual IClientProperties *WINAPI getClientProperties ()=0
 
virtual void WINAPI setClientProperties (IClientProperties *properties)=0
 
virtual void WINAPI saveProperties (const char *pathToIniFile)=0
 Save properties to ini file.
 
virtual void WINAPI loadProperties (const char *pathToIniFile)=0
 Load properties from ini file.
 
virtual void WINAPI clearDBCFileAssignments ()=0
 Remove all DBC file assignments. More...
 
virtual void WINAPI clearDatabaseFileAssignments ()=0
 Remove all database file assignments.
 
virtual void WINAPI assignDBCFile (int channelIndexCAN, const char *dbcFilePath)=0
 Assign a DBC file to a CAN channel. Multiple files for one CAN channel are allowed, but double used message IDs will ignored. More...
 
virtual void WINAPI assignDatabaseFile (ChannelType channelType, int channelIndex, const char *databaseFilePath)=0
 Assign a database file to a channel. Multiple files for one channel are allowed, but double used message IDs will ignored. More...
 
virtual int WINAPI resetMarkerCounter ()=0
 Reset marker counter.
 
virtual int WINAPI setPwdFile (const char *path, unsigned targetMbnr)=0
 
virtual const char *WINAPI getPwdFile (unsigned sourceMbnr)=0
 
virtual BOOL WINAPI isPasswordProtectionSupported (unsigned deviceMbnr)=0
 
virtual int WINAPI downloadBugReport (const char *targetPath, BPNGBugreportMode mode, uint64_t startTime, uint64_t endTime)=0
 Download bug report. More...
 
virtual int WINAPI restartDevice (BOOL waitForRestart)=0
 restarts the device or TSL More...
 
virtual int WINAPI shutdownDevice ()=0
 shut down the device or TSL More...
 
virtual BOOL WINAPI getMemoryFillLevel (MemoryFillLevel *fillLevel)=0
 get memory fill level of device More...
 
virtual BOOL WINAPI convertFileNameTimeStampsToLocalTime (const char *pathToOfflineDataSet)=0
 Converts all time stamps in an offline data set's file names to local time.
 
virtual BOOL WINAPI filterSignals (const char *pathToFilterSettings, const char *targetPath)=0
 Signal filtering. More...
 
virtual BOOL WINAPI filterSignalsFromOfflineData (const char *pathToOfflineDataSet, const char *pathToFilterSettings, const char *targetPath)=0
 Signal filtering. More...
 
virtual int WINAPI createTestReport (IConversionSet *conversionSet, const char *target)=0
 easy track test report creation More...
 
virtual void WINAPI enableClientLogOutput ()=0
 enable ClientLogUtil output More...
 

Detailed Description

Interface class for the Telemotive Client Library.

IBPNGClient is the interface class of the blue PiraT Client library. To get access to any Telemotive data logger except "blue PiraT 1" you need a pointer to an inplementing instance of the IBPNGClient interface. Use getBPNGClient() to get such a pointer. This will create an implementing instance on the heap. To avoid conflicts between different runtime libraries it is obligatory to release this object with its IBPNGClient::release() function when not needed any more. Don't call the delete operator directly on this pointer.

To get access to a device chain combined via Telemotive System Link (TSL) you also need a pointer to an implementing instance of IBPNGClient interface. Since version 4.1.1 you can use the same factory function getBPNGClient(). The prior method getTSLClient(int numTSLMember) is no longer available. Please see the documentation of the new methods setDevice(), setTSLCluster() and setOfflineData() regarding this issue.

Member Function Documentation

◆ activateGatewayLoggerDetection()

virtual void WINAPI IBPNGClient::activateGatewayLoggerDetection ( )
pure virtual

Activates the detection of devices connected to a different subnet.

Logger connected to a different subnet must be configured as DHCP client and must have anabled the PingToClient option to be detectable via the scanNetworkForLogger() function.

Calling this function will start a backgroud thread that waits for incoming pings of such devices.

◆ assignDatabaseFile()

virtual void WINAPI IBPNGClient::assignDatabaseFile ( ChannelType  channelType,
int  channelIndex,
const char *  databaseFilePath 
)
pure virtual

Assign a database file to a channel. Multiple files for one channel are allowed, but double used message IDs will ignored.

Supported database formats and channelTypes: CH_CAN (also CAN-FD): FIBEX, DBC, Autosar XML CH_FLEXRAY: FIBEX, Autosar XML CH_MII: Autosar XML Supported FIBEX versions: 3.1.0, 3.1.1, 4.0.0, 4.1.0, 4.1.1 Supported Autosar XML versions: 3.1.4.AI.4, 3.2.1, 3.2.2, 3.2.3, r4.0

◆ assignDBCFile()

virtual void WINAPI IBPNGClient::assignDBCFile ( int  channelIndexCAN,
const char *  dbcFilePath 
)
pure virtual

Assign a DBC file to a CAN channel. Multiple files for one CAN channel are allowed, but double used message IDs will ignored.

Deprecated:
, use function assignDatabaseFile() instead

will be removed with next vesion!

Parameters
channelIndexCANZero based CAN channel index
dbcFilePathAbsolute path to the dbc file

◆ clearDBCFileAssignments()

virtual void WINAPI IBPNGClient::clearDBCFileAssignments ( )
pure virtual

Remove all DBC file assignments.

Deprecated:
, use function clearDatabaseFileAssignments() instead

will be removed with next vesion!

◆ connectLogger()

virtual BOOL WINAPI IBPNGClient::connectLogger ( int  numLogger,
OnlineLoggerInfo devices 
)
pure virtual

Connect to passed loggers.

While the loggers are connected, they won't go to standby mode until the last IBPNGClient instance is disconnected. If connect fails the function will return 0. On success the return value is 1. In case of failure further information can be retrieved with getLastError().

Parameters
numLoggerthe number of passed OnlineLoggerInfo devices
devicespointer to first OnlineLoggerInfo
Returns
0 on failure, 1 on success

◆ convertData()

virtual int WINAPI IBPNGClient::convertData ( IConversionSet conversionSet,
const char *  target 
)
pure virtual

Convert all data specified by conversionSet.

Before data from a logger or an offline data set can be converted, IBPNGClient::initialize() must have been called before.

The data specified by conversionSet is converted to the passed target directory.

Function will return 0 on failure, 1 on success and -1 on user abort. In case of failure further information can be retrieved with getLastError().

If getLastError() returns BPNG_CONVERSION_ERRORS several errors occured. Use getNumConversionErrors() and getConversionError(int index) for detailed information.

Parameters
conversionSetconversion settings, see IConversionSet
targettarget directory for the converted trace files. Depending on the passed ClientProperties the files may be stored in sub folders named by date
Returns
0 on failure, 1 on success and -1 on user abort.

◆ createNewConversionSet()

virtual IConversionSet* WINAPI IBPNGClient::createNewConversionSet ( )
pure virtual

Returns the pointer to a new conversion set.

Deprecated:
, use static function createNewConversionSet() instead

◆ createTestReport()

virtual int WINAPI IBPNGClient::createTestReport ( IConversionSet conversionSet,
const char *  target 
)
pure virtual

easy track test report creation

This function creates test reports for every section started by START_TESTDRIVE and ended by END_TESTDRIVE. Every test report will get a own folder in the target directory, every timespan on conversionset is a failure and gets it own folder in the test report folder. All selected data in the conversion set will be converted in that failure folder.

Parameters
conversionSetconversion settings, see IConversionSet
targettarget directory for the test reports.
Returns
0 on failure, 1 on success and -1 on user abort.

◆ deleteAllData()

virtual int WINAPI IBPNGClient::deleteAllData ( )
pure virtual

Delete all trace data on the logger.

In case of failure further information can be retrieved with getLastError().

Returns
0 on failure, 1 on success and -1 on user abort.

◆ deleteSectionsByStartUpIds()

virtual int WINAPI IBPNGClient::deleteSectionsByStartUpIds ( uint16_t  numStartUpIds,
uint64_t *  startupIds 
)
pure virtual

Delete trace data.

Pass the size and the pointer to an array of RDB-DataBaseEntryIDs all from RdbEvents with RdbEventType 'STARTUP'. If you want to retrieve the section startupIds you have to call the initialize() function first to get the current RDB file.

Function will return 0 on failure, 1 on success and -1 on user abort. In case of failure further information can be retrieved with getLastError(). Note that this function is not available for blue PiraT Collect devices (BPNGDeviceType DEV_TRACE_COLL_DS).

Parameters
numStartUpIdsSize of the passed uint64_t array in second parameter
startupIdsArray of uint64_t, specifying the startupIds of the sections that should be deleted
Returns
0 on failure, 1 on success and -1 on user abort.

◆ downloadBugReport()

virtual int WINAPI IBPNGClient::downloadBugReport ( const char *  targetPath,
BPNGBugreportMode  mode,
uint64_t  startTime,
uint64_t  endTime 
)
pure virtual

Download bug report.

The downloaded bug report is a ZIP archive with several log data and system files for error analyzing purposes.

Parameters
targetPathPath inclusive file name under that the bug report will be stored.
modethat specifies what kind of data should be included in the report,
See also
BPNGBugreportMode
Parameters
startTimeStart time for the time span of trace data that should be included (usec since 01.01.1970 UTC). Only for mode BR_FULL_ALL_TRACES and BR_FULL_TIMESPAN_TRACES
endTimeEnd time for the time span of trace data that should be included (usec since 01.01.1970 UTC). Only for mode BR_FULL_ALL_TRACES and BR_FULL_TIMESPAN_TRACES
Returns
0 on failure, 1 on success and -1 on user abort.

◆ downloadDataSpans()

virtual int WINAPI IBPNGClient::downloadDataSpans ( uint16_t  numSpans,
DataSpan dataSpans,
const char *  target,
BOOL  doSorting 
)
pure virtual

Download trace data.

Pass the size and the pointer to an array of DataSpan. Each span specifies either a time span or an index span from the reference data base's entry IDs (DataBaseEntryId). IBPNGClient::initialize() must have been called before.

Function will return 0 on failure, 1 on success and -1 on user abort. In case of failure further information can be retrieved with getLastError().

If getLastError() returns BPNG_DOWNLOAD_ERRORS several errors occured. Use getNumDownloadErrors() and getDownloadError(int index) for detailed information.

Parameters
numSpansSize of the passed DataSpan array in second parameter
dataSpansArray of DataSpan, specifying the time or ID spans that should be downloaded
targetPath to the target directory or ZIP file. A passed directory must be empty or not existing. A passed ZIP path must not exist.
doSortingSpecifies whether the traces from different logger-internal sources should be sorted to one output stream or not.
Returns
0 on failure, 1 on success and -1 on user abort.

◆ enableClientLogOutput()

virtual void WINAPI IBPNGClient::enableClientLogOutput ( )
pure virtual

enable ClientLogUtil output

This function enable the output of class ClientLogUtil.

◆ filterSignals()

virtual BOOL WINAPI IBPNGClient::filterSignals ( const char *  pathToFilterSettings,
const char *  targetPath 
)
pure virtual

Signal filtering.

This function parses all data of the offline data set that was previously set via setOfflineData() and filters signals according to the complex filter settings created with the System Client.

Parameters
pathToFilterSettingpath to the ZIP file including the complex filter settings created with System Client
targetPathpath to the target directory where the filtered data should be written to

◆ filterSignalsFromOfflineData()

virtual BOOL WINAPI IBPNGClient::filterSignalsFromOfflineData ( const char *  pathToOfflineDataSet,
const char *  pathToFilterSettings,
const char *  targetPath 
)
pure virtual

Signal filtering.

This function parses all data of an offline data set and filters signals according to the complex filter settings created with the System Client.

Parameters
pathToOfflineDataSetpath to the offline data set
pathToFilterSettingpath to the ZIP file including the complex filter settings created with System Client
targetPathpath to the target directory where the filtered data should be written to

◆ flashDeviceLED()

virtual void WINAPI IBPNGClient::flashDeviceLED ( )
pure virtual

Let the connected device blink its front LEDs for identification.

You can use this function to identify you device if you can't identify it over the Name or IP address given from the IBPNGClientListener::onBPNGDeviceDetected callback function. On TSL all device LEDs will flash.

◆ getAvailableFormats()

virtual IFormatList* WINAPI IBPNGClient::getAvailableFormats ( )
pure virtual

Return pointer to a format list interface. Returns null in case of error.

All formats returned by this function are available for data conversion.

See also
IFormatList, IFormatInfo

◆ getClientProperties()

virtual IClientProperties* WINAPI IBPNGClient::getClientProperties ( )
pure virtual

◆ getConfig()

virtual BOOL WINAPI IBPNGClient::getConfig ( const char *  path)
pure virtual

Download the current logger configuration to the passed path.

If you download the current configuration from the data logger you get a zip Archive that contains all relevant XML and XSD files to modifiy the configuration in a valid way and reconfigurate the device with the reconfigLogger() function.

On TSL instance you have to pass a base path. All participants logger configurations will be saved as zip in that directory including a TSLConfig.txt file with additional informations.

Please note: It is up to you to ensure a valid configuration if you want to modify it with your own tools. You should only modify the xml and not the xsd files. "DeviceConfiguration.xml" and "FirmwareConfiguration.xml" should also not be modified. They specifiy all xml files that are mandatory to reconfigurate the data logger. You can validate the xml files with the supplied xsd files and a XML library of your choice. One possibility would be the XERCES library, see http://xerces.apache.org/xerces-c/

Parameters
pathThe path inclusive file name where to store the downloaded configuration ZIP file or on TSL the basepath for config zips

◆ getConfigPath()

virtual const char* WINAPI IBPNGClient::getConfigPath ( )
pure virtual

Get path to the config directory (after calling one of the init functions)

After calling IBPNGClient::initialize() this function returns the path to the current extracted configuration of the logger resp. the offline data set. On TSL instance you get paths to the config folders of every participant separated by ';': <configpath:1>;<configPath:2>;... for example C:\...\Telemotive_bp2\PNGINST25452\BPTSL_10.64.76.171_2\BP2Img_10.64.76.171_3_PID5452;C:\...\Telemotive_bp2\BPNGINST25452\BPTSL_10.64.76.171_2\BP2Img_10.64.76.206_4_PID5452;

Returns
Path to the folder containing the extracted config archive.

◆ getConversionError()

virtual BPNGError WINAPI IBPNGClient::getConversionError ( int  index)
pure virtual

Returns the conversion error at index.

After getting the number of conversion errors with getNumConversionErrors() you can get all single errors with this function.

◆ getDeviceName()

virtual const char* WINAPI IBPNGClient::getDeviceName ( )
pure virtual

Get name of device.

After calling IBPNGClient::initialize() this function returns the currently configured device name. On TSL the device names will be separated by ';'

Returns
The device name
See also
initialize()

◆ getDownloadError()

virtual BPNGError WINAPI IBPNGClient::getDownloadError ( int  index)
pure virtual

Returns the download error at index.

After getting the number of download errors with getNumDownloadErrors() you can get all single errors with this function.

◆ getEventList()

virtual IRdbEventList* WINAPI IBPNGClient::getEventList ( )
pure virtual

Get list of all events from the RDB.

The events of the device's or offline data set's RDB is returned. IBPNGClient::initialize() must have been called before

Returns
Pointer to a IRdbEventList

◆ getFalseMeasureSignals()

virtual const IFalseMeasureSignalList* WINAPI IBPNGClient::getFalseMeasureSignals ( )
pure virtual

Return pointer to a false measure signal list interface.

After calling the IBPNGClient::createCCPXCPDbcFiles() this function returns a pointer to a list with all measure signals which were ignored at DBC file generation.

See also
IFalseMeasureSignal

◆ getLastError()

virtual BPNGError WINAPI IBPNGClient::getLastError ( )
pure virtual

Get last error code.

If any called BPNGClient function returns a value that indicates an error you can retrieve further information about that error with this function.

Returns
The error description with error code and optional string value.
See also
BPNGError

◆ getLicenses()

virtual const char* WINAPI IBPNGClient::getLicenses ( unsigned  deviceMbnr)
pure virtual

Returns the license file's content of the specified device as string.

Parameters
deviceMbnrtarget device mainboardnumber
Returns
license file's content as string

◆ getLoggerChannels()

virtual const IChannelList* WINAPI IBPNGClient::getLoggerChannels ( )
pure virtual

Returns pointer to a channel list interface.

After calling IBPNGClient::initialize() this function returns a pointer to the logger's/TSL resp. offline data set's channel list.

In case of error null is returned and further information can be retrieved with getLastError().

See also
IChannelList

◆ getMemoryFillLevel()

virtual BOOL WINAPI IBPNGClient::getMemoryFillLevel ( MemoryFillLevel fillLevel)
pure virtual

get memory fill level of device

On TSL ensure the fillLevel structure has reserved enough space for all members

Parameters
fillLevelstructure description in bpngdefines
Returns
0 on failure, 1 on success

◆ getNumConversionErrors()

virtual int WINAPI IBPNGClient::getNumConversionErrors ( )
pure virtual

Returns the number of errors occured during the last conversion process.

If convertData() fails, getLastError() can return different kinds of errors. There are types of errors that won't interrupt the conversion process but will be gathered during conversion and notified at the end. In that case the error code returned by getLastError() will be BPNG_CONVERSION_ERRORS and you can get the number of errors with this function.

See also
getConversionError()

◆ getNumDownloadErrors()

virtual int WINAPI IBPNGClient::getNumDownloadErrors ( )
pure virtual

Returns the number of errors occured during the last download process.

If downloadDataSpans() fails, getLastError() can return different kinds of errors. There are types of errors that won't interrupt the download process but will be gathered during download and notified at the end. In that case the error code returned by getLastError() will be BPNG_DOWNLOAD_ERRORS and you can get the number of errors with this function.

See also
getDownloadError()

◆ getPwdFile()

virtual const char* WINAPI IBPNGClient::getPwdFile ( unsigned  sourceMbnr)
pure virtual

get the password file of device specified by the mainboardnumber

Parameters
sourceMbnrthe source device mainboardnumber
Returns
local path to file

◆ getReferenceDataBasePath()

virtual const char* WINAPI IBPNGClient::getReferenceDataBasePath ( )
pure virtual

Get path to the reference data base.

After calling IBPNGClient::initialize() this function returns the path to the current Reference Data Base of the logger resp. the offline data set. For online processes, the RDB is downloaded from the logger to a tmp directory. For offline processes from a ZIP archive, the RDB is extracted to a tmp directory. For offline processes from a directory this function just returns the path to the RDB inside this directory.

Returns
Path to the downloaded or extracted RDB file
See also
initialize()

◆ getTraceBlockList()

virtual IRdbTraceBlockList* WINAPI IBPNGClient::getTraceBlockList ( )
pure virtual

Get list of all trace blocks from the RDB.

Returns
Pointer to a IRdbEventList

◆ getVersions()

virtual BOOL WINAPI IBPNGClient::getVersions ( OnlineLoggerInfoStringPair versionPairs)
pure virtual

Get the firmware and hardware version.

On TSL ensure the versionPairs structure has reserved enough space for all members!

the versionPairs.value will be the firmware and version string the versionPairs.key.mbnr will be the referenced device. Only the mbnr field will be filled, the other fields will be empty!

Parameters
versionPairsstructure description in bpngdefines
Returns
0 on failure, 1 on success

◆ initialize()

virtual BOOL WINAPI IBPNGClient::initialize ( )
pure virtual

Initialization of download and conversion process.

For trace download and conversion this function must be called first. When operating on a network device, note you have to call the connect() function before.

Within this function the reference data base is read. Please note that reading a large RDB may take some time, especially in debug mode.

Function will return 0 on failure and 1 on success. In case of failure further information can be retrieved with getLastError().

Returns
0 on failure, 1 on success

◆ isPasswordProtectionSupported()

virtual BOOL WINAPI IBPNGClient::isPasswordProtectionSupported ( unsigned  deviceMbnr)
pure virtual

check if the device supports password protection

Parameters
deviceMbnrthe device
Returns
1 if the device supports password protection

◆ keepLoggerAlive()

virtual void WINAPI IBPNGClient::keepLoggerAlive ( const char *  ip)
pure virtual

Call this to keep logger alive.

The blue PiraT 2 data logger can be configured to go to standby after a specified timeout without any bus traffic on the connected interfaces. If you want to have access to a device without bus traffic, and you don't want to connect to it with connectLogger() you have to keep it alive by calling this function. This will start a separate thread that sends periodically ping messages to the passed IP address. Receiving these ping messages, the firmware will not shutdown the system.

Parameters
ipThe IP address of the logger that should be kept alive
See also
stopKeepLoggerAlive()

◆ reconfigLogger()

virtual BOOL WINAPI IBPNGClient::reconfigLogger ( int  numLogger,
OnlineLoggerInfoStringPair loggerConfigPathPairs,
const char *  xsdVersionOfConfig = nullptr 
)
pure virtual

Reconfig logger with the zipped new configuration.

Reconfigurates the logger/tsl with the passed configurations. The ZIP archive can be either one that was downloaded with the getConfig() method, stored by the client software or a modified one. If you want to create your own configuration ZIP archive the structure of this file must be the same as of those mentioned above (xml files inside an "etc" directory). The abstract.txt file and all *.xsd files are optional. The filename must include the current date in followed form: [YYYY-MM-DD_HH-MM-SS] -> Y=year, M=month, D=day, H=hour, M=minute, S=second

With the OnlineLoggerInfoStringPair structure you can assign the several configurations to the devices. OnlineLoggerInfoStringPair.key = OnlineLoggerInfo OnlineLoggerInfoStringPair.value = path to local config file

See also
OnlineLoggerInfoStringPair

Please note: It is up to you to ensure a valid configuration if you want to modify it with your own tools. You should only modify the xml and not the xsd files. "DeviceConfiguration.xml" and "FirmwareConfiguration.xml" should also not be modified. They specifiy all xml files that are mandatory to reconfigurate the data logger. You can validate the xml files with the supplied xsd files and a XML library of your choice. One possibility would be the XERCES library, see http://xerces.apache.org/xerces-c/

Parameters
numLoggerNumber of following OnlineLoggerInfoStringPair (should be equal to the number of devices on TSL)
loggerToConfigPathPairsPointer to first OnlineLoggerInfoStringPair
xsdVersionOfConfigxsd version of config version, required if the version differs from the logger config version. Requires FW 4.1.1 or higher. The xsd version can be found in the FirmwareConfiguration.xml.
Returns
0 on failure, 1 on success

◆ release()

virtual void WINAPI IBPNGClient::release ( )
pure virtual

Free memory of this IBPNGClient instance.

With the call of getBPNGClient() a new instance is created on the heap. The user is responsible to free its memory if it isn't needed any more. This function calls the delete operator on itself.

Important note: Any further function call on the IBPNGClient instance after release() was called will cause a memory access violation and will crash the application!

◆ removeAllLicenses()

virtual BOOL WINAPI IBPNGClient::removeAllLicenses ( )
pure virtual

Removes the current license file from the logger.

Removes the current license file from the logger.

Returns
true on success, false on failure

◆ restartDevice()

virtual int WINAPI IBPNGClient::restartDevice ( BOOL  waitForRestart)
pure virtual

restarts the device or TSL

Parameters
waitForRestartif 1 communication waits for the restart
Returns
0 on failure, 1 on success, -1 on false fw version

◆ scanNetworkForLogger()

virtual void WINAPI IBPNGClient::scanNetworkForLogger ( )
pure virtual

Scan network for logger.

This function sends one broadcast UDP messages via all network adapters and notifies the calling application about responding devices with the listener functions onBPNGDeviceDetected(), onBPNGDeviceDisappeared() and onBPNGDeviceStateChange() (see IBPNGClientListener.h). For each broadcast message sent, the function waits for 600ms for responding devices

The first function call notifies about all found devices. All following calls on the same IBPNGClient instance will only notify about changes to the previous call.

◆ setClientProperties()

virtual void WINAPI IBPNGClient::setClientProperties ( IClientProperties properties)
pure virtual
Parameters
Pointerto IClientProperties which can be retrieved from the static function createNewClientProperties() or from IBPNGClient::getClientProperties()
See also
IClientProperties, getClientProperties(), createNewClientProperties

◆ setDefaultConfig()

virtual BOOL WINAPI IBPNGClient::setDefaultConfig ( )
pure virtual

Reconfig logger/TSL with the default configuration.

An invalid configuration will set the logger/TSL in error state. To fix this one possibility is to set the logger's default configuration. On TSL every logger will be reset to default configuration.

Returns
0 on failure, 1 on success

◆ setDevice()

virtual void WINAPI IBPNGClient::setDevice ( const OnlineLoggerInfo device)
pure virtual

Sets the device, the IBPNGClient instance should operate with (download data, change configuration, update firmware, etc.)

Since Lib version 4.1.1 the proceeding who to connect to a device changed. Instead of passing the device resp. its IP address you want to operate with to the connect() function, the device must now be set with this function before calling connect(). If you don't use an OnlineLoggerInfo received via IBPNGClientListener::onBPNGDeviceDetected, only the IP parameter of OnlineLoggerInfo is obligatory. Example:

device.ip = "192.168.0.233";
client->setDevice(device);
client->connect();
See also
setTSLCluster, setOfflineData

◆ setInfoEvent()

virtual BOOL WINAPI IBPNGClient::setInfoEvent ( const char *  msg)
pure virtual

Set an info event with the passed string on the connected logger.

You can set an info event to the RDB. This event will be from type INFO and the passed message is written to the event's comment column

Returns
Returns 0 on failure, 1 on success

◆ setMarker()

virtual BOOL WINAPI IBPNGClient::setMarker ( )
pure virtual

Set a marker on the connected logger. Returns 0 on error.

You can set an marker to the RDB. The set event will be from type MARKER. On TSL the marker will be broadcasted internally.

Returns
Returns 0 on failure, 1 on success

◆ setOfflineData()

virtual BOOL WINAPI IBPNGClient::setOfflineData ( const char *  path)
pure virtual

Sets the path to offline data set the IBPNGClient instance should operate with (conversion)

Since Lib version 4.1.1 the proceeding who to process offline data changed. Instead of passing the file path directly to the initOnline() function, the file path must now be set with this function before calling initialize().

◆ setPwdFile()

virtual int WINAPI IBPNGClient::setPwdFile ( const char *  path,
unsigned  targetMbnr 
)
pure virtual

set the password file on device specified by the mainboardnumber

Parameters
pathlocal path of password file
targetMbnrthe target device mainboardnumber
Returns
0 on failure, 1 on success

◆ setTime()

virtual int WINAPI IBPNGClient::setTime ( int  time)
pure virtual

Set logger time and date to the passed UTC time stamp.

The parameter time must be in seconds since 01.01.1970 UTC. On TSL the new time will be applied on every device.

Returns
-1 on clientLib busy, 0 on failure, 1 on success

◆ setTSLCluster()

virtual void WINAPI IBPNGClient::setTSLCluster ( TSLCluster  cluster)
pure virtual

Sets the TSL cluster, the IBPNGClient instance should operate with (download data, change configuration, update firmware, etc.)

Since Lib version 4.1.1 the proceeding who to connect to a TSL changed. Instead of passing the devices directly to the connect() function, the TSL must now be set with this function before calling connect(). You can use objects of TSLClusterImpl provided with the library package or create your own TSLCluster instance. Example:

dev1.ip = "10.23.224.178";
dev2.ip = "10.23.224.56";
cluster.addDevice(dev1);
cluster.addDevice(dev2);
client->setTSLCluster(cluster.getTSLCluster());
client->connect();

◆ shutdownDevice()

virtual int WINAPI IBPNGClient::shutdownDevice ( )
pure virtual

shut down the device or TSL

Returns
0 on failure, 1 on success, -1 on false fw version

◆ startLiveDownload()

virtual int WINAPI IBPNGClient::startLiveDownload ( uint64_t  startTimeStamp,
const char *  target 
)
pure virtual

Downloads all available trace data younger than startTimeStamp from connected device and continues downloading all new captured traces periodically until an added listener returns zero in the implementation of IBNGClientListener::onDownloadProgress().

Parameters
startTimeStampTraces younger than this time stamp will be downloaded
targetTarget path where offline data should be stored. Can be a directory or ZIP archive. If directory or ZIP name contains placeholder 'ENDTIME', the file/folder name will be renamed when download was stopped by replacing 'ENDTIME' with the maximum downloaded trace time stamp

◆ synchronizeRdb()

virtual BOOL WINAPI IBPNGClient::synchronizeRdb ( )
pure virtual

Synchronizes the RDB.

After calling initialize() once you can use this function to synchronize the RDB that getEventList() and getTraceBlockList() will return the updated lists.

◆ updateFirmware()

virtual BOOL WINAPI IBPNGClient::updateFirmware ( OnlineLoggerInfoStringPair loggerFirmwareUpdatePacketPair,
BOOL  force 
)
pure virtual

Update firmware.

This function updates the logger's firmware. An internal version check is done. If the second parameter force is 0 only firmware components with an older version then the component's version inside the firmware packet will be updated.

Parameters
loggerToFirmwareUpdatePacketPairA pair with key=OnlineLoggerInfo, the device to be updated and value=local path to firmware packet
forceFlag whether to update the components independently from the components' versions
Returns
0 on failure, 1 on success

◆ updateLicenses()

virtual BOOL WINAPI IBPNGClient::updateLicenses ( OnlineLoggerInfoStringPair loggerLicenseFilePair)
pure virtual

Update licenses.

Overwrites the current license file with the new one.

Parameters
loggerLicenseFilePairA pair with key=OnlineLoggerInfo, the device to be updated and value=local path to licsene file
Returns
0 on failure, 1 on success

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