cisst-saw
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
mtsInterfaceProvided.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 
6  Author(s): Ankur Kapoor, Peter Kazanzides, Anton Deguet
7  Created on: 2004-04-30
8 
9  (C) Copyright 2004-2014 Johns Hopkins University (JHU), All Rights Reserved.
10 
11 --- begin cisst license - do not edit ---
12 
13 This software is provided "as is" under an open source license, with
14 no warranty. The complete license can be found in license.txt and
15 http://www.cisst.org/cisst/license.txt.
16 
17 --- end cisst license ---
18 */
19 
20 
26 #ifndef _mtsInterfaceProvided_h
27 #define _mtsInterfaceProvided_h
28 
30 
46 
47 // Always include last
49 
50 
98 
99  // To dynamically create and add command proxies and event proxies
100  friend class mtsComponentProxy;
101  // To get information about event generators in this interface
102  friend class mtsManagerLocal;
103  // To call GetEndUserInterface
104  friend class mtsComponent;
106 
107  // to allow adding command write generic ...
109  friend class mtsSocketProxyClient;
110  friend class mtsSocketProxyServer;
111 
112  public:
115 
118 
120  enum {DEFAULT_MAIL_BOX_AND_ARGUMENT_QUEUES_SIZE = 64};
121 
124 
127 
130 
133 
136 
139 
142 
145 
148 
154  mtsInterfaceProvided(const std::string & name, mtsComponent * component,
155  mtsInterfaceQueueingPolicy queueingPolicy,
156  mtsCallableVoidBase * postCommandQueuedCallable = 0,
157  bool isProxy = false);
158 
160  virtual ~mtsInterfaceProvided();
161 
164  void Cleanup(void);
165 
178  void SetMailBoxSize(size_t desiredSize);
179 
181  size_t GetMailBoxSize(void) const { return MailBoxSize; }
182 
197  void SetArgumentQueuesSize(size_t desiredSize);
198 
200  size_t GetArgumentQueuesSize(void) const { return ArgumentQueuesSize; }
201 
204  void SetMailBoxAndArgumentQueuesSize(size_t desiredSize);
205 
208  std::vector<std::string> GetNamesOfCommands(void) const;
209  std::vector<std::string> GetNamesOfCommandsVoid(void) const;
210  std::vector<std::string> GetNamesOfCommandsVoidReturn(void) const;
211  std::vector<std::string> GetNamesOfCommandsWrite(void) const;
212  std::vector<std::string> GetNamesOfCommandsWriteReturn(void) const;
213  std::vector<std::string> GetNamesOfCommandsRead(void) const;
214  std::vector<std::string> GetNamesOfCommandsQualifiedRead(void) const;
216 
219  std::vector<std::string> GetNamesOfEventsVoid(void) const;
220  std::vector<std::string> GetNamesOfEventsWrite(void) const;
222 
225  static bool IsSystemEventVoid(const std::string & name);
226 
229  mtsCommandVoid * GetCommandVoid(const std::string & commandName) const;
230  mtsCommandVoidReturn * GetCommandVoidReturn(const std::string & commandName) const;
231  mtsCommandWriteBase * GetCommandWrite(const std::string & commandName) const;
232  mtsCommandWriteReturn * GetCommandWriteReturn(const std::string & commandName) const;
233  mtsCommandRead * GetCommandRead(const std::string & commandName) const;
234  mtsCommandQualifiedRead * GetCommandQualifiedRead(const std::string & commandName) const;
236 
239  mtsMulticastCommandVoid * GetEventVoid(const std::string & eventName) const;
240  mtsMulticastCommandWriteBase * GetEventWrite(const std::string & eventName) const;
242 
243 #ifndef SWIG
244 
253  template <class __classType>
254  inline mtsCommandVoid * AddCommandVoid(void (__classType::*method)(void),
255  __classType * classInstantiation,
256  const std::string & commandName,
258  return this->AddCommandVoid(new mtsCallableVoidMethod<__classType>(method, classInstantiation), commandName, queueingPolicy);
259  }
260 
269  inline mtsCommandVoid * AddCommandVoid(void (*function)(void),
270  const std::string & commandName,
272  return this->AddCommandVoid(new mtsCallableVoidFunction(function), commandName, queueingPolicy);
273  }
274 
277  template <class __classType, class __resultType>
278  inline mtsCommandVoidReturn * AddCommandVoidReturn(void (__classType::*method)(__resultType &),
279  __classType * classInstantiation,
280  const std::string & commandName,
281  const __resultType & resultPrototype,
283  return this->AddCommandVoidReturn(new mtsCallableVoidReturnMethod<__classType, __resultType>(method, classInstantiation),
284  commandName,
285  mtsGenericTypes<__resultType>::ConditionalCreate(resultPrototype, commandName),
286  queueingPolicy);
287  }
288 
289  template <class __classType, class __resultType>
290  inline mtsCommandVoidReturn * AddCommandVoidReturn(void (__classType::*method)(__resultType &),
291  __classType * classInstantiation,
292  const std::string & commandName,
294  return this->AddCommandVoidReturn(new mtsCallableVoidReturnMethod<__classType, __resultType>(method, classInstantiation),
295  commandName,
296  mtsGenericTypes<__resultType>::ConditionalCreate(__resultType(), commandName),
297  queueingPolicy);
298  }
300 
313  template <class __classType, class __argumentType>
314  inline mtsCommandWriteBase * AddCommandWrite(void (__classType::*method)(const __argumentType &),
315  __classType * classInstantiation,
316  const std::string & commandName,
317  const __argumentType & argumentPrototype,
319  return this->AddCommandWrite(new mtsCommandWrite<__classType, __argumentType>(method, classInstantiation, commandName, argumentPrototype),
320  queueingPolicy);
321  }
322 
323  template <class __classType, class __argumentType>
324  inline mtsCommandWriteBase * AddCommandWrite(void (__classType::*method)(const __argumentType &),
325  __classType * classInstantiation,
326  const std::string & commandName,
328  return this->AddCommandWrite<__classType, __argumentType>(method, classInstantiation, commandName, __argumentType(),
329  queueingPolicy);
330  }
332 
335  template <class __classType, class __argumentType, class __resultType>
336  inline mtsCommandWriteReturn * AddCommandWriteReturn(void (__classType::*method)(const __argumentType &, __resultType &),
337  __classType * classInstantiation,
338  const std::string & commandName,
339  const __argumentType & argumentPrototype,
340  const __resultType & resultPrototype,
342  return this->AddCommandWriteReturn(new mtsCallableWriteReturnMethod<__classType, __argumentType, __resultType>(method, classInstantiation),
343  commandName,
344  mtsGenericTypes<__argumentType>::ConditionalCreate(argumentPrototype, commandName),
345  mtsGenericTypes<__resultType>::ConditionalCreate(resultPrototype, commandName),
346  queueingPolicy);
347  }
348 
349  template <class __classType, class __argumentType, class __resultType>
350  inline mtsCommandWriteReturn * AddCommandWriteReturn(void (__classType::*method)(const __argumentType &, __resultType &),
351  __classType * classInstantiation,
352  const std::string & commandName,
354  return this->AddCommandWriteReturn(new mtsCallableWriteReturnMethod<__classType, __argumentType, __resultType>(method, classInstantiation),
355  commandName,
356  mtsGenericTypes<__argumentType>::ConditionalCreate(__argumentType(), commandName),
357  mtsGenericTypes<__resultType>::ConditionalCreate(__resultType(), commandName),
358  queueingPolicy);
359  }
361 
372  template <class __classType, class __argumentType>
373  inline mtsCommandRead * AddCommandRead(void (__classType::*method)(__argumentType &) const,
374  __classType * classInstantiation,
375  const std::string & commandName,
376  const __argumentType & argumentPrototype) {
377  return this->AddCommandRead(new mtsCallableReadReturnVoidMethod<__classType, __argumentType>(method, classInstantiation),
378  commandName,
379  mtsGenericTypes<__argumentType>::ConditionalCreate(argumentPrototype, commandName));
380  }
381 
382  template <class __classType, class __argumentType>
383  inline mtsCommandRead * AddCommandRead(void (__classType::*method)(__argumentType &) const,
384  __classType * classInstantiation,
385  const std::string & commandName)
386  {
387  return this->AddCommandRead(new mtsCallableReadReturnVoidMethod<__classType, __argumentType>(method, classInstantiation),
388  commandName,
389  mtsGenericTypes<__argumentType>::ConditionalCreate(__argumentType(), commandName));
390  }
392 
398  // Note: Could use string for state, rather than the variable
399  template <class _elementType>
400  mtsCommandRead * AddCommandReadState(const mtsStateTable & stateTable,
401  const _elementType & stateData, const std::string & commandName);
402 
408  template <class _elementType>
409  mtsCommandRead * AddCommandReadStateDelayed(const mtsStateTable & stateTable,
410  const _elementType & stateData, const std::string & commandName);
411 
413  template <class _elementType>
414  mtsCommandWriteBase * AddCommandWriteState(const mtsStateTable & stateTable,
415  const _elementType & stateData,
416  const std::string & commandName,
418 
420  template <class __classType, class __argument1Type, class __argument2Type>
421  inline mtsCommandQualifiedRead * AddCommandQualifiedRead(void (__classType::*method)(const __argument1Type &, __argument2Type &) const,
422  __classType * classInstantiation,
423  const std::string & commandName,
424  const __argument1Type & argument1Prototype,
425  const __argument2Type & argument2Prototype) {
426  return this->AddCommandQualifiedRead(new mtsCallableQualifiedReadReturnVoidMethod<__classType, __argument1Type, __argument2Type>(method, classInstantiation),
427  commandName,
428  mtsGenericTypes<__argument1Type>::ConditionalCreate(argument1Prototype, commandName),
429  mtsGenericTypes<__argument2Type>::ConditionalCreate(argument2Prototype, commandName));
430  }
431 
432  template <class __classType, class __argument1Type, class __argument2Type>
433  inline mtsCommandQualifiedRead * AddCommandQualifiedRead(void (__classType::*method)(const __argument1Type &, __argument2Type &) const,
434  __classType * classInstantiation,
435  const std::string & commandName) {
436  return this->AddCommandQualifiedRead(new mtsCallableQualifiedReadReturnVoidMethod<__classType, __argument1Type, __argument2Type>(method, classInstantiation),
437  commandName,
438  mtsGenericTypes<__argument1Type>::ConditionalCreate(__argument1Type(), commandName),
439  mtsGenericTypes<__argument2Type>::ConditionalCreate(__argument2Type(), commandName));
440  }
442 
444  template <class __classType, class __argumentType, class __filteredType>
445  inline mtsCommandWriteBase * AddCommandFilteredWrite(void (__classType::*premethod)(const __argumentType &, __filteredType &) const,
446  void (__classType::*method)(const __filteredType &),
447  __classType * classInstantiation, const std::string & commandName,
448  const __argumentType & argumentPrototype,
449  const __filteredType & filteredPrototype,
451  std::string commandNameFilter(commandName + "Filter");
453  (premethod, classInstantiation),
454  commandNameFilter,
455  mtsGenericTypes<__argumentType>::ConditionalCreate(argumentPrototype, commandName),
456  mtsGenericTypes<__filteredType>::ConditionalCreate(filteredPrototype, commandName)),
457  new mtsCommandWrite<__classType, __filteredType>(method, classInstantiation, commandName, filteredPrototype),
458  queueingPolicy);
459  }
460 
461  template <class __classType, class __argumentType, class __filteredType>
462  inline mtsCommandWriteBase * AddCommandFilteredWrite(void (__classType::*premethod)(const __argumentType &, __filteredType &) const,
463  void (__classType::*method)(const __filteredType &),
464  __classType * classInstantiation, const std::string & commandName,
466  return this->AddCommandFilteredWrite(premethod, method, classInstantiation, commandName,
467  __argumentType(), __filteredType(),
468  queueingPolicy);
469  }
471 #endif // SWIG
472 
478  mtsCommandVoid * AddEventVoid(const std::string & eventName);
479  bool AddEventVoid(mtsFunctionVoid & eventTrigger, const std::string & eventName);
480 
481  template <class __argumentType>
482  mtsCommandWriteBase * AddEventWrite(const std::string & eventName,
483  const __argumentType & argumentPrototype);
484  template <class __argumentType>
485  bool AddEventWrite(mtsFunctionWrite & eventTrigger, const std::string & eventName,
486  const __argumentType & argumentPrototype);
487 
488  mtsCommandWriteBase * AddEventWriteGeneric(const std::string & eventName,
489  const mtsGenericObject & argumentPrototype);
490 
491  bool AddEventWriteGeneric(mtsFunctionWrite & eventTrigger, const std::string & eventName,
492  const mtsGenericObject & argumentPrototype);
494 
503  bool AddObserver(const std::string & eventName, mtsCommandVoid * handler);
504  bool AddObserver(const std::string & eventName, mtsCommandWriteBase * handler);
505  void AddObserverList(const mtsEventHandlerList & argin, mtsEventHandlerList & argout);
507 
515  bool RemoveObserver(const std::string & eventName, mtsCommandVoid * handler);
516  bool RemoveObserver(const std::string & eventName, mtsCommandWriteBase * handler);
517  void RemoveObserverList(const mtsEventHandlerList & argin, mtsEventHandlerList & argout);
519 
522  mtsInterfaceProvided * GetOriginalInterface(void) const;
523 
525  mtsInterfaceProvided * FindEndUserInterfaceByName(const std::string & userName);
526 
529  std::vector<std::string> GetListOfUserNames(void) const;
530 
532  int GetNumberOfEndUsers() const;
533 
537  size_t ProcessMailBoxes(void);
538 
540  void ToStream(std::ostream & outputStream) const;
541 
542  protected:
543 
547  mtsInterfaceProvided(mtsInterfaceProvided * interfaceProvided,
548  const std::string & userName,
549  size_t mailBoxSize,
550  size_t argumentQueuesSize);
551 
552  static std::string GenerateEndUserInterfaceName(const mtsInterfaceProvided * originalInterface,
553  const std::string & userName);
554 
570 public: // PK TEMP for IRE
571  mtsInterfaceProvided * GetEndUserInterface(const std::string & userName);
572 protected: // PK TEMP
573 
585  mtsInterfaceProvided * RemoveEndUserInterface(mtsInterfaceProvided * interfaceProvided,
586  const std::string & userName);
587 
589  template <class _MapType, class _QueuedType>
590  void CloneCommands(const std::string &cmdType, const _MapType &CommandMapIn, _MapType &CommandMapOut);
591 
596  bool UseQueueBasedOnInterfacePolicy(mtsCommandQueueingPolicy queueingPolicy,
597  const std::string & methodName,
598  const std::string & commandName);
599 
601  typedef std::pair<size_t, ThisType *> InterfaceProvidedCreatedPairType;
602  typedef std::list<InterfaceProvidedCreatedPairType> InterfaceProvidedCreatedListType;
604 
606  bool IsProxy;
607 
612 
616 
618  size_t MailBoxSize;
619 
622 
625 
629 
633 
640 
642  std::string UserName;
643 
648  size_t UserCounter;
649 
659  CommandInternalMapType CommandsInternal; // internal commands (not exposed to user)
660 
663 
664 protected:
665  mtsMailBox * GetMailBox(void);
666 
667  mtsCommandVoid * AddCommandVoid(mtsCallableVoidBase * callable,
668  const std::string & name,
670 
671  mtsCommandVoidReturn * AddCommandVoidReturn(mtsCallableVoidReturnBase * callable,
672  const std::string & name,
673  const mtsGenericObject * resultPrototype,
675 
676  mtsCommandWriteBase * AddCommandWrite(mtsCommandWriteBase * command,
678 
679  mtsCommandWriteReturn * AddCommandWriteReturn(mtsCallableWriteReturnBase * callable,
680  const std::string & name,
681  const mtsGenericObject * argumentPrototype,
682  const mtsGenericObject * resultPrototype,
684 
685  mtsCommandWriteBase * AddCommandFilteredWrite(mtsCommandQualifiedRead * filter,
686  mtsCommandWriteBase * command,
688 
689  mtsCommandRead * AddCommandRead(mtsCallableReadBase * callable,
690  const std::string & name,
691  const mtsGenericObject * argumentPrototype);
692 
693  mtsCommandQualifiedRead * AddCommandQualifiedRead(mtsCallableQualifiedReadBase * callable,
694  const std::string & name,
695  const mtsGenericObject * argument1Prototype,
696  const mtsGenericObject * argument2Prototype);
697 
704  mtsCommandVoid * AddCommandVoid(mtsCommandVoid * command);
705  mtsCommandVoidReturn * AddCommandVoidReturn(mtsCommandVoidReturn * command);
706  mtsCommandWriteReturn * AddCommandWriteReturn(mtsCommandWriteReturn * command);
707  mtsCommandRead * AddCommandRead(mtsCommandRead * command);
708  mtsCommandQualifiedRead * AddCommandQualifiedRead(mtsCommandQualifiedRead * command);
710 
711  bool AddEvent(const std::string & commandName, mtsMulticastCommandVoid * generator);
712  bool AddEvent(const std::string & commandName, mtsMulticastCommandWriteBase * generator);
713 
714  bool AddSystemEvents(void);
715 
717  bool GetDescription(mtsInterfaceProvidedDescription & providedInterfaceDescription);
718 };
719 
720 
721 
722 #ifndef SWIG
723 
724 template <class _elementType>
726  const _elementType & stateData, const std::string & commandName)
727 {
728  typedef typename mtsGenericTypes<_elementType>::FinalType FinalType;
729  typedef typename mtsStateTable::Accessor<_elementType> AccessorType;
730 
731  AccessorType * stateAccessor = dynamic_cast<AccessorType *>(stateTable.GetAccessor(stateData));
732  if (!stateAccessor) {
733  CMN_LOG_CLASS_INIT_ERROR << "AddCommandReadState: invalid accessor for command " << commandName << std::endl;
734  return 0;
735  }
736  // NOTE: qualified-read and read destructors will free the memory allocated below for the prototype objects.
738  commandName, new mtsStateIndex, new FinalType(stateData));
739  return this->AddCommandRead(new mtsCallableReadMethod<AccessorType, FinalType>(&AccessorType::GetLatest, stateAccessor),
740  commandName, new FinalType(stateData));
741 }
742 
743 
744 template <class _elementType>
746  const _elementType & stateData, const std::string & commandName)
747 {
748  typedef typename mtsGenericTypes<_elementType>::FinalType FinalType;
749  typedef typename mtsStateTable::Accessor<_elementType> AccessorType;
750 
751  AccessorType * stateAccessor = dynamic_cast<AccessorType *>(stateTable.GetAccessor(stateData));
752  if (!stateAccessor) {
753  CMN_LOG_CLASS_INIT_ERROR << "AddCommandReadState: invalid accessor for command " << commandName << std::endl;
754  return 0;
755  }
756  // NOTE: qualified-read and read destructors will free the memory allocated below for the prototype objects.
757  return this->AddCommandRead(new mtsCallableReadMethod<AccessorType, FinalType>(&AccessorType::GetDelayed, stateAccessor),
758  commandName, new FinalType(stateData));
759 }
760 
761 template <class _elementType>
763  const _elementType & stateData,
764  const std::string & commandName,
765  mtsCommandQueueingPolicy queueingPolicy)
766 {
767  typedef typename mtsGenericTypes<_elementType>::FinalType FinalType;
768  typedef typename mtsStateTable::Accessor<_elementType> AccessorType;
769  AccessorType * stateAccessor = dynamic_cast<AccessorType *>(stateTable.GetAccessor(stateData));
770  if (!stateAccessor) {
771  CMN_LOG_CLASS_INIT_ERROR << "AddCommandWriteState: invalid accessor for command " << commandName << std::endl;
772  return 0;
773  }
775  (&AccessorType::SetCurrent, stateAccessor, commandName, FinalType(stateData)),
776  queueingPolicy);
777 }
778 
779 template <class __argumentType>
781  const __argumentType & argumentPrototype) {
782  mtsMulticastCommandWriteBase * eventMulticastCommand = new mtsMulticastCommandWrite<__argumentType>(eventName, argumentPrototype);
783  if (eventMulticastCommand) {
784  if (AddEvent(eventName, eventMulticastCommand)) {
785  return eventMulticastCommand;
786  }
787  delete eventMulticastCommand;
788  CMN_LOG_CLASS_INIT_ERROR << "AddEventWrite: unable to add event \""
789  << eventName << "\"" << std::endl;
790  return 0;
791  }
792  CMN_LOG_CLASS_INIT_ERROR << "AddEventWrite: unable to create multi-cast command for event \""
793  << eventName << "\"" << std::endl;
794  return 0;
795 }
796 
797 
798 template <class __argumentType>
799 bool mtsInterfaceProvided::AddEventWrite(mtsFunctionWrite & eventTrigger, const std::string & eventName,
800  const __argumentType & argumentPrototype) {
801  mtsCommandWriteBase * command;
802  command = this->AddEventWrite(eventName, argumentPrototype);
803  if (command) {
804  eventTrigger.Bind(command);
805  return true;
806  }
807  return false;
808 }
809 
810 #endif // SWIG
811 
812 
814 
815 #endif // _mtsInterfaceProvided_h
cmnNamedMap< mtsCommandVoidReturn > CommandVoidReturnMapType
Definition: mtsInterfaceProvided.h:126
#define CISST_EXPORT
Definition: cmnExportMacros.h:50
Defines the state data table.
Defines a mailbox for communication between tasks.
mtsInterfaceQueueingPolicy
Definition: mtsForwardDeclarations.h:39
Definition: mtsParameterTypesOld.h:41
mtsCommandWriteBase * AddCommandFilteredWrite(void(__classType::*premethod)(const __argumentType &, __filteredType &) const, void(__classType::*method)(const __filteredType &), __classType *classInstantiation, const std::string &commandName, mtsCommandQueueingPolicy queueingPolicy=MTS_INTERFACE_COMMAND_POLICY)
Definition: mtsInterfaceProvided.h:462
Definition: mtsSocketProxyClient.h:72
Definition: mtsCallableQualifiedReadBase.h:40
mtsCommandRead * AddCommandReadStateDelayed(const mtsStateTable &stateTable, const _elementType &stateData, const std::string &commandName)
Definition: mtsInterfaceProvided.h:745
Definition: mtsCommandVoid.h:44
CommandInternalMapType CommandsInternal
Definition: mtsInterfaceProvided.h:659
mtsMailBox * MailBox
Definition: mtsInterfaceProvided.h:611
bool EndUserInterface
Definition: mtsInterfaceProvided.h:639
size_t GetMailBoxSize(void) const
Definition: mtsInterfaceProvided.h:181
Portability across compilers and operating systems tools.
size_t MailBoxSize
Definition: mtsInterfaceProvided.h:618
mtsCommandWriteReturn * AddCommandWriteReturn(void(__classType::*method)(const __argumentType &, __resultType &), __classType *classInstantiation, const std::string &commandName, mtsCommandQueueingPolicy queueingPolicy=MTS_INTERFACE_COMMAND_POLICY)
Definition: mtsInterfaceProvided.h:350
mtsCommandQueueingPolicy
Definition: mtsForwardDeclarations.h:44
Definition: mtsCallableVoidBase.h:39
cmnNamedMap< mtsCommandWriteReturn > CommandWriteReturnMapType
Definition: mtsInterfaceProvided.h:132
CommandVoidReturnMapType CommandsVoidReturn
Definition: mtsInterfaceProvided.h:652
CommandWriteMapType CommandsWrite
Definition: mtsInterfaceProvided.h:653
std::pair< size_t, ThisType * > InterfaceProvidedCreatedPairType
Definition: mtsInterfaceProvided.h:601
mtsCommandRead * AddCommandRead(void(__classType::*method)(__argumentType &) const, __classType *classInstantiation, const std::string &commandName, const __argumentType &argumentPrototype)
Definition: mtsInterfaceProvided.h:373
Defines a command with no argument.
mtsCommandWriteBase * AddEventWrite(const std::string &eventName, const __argumentType &argumentPrototype)
Definition: mtsInterfaceProvided.h:780
size_t ProcessMailBoxes(InterfacesProvidedMapType &interfaces)
mtsCommandQualifiedRead * AddCommandQualifiedRead(void(__classType::*method)(const __argument1Type &, __argument2Type &) const, __classType *classInstantiation, const std::string &commandName, const __argument1Type &argument1Prototype, const __argument2Type &argument2Prototype)
Definition: mtsInterfaceProvided.h:421
mtsCommandVoidReturn * AddCommandVoidReturn(void(__classType::*method)(__resultType &), __classType *classInstantiation, const std::string &commandName, mtsCommandQueueingPolicy queueingPolicy=MTS_INTERFACE_COMMAND_POLICY)
Definition: mtsInterfaceProvided.h:290
Definition: mtsInterface.h:41
CommandWriteReturnMapType CommandsWriteReturn
Definition: mtsInterfaceProvided.h:654
mtsCommandRead * AddCommandReadState(const mtsStateTable &stateTable, const _elementType &stateData, const std::string &commandName)
Definition: mtsInterfaceProvided.h:725
mtsCommandWriteBase * AddCommandWriteState(const mtsStateTable &stateTable, const _elementType &stateData, const std::string &commandName, mtsCommandQueueingPolicy queueingPolicy=MTS_INTERFACE_COMMAND_POLICY)
Definition: mtsInterfaceProvided.h:762
mtsCommandVoid * AddCommandVoid(void(*function)(void), const std::string &commandName, mtsCommandQueueingPolicy queueingPolicy=MTS_INTERFACE_COMMAND_POLICY)
Definition: mtsInterfaceProvided.h:269
Definition: mtsFunctionVoid.h:36
mtsCommandVoid * AddCommandVoid(void(__classType::*method)(void), __classType *classInstantiation, const std::string &commandName, mtsCommandQueueingPolicy queueingPolicy=MTS_INTERFACE_COMMAND_POLICY)
Definition: mtsInterfaceProvided.h:254
Definition: mtsComponentAddLatency.h:66
Base class for data object in cisstMultiTask.
Definition: mtsGenericObject.h:56
mtsInterfaceProvided ThisType
Definition: mtsInterfaceProvided.h:114
Definition: mtsCallableVoidReturnBase.h:39
cmnNamedMap< mtsCommandWriteBase > CommandWriteMapType
Definition: mtsInterfaceProvided.h:129
Defines a command with one argument sent to multiple interfaces.
cmnNamedMap< mtsMulticastCommandVoid > EventVoidMapType
Definition: mtsInterfaceProvided.h:141
Definition: mtsCallableWriteReturnMethod.h:40
Definition: mtsManagerLocal.h:89
Definition: mtsCommandRead.h:42
Declaration of Manager Component ClientThis class defines the manager component client which is manag...
Definition: mtsManagerComponentClient.h:41
EventVoidMapType EventVoidGenerators
Definition: mtsInterfaceProvided.h:657
mtsCommandWriteBase * AddCommandWrite(void(__classType::*method)(const __argumentType &), __classType *classInstantiation, const std::string &commandName, mtsCommandQueueingPolicy queueingPolicy=MTS_INTERFACE_COMMAND_POLICY)
Definition: mtsInterfaceProvided.h:324
Defines a command with no argument.
Definition: mtsMulticastCommandVoid.h:46
Definition: mtsGenericObjectProxy.h:47
Definition: mtsCommandWriteBase.h:40
std::string UserName
Definition: mtsInterfaceProvided.h:642
Definition: mtsInterfaceCommon.h:928
mtsCommandVoidReturn * AddCommandVoidReturn(void(__classType::*method)(__resultType &), __classType *classInstantiation, const std::string &commandName, const __resultType &resultPrototype, mtsCommandQueueingPolicy queueingPolicy=MTS_INTERFACE_COMMAND_POLICY)
Definition: mtsInterfaceProvided.h:278
Definition: mtsStateTable.h:169
Definition: mtsCallableQualifiedReadReturnVoidMethod.h:41
mtsCommandWriteReturn * AddCommandWriteReturn(void(__classType::*method)(const __argumentType &, __resultType &), __classType *classInstantiation, const std::string &commandName, const __argumentType &argumentPrototype, const __resultType &resultPrototype, mtsCommandQueueingPolicy queueingPolicy=MTS_INTERFACE_COMMAND_POLICY)
Definition: mtsInterfaceProvided.h:336
mtsCallableVoidBase * PostCommandQueuedCallable
Definition: mtsInterfaceProvided.h:662
bool Bind(CommandType *command)
Definition: mtsStateTable.h:67
virtual void ToStream(std::ostream &outputStream) const
Forward declarations and #define for cisstMultiTask.
cmnNamedMap< mtsCommandVoid > CommandVoidMapType
Definition: mtsInterfaceProvided.h:123
Definition: mtsComponent.h:150
Defines a command with no argument.
Defines a command with no argument.
mtsCommandQualifiedRead * AddCommandQualifiedRead(void(__classType::*method)(const __argument1Type &, __argument2Type &) const, __classType *classInstantiation, const std::string &commandName)
Definition: mtsInterfaceProvided.h:433
Defines a command with no argument.
mtsInterface BaseType
Definition: mtsInterfaceProvided.h:117
Definition: mtsCallableReadMethod.h:41
Definition: mtsForwardDeclarations.h:115
size_t GetArgumentQueuesSize(void) const
Definition: mtsInterfaceProvided.h:200
#define CMN_DECLARE_SERVICES(hasDynamicCreation, lod)
Definition: cmnClassRegisterMacros.h:116
CommandQualifiedReadMapType CommandsQualifiedRead
Definition: mtsInterfaceProvided.h:656
mtsCommandWriteBase * AddCommandFilteredWrite(void(__classType::*premethod)(const __argumentType &, __filteredType &) const, void(__classType::*method)(const __filteredType &), __classType *classInstantiation, const std::string &commandName, const __argumentType &argumentPrototype, const __filteredType &filteredPrototype, mtsCommandQueueingPolicy queueingPolicy=MTS_INTERFACE_COMMAND_POLICY)
Definition: mtsInterfaceProvided.h:445
mtsCommandVoid * BlockingCommandReturnExecuted
Definition: mtsInterfaceProvided.h:628
Declaration of mtsInterface.
Definition: mtsCommandQualifiedRead.h:39
Definition: mtsMulticastCommandWriteBase.h:43
Defines a command with no argument.
size_t UserCounter
Definition: mtsInterfaceProvided.h:648
cmnNamedMap< mtsCommandRead > CommandReadMapType
Definition: mtsInterfaceProvided.h:135
bool IsProxy
Definition: mtsInterfaceProvided.h:606
Defines a command with no argument.
Definition: mtsInterfaceProvided.h:96
Definition: mtsCommandVoidReturn.h:47
std::list< InterfaceProvidedCreatedPairType > InterfaceProvidedCreatedListType
Definition: mtsInterfaceProvided.h:602
size_t ArgumentQueuesSize
Definition: mtsInterfaceProvided.h:621
Defines a command with one argument.
mtsStateTable::AccessorBase * GetAccessor(const _elementType &element) const
cmnNamedMap< mtsCommandBase > CommandInternalMapType
Definition: mtsInterfaceProvided.h:147
mtsCommandWriteBase * AddCommandWrite(void(__classType::*method)(const __argumentType &), __classType *classInstantiation, const std::string &commandName, const __argumentType &argumentPrototype, mtsCommandQueueingPolicy queueingPolicy=MTS_INTERFACE_COMMAND_POLICY)
Definition: mtsInterfaceProvided.h:314
InterfaceProvidedCreatedListType InterfacesProvidedCreated
Definition: mtsInterfaceProvided.h:603
Definition: mtsCallableReadReturnVoidMethod.h:41
#define CMN_LOG_CLASS_INIT_ERROR
Definition: cmnLogger.h:113
Definition: mtsCallableVoidFunction.h:35
EventWriteMapType EventWriteGenerators
Definition: mtsInterfaceProvided.h:658
mtsInterfaceQueueingPolicy QueueingPolicy
Definition: mtsInterfaceProvided.h:615
cmnNamedMap< mtsMulticastCommandWriteBase > EventWriteMapType
Definition: mtsInterfaceProvided.h:144
ThisType * OriginalInterface
Definition: mtsInterfaceProvided.h:632
Rules of exporting.
Definition: mtsForwardDeclarations.h:44
Definition: mtsCallableVoidReturnMethod.h:40
Definition: mtsCallableWriteReturnBase.h:40
Definition: mtsCallableVoidMethod.h:45
bool AddEvent(const std::string &commandName, mtsMulticastCommandVoid *generator)
Definition: mtsStateIndex.h:51
Definition: mtsFunctionWrite.h:37
Definition: mtsCommandWriteReturn.h:47
Definition: mtsGenericObjectProxy.h:45
Definition: mtsCommandWrite.h:41
Defines a command with one argument.
mtsCommandRead * AddCommandRead(void(__classType::*method)(__argumentType &) const, __classType *classInstantiation, const std::string &commandName)
Definition: mtsInterfaceProvided.h:383
CommandReadMapType CommandsRead
Definition: mtsInterfaceProvided.h:655
const int CMN_NO_DYNAMIC_CREATION
Definition: cmnClassRegisterMacros.h:328
Definition: mtsCallableQualifiedReadMethod.h:40
Definition: mtsMailBox.h:36
#define CMN_DECLARE_SERVICES_INSTANTIATION(className)
Definition: cmnClassRegisterMacros.h:202
CommandVoidMapType CommandsVoid
Definition: mtsInterfaceProvided.h:651
cmnNamedMap< mtsCommandQualifiedRead > CommandQualifiedReadMapType
Definition: mtsInterfaceProvided.h:138
Defines a command with no argument.
#define CMN_LOG_ALLOW_DEFAULT
Definition: cmnLogLoD.h:76
Definition: mtsCallableReadBase.h:39
mtsCommandVoid * BlockingCommandExecuted
Definition: mtsInterfaceProvided.h:624
Definition: mtsSocketProxyServer.h:81