Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
canopen::ObjectDict Class Reference

#include <objdict.h>

Classes

struct  Entry
 
class  Key
 
struct  KeyHash
 

Public Types

enum  Code {
  NULL_DATA = 0x00, DOMAIN_DATA = 0x02, DEFTYPE = 0x05, DEFSTRUCT = 0x06,
  VAR = 0x07, ARRAY = 0x08, RECORD = 0x09
}
 
enum  DataTypes {
  DEFTYPE_INTEGER8 = 0x0002, DEFTYPE_INTEGER16 = 0x0003, DEFTYPE_INTEGER32 = 0x0004, DEFTYPE_UNSIGNED8 = 0x0005,
  DEFTYPE_UNSIGNED16 = 0x0006, DEFTYPE_UNSIGNED32 = 0x0007, DEFTYPE_REAL32 = 0x0008, DEFTYPE_VISIBLE_STRING = 0x0009,
  DEFTYPE_OCTET_STRING = 0x000A, DEFTYPE_UNICODE_STRING = 0x000B, DEFTYPE_DOMAIN = 0x000F, DEFTYPE_REAL64 = 0x0010,
  DEFTYPE_INTEGER64 = 0x0015, DEFTYPE_UNSIGNED64 = 0x001B
}
 
typedef std::shared_ptr< const EntryEntryConstSharedPtr
 
typedef boost::error_info< struct tag_objectdict_key, ObjectDict::Keykey_info
 
typedef std::unordered_map< Key, EntryConstSharedPtr, KeyHashObjectDictMap
 
typedef std::shared_ptr< ObjectDictObjectDictSharedPtr
 
typedef std::list< std::pair< std::string, std::string > > Overlay
 

Public Member Functions

const EntryConstSharedPtrget (const Key &k) const
 
bool has (uint16_t i, uint8_t s) const
 
bool has (uint16_t i) const
 
bool has (const Key &k) const
 
bool insert (bool is_sub, EntryConstSharedPtr e)
 
bool iterate (ObjectDictMap::const_iterator &it) const
 
 ObjectDict (const DeviceInfo &info)
 
const Entryoperator() (uint16_t i) const
 
const Entryoperator() (uint16_t i, uint8_t s) const
 

Static Public Member Functions

static ObjectDictSharedPtr fromFile (const std::string &path, const Overlay &overlay=Overlay())
 

Public Attributes

const DeviceInfo device_info
 

Protected Member Functions

const EntryConstSharedPtrat (const Key &key) const
 

Protected Attributes

ObjectDictMap dict_
 

Detailed Description

Definition at line 119 of file objdict.h.

Member Typedef Documentation

◆ EntryConstSharedPtr

typedef std::shared_ptr<const Entry> canopen::ObjectDict::EntryConstSharedPtr

Definition at line 189 of file objdict.h.

◆ key_info

typedef boost::error_info<struct tag_objectdict_key, ObjectDict::Key> canopen::ObjectDict::key_info

Definition at line 222 of file objdict.h.

◆ ObjectDictMap

Definition at line 214 of file objdict.h.

◆ ObjectDictSharedPtr

Definition at line 217 of file objdict.h.

◆ Overlay

typedef std::list<std::pair<std::string, std::string> > canopen::ObjectDict::Overlay

Definition at line 216 of file objdict.h.

Member Enumeration Documentation

◆ Code

Enumerator
NULL_DATA 
DOMAIN_DATA 
DEFTYPE 
DEFSTRUCT 
VAR 
ARRAY 
RECORD 

Definition at line 139 of file objdict.h.

◆ DataTypes

Enumerator
DEFTYPE_INTEGER8 
DEFTYPE_INTEGER16 
DEFTYPE_INTEGER32 
DEFTYPE_UNSIGNED8 
DEFTYPE_UNSIGNED16 
DEFTYPE_UNSIGNED32 
DEFTYPE_REAL32 
DEFTYPE_VISIBLE_STRING 
DEFTYPE_OCTET_STRING 
DEFTYPE_UNICODE_STRING 
DEFTYPE_DOMAIN 
DEFTYPE_REAL64 
DEFTYPE_INTEGER64 
DEFTYPE_UNSIGNED64 

Definition at line 148 of file objdict.h.

Constructor & Destructor Documentation

◆ ObjectDict()

canopen::ObjectDict::ObjectDict ( const DeviceInfo info)
inline

Definition at line 221 of file objdict.h.

Member Function Documentation

◆ at()

const EntryConstSharedPtr& canopen::ObjectDict::at ( const Key key) const
inlineprotected

Definition at line 224 of file objdict.h.

◆ fromFile()

ObjectDictSharedPtr ObjectDict::fromFile ( const std::string &  path,
const Overlay overlay = Overlay() 
)
static

Definition at line 274 of file objdict.cpp.

◆ get()

const EntryConstSharedPtr& canopen::ObjectDict::get ( const Key k) const
inline

Definition at line 197 of file objdict.h.

◆ has() [1/3]

bool canopen::ObjectDict::has ( uint16_t  i,
uint8_t  s 
) const
inline

Definition at line 200 of file objdict.h.

◆ has() [2/3]

bool canopen::ObjectDict::has ( uint16_t  i) const
inline

Definition at line 203 of file objdict.h.

◆ has() [3/3]

bool canopen::ObjectDict::has ( const Key k) const
inline

Definition at line 206 of file objdict.h.

◆ insert()

bool canopen::ObjectDict::insert ( bool  is_sub,
EntryConstSharedPtr  e 
)
inline

Definition at line 210 of file objdict.h.

◆ iterate()

bool ObjectDict::iterate ( ObjectDictMap::const_iterator &  it) const

Definition at line 77 of file objdict.cpp.

◆ operator()() [1/2]

const Entry& canopen::ObjectDict::operator() ( uint16_t  i) const
inline

Definition at line 191 of file objdict.h.

◆ operator()() [2/2]

const Entry& canopen::ObjectDict::operator() ( uint16_t  i,
uint8_t  s 
) const
inline

Definition at line 194 of file objdict.h.

Member Data Documentation

◆ device_info

const DeviceInfo canopen::ObjectDict::device_info

Definition at line 219 of file objdict.h.

◆ dict_

ObjectDictMap canopen::ObjectDict::dict_
protected

Definition at line 233 of file objdict.h.


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


canopen_master
Author(s): Mathias L├╝dtke
autogenerated on Mon Feb 28 2022 23:28:03