29 class FactoryBaseImpl;
30 class LogStreamBufferImpl;
31 class LogStreamGetterImpl;
39 class NDS3_API BaseImpl:
public std::enable_shared_from_this<BaseImpl>
42 BaseImpl(
const std::string& name);
45 BaseImpl(
const BaseImpl& right) =
delete;
58 void setExternalName(
const std::string& externalName);
66 virtual std::shared_ptr<PortImpl> getPort();
73 const std::string& getComponentName()
const;
75 void setParent(std::shared_ptr<NodeImpl> pParent,
const std::uint32_t parentLevel);
77 std::shared_ptr<NodeImpl> getParent()
const;
79 std::uint32_t getNodeLevel()
const;
87 const std::string& getFullName()
const;
98 const std::string& getFullNameFromPort()
const;
105 const std::string& getFullExternalName()
const;
107 const std::string& getFullExternalNameFromPort()
const;
121 timespec getTimestamp()
const;
125 ThreadBaseImpl* runInThread(
const std::string& name, threadFunction_t
function);
136 std::ostream& getLogger(
const logLevel_t logLevel);
145 bool isLogLevelEnabled(
const logLevel_t logLevel)
const;
153 virtual void setLogLevel(
const logLevel_t logLevel);
163 void defineCommand(
const std::string& command,
const std::string& usage,
const size_t numParameters,
const command_t function);
172 virtual void initialize(FactoryBaseImpl& controlSystem);
178 virtual void deinitialize();
181 virtual std::string buildFullName(
const FactoryBaseImpl& controlSystem)
const ;
182 virtual std::string buildFullNameFromPort(
const FactoryBaseImpl& controlSystem)
const ;
184 virtual std::string buildFullExternalName(
const FactoryBaseImpl& controlSystem)
const = 0;
185 virtual std::string buildFullExternalNameFromPort(
const FactoryBaseImpl& controlSystem)
const = 0;
188 timespec getLocalTimestamp()
const;
206 std::string m_externalName;
211 std::uint32_t m_nodeLevel;
216 std::weak_ptr<NodeImpl> m_pParent;
218 FactoryBaseImpl* m_pFactory;
228 LogStreamGetterImpl* m_logStreamGetter;
230 struct commandDefinition_t
232 commandDefinition_t(
const std::string& command,
const std::string& usage,
const size_t numParameters,
command_t function):
233 m_command(command), m_usage(usage), m_numParameters(numParameters), m_function(function)
237 std::string m_command;
239 size_t m_numParameters;
243 typedef std::list<commandDefinition_t> commands_t;
244 commands_t m_commands;
247 std::string m_cachedFullName;
248 std::string m_cachedFullNameFromPort;
249 std::string m_cachedFullExternalName;
250 std::string m_cahcedFullExternalNameFromPort;
265 #endif // NDSBASEIMPL_H
std::function< timespec()> getTimestampPlugin_t
Definition for a function called to retrieve a time.
Definition: definitions.h:279
logLevel_t
Defines the severities of the log information.
Definition: definitions.h:80
std::function< parameters_t(const parameters_t ¶meters)> command_t
Definition of a function called to execute a node's command.
Definition: definitions.h:216
Defines all the enumeration and common types used across the NDS library.
std::vector< std::string > parameters_t
List of strings passed as parameters to nodes' commands.
Definition: definitions.h:204