BPNGClientLib
Library for accessing the Telemotive data logger devices
Public Member Functions | List of all members
IBPNGClientListener Struct Referenceabstract
Inheritance diagram for IBPNGClientListener:
BPNGLoggerDetector

Public Member Functions

virtual void WINAPI onBPNGDeviceDetected (OnlineLoggerInfo *info)=0
 Called to notify a detected logger in network. More...
 
virtual void WINAPI onBPNGDeviceDisappeared (OnlineLoggerInfo *info)=0
 Called to notify a disappeared logger. More...
 
virtual void WINAPI onBPNGDeviceStateChange (OnlineLoggerInfo *info)=0
 Called to notify a logger's state change. More...
 
virtual int WINAPI onProgressDataDownload (int percentCompleted)=0
 Called to indicate the current progress of a data transfer. More...
 
virtual int WINAPI onProgressDataDownload (int percentCompleted, uint64_t downloadedSize, uint64_t totalSize)=0
 Called to indicate the current progress of a data transfer. More...
 
virtual int WINAPI onProgressConversion (int percentCompleted, const char *status)=0
 Called to indicate the current progress of file conversion. More...
 
virtual int WINAPI onProgressDeletion (int percentCompleted)=0
 Called to indicate the current progress of file deletion. More...
 
virtual void WINAPI onStatusMessage (const char *statusMsg)=0
 Called to send additional information of the current process to the calling app. More...
 
virtual int WINAPI onDataRecoverProgress (const char *statusMsg, int percentage)=0
 Called to send additional information of the current data recovery progress. More...
 
virtual void WINAPI onWarning (BPNGWarningCode warningCode, const char *warnMsg)=0
 Called to inform about a warning. More...
 
virtual int WINAPI onTargetPathTooLong (char *newTarget, int maxSize)=0
 Called on a too long target directory. More...
 
virtual int WINAPI getOverwritingPermission (const char *filePath)=0
 Called on existing output trace files. More...
 
virtual const char *WINAPI onLogInDataRequired (unsigned mbnr)=0
 Called on accessing password protected functions. More...
 
virtual void WINAPI onInvalidPwConfigFound (unsigned mbnr)=0
 Called if invalid pw file found on device. More...
 
virtual void WINAPI onLogInDataFailed ()=0
 
virtual void WINAPI onResetLogInDataFailed ()=0
 
virtual void WINAPI onFuncAccessDenied ()=0
 
virtual int WINAPI onCriticalDiskSpace (uint64_t freeSpace, uint64_t neededSpace, const char *drive, const char *msg)=0
 Called in case of not enough free diskspace. More...
 
virtual void WINAPI onFirmwareUpdateProgress (int percentage, int stepId, int subStepId, const char *desc)=0
 Called on firmware update progress.
 
virtual void WINAPI onFirmwareUpdateError (int errorId)=0
 
virtual int WINAPI onGetLogReportProgress (int percentage, const char *desc)=0
 
virtual void WINAPI onDownloadStart (int64_t totalAmountOfBytes)=0
 Notifies the listeners before the download starts about the total amount of bytes to be downloaded. More...
 
virtual void WINAPI onConversionStart (int64_t totalAmountOfBytes)=0
 Notifies the listeners before the conversion starts about the total amount of bytes to be converted. More...
 
virtual const char *WINAPI onExtractionPasswordRequired (unsigned int retryCount)=0
 
virtual bool WINAPI isTerminateLiveDownloadRequest ()=0
 Called periodically on live download to query whether the permanent download should be finished.
 

Member Function Documentation

◆ getOverwritingPermission()

virtual int WINAPI IBPNGClientListener::getOverwritingPermission ( const char *  filePath)
pure virtual

Called on existing output trace files.

When an output trace file already exists this function is called. The listener has the possibility to return one of following values: -1: no, don't overwrite file -2: no, overwrite neither this nor any following file 1: yes, overwrite file 2: yes, overwrite this and all following files 0: cancel conversion

Implemented in BPNGLoggerDetector.

◆ onBPNGDeviceDetected()

virtual void WINAPI IBPNGClientListener::onBPNGDeviceDetected ( OnlineLoggerInfo info)
pure virtual

Called to notify a detected logger in network.

