cisst-saw
Loading...
Searching...
No Matches
mtsCommandQueuedVoid Class Reference

#include <mtsCommandQueuedVoid.h>

Inheritance diagram for mtsCommandQueuedVoid:
mtsCommandVoid mtsCommandBase

Public Types

typedef mtsCommandVoid BaseType
typedef mtsCommandQueuedVoid ThisType
Public Types inherited from mtsCommandVoid
typedef mtsCommandBase BaseType
typedef mtsCommandVoid ThisType

Public Member Functions

 mtsCommandQueuedVoid (void)
 mtsCommandQueuedVoid (mtsCallableVoidBase *callable, const std::string &name, mtsMailBox *mailBox, size_t size)
virtual ~mtsCommandQueuedVoid ()
virtual mtsCommandQueuedVoidClone (mtsMailBox *mailBox, size_t size) const
virtual void Allocate (unsigned int CMN_UNUSED(size))
mtsExecutionResult Execute (mtsBlockingType blocking)
mtsExecutionResult Execute (mtsBlockingType blocking, mtsCommandWriteBase *finishedEventHandler)
mtsBlockingType BlockingFlagGet (void)
mtsCommandWriteBaseFinishedEventGet (void)
std::string GetMailBoxName (void) const
void ToStream (std::ostream &outputStream) const
Public Member Functions inherited from mtsCommandVoid
 mtsCommandVoid (void)
 mtsCommandVoid (mtsCallableVoidBase *callable, const std::string &name)
virtual ~mtsCommandVoid ()
virtual mtsExecutionResult Execute (mtsBlockingType CMN_UNUSED(blocking))
virtual mtsExecutionResult Execute (mtsBlockingType blocking, mtsCommandWriteBase *CMN_UNUSED(finishedEventHandler))
mtsCallableVoidBaseGetCallable (void) const
void ToStream (std::ostream &outputStream) const
size_t NumberOfArguments (void) const
bool Returns (void) const
Public Member Functions inherited from mtsCommandBase
 mtsCommandBase (void)
 mtsCommandBase (const std::string &name)
virtual ~mtsCommandBase ()
virtual std::string ToString (void) const
void Enable (void)
void Disable (void)
bool IsEnabled (void) const
bool IsDisabled (void) const
const std::string & GetName (void) const

Protected Attributes

mtsMailBoxMailBox
mtsQueue< mtsBlockingTypeBlockingFlagQueue
mtsQueue< mtsCommandWriteBase * > FinishedEventQueue
Protected Attributes inherited from mtsCommandVoid
mtsCallableVoidBaseCallable
Protected Attributes inherited from mtsCommandBase
std::string Name
bool EnableFlag

Member Typedef Documentation

◆ BaseType

◆ ThisType

Constructor & Destructor Documentation

◆ mtsCommandQueuedVoid() [1/2]

mtsCommandQueuedVoid::mtsCommandQueuedVoid ( void )

◆ mtsCommandQueuedVoid() [2/2]

mtsCommandQueuedVoid::mtsCommandQueuedVoid ( mtsCallableVoidBase * callable,
const std::string & name,
mtsMailBox * mailBox,
size_t size )

◆ ~mtsCommandQueuedVoid()

virtual mtsCommandQueuedVoid::~mtsCommandQueuedVoid ( )
inlinevirtual

Member Function Documentation

◆ Allocate()

virtual void mtsCommandQueuedVoid::Allocate ( unsigned int CMN_UNUSEDsize)
inlinevirtual

◆ BlockingFlagGet()

mtsBlockingType mtsCommandQueuedVoid::BlockingFlagGet ( void )

◆ Clone()

virtual mtsCommandQueuedVoid * mtsCommandQueuedVoid::Clone ( mtsMailBox * mailBox,
size_t size ) const
virtual

◆ Execute() [1/2]

mtsExecutionResult mtsCommandQueuedVoid::Execute ( mtsBlockingType blocking)

For a queued command, Execute means queueing the command. This method will return mtsExecutionResult::COMMAND_QUEUED if the command has been queued; it doesn't mean that the actual has been executed yet. If the command has been disabled (see mtsCommandBase::Disable()), Execute will return mtsExecutionResult::COMMAND_DISABLED. Finally, if the mailbox is full, Execute() will return mtsExecutionResult::INTERFACE_COMMAND_MAILBOX_FULL. This can happen if the task receiving the command doesn't process/empty its mailboxes fast enough.

◆ Execute() [2/2]

mtsExecutionResult mtsCommandQueuedVoid::Execute ( mtsBlockingType blocking,
mtsCommandWriteBase * finishedEventHandler )

This version of Execute includes a command pointer that the recipient can use to indicate when the command has been finished (e.g., for a blocking command)

◆ FinishedEventGet()

mtsCommandWriteBase * mtsCommandQueuedVoid::FinishedEventGet ( void )

◆ GetMailBoxName()

std::string mtsCommandQueuedVoid::GetMailBoxName ( void ) const

◆ ToStream()

void mtsCommandQueuedVoid::ToStream ( std::ostream & outputStream) const
virtual

Implements mtsCommandBase.

Member Data Documentation

◆ BlockingFlagQueue

mtsQueue<mtsBlockingType> mtsCommandQueuedVoid::BlockingFlagQueue
protected

Queue of flags to indicate if the command is blocking or not

◆ FinishedEventQueue

mtsQueue<mtsCommandWriteBase *> mtsCommandQueuedVoid::FinishedEventQueue
protected

Queue for return events (to send result to caller)

◆ MailBox

mtsMailBox* mtsCommandQueuedVoid::MailBox
protected

Mailbox used to queue the commands


The documentation for this class was generated from the following file: