Overview   API Reference  

memory_image Struct Reference

Class simulating a block driver in raw main memory. More...

#include <memory_image.hpp>

Inheritance diagram for memory_image:

Inheritance graph
[legend]
Collaboration diagram for memory_image:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 memory_image (l4_sector_t size=MIN_SECTOR_NUMBER, const state_flags flags=0)
virtual l4_sector_t sectors (void) const
 Returns the number of disk sectors the underlying medium (e.g a file) provides.
virtual int read_sectors (uint8_t *buffer, l4_sector_t sector, l4_sector_t number)
 Reads (from disk) the specified number of sectors starting at the specified sector (inclusive) into the specified data buffer (which must be big enough).
virtual int write_sectors (uint8_t *buffer, l4_sector_t sector, l4_sector_t number)
 Writes (to disk) the specified number of sectors starting at the specified sector (inclusive) from the specified data buffer (which must be big enough).

Protected Attributes

const l4_sector_t size
uint8_t *const data


Detailed Description

Class simulating a block driver in raw main memory.

Member Function Documentation

virtual int memory_image::read_sectors ( uint8_t *  buffer,
l4_sector_t  sector,
l4_sector_t  number 
) [inline, virtual]

Reads (from disk) the specified number of sectors starting at the specified sector (inclusive) into the specified data buffer (which must be big enough).

Returns 0 on success. Negative error codes otherwise.

Implements block_driver.

References block_driver_base::is(), and block_driver_constants::READY.

virtual int memory_image::write_sectors ( uint8_t *  buffer,
l4_sector_t  sector,
l4_sector_t  number 
) [inline, virtual]

Writes (to disk) the specified number of sectors starting at the specified sector (inclusive) from the specified data buffer (which must be big enough).

Returns 0 on success. Negative error codes otherwise.

Implements block_driver.

References block_driver_base::is(), and block_driver_constants::READY.


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

L4vmm Reference Manual, written by Mario Schwalbe  © 2006-2008