#include <objdict.h>
Public Types | |
typedef std::shared_ptr< ObjectStorage > | ObjectStorageSharedPtr |
using | ReadDelegate = can::DelegateHelper< ReadFunc > |
using | ReadFunc = std::function< void(const ObjectDict::Entry &, String &)> |
typedef std::function< std::string()> | ReadStringFuncType |
using | WriteDelegate = can::DelegateHelper< WriteFunc > |
using | WriteFunc = std::function< void(const ObjectDict::Entry &, const String &)> |
typedef std::function< void(const std::string &)> | WriteStringFuncType |
Public Member Functions | |
template<typename T > | |
Entry< T > | entry (const ObjectDict::Key &key) |
template<typename T > | |
bool | entry (Entry< T > &e, const ObjectDict::Key &k) |
template<typename T > | |
void | entry (Entry< T > &e, uint16_t index) |
template<typename T > | |
void | entry (Entry< T > &e, uint16_t index, uint8_t sub_index) |
template<typename T > | |
Entry< T > | entry (uint16_t index) |
template<typename T > | |
Entry< T > | entry (uint16_t index, uint8_t sub_index) |
ReadStringFuncType | getStringReader (const ObjectDict::Key &key, bool cached=false) |
WriteStringFuncType | getStringWriter (const ObjectDict::Key &key, bool cached=false) |
void | init (const ObjectDict::Key &key) |
void | init_all () |
size_t | map (uint16_t index, uint8_t sub_index, const ReadFunc &read_delegate, const WriteFunc &write_delegate) |
ObjectStorage (ObjectDictConstSharedPtr dict, uint8_t node_id, ReadFunc read_delegate, WriteFunc write_delegate) | |
void | reset () |
Public Attributes | |
const ObjectDictConstSharedPtr | dict_ |
const uint8_t | node_id_ |
Protected Types | |
typedef std::shared_ptr< Data > | DataSharedPtr |
typedef std::unordered_map< ObjectDict::Key, DataSharedPtr, ObjectDict::KeyHash > | ObjectStorageMap |
Protected Member Functions | |
void | init_nolock (const ObjectDict::Key &key, const ObjectDict::EntryConstSharedPtr &entry) |
size_t | map (const ObjectDict::EntryConstSharedPtr &e, const ObjectDict::Key &key, const ReadFunc &read_delegate, const WriteFunc &write_delegate) |
Protected Attributes | |
boost::mutex | mutex_ |
ReadFunc | read_delegate_ |
ObjectStorageMap | storage_ |
WriteFunc | write_delegate_ |
|
protected |
|
protected |
typedef std::shared_ptr<ObjectStorage> canopen::ObjectStorage::ObjectStorageSharedPtr |
using canopen::ObjectStorage::ReadFunc = std::function<void(const ObjectDict::Entry&, String &)> |
typedef std::function<std::string()> canopen::ObjectStorage::ReadStringFuncType |
using canopen::ObjectStorage::WriteFunc = std::function<void(const ObjectDict::Entry&, const String &)> |
typedef std::function<void(const std::string &)> canopen::ObjectStorage::WriteStringFuncType |
ObjectStorage::ObjectStorage | ( | ObjectDictConstSharedPtr | dict, |
uint8_t | node_id, | ||
ReadFunc | read_delegate, | ||
WriteFunc | write_delegate | ||
) |
Definition at line 383 of file objdict.cpp.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
ObjectStorage::ReadStringFuncType ObjectStorage::getStringReader | ( | const ObjectDict::Key & | key, |
bool | cached = false |
||
) |
Definition at line 449 of file objdict.cpp.
ObjectStorage::WriteStringFuncType ObjectStorage::getStringWriter | ( | const ObjectDict::Key & | key, |
bool | cached = false |
||
) |
Definition at line 476 of file objdict.cpp.
void ObjectStorage::init | ( | const ObjectDict::Key & | key | ) |
Definition at line 406 of file objdict.cpp.
void ObjectStorage::init_all | ( | ) |
Definition at line 410 of file objdict.cpp.
|
protected |
Definition at line 390 of file objdict.cpp.
|
protected |
Definition at line 333 of file objdict.cpp.
size_t ObjectStorage::map | ( | uint16_t | index, |
uint8_t | sub_index, | ||
const ReadFunc & | read_delegate, | ||
const WriteFunc & | write_delegate | ||
) |
Definition at line 366 of file objdict.cpp.
void ObjectStorage::reset | ( | ) |
Definition at line 419 of file objdict.cpp.
const ObjectDictConstSharedPtr canopen::ObjectStorage::dict_ |
|
protected |
|
protected |