All char* of the passed OnlineLoggerInfo* are only valid for the time of the function call. Please ensure to copy the string values.

Implemented in BPNGLoggerDetector.

◆ onBPNGDeviceDisappeared()

virtual void WINAPI IBPNGClientListener::onBPNGDeviceDisappeared ( OnlineLoggerInfo info)
pure virtual

Called to notify a disappeared logger.

All char* of the passed OnlineLoggerInfo* are only valid for the time of the function call. Please ensure to copy the string values.

Implemented in BPNGLoggerDetector.

◆ onBPNGDeviceStateChange()

virtual void WINAPI IBPNGClientListener::onBPNGDeviceStateChange ( OnlineLoggerInfo info)
pure virtual

Called to notify a logger's state change.

All char* of the passed OnlineLoggerInfo* are only valid for the time of the function call. Please ensure to copy the string values.

Implemented in BPNGLoggerDetector.

◆ onConversionStart()

virtual void WINAPI IBPNGClientListener::onConversionStart ( int64_t  totalAmountOfBytes)
pure virtual

Notifies the listeners before the conversion starts about the total amount of bytes to be converted.

Parameters
totalAmountOfBytesTotal data size to be converted

Implemented in BPNGLoggerDetector.

◆ onCriticalDiskSpace()

virtual int WINAPI IBPNGClientListener::onCriticalDiskSpace ( uint64_t  freeSpace,
uint64_t  neededSpace,
const char *  drive,
const char *  msg 
)
pure virtual

Called in case of not enough free diskspace.

This notifies the listener about not enough free disk space for data download or conversion. The user can continue or abort the process. Returning 0 will abort the process. In some cases continuing without providing more disk space will call this function immediately again.

Parameters
freeSpaceAmount of free space
neededSpaceAmount of needed space
driveName of the drive where to store data
msgAdditional message to display
Returns
return 0 when process should be aborted, 1 to ignore

Implemented in BPNGLoggerDetector.

◆ onDataRecoverProgress()

virtual int WINAPI IBPNGClientListener::onDataRecoverProgress ( const char *  statusMsg,
int  percentage 
)
pure virtual

Called to send additional information of the current data recovery progress.

This function transmit message informations for the data recovery process. Those messages are only for information purpose. The information contains a String information about the current data recovery process and int value which contains a percent value for progressbar

Implemented in BPNGLoggerDetector.

◆ onDownloadStart()

virtual void WINAPI IBPNGClientListener::onDownloadStart ( int64_t  totalAmountOfBytes)
pure virtual

Notifies the listeners before the download starts about the total amount of bytes to be downloaded.

Parameters
totalAmountOfBytesTotal data size to be downloaded

Implemented in BPNGLoggerDetector.

◆ onExtractionPasswordRequired()

virtual const char* WINAPI IBPNGClientListener::onExtractionPasswordRequired ( unsigned int  retryCount)
pure virtual

Notifies the listeners that a password for an archive extraction is required, this will be called on EVERY archive that needs a password nethertheless a password was already entered. Already entered passwords should be handled by the callbacked instance.

Parameters
retryCountnumber of attempty on one file, on zero its first try The callbacked instance can save a password list and try every password on the list, if retryCount is zero the list should be handled from the start. If no password is left return 0.

Implemented in BPNGLoggerDetector.

◆ onGetLogReportProgress()

virtual int WINAPI IBPNGClientListener::onGetLogReportProgress ( int  percentage,
const char *  desc 
)
pure virtual

Called on creation of log report

Returns
return value 0 indicates an abort request from the implementing class

Implemented in BPNGLoggerDetector.

◆ onInvalidPwConfigFound()

virtual void WINAPI IBPNGClientListener::onInvalidPwConfigFound ( unsigned  mbnr)
pure virtual

Called if invalid pw file found on device.

An error may occure on transfering the password configuration to the device, as a result the password configuration is invalid and needs to be reset to default. Inform the user.

Implemented in BPNGLoggerDetector.

◆ onLogInDataRequired()

virtual const char* WINAPI IBPNGClientListener::onLogInDataRequired ( unsigned  mbnr)
pure virtual

Called on accessing password protected functions.

