![]() |
Kinetis Bootloader Host
2.0.0
Host Tools for Kinetis devices
|
Provide data from hex string for data phase. More...
#include <Command.h>
Inheritance diagram for blfwk::DataPacket::HexDataProducer:
Collaboration diagram for blfwk::DataPacket::HexDataProducer:Public Member Functions | |
| HexDataProducer () | |
| Default constructor. | |
| HexDataProducer (const uchar_vector_t &data) | |
| Constructor that takes a vector<uchar> parameter. | |
| uint32_t | initFromString (const std::string hexData) |
| Initialize with a data string. More... | |
| virtual | ~HexDataProducer () |
| Destructor. | |
DataProducer | |
| virtual bool | hasMoreData () const |
| Query if more data is available. | |
| virtual uint32_t | getDataSize () const |
| Query the total size of the data. | |
| virtual uint32_t | getData (uint8_t *data, uint32_t size) |
| Get the next data chunk. More... | |
Protected Attributes | |
| uint32_t | m_byteIndex |
| Current byte index. | |
| uchar_vector_t | m_data |
| Data byte vector. | |
Provide data from hex string for data phase.
|
virtual |
Get the next data chunk.
See host_command.h for documentation on this function.
Before calling getData(), call moreData() to determine if data is available.
Implements blfwk::DataPacket::DataProducer.
| uint32_t blfwk::DataPacket::HexDataProducer::initFromString | ( | const std::string | hexData | ) |
Initialize with a data string.
See host_command.h for documentation on this function.
| hexData | String with hex digits surrounded by double brackets, e.g. '{{11 22 33}}', white space ignored |