Kinetis Bootloader Host  2.0.0
Host Tools for Kinetis devices
blfwk::PatternSource Class Reference

Data source for a repeating pattern. More...

#include <DataSource.h>

+ Inheritance diagram for blfwk::PatternSource:
+ Collaboration diagram for blfwk::PatternSource:

Public Member Functions

 PatternSource ()
 Default constructor.
 
 PatternSource (const SizedIntegerValue &value)
 Constructor taking the pattern value.
 
virtual unsigned getSegmentCount ()
 There is only one segment.
 
virtual DataSource::SegmentgetSegmentAt (unsigned index)
 Returns this object, as it is its own segment.
 
PatternSourceoperator= (const SizedIntegerValue &value)
 Assignment operator, sets the pattern value and length.
 
- Public Member Functions inherited from blfwk::DataSource
 DataSource ()
 Default constructor.
 
virtual ~DataSource ()
 Destructor.
 
void setTarget (DataTarget *target)
 Sets the associated data target.
 
DataTargetgetTarget () const
 Gets the associated data target.
 
- Public Member Functions inherited from blfwk::DataSource::PatternSegment
 PatternSegment (DataSource &source)
 Default constructor.
 
 PatternSegment (DataSource &source, const SizedIntegerValue &pattern)
 Constructor taking a fill pattern.
 
 PatternSegment (DataSource &source, uint8_t pattern)
 Constructor taking a byte fill pattern.
 
 PatternSegment (DataSource &source, uint16_t pattern)
 Constructor taking a half-word fill pattern.
 
 PatternSegment (DataSource &source, uint32_t pattern)
 Constructor taking a word fill pattern.
 
virtual bool hasNaturalLocation ()
 Pattern segments have no natural address.
 
virtual unsigned getData (unsigned offset, unsigned maxBytes, uint8_t *buffer)
 Performs a pattern fill into the buffer.
 
virtual unsigned getLength ()
 Returns a length based on the data target's address range. More...
 
void setPattern (const SizedIntegerValue &newPattern)
 Assigns a new fill pattern.
 
SizedIntegerValuegetPattern ()
 Return the fill pattern for the segment.
 
PatternSegmentoperator= (const SizedIntegerValue &value)
 Assignment operator, sets the pattern value and length.
 
- Public Member Functions inherited from blfwk::DataSource::Segment
 Segment (DataSource &source)
 Default constructor.
 
virtual ~Segment ()
 Destructor.
 
virtual uint32_t getBaseAddress ()
 Returns the address associated with the segment.
 

Additional Inherited Members

- Protected Attributes inherited from blfwk::DataSource
DataTargetm_target
 Corresponding target for this source.
 
- Protected Attributes inherited from blfwk::DataSource::PatternSegment
SizedIntegerValue m_pattern
 The fill pattern.
 
- Protected Attributes inherited from blfwk::DataSource::Segment
DataSourcem_source
 The data source to which this segment belongs.
 

Detailed Description

Data source for a repeating pattern.

The pattern is represented by a SizedIntegerValue object. Thus the pattern can be either byte, half-word, or word sized.

This data source has only one segment, and the PatternSource instance acts as its own single segment.


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