26 lines
631 B
C++
26 lines
631 B
C++
|
|
#pragma once
|
|||
|
|
|
|||
|
|
#include <cstdint>
|
|||
|
|
#include <string>
|
|||
|
|
#include <map>
|
|||
|
|
#include <memory>
|
|||
|
|
|
|||
|
|
#include "profinet_submodule.hpp"
|
|||
|
|
|
|||
|
|
|
|||
|
|
class ProfinetModule {
|
|||
|
|
public:
|
|||
|
|
ProfinetModule(uint32_t module_id, std::string module_name);
|
|||
|
|
|
|||
|
|
bool addSubmodule(std::shared_ptr<ProfinetSubmodule>& submodule_ptr);
|
|||
|
|
|
|||
|
|
std::shared_ptr<ProfinetSubmodule> getSubmodulePtr(uint32_t submodule_id);
|
|||
|
|
|
|||
|
|
public:
|
|||
|
|
const uint32_t m_id; /// module id
|
|||
|
|
const std::string m_name; /// module name
|
|||
|
|
|
|||
|
|
private:
|
|||
|
|
/// Набор поддерживаемых подмодулей
|
|||
|
|
std::map<uint32_t, std::shared_ptr<ProfinetSubmodule>> m_submodules;
|
|||
|
|
};
|