Classes | Typedefs | Enumerations | Functions | Variables
Phidget Manager

Classes

struct  _CPhidgetManager
struct  _CPhidgetManagerList

Typedefs

typedef struct _CPhidgetManager CPhidgetManager
typedef struct _CPhidgetManagerList CPhidgetManagerList
typedef struct
_CPhidgetManagerList
CPhidgetManagerListHandle

Enumerations

enum  CPhidgetManagerState { PHIDGETMANAGER_INACTIVE = 1, PHIDGETMANAGER_ACTIVE, PHIDGETMANAGER_ACTIVATING }

Functions

int CPhidgetAttachEvent (CPhidgetHandle phid)
int CPhidgetDetachEvent (CPhidgetHandle phid)
int CPhidgetManager_areEqual (void *arg1, void *arg2)
PHIDGET21_API int CCONV CPhidgetManager_close (CPhidgetManagerHandle phidm)
PHIDGET21_API int CCONV CPhidgetManager_create (CPhidgetManagerHandle *phidm)
PHIDGET21_API int CCONV CPhidgetManager_delete (CPhidgetManagerHandle phidm)
void CPhidgetManager_free (void *arg)
PHIDGET21_API int CCONV CPhidgetManager_freeAttachedDevicesArray (CPhidgetHandle phidArray[])
PHIDGET21_API int CCONV CPhidgetManager_getAttachedDevices (CPhidgetManagerHandle phidm, CPhidgetHandle *phidArray[], int *count)
PHIDGET21_API int CCONV CPhidgetManager_getServerAddress (CPhidgetManagerHandle phidm, const char **address, int *port)
PHIDGET21_API int CCONV CPhidgetManager_getServerID (CPhidgetManagerHandle phidm, const char **serverID)
PHIDGET21_API int CCONV CPhidgetManager_getServerStatus (CPhidgetManagerHandle phidm, int *serverStatus)
PHIDGET21_API int CCONV CPhidgetManager_open (CPhidgetManagerHandle phidm)
PHIDGET21_API int CCONV CPhidgetManager_openRemote (CPhidgetManagerHandle phidm, const char *serverID, const char *password)
PHIDGET21_API int CCONV CPhidgetManager_openRemoteIP (CPhidgetManagerHandle phidm, const char *address, int port, const char *password)
int CPhidgetManager_poll ()
PHIDGET21_API int CCONV CPhidgetManager_set_OnAttach_Handler (CPhidgetManagerHandle phidm, int(CCONV *fptr)(CPhidgetHandle phid, void *userPtr), void *userPtr)
PHIDGET21_API int CCONV CPhidgetManager_set_OnDetach_Handler (CPhidgetManagerHandle phidm, int(CCONV *fptr)(CPhidgetHandle phid, void *userPtr), void *userPtr)
PHIDGET21_API int CCONV CPhidgetManager_set_OnError_Handler (CPhidgetManagerHandle phidm, int(CCONV *fptr)(CPhidgetManagerHandle phidm, void *userPtr, int errorCode, const char *errorString), void *userPtr)
PHIDGET21_API int CCONV CPhidgetManager_set_OnServerConnect_Handler (CPhidgetManagerHandle phidm, int(CCONV *fptr)(CPhidgetManagerHandle phidm, void *userPtr), void *userPtr)
PHIDGET21_API int CCONV CPhidgetManager_set_OnServerDisconnect_Handler (CPhidgetManagerHandle phidm, int(CCONV *fptr)(CPhidgetManagerHandle phidm, void *userPtr), void *userPtr)

Variables

int ActivePhidgetManagers
CPhidgetManagerListHandle localPhidgetManagers

Detailed Description

These calls are specific to the Phidget Manager. The Phidget Manager allows enumeration of all connected devices and notification of device attach and detach events.


Typedef Documentation


Enumeration Type Documentation

A Phidget Manager handle.

Enumerator:
PHIDGETMANAGER_INACTIVE 
PHIDGETMANAGER_ACTIVE 
PHIDGETMANAGER_ACTIVATING 

Definition at line 18 of file cphidgetmanager.h.


Function Documentation

Definition at line 54 of file cphidgetmanager.c.

Definition at line 82 of file cphidgetmanager.c.

int CPhidgetManager_areEqual ( void arg1,
void arg2 
)

Definition at line 18 of file cphidgetmanager.c.

Closes a Phidget Manager.

Parameters:
phidmAn opened phidget manager handle.

Definition at line 276 of file cphidgetmanager.c.

Creates a Phidget Manager handle.

Parameters:
phidmA pointer to an empty phidget manager handle.

Definition at line 252 of file cphidgetmanager.c.

Frees a Phidget Manager handle.

Parameters:
phidmA closed phidget manager handle.

Definition at line 324 of file cphidgetmanager.c.

Definition at line 24 of file cphidgetmanager.c.

