cisst-saw
Loading...
Searching...
No Matches
mtsManagerComponentBase.h
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/* ex: set filetype=cpp softtabstop=4 shiftwidth=4 tabstop=4 cindent expandtab: */
3
4/*
5 Author(s): Anton Deguet, Min Yang Jung, Peter Kazanzides
6 Created on: 2010-08-29
7
8 (C) Copyright 2010-2026 Johns Hopkins University (JHU), All Rights Reserved.
9
10--- begin cisst license - do not edit ---
11
12This software is provided "as is" under an open source license, with
13no warranty. The complete license can be found in license.txt and
14http://www.cisst.org/cisst/license.txt.
15
16--- end cisst license ---
17*/
18
19#ifndef _mtsManagerComponentBase_h
20#define _mtsManagerComponentBase_h
21
26
27// Always include last
29
63
65{
67
68public:
71 public:
73 const static std::string ManagerComponent;
75 const static std::string ManagerLocal;
76 };
77
80 public:
81 // Internal interfaces for dynamic component services
82 const static std::string InterfaceInternalProvided;
83 const static std::string InterfaceInternalRequired;
84 const static std::string InterfaceComponentProvided;
85 const static std::string InterfaceComponentRequired;
86 // Interface for system-wide thread-safe logging
87 const static std::string InterfaceSystemLoggerProvided;
88 const static std::string InterfaceSystemLoggerRequired;
89 // Interfaces for sharing execution threads between tasks
90 const static std::string InterfaceExecIn;
91 const static std::string InterfaceExecOut;
92 };
93
96 public:
97 // Dynamic component management
98 const static std::string ComponentCreate;
99 const static std::string ComponentAdd;
100 const static std::string ComponentRemove;
101 const static std::string ComponentGet;
102 const static std::string ComponentConfigure;
103 const static std::string ComponentConnect;
104 const static std::string ComponentDisconnect;
105 const static std::string ComponentStart;
106 const static std::string ComponentStop;
107 const static std::string ComponentResume;
108 const static std::string ComponentGetState;
109 const static std::string LoadLibrary; // dynamic loading
110 // Logging
111 const static std::string PrintLog;
112 // Getters
113 const static std::string GetNamesOfProcesses;
114 const static std::string GetNamesOfComponents;
115 const static std::string GetDescriptionsOfComponents;
116 const static std::string GetNamesOfInterfaces;
117 const static std::string GetDescriptionsOfInterfaces;
118 const static std::string GetListOfConnections;
119 const static std::string GetListOfComponentClasses;
120 const static std::string GetInterfaceProvidedDescription;
121 const static std::string GetInterfaceRequiredDescription;
122 // Get absolute time for each process
123 const static std::string GetAbsoluteTimeInSeconds;
124 // Establishing connections
125 const static std::string GetEndUserInterface;
126 const static std::string AddObserverList;
127 const static std::string RemoveEndUserInterface;
128 const static std::string RemoveObserverList;
129 };
130
133 public:
134 // Events
135 const static std::string AddComponent;
136 const static std::string AddConnection;
137 const static std::string RemoveConnection;
138 const static std::string ChangeState;
139 const static std::string PrintLog;
140 };
141
142 mtsManagerComponentBase(const std::string & componentName);
144
145 static bool IsManagerComponent(const std::string & componentName);
146 static bool IsNameOfInternalInterface(const std::string & interfaceName);
147
148 static bool IsNameOfInterfaceComponentRequired(const std::string & interfaceName);
149 static bool IsNameOfInterfaceComponentProvided(const std::string & interfaceName);
150 static bool IsNameOfInterfaceInternalRequired(const std::string & interfaceName);
151 static bool IsNameOfInterfaceInternalProvided(const std::string & interfaceName);
152
153 static const std::string GetNameOfManagerComponent(void);
154 static const std::string GetNameOfInterfaceComponentRequiredFor(const std::string & componentName);
155 static const std::string GetNameOfInterfaceComponentProvided(void);
156 static const std::string GetNameOfInterfaceInternalRequired(void);
157 static const std::string GetNameOfInterfaceInternalProvided(void);
158
159 // mtsTask implementation
160 void Run(void) override;
161 void Cleanup(void) override;
162};
163
165
166#endif // _mtsManagerComponentBase_h
Definition mtsManagerComponentBase.h:95
static const std::string ComponentAdd
Definition mtsManagerComponentBase.h:99
static const std::string ComponentConfigure
Definition mtsManagerComponentBase.h:102
static const std::string LoadLibrary
Definition mtsManagerComponentBase.h:109
static const std::string AddObserverList
Definition mtsManagerComponentBase.h:126
static const std::string GetNamesOfComponents
Definition mtsManagerComponentBase.h:114
static const std::string ComponentRemove
Definition mtsManagerComponentBase.h:100
static const std::string GetAbsoluteTimeInSeconds
Definition mtsManagerComponentBase.h:123
static const std::string PrintLog
Definition mtsManagerComponentBase.h:111
static const std::string GetDescriptionsOfComponents
Definition mtsManagerComponentBase.h:115
static const std::string ComponentDisconnect
Definition mtsManagerComponentBase.h:104
static const std::string GetInterfaceRequiredDescription
Definition mtsManagerComponentBase.h:121
static const std::string GetInterfaceProvidedDescription
Definition mtsManagerComponentBase.h:120
static const std::string ComponentCreate
Definition mtsManagerComponentBase.h:98
static const std::string RemoveEndUserInterface
Definition mtsManagerComponentBase.h:127
static const std::string GetListOfConnections
Definition mtsManagerComponentBase.h:118
static const std::string GetNamesOfInterfaces
Definition mtsManagerComponentBase.h:116
static const std::string ComponentGetState
Definition mtsManagerComponentBase.h:108
static const std::string GetListOfComponentClasses
Definition mtsManagerComponentBase.h:119
static const std::string ComponentGet
Definition mtsManagerComponentBase.h:101
static const std::string GetDescriptionsOfInterfaces
Definition mtsManagerComponentBase.h:117
static const std::string GetEndUserInterface
Definition mtsManagerComponentBase.h:125
static const std::string ComponentResume
Definition mtsManagerComponentBase.h:107
static const std::string ComponentStop
Definition mtsManagerComponentBase.h:106
static const std::string GetNamesOfProcesses
Definition mtsManagerComponentBase.h:113
static const std::string ComponentConnect
Definition mtsManagerComponentBase.h:103
static const std::string ComponentStart
Definition mtsManagerComponentBase.h:105
static const std::string RemoveObserverList
Definition mtsManagerComponentBase.h:128
Definition mtsManagerComponentBase.h:70
static const std::string ManagerComponent
Definition mtsManagerComponentBase.h:73
static const std::string ManagerLocal
Definition mtsManagerComponentBase.h:75
Definition mtsManagerComponentBase.h:132
static const std::string AddConnection
Definition mtsManagerComponentBase.h:136
static const std::string RemoveConnection
Definition mtsManagerComponentBase.h:137
static const std::string PrintLog
Definition mtsManagerComponentBase.h:139
static const std::string ChangeState
Definition mtsManagerComponentBase.h:138
static const std::string AddComponent
Definition mtsManagerComponentBase.h:135
Definition mtsManagerComponentBase.h:79
static const std::string InterfaceInternalRequired
Definition mtsManagerComponentBase.h:83
static const std::string InterfaceExecOut
Definition mtsManagerComponentBase.h:91
static const std::string InterfaceComponentRequired
Definition mtsManagerComponentBase.h:85
static const std::string InterfaceComponentProvided
Definition mtsManagerComponentBase.h:84
static const std::string InterfaceInternalProvided
Definition mtsManagerComponentBase.h:82
static const std::string InterfaceSystemLoggerRequired
Definition mtsManagerComponentBase.h:88
static const std::string InterfaceSystemLoggerProvided
Definition mtsManagerComponentBase.h:87
static const std::string InterfaceExecIn
Definition mtsManagerComponentBase.h:90
Definition mtsManagerComponentBase.h:65
static bool IsNameOfInterfaceComponentRequired(const std::string &interfaceName)
static const std::string GetNameOfManagerComponent(void)
static bool IsNameOfInterfaceInternalRequired(const std::string &interfaceName)
static bool IsManagerComponent(const std::string &componentName)
virtual ~mtsManagerComponentBase()
void Cleanup(void) override
static const std::string GetNameOfInterfaceInternalRequired(void)
static const std::string GetNameOfInterfaceInternalProvided(void)
mtsManagerComponentBase(const std::string &componentName)
static const std::string GetNameOfInterfaceComponentRequiredFor(const std::string &componentName)
static const std::string GetNameOfInterfaceComponentProvided(void)
static bool IsNameOfInterfaceInternalProvided(const std::string &interfaceName)
void Run(void) override
static bool IsNameOfInterfaceComponentProvided(const std::string &interfaceName)
static bool IsNameOfInternalInterface(const std::string &interfaceName)
mtsTaskFromSignal(const std::string &name, unsigned int sizeStateTable=256)
#define CMN_DECLARE_SERVICES_INSTANTIATION(className)
Definition cmnClassRegisterMacros.h:199
const int CMN_NO_DYNAMIC_CREATION
Definition cmnClassRegisterMacros.h:325
#define CISST_EXPORT
Definition cmnExportMacros.h:50
#define CMN_LOG_ALLOW_DEFAULT
Definition cmnLogLoD.h:76
Rules of exporting.
Declaration of mtsInterfaceProvided.
Declaration of mtsInterfaceRequired.
Defines a task with a Run method trigger by signals (any queued command or event).