- Main Page
- Related Pages
- Modules
- Classes
- Examples

- Class List
- Class Hierarchy
- Class Members

Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes

# MPxClientDeviceNode Class Reference
OpenMayaUI - API module for user interface | Proxy classes

Search for all occurrences

## Detailed Description

Base class for client device creation.

MPxClientDeviceNode is an extension of MPxThreadedDevice node, and is intended for creating maya devices that act as clients. An example of this will be a Maya device that listens for animation data that is sent from another application.

See MPxThreadedDevice node for details on how to use the memory queue system

Plug-ins should create the MPxClientDeviceNode with a kCustomClient parameter.

This class contains the serverName and deviceName attributes. If these attributes are changed, the node will restart the thread so that processing will continue with the new settings.

NOTE: This class relies on the idle event queue to perform the node attribute updating. As a result, it will not work in Maya batch mode.

`#include <MPxClientDeviceNode.h>`

Inheritance diagram for MPxClientDeviceNode:
[legend]

List of all members.

## Public Types
enum | ClientType { kUser, kInternal }
| Defines the type client server. More...
## Public Member Functions
| MPxClientDeviceNode (ClientType typ=kUser)
| Constructor.
virtual | ~MPxClientDeviceNode ()
| Class destructor.
virtual MPxNode::Type | type () const
| Returns the type of node that this is.
ClientType | clientType ()
| Returns the client type of this node.
virtual void | threadHandler (const char *serverName, const char *deviceName)
| This method should be overridden in user defined nodes rather than the parameterless version that exists in the base class.
## Static Public Member Functions
static const char * | className ()
| Returns the name of this class.
## Static Public Attributes
static MObject | serverName
| Server. Search for all occurrences
static MObject | deviceName
| Device. Search for all occurrences

## Member Enumeration Documentation

enum ClientType

Search for all occurrences

Defines the type client server.

Enumerator:

  kUser | Custom client implemented in a plug-in. Search for all occurrences
  kInternal | Autodesk specific. Search for all occurrences

## Constructor & Destructor Documentation

MPxClientDeviceNode | ( | MPxClientDeviceNode::ClientType | type = `kUser` | ) |

Constructor.

The constructor should never call any methods from MPxNode or make any calls that require the existence of the MObject associated with the user defined node. The postConstructor method should be used to do any initialization of this kind.

For example, the postConstructor method would be used to call: setRefreshOutputAttributes()

Parameters:

  [in] | type | specify what type of client will be implemented

## Member Function Documentation

MPxNode::Type type | ( |  | ) | const`[virtual]`

Search for all occurrences

Returns the type of node that this is.

This is used to differentiate user defined nodes that are derived off different MPx base classes.

It is not necessary to override this method.

Returns:
  Type of the node

Reimplemented from MPxThreadedDeviceNode.

MPxClientDeviceNode::ClientType clientType | ( |  | ) |

Search for all occurrences

Returns the client type of this node.

Returns:
  Client type of the node

void threadHandler | ( | const char * | serverName,
|  | const char * | deviceName
| ) |  | `[virtual]`

Search for all occurrences

This method should be overridden in user defined nodes rather than the parameterless version that exists in the base class.

Thread management( creation/destruction/shutdown ) will be handled by Maya. This method will be called when the thread has been created. In a typical implementation, the thread handler will implement a loop for reading information from an external device.

Parameters:

  [in] | serverName | current server name
  [in] | deviceName | current device name

const char * className | ( |  | ) | `[static]`

Search for all occurrences

Returns the name of this class.

Returns:
  The name of this class.

Reimplemented from MPxThreadedDeviceNode.

MPxClientDeviceNode MPxClientDeviceNode MPxClientDeviceNode MPxClientDeviceNode MPxClientDeviceNode MPxClientDeviceNode MPxClientDeviceNode MPxClientDeviceNode MPxClientDeviceNode MPxClientDeviceNode
MPxClientDeviceNode MPxClientDeviceNode MPxClientDeviceNode MPxClientDeviceNode MPxClientDeviceNode MPxClientDeviceNode MPxClientDeviceNode MPxClientDeviceNode MPxClientDeviceNode MPxClientDeviceNode