When password protected functions are called this listener function queries for login parameters that must be returned from the implementing class.

Parameters
ipAddressIP address of the password protected device
Returns
Implementing class must return the username and passwort separated by a slash, e.g. "Tester/tge6ht". If an empty string is returned the login process will be aborted.

◆ onProgressConversion()

virtual int WINAPI IBPNGClientListener::onProgressConversion ( int  percentCompleted,
const char *  status 
)
pure virtual

Called to indicate the current progress of file conversion.

This function notifies the listener about the conversion progress of the raw Telemotive trace data. If the percentCompleted value has changed, but the status is still the same, the application passes an empty string as status to the function.

Parameters
percentCompletedPercent of the entire conversion process (from 0...100%), -1 indicates the same value as from last function call
statusStatus of the conversion process (e.g. "Converting trace data. Block 5 of 32")
Returns
return value 0 indicates an abort request from the implementing class

Implemented in BPNGLoggerDetector.

◆ onProgressDataDownload() [1/2]

virtual int WINAPI IBPNGClientListener::onProgressDataDownload ( int  percentCompleted)
pure virtual

Called to indicate the current progress of a data transfer.

Deprecated:
This function version is deprecated. Use the onProgressDataDownload() with three arguments.

This function notifies the listener about the download progress of the raw Telemotive trace data.

Parameters
percentCompletedPercentage of the entire download process (from 0...100%). A negative value can be passed if only the abort request is checked. A negative value of -1 indicates a broken ftp connection.
Returns
return value 0 indicates an abort request from the implementing class

Implemented in BPNGLoggerDetector.

◆ onProgressDataDownload() [2/2]

virtual int WINAPI IBPNGClientListener::onProgressDataDownload ( int  percentCompleted,
uint64_t  downloadedSize,
uint64_t  totalSize 
)
pure virtual

Called to indicate the current progress of a data transfer.

This function notifies the listener about the download progress of the raw Telemotive trace data.

Parameters
percentCompletedPercentage of the entire download process (from 0...100%). A negative value can be passed if only the abort request is checked. A negative value of -1 indicates a broken ftp connection.
downloadedSizeAmount of bytes already downloaded
totalSizeTotal size to be downloaded
Returns
return value 0 indicates an abort request from the implementing class

Implemented in BPNGLoggerDetector.

◆ onProgressDeletion()

virtual int WINAPI IBPNGClientListener::onProgressDeletion ( int  percentCompleted)
pure virtual

Called to indicate the current progress of file deletion.

This function notifies the listener about the deletion progress of the raw Telemotive trace data.

Parameters
percentCompletedPercentage of the entire deletion process (from 0...100%). A negative value can be passed if only the abort request is checked. A negative value of -1 indicates a broken ftp connection.
Returns
return value 0 indicates an abort request from the implementing class

Implemented in BPNGLoggerDetector.

◆ onStatusMessage()

virtual void WINAPI IBPNGClientListener::onStatusMessage ( const char *  statusMsg)
pure virtual

Called to send additional information of the current process to the calling app.

This function transmit message strings to the listener class. Those messages are only for imformation purpose. The receiver doesn't have to react on it but can display it on the screen.

Implemented in BPNGLoggerDetector.

◆ onTargetPathTooLong()

virtual int WINAPI IBPNGClientListener::onTargetPathTooLong ( char *  newTarget,
int  maxSize 
)
pure virtual

Called on a too long target directory.

Called when the resulting file name of the converted files or the files of an offline data set is longer than the maximum allowed size of the file system (Windows 260). The lib user has to pass a new (shorter) base target directory to the passed char array with strcpy. The memory of the array is already allocated by the library and it's size is maxSize. When a new directory was set the value 1 must be returned. Returning another value than 1 will abort the current process with an error result.

Implemented in BPNGLoggerDetector.

◆ onWarning()

virtual void WINAPI IBPNGClientListener::onWarning ( BPNGWarningCode  warningCode,
const char *  warnMsg 
)
pure virtual

Called to inform about a warning.

This function transmit a warning message to the listener class. Warnings have a WARING_CODE and a warning message. Warnings do not interrupt the current process but should be noticed from the user to possibly initiate further provisions.

Implemented in BPNGLoggerDetector.


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