BPNGClientLib
Library for accessing the Telemotive data logger devices
|
Public Member Functions | |
template<typename IP > | |
BPNGLoggerDetector (IP &&_ip, unsigned int _debug) | |
CTOR. | |
virtual void | onBPNGDeviceDetected (OnlineLoggerInfo *info) |
Called to notify a detected logger in network. More... | |
virtual void | onBPNGDeviceDisappeared (OnlineLoggerInfo *info) |
Called to notify a disappeared logger. More... | |
virtual void | onBPNGDeviceStateChange (OnlineLoggerInfo *info) |
Called to notify a logger's state change. More... | |
virtual int | onProgressDataDownload (int percentCompleted) |
Called to indicate the current progress of a data transfer. More... | |
virtual int | onProgressDataDownload (int percentCompleted, uint64_t downloadedSize, uint64_t totalSize) |
Called to indicate the current progress of a data transfer. More... | |
virtual int | onProgressConversion (int percentCompleted, const char *status) |
Called to indicate the current progress of file conversion. More... | |
virtual int | onProgressDeletion (int percentCompleted) |
Called to indicate the current progress of file deletion. More... | |
virtual int | onTargetPathTooLong (char *newTarget, int maxSize) |
Called on a too long target directory. More... | |
virtual int | getOverwritingPermission (const char *filePath) |
Called on existing output trace files. More... | |
virtual void | onFirmwareUpdateProgress (int percentage, int step, int substep, const char *desc) |
Called on firmware update progress. | |
virtual void | onFirmwareUpdateError (int errorId) |
virtual int | onCriticalDiskSpace (uint64_t freeSpace, uint64_t neededSpace, const char *drive, const char *msg) |
Called in case of not enough free diskspace. More... | |
virtual void | onLoggerConnected (bool isConnected) |
virtual void | onStatusMessage (const char *statusMsg) |
Called to send additional information of the current process to the calling app. More... | |
virtual int | onGetLogReportProgress (int percentage, const char *desc) |
virtual void | onWarning (BPNGWarningCode warningCode, const char *warnMsg) |
Called to inform about a warning. More... | |
virtual void | onInvalidPwConfigFound (const char *) |
virtual void | onDownloadStart (int64_t totalAmountOfBytes) |
Notifies the listeners before the download starts about the total amount of bytes to be downloaded. More... | |
virtual void | onLogInDataFailed () |
virtual void | onResetLogInDataFailed () |
virtual void | onFuncAccessDenied () |
virtual void | onConversionStart (int64_t totalAmountOfBytes) |
Notifies the listeners before the conversion starts about the total amount of bytes to be converted. More... | |
virtual int | onDataRecoverProgress (const char *test1, int test2) |
Called to send additional information of the current data recovery progress. More... | |
virtual const char * | onLogInDataRequired (unsigned int test1) |
virtual void | onInvalidPwConfigFound (unsigned int) |
Called if invalid pw file found on device. More... | |
virtual const char * | onExtractionPasswordRequired (unsigned int) |
virtual bool | isTerminateLiveDownloadRequest () |
Called periodically on live download to query whether the permanent download should be finished. | |
OnlineLoggerInfo | getLoggerInfoForIP (const char *ip) const |
const std::string & | getIP () const |
std::vector< OnlineLoggerInfoWrapper > | getLoggerList (unsigned searchTimeOut) |
std::vector< TSLClusterImpl > | getTSLs (const std::vector< OnlineLoggerInfoWrapper > &tslChain) |
void | excludeRCTFromTSL (TSLClusterImpl &loggersInNetwork) |
![]() | |
virtual const char *WINAPI | onLogInDataRequired (unsigned mbnr)=0 |
Called on accessing password protected functions. More... | |
void BPNGLoggerDetector::excludeRCTFromTSL | ( | TSLClusterImpl & | loggersInNetwork | ) |
Remove RCT from TSL for spezific functions like delete data.
loggersInNetwork | TSL Chain to check for rct devices |
std::vector<OnlineLoggerInfoWrapper> BPNGLoggerDetector::getLoggerList | ( | unsigned | searchTimeOut | ) |
Returns a vector of detected BPNGDevice in local networks.
searchTimeOut | the search timeout in seconds |
|
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
Implements IBPNGClientListener.
std::vector<TSLClusterImpl> BPNGLoggerDetector::getTSLs | ( | const std::vector< OnlineLoggerInfoWrapper > & | tslChain | ) |
Checks a vector of BPNGDevice for TSL chains. Combines the devices with same tslNetworkId (except -1) to TSLCluster.
loggersInNetwork | the BPNGDevice in network found by getLoggerList(unsigned searchTimeOut) |
|
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.
Implements IBPNGClientListener.
|
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.
Implements IBPNGClientListener.
|
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.
Implements IBPNGClientListener.
|
virtual |
Notifies the listeners before the conversion starts about the total amount of bytes to be converted.
totalAmountOfBytes | Total data size to be converted |
Implements IBPNGClientListener.
|
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.
freeSpace | Amount of free space |
neededSpace | Amount of needed space |
drive | Name of the drive where to store data |
msg | Additional message to display |
Implements IBPNGClientListener.
|
inlinevirtual |
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
Implements IBPNGClientListener.
|
virtual |
Notifies the listeners before the download starts about the total amount of bytes to be downloaded.
totalAmountOfBytes | Total data size to be downloaded |
Implements IBPNGClientListener.
|
inlinevirtual |
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.
retryCount | number 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. |
Implements IBPNGClientListener.
|
virtual |
Called on creation of log report
Implements IBPNGClientListener.
|
inlinevirtual |
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.
Implements IBPNGClientListener.
|
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.
percentCompleted | Percent of the entire conversion process (from 0...100%), -1 indicates the same value as from last function call |
status | Status of the conversion process (e.g. "Converting trace data. Block 5 of 32") |
Implements IBPNGClientListener.
|
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.
percentCompleted | Percentage 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. |
Implements IBPNGClientListener.
|
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.
percentCompleted | Percentage 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. |
downloadedSize | Amount of bytes already downloaded |
totalSize | Total size to be downloaded |
Implements IBPNGClientListener.
|
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.
percentCompleted | Percentage 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. |
Implements IBPNGClientListener.
|
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.
Implements IBPNGClientListener.
|
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.
Implements IBPNGClientListener.
|
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.
Implements IBPNGClientListener.