Dataflow Runtime API  4.0.1.0
Classes | Public Member Functions | List of all members
imt::base::lib::srecconverter::SRecConverter Class Reference

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

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

Public Member Functions

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

Detailed Description

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

Constructor & Destructor Documentation

◆ SRecConverter()

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

Constructor.

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

◆ ~SRecConverter()

virtual imt::base::lib::srecconverter::SRecConverter::~SRecConverter ( )
virtual

Destructor.

Member Function Documentation

◆ convert()

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

Converts the srecord.

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

◆ getDataRecord()

bool imt::base::lib::srecconverter::SRecConverter::getDataRecord ( uint32_t const  recordNr,
DataRecord record 
) const

Gets the data of a single record.

One record contains 256 bytes of program data.

Parameters
recordNrrecord number
recordData record containing the program data
Returns
true if data available, else false

◆ 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: