20 #ifndef _mtsManagerComponentServices_h
21 #define _mtsManagerComponentServices_h
50 } ServiceComponentManagement;
56 } ServiceLogManagement;
79 bool CheckAndWait(
const std::vector<std::string> &list,
const std::string &key,
double &timeoutInSec,
85 bool InitializeInterfaceInternalRequired(
void);
88 {
return (InternalInterfaceRequired->GetConnectedInterface() != 0); }
92 template <
class __
classType>
94 __classType * classInstantiation,
97 return (EventReceivers.AddComponent.SetHandler(method, classInstantiation, queueingPolicy) != 0);
100 template <
class __
classType>
102 __classType * classInstantiation,
105 return (EventReceivers.AddConnection.SetHandler(method, classInstantiation, queueingPolicy) != 0);
108 template <
class __
classType>
110 __classType * classInstantiation,
113 return (EventReceivers.RemoveConnection.SetHandler(method, classInstantiation, queueingPolicy) != 0);
116 template <
class __
classType>
118 __classType * classInstantiation,
121 return (EventReceivers.ChangeState.SetHandler(method, classInstantiation, queueingPolicy) != 0);
127 bool ComponentCreate(
const std::string & className,
const std::string & componentName)
const;
128 bool ComponentCreate(
const std::string & processName,
const std::string & className,
129 const std::string & componentName)
const;
131 bool ComponentCreate(
const std::string & className,
const mtsGenericObject & constructorArg)
const;
132 bool ComponentCreate(
133 const std::string& processName,
const std::string & className,
const mtsGenericObject & constructorArg)
const;
135 bool ComponentConfigure(
const std::string & componentName,
const std::string & configString)
const;
136 bool ComponentConfigure(
137 const std::string& processName,
const std::string & componentName,
const std::string & configString)
const;
139 bool Connect(
const std::string & clientComponentName,
const std::string & clientInterfaceName,
140 const std::string & serverComponentName,
const std::string & serverInterfaceName)
const;
141 bool Connect(
const std::string & clientProcessName,
142 const std::string & clientComponentName,
const std::string & clientInterfaceName,
143 const std::string & serverProcessName,
144 const std::string & serverComponentName,
const std::string & serverInterfaceName)
const;
148 const std::string & clientComponentName,
const std::string & clientInterfaceName,
149 const std::string & serverComponentName,
const std::string & serverInterfaceName)
const;
151 const std::string & clientProcessName,
152 const std::string & clientComponentName,
const std::string & clientInterfaceName,
153 const std::string & serverProcessName,
154 const std::string & serverComponentName,
const std::string & serverInterfaceName)
const;
158 bool ComponentStart(
const std::string & componentName,
const double delayInSecond)
const;
160 {
return ComponentStart(componentName, 0.0); }
161 bool ComponentStart(
const std::string& processName,
const std::string & componentName,
162 const double delayInSecond)
const;
163 bool ComponentStart(
const std::string& processName,
const std::string & componentName)
const
164 {
return ComponentStart(processName, componentName, 0.0); }
167 bool ComponentStop(
const std::string & componentName,
const double delayInSecond)
const;
169 {
return ComponentStop(componentName, 0.0); }
170 bool ComponentStop(
const std::string& processName,
const std::string & componentName,
171 const double delayInSecond)
const;
172 bool ComponentStop(
const std::string& processName,
const std::string & componentName)
const
173 {
return ComponentStop(processName, componentName, 0.0); }
175 bool ComponentResume(
const std::string & componentName,
const double delayInSecond = 0.0)
const;
176 bool ComponentResume(
const std::string& processName,
const std::string & componentName,
177 const double delayInSecond = 0.0)
const;
180 std::string ComponentGetState(
const std::string componentName)
const;
181 std::string ComponentGetState(
const std::string & processName,
const std::string componentName)
const;
183 std::vector<std::string> GetNamesOfProcesses(
void)
const;
184 std::vector<std::string> GetNamesOfComponents(
const std::string & processName)
const;
185 bool GetNamesOfInterfaces(
const std::string & processName,
186 const std::string & componentName,
187 std::vector<std::string> & namesOfInterfacesRequired,
188 std::vector<std::string> & namesOfInterfacesProvided)
const;
190 std::vector<mtsDescriptionConnection> GetListOfConnections(
void)
const;
192 std::vector<mtsDescriptionComponentClass> GetListOfComponentClasses(
void)
const;
193 std::vector<mtsDescriptionComponentClass> GetListOfComponentClasses(
const std::string &processName)
const;
196 GetInterfaceProvidedDescription(
const std::string & processName,
197 const std::string & componentName,
const std::string &interfaceName)
const;
199 GetInterfaceRequiredDescription(
const std::string & processName,
200 const std::string & componentName,
const std::string &interfaceName)
const;
203 bool Load(
const std::string & fileName)
const;
205 bool Load(
const std::string & processName,
const std::string & fileName)
const;
208 void EnableLogForwarding(
void);
209 void EnableLogForwarding(
const std::vector<std::string> &processNames);
210 void DisableLogForwarding(
void);
211 void DisableLogForwarding(
const std::vector<std::string> &processNames);
212 void GetLogForwardingStates(
stdCharVec & states)
const;
216 std::vector<double> GetAbsoluteTimeDiffs(
const std::vector<std::string> &processNames)
const;
221 bool WaitFor(
const std::string & processName,
double timeoutInSec = -1.0);
222 bool WaitFor(
const std::string & processName,
const std::string & componentName,
double timeoutInSec = -1.0);
223 bool WaitFor(
const std::string & processName,
const std::string & componentName,
const std::string & state,
224 double timeoutInSec = -1.0);
231 #endif // _mtsManagerComponentServices_h
Defines the command interfaces.
mtsEventReceiverWrite RemoveConnection
Definition: mtsManagerComponentServices.h:74
#define CISST_EXPORT
Definition: cmnExportMacros.h:50
mtsFunctionRead GetNamesOfProcesses
Definition: mtsManagerComponentServices.h:60
Definition: mtsManagerComponentServices.h:40
Defines the command interfaces.
Definition: mtsFunctionRead.h:37
bool ComponentStop(const std::string &componentName) const
Definition: mtsManagerComponentServices.h:168
Declaration of mtsInterfaceRequired.
Definition: mtsManagerComponentServices.h:52
mtsFunctionQualifiedRead GetAbsoluteTimeDiffs
Definition: mtsManagerComponentServices.h:67
Definition: mtsParameterTypes.h:100
Definition: mtsForwardDeclarations.h:49
Definition: mtsFunctionQualifiedRead.h:37
mtsFunctionWrite Connect
Definition: mtsManagerComponentServices.h:43
Definition: mtsInterfaceRequired.h:85
mtsFunctionQualifiedRead GetLogForwardingStates
Definition: mtsManagerComponentServices.h:55
bool RemoveConnectionEventHandler(void(__classType::*method)(const mtsDescriptionConnection &), __classType *classInstantiation, mtsEventQueueingPolicy queueingPolicy=MTS_INTERFACE_EVENT_POLICY)
Definition: mtsManagerComponentServices.h:109
mtsFunctionWrite Configure
Definition: mtsManagerComponentServices.h:42
mtsFunctionQualifiedRead LoadLibrary
Definition: mtsManagerComponentServices.h:49
~mtsManagerComponentServices()
Definition: mtsManagerComponentServices.h:83
unsigned int ConnectionIDType
Definition: mtsForwardDeclarations.h:150
std::vector< std::string > stdStringVec
Definition: mtsGenericObjectProxy.h:39
mtsFunctionWrite DisableLogForwarding
Definition: mtsManagerComponentServices.h:54
Definition: mtsInterfaceCommon.h:1046
Declaration of mtsEventReceiverBase, mtsEventReceiverVoid, and mtsEventReceiverWrite.
Base class for high level objects.
Definition: cmnGenericObject.h:51
Base class for data object in cisstMultiTask.
Definition: mtsGenericObject.h:56
mtsFunctionQualifiedRead GetState
Definition: mtsManagerComponentServices.h:48
Defines the command interfaces.
Declaration of Base Class for Manager ComponentsIn the networked configuration, the communication bet...
mtsFunctionQualifiedRead GetListOfComponentClasses
Definition: mtsManagerComponentServices.h:64
bool ComponentStart(const std::string &componentName) const
Definition: mtsManagerComponentServices.h:159
mtsFunctionWrite Disconnect
Definition: mtsManagerComponentServices.h:44
mtsEventReceiverWrite ChangeState
Definition: mtsManagerComponentServices.h:75
Definition: mtsEventReceiver.h:180
mtsEventQueueingPolicy
Definition: mtsForwardDeclarations.h:49
mtsEventReceiverWrite AddComponent
Definition: mtsManagerComponentServices.h:72
Definition: mtsInterfaceCommon.h:928
Definition: mtsParameterTypes.h:533
mtsFunctionWrite EnableLogForwarding
Definition: mtsManagerComponentServices.h:53
mtsFunctionQualifiedRead GetInterfaceRequiredDescription
Definition: mtsManagerComponentServices.h:66
bool AddConnectionEventHandler(void(__classType::*method)(const mtsDescriptionConnection &), __classType *classInstantiation, mtsEventQueueingPolicy queueingPolicy=MTS_INTERFACE_EVENT_POLICY)
Definition: mtsManagerComponentServices.h:101
Definition: mtsComponentState.h:34
mtsFunctionQualifiedRead GetInterfaceProvidedDescription
Definition: mtsManagerComponentServices.h:65
#define CMN_DECLARE_SERVICES(hasDynamicCreation, lod)
Definition: cmnClassRegisterMacros.h:116
Definition: mtsManagerComponentServices.h:59
mtsEventReceiverWrite AddConnection
Definition: mtsManagerComponentServices.h:73
mtsFunctionWriteReturn Create
Definition: mtsManagerComponentServices.h:41
bool AddComponentEventHandler(void(__classType::*method)(const mtsDescriptionComponent &), __classType *classInstantiation, mtsEventQueueingPolicy queueingPolicy=MTS_INTERFACE_EVENT_POLICY)
Definition: mtsManagerComponentServices.h:93
Definition: mtsManagerComponentServices.h:71
mtsFunctionWrite Resume
Definition: mtsManagerComponentServices.h:47
bool ComponentStart(const std::string &processName, const std::string &componentName) const
Definition: mtsManagerComponentServices.h:163
bool IsConnected(void) const
Definition: mtsManagerComponentServices.h:87
mtsFunctionQualifiedRead GetNamesOfInterfaces
Definition: mtsManagerComponentServices.h:62
std::vector< char > stdCharVec
Definition: mtsGenericObjectProxy.h:41
Definition: mtsFunctionWrite.h:37
bool ChangeStateEventHandler(void(__classType::*method)(const mtsComponentStateChange &), __classType *classInstantiation, mtsEventQueueingPolicy queueingPolicy=MTS_INTERFACE_EVENT_POLICY)
Definition: mtsManagerComponentServices.h:117
const int CMN_NO_DYNAMIC_CREATION
Definition: cmnClassRegisterMacros.h:328
#define CMN_DECLARE_SERVICES_INSTANTIATION(className)
Definition: cmnClassRegisterMacros.h:202
mtsFunctionQualifiedRead GetNamesOfComponents
Definition: mtsManagerComponentServices.h:61
Definition: mtsParameterTypes.h:769
mtsInterfaceRequired * InternalInterfaceRequired
Definition: mtsManagerComponentServices.h:36
mtsFunctionRead GetListOfConnections
Definition: mtsManagerComponentServices.h:63
Definition: mtsManagerComponentServices.h:31
#define CMN_LOG_ALLOW_DEFAULT
Definition: cmnLogLoD.h:76
mtsFunctionWrite Start
Definition: mtsManagerComponentServices.h:45
Definition: mtsFunctionWriteReturn.h:38
bool ComponentStop(const std::string &processName, const std::string &componentName) const
Definition: mtsManagerComponentServices.h:172
mtsFunctionWrite Stop
Definition: mtsManagerComponentServices.h:46