APM:Libraries
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Linux::Storage Class Reference

#include <Storage.h>

Inheritance diagram for Linux::Storage:
[legend]
Collaboration diagram for Linux::Storage:
[legend]

Public Member Functions

 Storage ()
 
void init () override
 
uint8_t read_byte (uint16_t loc)
 
uint16_t read_word (uint16_t loc)
 
uint32_t read_dword (uint16_t loc)
 
void read_block (void *dst, uint16_t src, size_t n)
 
void write_byte (uint16_t loc, uint8_t value)
 
void write_word (uint16_t loc, uint16_t value)
 
void write_dword (uint16_t loc, uint32_t value)
 
void write_block (uint16_t dst, const void *src, size_t n)
 
virtual void _timer_tick (void) override
 

Static Public Member Functions

static Storagefrom (AP_HAL::Storage *storage)
 

Protected Member Functions

void _mark_dirty (uint16_t loc, uint16_t length)
 
int _storage_create (const char *dpath)
 

Protected Attributes

int _fd
 
volatile bool _initialised
 
volatile uint32_t _dirty_mask
 
uint8_t _buffer [LINUX_STORAGE_SIZE]
 

Detailed Description

Definition at line 13 of file Storage.h.

Constructor & Destructor Documentation

◆ Storage()

Linux::Storage::Storage ( )
inline

Definition at line 16 of file Storage.h.

Member Function Documentation

◆ _mark_dirty()

void Storage::_mark_dirty ( uint16_t  loc,
uint16_t  length 
)
protected

Definition at line 184 of file Storage.cpp.

Referenced by from(), and write_block().

Here is the caller graph for this function:

◆ _storage_create()

int Storage::_storage_create ( const char *  dpath)
protected

Definition at line 94 of file Storage.cpp.

Referenced by from(), and init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ _timer_tick()

void Storage::_timer_tick ( void  )
overridevirtual

Reimplemented from AP_HAL::Storage.

Definition at line 215 of file Storage.cpp.

Referenced by from().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ from()

static Storage* Linux::Storage::from ( AP_HAL::Storage storage)
inlinestatic

Definition at line 18 of file Storage.h.

Here is the call graph for this function:

◆ init()

void Storage::init ( void  )
overridevirtual

Implements AP_HAL::Storage.

Definition at line 136 of file Storage.cpp.

Referenced by from(), read_block(), and write_block().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ read_block()

void Storage::read_block ( void *  dst,
uint16_t  src,
size_t  n 
)
virtual

Implements AP_HAL::Storage.

Definition at line 194 of file Storage.cpp.

Referenced by from().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ read_byte()

uint8_t Linux::Storage::read_byte ( uint16_t  loc)

Referenced by from().

Here is the caller graph for this function:

◆ read_dword()

uint32_t Linux::Storage::read_dword ( uint16_t  loc)

Referenced by from().

Here is the caller graph for this function:

◆ read_word()

uint16_t Linux::Storage::read_word ( uint16_t  loc)

Referenced by from().

Here is the caller graph for this function:

◆ write_block()

void Storage::write_block ( uint16_t  dst,
const void *  src,
size_t  n 
)
virtual

Implements AP_HAL::Storage.

Definition at line 203 of file Storage.cpp.

Referenced by from().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ write_byte()

void Linux::Storage::write_byte ( uint16_t  loc,
uint8_t  value 
)

Referenced by from().

Here is the caller graph for this function:

◆ write_dword()

void Linux::Storage::write_dword ( uint16_t  loc,
uint32_t  value 
)

Referenced by from().

Here is the caller graph for this function:

◆ write_word()

void Linux::Storage::write_word ( uint16_t  loc,
uint16_t  value 
)

Referenced by from().

Here is the caller graph for this function:

Member Data Documentation

◆ _buffer

uint8_t Linux::Storage::_buffer[LINUX_STORAGE_SIZE]
protected

Definition at line 44 of file Storage.h.

Referenced by _storage_create(), _timer_tick(), init(), read_block(), and write_block().

◆ _dirty_mask

volatile uint32_t Linux::Storage::_dirty_mask
protected

Definition at line 43 of file Storage.h.

Referenced by _mark_dirty(), _timer_tick(), and init().

◆ _fd

int Linux::Storage::_fd
protected

Definition at line 41 of file Storage.h.

Referenced by _timer_tick(), and init().

◆ _initialised

volatile bool Linux::Storage::_initialised
protected

Definition at line 42 of file Storage.h.

Referenced by _timer_tick(), and init().


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