Public Member Functions | Private Types | Private Attributes | List of all members
MemoryStorageBackend Class Reference

#include <memory_storage_backend.hpp>

Inheritance diagram for MemoryStorageBackend:
Inheritance graph
[legend]

Public Member Functions

void failOnSetCalls (bool really)
 
virtual String get (const String &key) const
 
unsigned getNumKeys () const
 
 MemoryStorageBackend ()
 
void print () const
 
void reset ()
 
virtual void set (const String &key, const String &value)
 
- Public Member Functions inherited from uavcan::dynamic_node_id_server::IStorageBackend
virtual ~IStorageBackend ()
 

Private Types

typedef std::map< String, StringContainer
 

Private Attributes

Container container_
 
bool fail_
 

Additional Inherited Members

- Public Types inherited from uavcan::dynamic_node_id_server::IStorageBackend
enum  { MaxStringLength = 32 }
 
enum  { MaxKeyValuePairs = 512 }
 
typedef MakeString< MaxStringLength >::Type String
 

Detailed Description

Definition at line 10 of file memory_storage_backend.hpp.

Member Typedef Documentation

◆ Container

typedef std::map<String, String> MemoryStorageBackend::Container
private

Definition at line 12 of file memory_storage_backend.hpp.

Constructor & Destructor Documentation

◆ MemoryStorageBackend()

MemoryStorageBackend::MemoryStorageBackend ( )
inline

Definition at line 18 of file memory_storage_backend.hpp.

Member Function Documentation

◆ failOnSetCalls()

void MemoryStorageBackend::failOnSetCalls ( bool  really)
inline

Definition at line 40 of file memory_storage_backend.hpp.

◆ get()

virtual String MemoryStorageBackend::get ( const String key) const
inlinevirtual

Read one value from the storage. If such key does not exist, or if read failed, an empty string will be returned. This method should not block for more than 50 ms.

Implements uavcan::dynamic_node_id_server::IStorageBackend.

Definition at line 22 of file memory_storage_backend.hpp.

◆ getNumKeys()

unsigned MemoryStorageBackend::getNumKeys ( ) const
inline

Definition at line 44 of file memory_storage_backend.hpp.

◆ print()

void MemoryStorageBackend::print ( ) const
inline

Definition at line 46 of file memory_storage_backend.hpp.

◆ reset()

void MemoryStorageBackend::reset ( )
inline

Definition at line 42 of file memory_storage_backend.hpp.

◆ set()

virtual void MemoryStorageBackend::set ( const String key,
const String value 
)
inlinevirtual

Create or update value for the given key. Empty value should be regarded as a request to delete the key. This method should not block for more than 50 ms. Failures will be ignored.

Implements uavcan::dynamic_node_id_server::IStorageBackend.

Definition at line 32 of file memory_storage_backend.hpp.

Member Data Documentation

◆ container_

Container MemoryStorageBackend::container_
private

Definition at line 13 of file memory_storage_backend.hpp.

◆ fail_

bool MemoryStorageBackend::fail_
private

Definition at line 15 of file memory_storage_backend.hpp.


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


uavcan_communicator
Author(s):
autogenerated on Fri Dec 13 2024 03:10:04