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

A conversion set stores all conversion relevant settings. More...

#include <BPNGDefines.h>

Public Member Functions

virtual void addChannel (ChannelType channelType, uint8_t channelIndex, const char *formatId, int fileId, int offset, int mbnr, bool mappingActive, int mappedChannelId)=0
 Adds a channel to the conversion set and assigns the target format to it. More...
 
virtual void addTimeSpan (uint64_t startTime, uint64_t endTime, uint64_t id=0)=0
 Adds a time span to the conversion set. More...
 
virtual void addRdbIdRange (uint64_t startId, uint64_t endId)=0
 Adds a ReferenceDB ID range to the conversion set. More...
 
virtual bool loadConversionFilters (const char *pathToIni)=0
 Conversion filters can be loaded from an ini file. More...
 
virtual bool loadFormats (const char *pathToIniFile)=0
 Loads the format settings from an ini file.
 
virtual bool saveFormats (const char *pathToIniFile) const =0
 Saves the format settings to an ini file.
 

Detailed Description

A conversion set stores all conversion relevant settings.

To convert trace data a conversion set must be created. Several channels can be added to one conversion set. The trace data of that channels are converted to the assigned formats. The conversion set also includes the data spans that has to be converted.

Member Function Documentation

◆ addChannel()

virtual void IConversionSet::addChannel ( ChannelType  channelType,
uint8_t  channelIndex,
const char *  formatId,
int  fileId,
int  offset,
int  mbnr,
bool  mappingActive,
int  mappedChannelId 
)
pure virtual

Adds a channel to the conversion set and assigns the target format to it.

Use the IBPNGClient::getLoggerChannel() function to get all existing channels.

Hint for offset, mappingActive and mappedChannelId: Use the configured values! Else the channel will not be found and the data not written. All information can be retrieved from IChannel

Parameters
channelTypemust be one of the appropriate ChannelType enum.
channelIndexzero-based channel index
formatIdmust be one of the appropriate FormatId enum.
fileIdThe data of all channels with same formatId and same fileId are written to the same output file. The default value -1 indicates always a separate file for each channel.
offsetOnly needed for TSL, default 1. The offset to the original channel number. Can be read out from IChannel
mbnrOnly needed for TSL, default -1. The mainboardnumber of the channels source device. Can be read out from IChannel
mappingActiveOnly needed for Channelmapping, default false. If true the mappedChannelId will be used instead of original index. Can be read out from IChannel
mappedChannelIdOnly needed for Channelmapping, default -1. If mappingActive is true the mappedChannelId will be used instead of original index. Can be read out from IChannel

◆ addRdbIdRange()

virtual void IConversionSet::addRdbIdRange ( uint64_t  startId,
uint64_t  endId 
)
pure virtual

Adds a ReferenceDB ID range to the conversion set.

Passed parameter are IDs from the Reference Data Base (RDB). After calling on of the init functions IBPNGClient::initOnline() or IBPNGClient::initOffline() you can get the path to the RDB with IBPNGClient::getReferenceDataBasePath().

The RDB includes all occurred events like startups, shutdowns, etc. but also all recorded trace files. Each RDB entry has a unique DataBaseEntryID. With this function you can easily select data between arbitrary RDB entries. For example you can convert all data between index X (which is e.g. a startup) and index Y (which is e.g. a shutdown). When the DataBaseEntryId of a trace file is passed, this trace block will be included by the conversion.

Parameters
startIdDataBaseEntryId that inicates the start of the data range to be converted
endIdDataBaseEntryId that inicates the end of the data range to be converted

◆ addTimeSpan()

virtual void IConversionSet::addTimeSpan ( uint64_t  startTime,
uint64_t  endTime,
uint64_t  id = 0 
)
pure virtual

Adds a time span to the conversion set.

The data within the time span will be converted to the specified formats.

Parameters
startTimemust be in usec since 01.01.1970 (UTC)
endTimemust be in usec since 01.01.1970 (UTC)
idid of timespan, e.g. marker id

◆ loadConversionFilters()

virtual bool IConversionSet::loadConversionFilters ( const char *  pathToIni)
pure virtual

Conversion filters can be loaded from an ini file.

Currently only some ethernet filters for BLF and pcap-Format are supported. An example ini file can be found in the System Client Libraries package ("conversionFilter.ini").


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