Frees the array that is allocated when CPhidgetManager_getAttachedDevices is called. Since the array is malloced internally to the library, it should also be freed internally to the library.

Parameters:
phidArrayAn array of CPhidgetHandles.

Definition at line 428 of file cphidgetmanager.c.

Gets a list of all currently attached Phidgets. When you are finished with the list, free it with CPhidgetManager_freeAttachedDevicesArray.

Parameters:
phidmAn opened phidget manager handle.
phidArrayAn empty pointer for returning the list of Phidgets. Note that this list is created internally, you don't need to pass in a array.
countAn int pointer for returning the list size

Definition at line 435 of file cphidgetmanager.c.

PHIDGET21_API int CCONV CPhidgetManager_getServerAddress ( CPhidgetManagerHandle  phidm,
const char **  address,
int *  port 
)

Gets the address and port of a remotely opened Phidget Manager. This will fail if the manager was opened locally.

Parameters:
phidmA connected phidget manager handle.
addressA pointer which will be set to a char array containing the address string.
portAn int pointer for returning the port number.

Definition at line 334 of file cphidgetmanager.c.

PHIDGET21_API int CCONV CPhidgetManager_getServerID ( CPhidgetManagerHandle  phidm,
const char **  serverID 
)

Gets the server ID of a remotely opened Phidget Manager. This will fail if the manager was opened locally.

Parameters:
phidmA connected phidget manager handle.
serverIDA pointer which will be set to a char array containing the server ID string.

Definition at line 330 of file cphidgetmanager.c.

Gets the connected to server status of a remotely opened Phidget Manager. This will fail if the manager was opened locally.

Parameters:
phidmAn opened phidget manager handle.
serverStatusAn int pointer for returning the server status. Possible codes are PHIDGET_ATTACHED and PHIDGET_NOTATTACHED.

Definition at line 338 of file cphidgetmanager.c.

Opens a Phidget Manager.

Parameters:
phidmA phidget manager handle.

Definition at line 343 of file cphidgetmanager.c.

PHIDGET21_API int CCONV CPhidgetManager_openRemote ( CPhidgetManagerHandle  phidm,
const char *  serverID,
const char *  password 
)

Opens a Phidget manager remotely by ServerID. Note that this requires Bonjour (mDNS) to be running on both the host and the server.

Parameters:
phidmA phidget manager handle.
serverIDServer ID. Specify NULL to open any.
passwordPassword. Can be NULL if the server is running unsecured.

Definition at line 2386 of file csocketopen.c.

PHIDGET21_API int CCONV CPhidgetManager_openRemoteIP ( CPhidgetManagerHandle  phidm,
const char *  address,
int  port,
const char *  password 
)

Opens a Phidget manager remotely by address and port.

Parameters:
phidmA phidget manager handle.
addressAddress. This can be a hostname or IP address.
portPort number. Default is 5001.
passwordPassword. Can be NULL if the server is running unsecured.

Definition at line 2325 of file csocketopen.c.

Definition at line 177 of file cphidgetmanager.c.

Sets an attach handler callback function. This is called when a Phidget is plugged into the system.

Parameters:
phidmA phidget manager handle.
fptrCallback function pointer.
userPtrA pointer for use by the user - this value is passed back into the callback function.

Definition at line 399 of file cphidgetmanager.c.

Sets a detach handler callback function. This is called when a Phidget is unplugged from the system.

Parameters:
phidmA phidget manager handle.
fptrCallback function pointer.
userPtrA pointer for use by the user - this value is passed back into the callback function.

Definition at line 406 of file cphidgetmanager.c.

PHIDGET21_API int CCONV CPhidgetManager_set_OnError_Handler ( CPhidgetManagerHandle  phidm,
int(CCONV *fptr)(CPhidgetManagerHandle phidm, void *userPtr, int errorCode, const char *errorString)  ,
void userPtr 
)

Sets the error handler callback function. This is called when an asynchronous error occurs.

Parameters:
phidmA phidget manager handle.
fptrCallback function pointer.
userPtrA pointer for use by the user - this value is passed back into the callback function.

Sets a server connect handler callback function. This is used for opening Phidget Managers remotely, and is called when a connection to the sever has been made.

Parameters:
phidmA phidget manager handle.
fptrCallback function pointer.
userPtrA pointer for use by the user - this value is passed back into the callback function.

Definition at line 413 of file cphidgetmanager.c.

Sets a server disconnect handler callback function. This is used for opening Phidget Managers remotely, and is called when a connection to the server has been lost.

Parameters:
phidmA phidget manager handle.
fptrCallback function pointer.
userPtrA pointer for use by the user - this value is passed back into the callback function.

Definition at line 420 of file cphidgetmanager.c.


Variable Documentation

Definition at line 12 of file cphidgetmanager.c.

Definition at line 11 of file cphidgetmanager.c.



pedal_monitor
Author(s): Pedro Mendes
autogenerated on Fri Jun 6 2014 18:37:22