SlaveConfig.h
Go to the documentation of this file.
1#pragma once
2
5
7{
8 class SlaveProfile : public Config
9 {
10 friend class SlaveConfig;
11
12 public:
13 SlaveProfile(SlaveIdentifierConfig identifier, std::string type, std::string name) :
14 type(type), name(name), identifier(identifier)
15 {
16 }
17
18 std::string getName();
19 std::string getType();
21
22 private:
23 std::string type;
24 std::string name;
25 SlaveIdentifierConfig identifier;
26 };
27
28 class SlaveConfig : public Config
29 {
30 public:
32 std::optional<std::string> type,
33 std::optional<std::string> name);
34
36 std::optional<std::string> type,
37 std::optional<std::string> name,
38 std::shared_ptr<SlaveProfile> profile);
39
40 virtual ~SlaveConfig() = default;
41
43
44 std::optional<std::string> getType() const;
45
46 std::optional<std::string> getName() const;
47
48 bool checkAllItemsRead(std::vector<std::string>& errors) const override;
49
50 void print(std::stringstream& s, int indention) const override;
51
52 void onParsingFinished() override;
53
54 private:
55 SlaveIdentifierConfig identifier;
56 std::optional<std::string> type;
57 std::optional<std::string> name;
58 bool identifierRead = false;
59 };
60
66} // namespace armarx::control::hardware_config
std::optional< std::string > getType() const
bool checkAllItemsRead(std::vector< std::string > &errors) const override
This method is called once the device has read the configuration data it needs.
void onParsingFinished() override
This method is called when the config is completely read form the HardwareConfig file.
void print(std::stringstream &s, int indention) const override
Print this configuration.
SlaveConfig(SlaveIdentifierConfig identifier, std::optional< std::string > type, std::optional< std::string > name)
std::optional< std::string > getName() const
Data structure holding the information necessary to create a SlaveIdentifier.
SlaveProfile(SlaveIdentifierConfig identifier, std::string type, std::string name)
Definition SlaveConfig.h:13