srecord: srecord::memory_walker_crc16 Class Reference

srecord 1.65.0

Loading...
Searching...
No Matches
srecord::memory_walker_crc16 Class Reference

The srecord::memory_walker_crc16 class is used to represent the parse state of a memory walker which calculates a running CRC16 checksum. More...

`#include <crc16.h>`

Inheritance diagram for srecord::memory_walker_crc16:
[legend]
Collaboration diagram for srecord::memory_walker_crc16:
[legend]

## Public Types
typedef std::shared_ptr< memory_walker_crc16 > | pointer
Public Types inherited from srecord::memory_walker
typedef std::shared_ptr< memory_walker > | pointer

## Public Member Functions
virtual | ~memory_walker_crc16 ()
| The destructror.
unsigned | get () const
| The get method is used to get the CRC16 checksum once all memory chunks have been processed by calls to our observe method.
Public Member Functions inherited from srecord::memory_walker
virtual | ~memory_walker ()
| The destructor.
virtual void | observe_end (void)
| The observe_end method is called once all of the data blocks have been passed to the observer via the observe() method.
virtual void | notify_upper_bound (unsigned long address)
| The notify_upper_bound method is used to notify the walker of the upper bound (highest address plus one) of the observe calls to come.
virtual void | observe_header (const record *rec=0)
| The observe_header method is used to inform the walker of the header record.
virtual void | observe_start_address (const record *rec=0)
| The observe_start_address method is used to inform the walker of the execution start address record.

## Static Public Member Functions
static pointer | create (crc16::seed_mode_t seed_mode, bool augment_flag, unsigned short polynomial, crc16::bit_direction_t bitdir)
| The create class method is used to create new dynamically allocated instances of this class.

## Protected Member Functions
void | observe (unsigned long, const void *, int)
| The observe method is used by the memory walker to provide data.
Protected Member Functions inherited from srecord::memory_walker
| memory_walker ()
| The default constructor.

## Detailed Description

The srecord::memory_walker_crc16 class is used to represent the parse state of a memory walker which calculates a running CRC16 checksum.

Definition at line 33 of file crc16.h.

## Member Typedef Documentation

## ◆ pointer

typedef std::shared_ptr<memory_walker_crc16> srecord::memory_walker_crc16::pointer

Definition at line 37 of file crc16.h.

## Constructor & Destructor Documentation

## ◆ ~memory_walker_crc16()

virtual srecord::memory_walker_crc16::~memory_walker_crc16 | ( |  | ) |
| virtual

The destructror.

## Member Function Documentation

## ◆ create()

pointer srecord::memory_walker_crc16::create | ( | crc16::seed_mode_t | seed_mode,
|  | bool | augment_flag,
|  | unsigned short | polynomial,
|  | crc16::bit_direction_t | bitdir )
| static

The create class method is used to create new dynamically allocated instances of this class.

Parameters

  seed_mode | The selector for the initial seed for the calculation
  augment_flag | Whether or not to augment the calculation
  polynomial | The CRC polynomial to be used.
  bitdir | the bit direction of the CRC

## ◆ get()

unsigned srecord::memory_walker_crc16::get | ( |  | ) | const

The get method is used to get the CRC16 checksum once all memory chunks have been processed by calls to our observe method.

## ◆ observe()

void srecord::memory_walker_crc16::observe | ( | unsigned long | address,
|  | const void * | data,
|  | int | data_size )
| protectedvirtual

The observe method is used by the memory walker to provide data.

Derived classes are required to impliment this method, and do something with the data.

Parameters

  address | The base address of this chunk of memory.
  data | The base address of this chunk of memory in memory.
  data_size | The size, in bytes, of this chunk of memory.

Implements srecord::memory_walker.

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

- memory/walker/crc16.h