KaCanOpen
 All Classes Functions Variables Typedefs Enumerations Pages
Public Member Functions | List of all members
kaco::EDSReader Class Reference

This class allows reading EDS files (like standardized in CiA 306) and inserting all contained entries into a dictionary of type std::unordered_map<Address, Entry> and a map std::unordered_map<std::string, Address> It makes use of Boost's property_tree class. More...

#include <eds_reader.h>

Public Member Functions

 EDSReader (std::unordered_map< Address, Entry > &dictionary, std::unordered_map< std::string, Address > &name_to_address)
 Constructor. More...
 
bool load_file (std::string filename)
 Loads an EDS file from file system. More...
 
bool import_entries ()
 Import entries from the EDS file into the given dictionary. More...
 

Detailed Description

This class allows reading EDS files (like standardized in CiA 306) and inserting all contained entries into a dictionary of type std::unordered_map<Address, Entry> and a map std::unordered_map<std::string, Address> It makes use of Boost's property_tree class.

Examples:
examples/test/eds_reader.cpp.

Definition at line 50 of file eds_reader.h.

Constructor & Destructor Documentation

kaco::EDSReader::EDSReader ( std::unordered_map< Address, Entry > &  dictionary,
std::unordered_map< std::string, Address > &  name_to_address 
)

Constructor.

Parameters
dictionaryThe dictionary, into which entries should be inserted.
name_to_addressMapping from name to address in dictionary (to be created).

Definition at line 50 of file eds_reader.cpp.

Member Function Documentation

bool kaco::EDSReader::import_entries ( )

Import entries from the EDS file into the given dictionary.

Returns
true if successful
Examples:
examples/test/eds_reader.cpp.

Definition at line 67 of file eds_reader.cpp.

bool kaco::EDSReader::load_file ( std::string  filename)

Loads an EDS file from file system.

Returns
true if successful
Examples:
examples/test/eds_reader.cpp.

Definition at line 54 of file eds_reader.cpp.


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