cisst-saw
|
#include <mtsInterfaceProvided.h>
Public Types | |
enum | { DEFAULT_MAIL_BOX_AND_ARGUMENT_QUEUES_SIZE = 64 } |
typedef mtsInterfaceProvided | ThisType |
typedef mtsInterface | BaseType |
typedef cmnNamedMap < mtsCommandVoid > | CommandVoidMapType |
typedef cmnNamedMap < mtsCommandVoidReturn > | CommandVoidReturnMapType |
typedef cmnNamedMap < mtsCommandWriteBase > | CommandWriteMapType |
typedef cmnNamedMap < mtsCommandWriteReturn > | CommandWriteReturnMapType |
typedef cmnNamedMap < mtsCommandRead > | CommandReadMapType |
typedef cmnNamedMap < mtsCommandQualifiedRead > | CommandQualifiedReadMapType |
typedef cmnNamedMap < mtsMulticastCommandVoid > | EventVoidMapType |
typedef cmnNamedMap < mtsMulticastCommandWriteBase > | EventWriteMapType |
typedef cmnNamedMap < mtsCommandBase > | CommandInternalMapType |
Public Member Functions | |
mtsInterfaceProvided (const std::string &name, mtsComponent *component, mtsInterfaceQueueingPolicy queueingPolicy, mtsCallableVoidBase *postCommandQueuedCallable=0, bool isProxy=false) | |
virtual | ~mtsInterfaceProvided () |
void | Cleanup (void) |
void | SetMailBoxSize (size_t desiredSize) |
size_t | GetMailBoxSize (void) const |
void | SetArgumentQueuesSize (size_t desiredSize) |
size_t | GetArgumentQueuesSize (void) const |
void | SetMailBoxAndArgumentQueuesSize (size_t desiredSize) |
template<class __classType > | |
mtsCommandVoid * | AddCommandVoid (void(__classType::*method)(void), __classType *classInstantiation, const std::string &commandName, mtsCommandQueueingPolicy queueingPolicy=MTS_INTERFACE_COMMAND_POLICY) |
mtsCommandVoid * | AddCommandVoid (void(*function)(void), const std::string &commandName, mtsCommandQueueingPolicy queueingPolicy=MTS_INTERFACE_COMMAND_POLICY) |
template<class _elementType > | |
mtsCommandRead * | AddCommandReadState (const mtsStateTable &stateTable, const _elementType &stateData, const std::string &commandName) |
template<class _elementType > | |
mtsCommandRead * | AddCommandReadStateDelayed (const mtsStateTable &stateTable, const _elementType &stateData, const std::string &commandName) |
template<class _elementType > | |
mtsCommandWriteBase * | AddCommandWriteState (const mtsStateTable &stateTable, const _elementType &stateData, const std::string &commandName, mtsCommandQueueingPolicy queueingPolicy=MTS_INTERFACE_COMMAND_POLICY) |
mtsInterfaceProvided * | GetOriginalInterface (void) const |
mtsInterfaceProvided * | FindEndUserInterfaceByName (const std::string &userName) |
std::vector< std::string > | GetListOfUserNames (void) const |
int | GetNumberOfEndUsers () const |
size_t | ProcessMailBoxes (void) |
void | ToStream (std::ostream &outputStream) const |
mtsInterfaceProvided * | GetEndUserInterface (const std::string &userName) |
std::vector< std::string > | GetNamesOfCommands (void) const |
std::vector< std::string > | GetNamesOfCommandsVoid (void) const |
std::vector< std::string > | GetNamesOfCommandsVoidReturn (void) const |
std::vector< std::string > | GetNamesOfCommandsWrite (void) const |
std::vector< std::string > | GetNamesOfCommandsWriteReturn (void) const |
std::vector< std::string > | GetNamesOfCommandsRead (void) const |
std::vector< std::string > | GetNamesOfCommandsQualifiedRead (void) const |
std::vector< std::string > | GetNamesOfEventsVoid (void) const |
std::vector< std::string > | GetNamesOfEventsWrite (void) const |
mtsCommandVoid * | GetCommandVoid (const std::string &commandName) const |
mtsCommandVoidReturn * | GetCommandVoidReturn (const std::string &commandName) const |
mtsCommandWriteBase * | GetCommandWrite (const std::string &commandName) const |
mtsCommandWriteReturn * | GetCommandWriteReturn (const std::string &commandName) const |
mtsCommandRead * | GetCommandRead (const std::string &commandName) const |
mtsCommandQualifiedRead * | GetCommandQualifiedRead (const std::string &commandName) const |
mtsMulticastCommandVoid * | GetEventVoid (const std::string &eventName) const |
mtsMulticastCommandWriteBase * | GetEventWrite (const std::string &eventName) const |
template<class __classType , class __resultType > | |
mtsCommandVoidReturn * | AddCommandVoidReturn (void(__classType::*method)(__resultType &), __classType *classInstantiation, const std::string &commandName, const __resultType &resultPrototype, mtsCommandQueueingPolicy queueingPolicy=MTS_INTERFACE_COMMAND_POLICY) |
template<class __classType , class __resultType > | |
mtsCommandVoidReturn * | AddCommandVoidReturn (void(__classType::*method)(__resultType &), __classType *classInstantiation, const std::string &commandName, mtsCommandQueueingPolicy queueingPolicy=MTS_INTERFACE_COMMAND_POLICY) |
template<class __classType , class __argumentType > | |
mtsCommandWriteBase * | AddCommandWrite (void(__classType::*method)(const __argumentType &), __classType *classInstantiation, const std::string &commandName, const __argumentType &argumentPrototype, mtsCommandQueueingPolicy queueingPolicy=MTS_INTERFACE_COMMAND_POLICY) |
template<class __classType , class __argumentType > | |
mtsCommandWriteBase * | AddCommandWrite (void(__classType::*method)(const __argumentType &), __classType *classInstantiation, const std::string &commandName, mtsCommandQueueingPolicy queueingPolicy=MTS_INTERFACE_COMMAND_POLICY) |
template<class __classType , class __argumentType , class __resultType > | |
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) |
template<class __classType , class __argumentType , class __resultType > | |
mtsCommandWriteReturn * | AddCommandWriteReturn (void(__classType::*method)(const __argumentType &, __resultType &), __classType *classInstantiation, const std::string &commandName, mtsCommandQueueingPolicy queueingPolicy=MTS_INTERFACE_COMMAND_POLICY) |
template<class __classType , class __argumentType > | |
mtsCommandRead * | AddCommandRead (void(__classType::*method)(__argumentType &) const, __classType *classInstantiation, const std::string &commandName, const __argumentType &argumentPrototype) |
template<class __classType , class __argumentType > | |
mtsCommandRead * | AddCommandRead (void(__classType::*method)(__argumentType &) const, __classType *classInstantiation, const std::string &commandName) |
template<class __classType , class __argument1Type , class __argument2Type > | |
mtsCommandQualifiedRead * | AddCommandQualifiedRead (void(__classType::*method)(const __argument1Type &, __argument2Type &) const, __classType *classInstantiation, const std::string &commandName, const __argument1Type &argument1Prototype, const __argument2Type &argument2Prototype) |
template<class __classType , class __argument1Type , class __argument2Type > | |
mtsCommandQualifiedRead * | AddCommandQualifiedRead (void(__classType::*method)(const __argument1Type &, __argument2Type &) const, __classType *classInstantiation, const std::string &commandName) |
template<class __classType , class __argumentType , class __filteredType > | |
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) |
template<class __classType , class __argumentType , class __filteredType > | |
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) |
mtsCommandVoid * | AddEventVoid (const std::string &eventName) |
bool | AddEventVoid (mtsFunctionVoid &eventTrigger, const std::string &eventName) |
template<class __argumentType > | |
mtsCommandWriteBase * | AddEventWrite (const std::string &eventName, const __argumentType &argumentPrototype) |
template<class __argumentType > | |
bool | AddEventWrite (mtsFunctionWrite &eventTrigger, const std::string &eventName, const __argumentType &argumentPrototype) |
mtsCommandWriteBase * | AddEventWriteGeneric (const std::string &eventName, const mtsGenericObject &argumentPrototype) |
bool | AddEventWriteGeneric (mtsFunctionWrite &eventTrigger, const std::string &eventName, const mtsGenericObject &argumentPrototype) |
bool | AddObserver (const std::string &eventName, mtsCommandVoid *handler) |
bool | AddObserver (const std::string &eventName, mtsCommandWriteBase *handler) |
void | AddObserverList (const mtsEventHandlerList &argin, mtsEventHandlerList &argout) |
bool | RemoveObserver (const std::string &eventName, mtsCommandVoid *handler) |
bool | RemoveObserver (const std::string &eventName, mtsCommandWriteBase *handler) |
void | RemoveObserverList (const mtsEventHandlerList &argin, mtsEventHandlerList &argout) |
![]() | |
mtsInterface (const std::string &interfaceName, mtsComponent *component) | |
virtual | ~mtsInterface () |
const std::string & | GetName (void) const |
const std::string | GetFullName (void) const |
const mtsComponent * | GetComponent (void) const |
const std::string & | GetComponentName (void) const |
![]() | |
virtual | ~cmnGenericObject (void) |
virtual const cmnClassServicesBase * | Services (void) const =0 |
bool | ReconstructFrom (const cmnGenericObject &other) |
std::string | ToString (void) const |
virtual void | ToStreamRaw (std::ostream &outputStream, const char delimiter= ' ', bool headerOnly=false, const std::string &headerPrefix="") const |
virtual bool | FromStreamRaw (std::istream &inputStream, const char delimiter= ' ') |
virtual void | SerializeRaw (std::ostream &outputStream) const |
virtual void | DeSerializeRaw (std::istream &inputStream) |
virtual cmnLogger::StreamBufType * | GetLogMultiplexer (void) const |
virtual size_t | ScalarNumber (void) const |
virtual bool | ScalarNumberIsFixed (void) const |
virtual double | Scalar (const size_t CMN_UNUSED(index)) const throw (std::out_of_range) |
virtual std::string | ScalarDescription (const size_t CMN_UNUSED(index), const std::string &CMN_UNUSED(userDescription)) const |
Static Public Member Functions | |
static bool | IsSystemEventVoid (const std::string &name) |
Protected Types | |
typedef std::pair< size_t, ThisType * > | InterfaceProvidedCreatedPairType |
typedef std::list < InterfaceProvidedCreatedPairType > | InterfaceProvidedCreatedListType |
Static Protected Member Functions | |
static std::string | GenerateEndUserInterfaceName (const mtsInterfaceProvided *originalInterface, const std::string &userName) |
Friends | |
class | mtsComponentProxy |
class | mtsManagerLocal |
class | mtsComponent |
class | mtsManagerComponentClient |
class | mtsComponentAddLatency |
class | mtsSocketProxyClient |
class | mtsSocketProxyServer |
This class implements the provided interface for a component, mtsComponent. It provides services via command objects, which have four signatures:
Void: no parameters Read: one non-const parameter Write: one const parameter QualifiedRead: one non-const (read) and one const (write) parameter
The interface can also generate two types of events:
Void: no parameters Write: one const parameter
Clients (components) connect to this interface and obtain pointers to command objects. They can then execute these command objects to obtain the desired service. Clients can also provide event handlers to the interface – these are actually command objects that the device will execute when the particular event occurs (Observer Pattern).
This class includes both public and protected members functions. The public members are for access by connected clients. The protected members are for access by the owning device, in order to populate the lists of commands and events.
Note that this class is instantiated by both mtsComponent and its derived mtsTask classes, via the virtual method AddInterfaceProvided. Because mtsTask (and its derived classes) have a thread, they (by default) instantiate mtsInterfaceProvided with a queueing policy of MTS_COMMANDS_SHOULD_BE_QUEUED. In this case, the provided interface uses queues for Void and Write commands in order to maintain thread safety. Furthermore, a separate queue is allocated for each client that connects to this interface – this ensures that each queue has only a single writer (the client) and a single reader (this task), so thread-safety can be achieved without relying on potentially blocking mutexes. This is implemented by the GetEndUserInterface method, which returns a new mtsInterfaceProvided object to the client component. In other words, the original provided interface acts as a provided interface factory that generates a "copy" of the provided interface for every client. Note that GetEndUserInterface is protected, and should only be called by mtsComponent.
Base class
Typedef for a map of internally-generated commands (only used for garbage collection).
Typedef for a map of name and qualified read commands.
Typedef for a map of name and read commands.
Typedef for a map of name and void commands.
Typedef for a map of name and void return commands.
Typedef for a map of name and write commands.
Typedef for a map of name and write return commands.
Typedef for a map of event name and void event generators.
Typedef for a map of event name and write event generators.
|
protected |
|
protected |
types and containers to store interfaces cloned for thread safety
This type
anonymous enum |
mtsInterfaceProvided::mtsInterfaceProvided | ( | const std::string & | name, |
mtsComponent * | component, | ||
mtsInterfaceQueueingPolicy | queueingPolicy, | ||
mtsCallableVoidBase * | postCommandQueuedCallable = 0 , |
||
bool | isProxy = false |
||
) |
Constructor with a post queued command. This constructor is used by mtsTaskFromSignal to provide the command used everytime one uses a queued command of this interface (write and void commands). The post command queued command in this case performs a wakeup (signal) on the task's thread.
|
virtual |
Default Destructor.
|
protected |
Constructor used to create an end user interface (object factory) for each user (interface required). This constructor is called by the method GetEndUserInterface.
|
inline |
|
inline |
|
protected |
|
inline |
|
inline |
|
protected |
|
protected |
|
inline |
Add a read command to the provided interface based on a method and an object instantiating the method. This method creates an mtsCommandRead object and then calls the AddCommandRead virtual method.
method | method pointer |
classInstantiation | an instantiation of the method's class |
commandName | name as it should appear in the interface |
argumentPrototype | example of argument that should be used to call this method. This is especially useful for commands using objects of variable size (dynamic allocation) |
|
inline |
|
protected |
|
protected |
mtsCommandRead * mtsInterfaceProvided::AddCommandReadState | ( | const mtsStateTable & | stateTable, |
const _elementType & | stateData, | ||
const std::string & | commandName | ||
) |
Adds command objects to read from the state table (by default, all tasks have state tables, but it is possible to have a state table in a device). Note that there are two command objects: a 'read' command to get the latest value, and a 'qualified read' command to get the value at the specified time.
mtsCommandRead * mtsInterfaceProvided::AddCommandReadStateDelayed | ( | const mtsStateTable & | stateTable, |
const _elementType & | stateData, | ||
const std::string & | commandName | ||
) |
Adds command objects to read from the state table with a delay. The commands created ('read' and 'qualified read') are similar to the commands added using AddCommandReadState except that instead of reading from the head, these commands read from head - delay.
|
inline |
Add a void command to the provided interface based on a method and an object instantiating the method. This method creates an mtsCommandVoid object and then calls the AddCommandVoid virtual method; this method is overridden in mtsInterfaceProvided to queue the void command (thereby ensuring thread safety).
method | method pointer |
classInstantiation | an instantiation of the method's class |
commandName | name as it should appear in the interface |
|
inline |
Add a void command to the provided interface based on a void function. This method creates an mtsCommandVoid object and then calls the AddCommandVoid virtual method; this method is overridden in mtsInterfaceProvided to queue the void command (thereby ensuring thread safety).
function | void function pointer |
commandName | name as it should appear in the interface |
|
protected |
|
protected |
Methods to add an existing command to the interface. These methods will not check the queueing policy of the interface nor the type of command (queued or not). These methods must be used with extreme caution since they bypass the built-in thread safety mechanisms.
|
inline |
Add a void command with result.
|
inline |
|
protected |
|
protected |
|
inline |
Add a write command to the provided interface based on a method and an object instantiating the method. This method creates an mtsCommandWrite object and then calls the AddCommandWrite virtual method; this method is overridden in mtsInterfaceProvided to queue the write command (thereby ensuring thread safety).
method | method pointer |
classInstantiation | an instantiation of the method's class |
commandName | name as it should appear in the interface |
argumentPrototype | example of argument that should be used to call this method. This is especially useful for commands using objects of variable size (dynamic allocation) |
|
inline |
|
protected |
|
inline |
Add a write command with result.
|
inline |
|
protected |
|
protected |
mtsCommandWriteBase * mtsInterfaceProvided::AddCommandWriteState | ( | const mtsStateTable & | stateTable, |
const _elementType & | stateData, | ||
const std::string & | commandName, | ||
mtsCommandQueueingPolicy | queueingPolicy = MTS_INTERFACE_COMMAND_POLICY |
||
) |
Adds command object to write to state table.
|
protected |
|
protected |
mtsCommandVoid* mtsInterfaceProvided::AddEventVoid | ( | const std::string & | eventName | ) |
Add events to the interface. This method creates the multicast command used to trigger all the observers for the event. These methods are used to populate the provided interface.
bool mtsInterfaceProvided::AddEventVoid | ( | mtsFunctionVoid & | eventTrigger, |
const std::string & | eventName | ||
) |
mtsCommandWriteBase * mtsInterfaceProvided::AddEventWrite | ( | const std::string & | eventName, |
const __argumentType & | argumentPrototype | ||
) |
bool mtsInterfaceProvided::AddEventWrite | ( | mtsFunctionWrite & | eventTrigger, |
const std::string & | eventName, | ||
const __argumentType & | argumentPrototype | ||
) |
mtsCommandWriteBase* mtsInterfaceProvided::AddEventWriteGeneric | ( | const std::string & | eventName, |
const mtsGenericObject & | argumentPrototype | ||
) |
bool mtsInterfaceProvided::AddEventWriteGeneric | ( | mtsFunctionWrite & | eventTrigger, |
const std::string & | eventName, | ||
const mtsGenericObject & | argumentPrototype | ||
) |
bool mtsInterfaceProvided::AddObserver | ( | const std::string & | eventName, |
mtsCommandVoid * | handler | ||
) |
Add an observer for the specified event. These methods are used to connect to an existing provided interface, ideally from a required interface.
name | Name of event |
handler | command object that implements event handler |
bool mtsInterfaceProvided::AddObserver | ( | const std::string & | eventName, |
mtsCommandWriteBase * | handler | ||
) |
void mtsInterfaceProvided::AddObserverList | ( | const mtsEventHandlerList & | argin, |
mtsEventHandlerList & | argout | ||
) |
|
protected |
void mtsInterfaceProvided::Cleanup | ( | void | ) |
The member function that is executed once the task terminates. This does some cleanup work
|
protected |
Templated utility method to clone commands
mtsInterfaceProvided* mtsInterfaceProvided::FindEndUserInterfaceByName | ( | const std::string & | userName | ) |
Find an end-user interface given a client name.
|
staticprotected |
|
inline |
Get the current argument queues size.
mtsCommandQualifiedRead* mtsInterfaceProvided::GetCommandQualifiedRead | ( | const std::string & | commandName | ) | const |
mtsCommandRead* mtsInterfaceProvided::GetCommandRead | ( | const std::string & | commandName | ) | const |
mtsCommandVoid* mtsInterfaceProvided::GetCommandVoid | ( | const std::string & | commandName | ) | const |
Find a command based on its name.
mtsCommandVoidReturn* mtsInterfaceProvided::GetCommandVoidReturn | ( | const std::string & | commandName | ) | const |
mtsCommandWriteBase* mtsInterfaceProvided::GetCommandWrite | ( | const std::string & | commandName | ) | const |
mtsCommandWriteReturn* mtsInterfaceProvided::GetCommandWriteReturn | ( | const std::string & | commandName | ) | const |
|
protected |
Get description of this interface (with serialized argument information)
mtsInterfaceProvided* mtsInterfaceProvided::GetEndUserInterface | ( | const std::string & | userName | ) |
This method creates a copy of the existing interface. The copy is required for each new user, i.e. for each required interface connected to this provided interface if queueing has been enabled. This method should not be called on a provided interface if queueing is not enable. The newly created provided interface is created using the current MailBoxSize (see SetMailBoxSize) and ArgumentQueuesSize (see SetArgumentQueuesSize). Commands and events should only be added to the original interface.
userName | name of the required interface being connected to this provided interface. This information is used for logging only. |
mtsMulticastCommandVoid* mtsInterfaceProvided::GetEventVoid | ( | const std::string & | eventName | ) | const |
Find an event based on its name.
mtsMulticastCommandWriteBase* mtsInterfaceProvided::GetEventWrite | ( | const std::string & | eventName | ) | const |
std::vector<std::string> mtsInterfaceProvided::GetListOfUserNames | ( | void | ) | const |
Returns a list of user names (name of connected required interface). Used to remove provided interface in a thread-safe way
|
protected |
|
inline |
Get the current mailbox size.
std::vector<std::string> mtsInterfaceProvided::GetNamesOfCommands | ( | void | ) | const |
Get the names of commands provided by this interface.
std::vector<std::string> mtsInterfaceProvided::GetNamesOfCommandsQualifiedRead | ( | void | ) | const |
std::vector<std::string> mtsInterfaceProvided::GetNamesOfCommandsRead | ( | void | ) | const |
std::vector<std::string> mtsInterfaceProvided::GetNamesOfCommandsVoid | ( | void | ) | const |
std::vector<std::string> mtsInterfaceProvided::GetNamesOfCommandsVoidReturn | ( | void | ) | const |
std::vector<std::string> mtsInterfaceProvided::GetNamesOfCommandsWrite | ( | void | ) | const |
std::vector<std::string> mtsInterfaceProvided::GetNamesOfCommandsWriteReturn | ( | void | ) | const |
std::vector<std::string> mtsInterfaceProvided::GetNamesOfEventsVoid | ( | void | ) | const |
Get the names of events coming from this interface
std::vector<std::string> mtsInterfaceProvided::GetNamesOfEventsWrite | ( | void | ) | const |
int mtsInterfaceProvided::GetNumberOfEndUsers | ( | ) | const |
Return number of active end-user interfaces.
mtsInterfaceProvided* mtsInterfaceProvided::GetOriginalInterface | ( | void | ) | const |
Get the original interface. This allows to retrieve the original interface from a copy created using GetEndUserInterface.
|
static |
Returns true if the event is a system event (e.g., BlockingCommandExecuted or BlockingCommandReturnExecuted)
size_t mtsInterfaceProvided::ProcessMailBoxes | ( | void | ) |
Method used to process all commands queued in mailboxes. This method should only be used by the component that owns the interface for thread safety.
|
protected |
This method deletes the end-user interface created by GetEndUserInterface. Note that there are two mtsInterfaceProvided objects: (1) the interfaceProvided parameter, which should be a pointer to the end-user interface to be removed (2) the "this" pointer, which should point to the original interface.
interfaceProvided | the end-user interface to be removed |
userName | name of the required interface (used for logging only) |
bool mtsInterfaceProvided::RemoveObserver | ( | const std::string & | eventName, |
mtsCommandVoid * | handler | ||
) |
Remove an observer for the specified event. These methods are used when disconnecting from the provided interface.
name | Name of event |
handler | command object that implements event handler |
bool mtsInterfaceProvided::RemoveObserver | ( | const std::string & | eventName, |
mtsCommandWriteBase * | handler | ||
) |
void mtsInterfaceProvided::RemoveObserverList | ( | const mtsEventHandlerList & | argin, |
mtsEventHandlerList & | argout | ||
) |
void mtsInterfaceProvided::SetArgumentQueuesSize | ( | size_t | desiredSize | ) |
Set the desired size for all argument queues. If queueing has been enabled for this interface, each write command (write or write with return) manages it's own queue of arguments. The command itself is queued in the interface mailbox (see SetMailBoxSize) and the argument is queued by the command itself. There is no reason to have an argument queue larger than the command mail box as there can't be more arguments queued than commands. The reciprocal is not true as different commands can be queued. So, the argument queue size should be lesser or equal to the mail box size.
The size of argument queues can't be changed while being used (i.e. while any required interface is connected to the provided interface.
void mtsInterfaceProvided::SetMailBoxAndArgumentQueuesSize | ( | size_t | desiredSize | ) |
Set the desired size for the command mail box and argument queues. See SetMailBoxSize and SetArgumentQueuesSize.
void mtsInterfaceProvided::SetMailBoxSize | ( | size_t | desiredSize | ) |
Set the desired size for the command mail box. If queueing has been enabled for this interface, a single mailbox is created for each connected required interface. All commands provided by this interface share a single mailbox but each write command (write and write with return) manages it's own queue for the command argument. To change the argument queue size, use SetArgumentQueuesSize. To change both parameters at once, use SetMailBoxAndArgumentQueuesSize.
The size of the mail box can't be changed while being used (i.e. while any required interface is connected to the provided interface.
|
virtual |
Send a human readable description of the interface.
Reimplemented from cmnGenericObject.
|
protected |
Utility method to determine if a command should be queued or not based on the default policy for the interface and the user's requested policy. This method also generates a warning or error in the log if needed.
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
protected |
Size to be used for argument queues
|
protected |
Command to trigger void event for blocking commands.
|
protected |
Command to trigger void event for blocking commands with a return value.
|
protected |
|
protected |
|
protected |
|
protected |
Containers of commands
|
protected |
|
protected |
|
protected |
|
protected |
Flag to indicate if this interface can be used directly or if it should be used as a factory to create a new interface. When the interface relies assumes queued commands, the first interface should be created as a factory or template. All users should use their own copy created using GetEndUserInterface().
|
protected |
|
protected |
|
protected |
|
protected |
Indicates if this interface is used to generate a proxy
|
protected |
Mailbox (if supported). Mailboxes should only be provided for end user provided interfaces (if needed). Factory interfaces should not use the mailbox.
|
protected |
Size to be used for mailboxes
|
protected |
If this interface was created using an existing one, keep a pointer on the original one.
|
protected |
Post command queued command
|
protected |
Flag to determine if by default void and write commands are queued.
|
protected |
Counter for number of users, i.e. number or required interfaces connected to this provided interface. This number should remain consistent with the size of created interfaces list.
|
protected |
Name of user for end user interface