pflib v3.14.3-4-g3289bd3
Pretty Fine HGCROC Interaction Library
Loading...
Searching...
No Matches
pflib::utility::intel_hex::DataRecord Class Reference

a record of data from/to the IntelHex format More...

#include <intel_hex.h>

Collaboration diagram for pflib::utility::intel_hex::DataRecord:
[legend]

Public Member Functions

void from_bytes (uint16_t addr, std::vector< uint8_t > data)
 set contents of data record
 
template<typename WordType , std::enable_if_t< std::is_integral< WordType >::value, bool > = true>
void from (uint16_t addr, WordType value)
 set contents of data record using width of integer type
 
const std::vector< uint8_t > & get_bytes () const
 get raw bytes of data
 
template<typename WordType , std::enable_if_t< std::is_integral< WordType >::value, bool > = true>
WordType get ()
 get data in terms of integer type
 
const uint16_t & addr () const
 get address
 

Private Attributes

std::vector< uint8_t > data_
 actual data in this record
 
uint16_t addr_
 address for the data
 

Detailed Description

a record of data from/to the IntelHex format

The from/get template functions are where we decide on endian-ness of the data values (we choose big-endian as defined by format).


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