Imt.Base C++ API V4.1.1.0
Loading...
Searching...
No Matches
imt::base::lib::srecconverter::SRecConverter Class Referencefinal

The SRecConverter is used to read a Motorola srecord binary file. More...

#include <Imt.Base.Lib.SRecConverter/inc/Imt.Base.Lib.SRecConverter/SRecConverter.h>

Inheritance diagram for imt::base::lib::srecconverter::SRecConverter:
imt::base::core::platform::Nonmovable

Public Member Functions

 SRecConverter (uint32_t const pageSizeKb, uint32_t const flashSizeKb)
 Constructor.
 
bool convert (std::string const &fileName)
 Converts the srecord.
 
uint8_t getPageCount () const
 Returns the number of pages (1kB || 2kB) containing in Motorola srecord file.
 
std::vector< uint8_tgetPageNumberList () const
 Returns the page number list.
 
uint32_t getRecordCount () const
 Returns the number of records.
 
DataRecord const * getDataRecord (uint32_t const recordNr) const
 Gets the data of a single record.
 
uint32_t getDataSize () const
 Returns the data size of program or eeprom data in bytes.
 

Detailed Description

The SRecConverter is used to read a Motorola srecord binary file.

Definition at line 22 of file SRecConverter.h.

Constructor & Destructor Documentation

◆ SRecConverter()

imt::base::lib::srecconverter::SRecConverter::SRecConverter ( uint32_t const  pageSizeKb,
uint32_t const  flashSizeKb 
)

Constructor.

Parameters
pageSizeKbSize of a single page in kilobytes.
flashSizeKbSize of the avaliable memory in kilobytes.

Member Function Documentation

◆ convert()

bool imt::base::lib::srecconverter::SRecConverter::convert ( std::string const &  fileName)

Converts the srecord.

Parameters
fileNameFile name of motorola file to convert
Returns
Returns true if conversion was successful, else returns false

◆ getDataRecord()

DataRecord const * imt::base::lib::srecconverter::SRecConverter::getDataRecord ( uint32_t const  recordNr) const

Gets the data of a single record.

One record contains 256 bytes of program data.

Parameters
recordNrrecord number
Returns
Data record containing the program data or nullptr.

◆ getDataSize()

uint32_t imt::base::lib::srecconverter::SRecConverter::getDataSize ( ) const

Returns the data size of program or eeprom data in bytes.

Without address and checksum.

Returns
program size [byte]

◆ getPageCount()

uint8_t imt::base::lib::srecconverter::SRecConverter::getPageCount ( ) const

Returns the number of pages (1kB || 2kB) containing in Motorola srecord file.

Returns
Number of pages

◆ getPageNumberList()

std::vector< uint8_t > imt::base::lib::srecconverter::SRecConverter::getPageNumberList ( ) const

Returns the page number list.

First page has number 1.

Returns
Page number list

◆ getRecordCount()

uint32_t imt::base::lib::srecconverter::SRecConverter::getRecordCount ( ) const

Returns the number of records.

One record contains 256 bytes of program data.

Returns
Number of records

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