blfwk::DataPacket::FileDataProducer Class Reference

Provide file data for data phase. More...

`#include <Command.h>`

Inheritance diagram for blfwk::DataPacket::FileDataProducer:
[legend]
Collaboration diagram for blfwk::DataPacket::FileDataProducer:
[legend]

## Public Member Functions

| FileDataProducer ()
| Default constructor.
virtual | ~FileDataProducer ()
| Destructor.
bool | init (std::string filePath, uint32_t count)
| Initialize with a file path. More...
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

std::string | m_filePath
| Data file path.
FILE * | m_filePointer
| Data file pointer.
long | m_fileSize
| Size in bytes of data file.

## Detailed Description

Provide file data for data phase.

## Member Function Documentation

uint32_t blfwk::DataPacket::FileDataProducer::getData | ( | uint8_t * | data,
|  | uint32_t | size
| ) |  |

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.

bool blfwk::DataPacket::FileDataProducer::init | ( | std::string | filePath,
|  | uint32_t | count
| ) |  |

Initialize with a file path.

See host_command.h for documentation on this function.

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

- Command.h
- Command.cpp