retdec
Classes | Public Attributes | List of all members
retdec::fileformat::IntelHexToken Class Reference

The Token class - output of tokenizer. More...

#include <intel_hex_tokenizer.h>

Collaboration diagram for retdec::fileformat::IntelHexToken:
Collaboration graph
[legend]

Classes

struct  REC_TYPE
 Possible Token types. More...
 

Public Member Functions

Auxiliary methods
int addStringByTwo (const std::string &str)
 
void controlChecksum ()
 

Public Attributes

unsigned byteCount = 0
 Size of data in bytes. More...
 
unsigned recordType = 0
 Type of record. More...
 
std::string address
 Address of data. More...
 
std::string data
 Data. More...
 
std::string checksum
 Checksum in ASCII. More...
 
std::string errorDesc
 Error description in case of REC_TYPE::RT_ERROR. More...
 
bool checksumValid = false
 True if checksum is valid. False by default. More...
 

Detailed Description

The Token class - output of tokenizer.

Member Function Documentation

◆ addStringByTwo()

int retdec::fileformat::IntelHexToken::addStringByTwo ( const std::string &  str)

Adds chars of string by two (one data byte) for checksum

Parameters
strInput string
Returns
Sum of chars by two in string
Warning
Function only works with even size of string (this is granted in Intel HEX)

◆ controlChecksum()

void retdec::fileformat::IntelHexToken::controlChecksum ( )

Verifies checksum

Member Data Documentation

◆ address

std::string retdec::fileformat::IntelHexToken::address

Address of data.

◆ byteCount

unsigned retdec::fileformat::IntelHexToken::byteCount = 0

Size of data in bytes.

◆ checksum

std::string retdec::fileformat::IntelHexToken::checksum

Checksum in ASCII.

◆ checksumValid

bool retdec::fileformat::IntelHexToken::checksumValid = false

True if checksum is valid. False by default.

◆ data

std::string retdec::fileformat::IntelHexToken::data

Data.

◆ errorDesc

std::string retdec::fileformat::IntelHexToken::errorDesc

Error description in case of REC_TYPE::RT_ERROR.

◆ recordType

unsigned retdec::fileformat::IntelHexToken::recordType = 0

Type of record.


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