Classes | Typedefs | Enumerations | Functions
Phidget Dictionary

Classes

struct  _CPhidgetDictionary
struct  _CPhidgetDictionaryList
struct  _CPhidgetDictionaryListener
struct  _CPhidgetDictionaryListenerList

Typedefs

typedef struct _CPhidgetDictionary CPhidgetDictionary
typedef int(CCONVCPhidgetDictionary_OnKeyChange_Function )(CPhidgetDictionaryHandle dict, void *userPtr, const char *key, const char *value, CPhidgetDictionary_keyChangeReason reason)
typedef struct
_CPhidgetDictionaryList 
CPhidgetDictionaryList
typedef struct
_CPhidgetDictionaryListener 
CPhidgetDictionaryListener
typedef struct
_CPhidgetDictionaryListenerList 
CPhidgetDictionaryListenerList
typedef struct
_CPhidgetDictionaryListenerList
CPhidgetDictionaryListenerListHandle
typedef struct
_CPhidgetDictionaryList
CPhidgetDictionaryListHandle

Enumerations

enum  CPhidgetDictionary_keyChangeReason {
  PHIDGET_DICTIONARY_VALUE_CHANGED = 1, PHIDGET_DICTIONARY_ENTRY_ADDED, PHIDGET_DICTIONARY_ENTRY_REMOVING, PHIDGET_DICTIONARY_CURRENT_VALUE,
  PHIDGET_DICTIONARY_VALUE_CHANGED = 1, PHIDGET_DICTIONARY_ENTRY_ADDED, PHIDGET_DICTIONARY_ENTRY_REMOVING, PHIDGET_DICTIONARY_CURRENT_VALUE
}

Functions

PHIDGET21_API int CCONV CPhidgetDictionary_addKey (CPhidgetDictionaryHandle dict, const char *key, const char *value, int persistent)
int CPhidgetDictionary_areEqual (void *arg1, void *arg2)
PHIDGET21_API int CCONV CPhidgetDictionary_close (CPhidgetDictionaryHandle dict)
PHIDGET21_API int CCONV CPhidgetDictionary_create (CPhidgetDictionaryHandle *dict)
PHIDGET21_API int CCONV CPhidgetDictionary_delete (CPhidgetDictionaryHandle dict)
void CPhidgetDictionary_free (void *arg)
PHIDGET21_API int CCONV CPhidgetDictionary_getKey (CPhidgetDictionaryHandle dict, const char *key, char *value, int valuelen)
PHIDGET21_API int CCONV CPhidgetDictionary_getServerAddress (CPhidgetDictionaryHandle dict, const char **address, int *port)
PHIDGET21_API int CCONV CPhidgetDictionary_getServerID (CPhidgetDictionaryHandle dict, const char **serverID)
PHIDGET21_API int CCONV CPhidgetDictionary_getServerStatus (CPhidgetDictionaryHandle dict, int *serverStatus)
PHIDGET21_API int CCONV CPhidgetDictionary_openRemote (CPhidgetDictionaryHandle dict, const char *serverID, const char *password)
PHIDGET21_API int CCONV CPhidgetDictionary_openRemoteIP (CPhidgetDictionaryHandle dict, const char *address, int port, const char *password)
PHIDGET21_API int CCONV CPhidgetDictionary_remove_OnKeyChange_Handler (CPhidgetDictionaryListenerHandle dictlistener)
PHIDGET21_API int CCONV CPhidgetDictionary_removeKey (CPhidgetDictionaryHandle dict, const char *pattern)
PHIDGET21_API int CCONV CPhidgetDictionary_set_OnError_Handler (CPhidgetDictionaryHandle dict, int(CCONV *fptr)(CPhidgetDictionaryHandle, void *userPtr, int errorCode, const char *errorString), void *userPtr)
PHIDGET21_API int CCONV CPhidgetDictionary_set_OnKeyChange_Handler (CPhidgetDictionaryHandle dict, CPhidgetDictionaryListenerHandle *dictlistener, const char *pattern, CPhidgetDictionary_OnKeyChange_Function fptr, void *userPtr)
PHIDGET21_API int CCONV CPhidgetDictionary_set_OnServerConnect_Handler (CPhidgetDictionaryHandle dict, int(CCONV *fptr)(CPhidgetDictionaryHandle dict, void *userPtr), void *userPtr)
PHIDGET21_API int CCONV CPhidgetDictionary_set_OnServerDisconnect_Handler (CPhidgetDictionaryHandle dict, int(CCONV *fptr)(CPhidgetDictionaryHandle dict, void *userPtr), void *userPtr)
int CPhidgetDictionaryListener_areEqual (void *arg1, void *arg2)
void CPhidgetDictionaryListener_free (void *arg)

Detailed Description

These calls are specific to the Phidget Dictionary.


Typedef Documentation

typedef int(CCONV * CPhidgetDictionary_OnKeyChange_Function)(CPhidgetDictionaryHandle dict, void *userPtr, const char *key, const char *value, CPhidgetDictionary_keyChangeReason reason)

Callback function for KeyChange events.

Parameters:
dictDictionary from which this event originated.
userPtrUser defined data.
keyKey value.
valueValue value.
reasonReason for KeyChange event.

Definition at line 118 of file cphidgetdictionary.h.

A Phidget Dictionary handle. A Dictionary key listener handle.


Enumeration Type Documentation

Possible reasons for a key event.

Enumerator:
PHIDGET_DICTIONARY_VALUE_CHANGED 

The value of an existing key/value pair changed.

PHIDGET_DICTIONARY_ENTRY_ADDED 

A new key/value pair was added.

PHIDGET_DICTIONARY_ENTRY_REMOVING 

A key is being removed.

PHIDGET_DICTIONARY_CURRENT_VALUE 

Initial state received once a handler was added.

PHIDGET_DICTIONARY_VALUE_CHANGED 
PHIDGET_DICTIONARY_ENTRY_ADDED 
PHIDGET_DICTIONARY_ENTRY_REMOVING 
PHIDGET_DICTIONARY_CURRENT_VALUE 

Definition at line 13 of file cphidgetdictionary.h.


Function Documentation

PHIDGET21_API int CCONV CPhidgetDictionary_addKey ( CPhidgetDictionaryHandle  dict,
const char *  key,
const char *  value,
int  persistent 
)

Adds a key/value pair to the dictionary. Or, changes an existing key's value.

Parameters:
dictA connected dictionary handle.
keyThe key value.
valueThe value value.
persistentWhether the key stays in the dictionary after disconnection.

Definition at line 127 of file cphidgetdictionary.c.

int CPhidgetDictionary_areEqual ( void arg1,
void arg2 
)

Definition at line 17 of file cphidgetdictionary.c.

Closes the connection to a Phidget Dictionary.

Parameters:
dictAn opened phidget dictionary handle.

Definition at line 74 of file cphidgetdictionary.c.

Creates a Phidget Dictionary handle.

Parameters:
dictA pointer to an unallocated phidget dictionary handle.

Definition at line 56 of file cphidgetdictionary.c.

Frees a Phidget Dictionary handle.

Parameters:
dictA closed dictionary handle.

Definition at line 98 of file cphidgetdictionary.c.

Definition at line 23 of file cphidgetdictionary.c.

PHIDGET21_API int CCONV CPhidgetDictionary_getKey ( CPhidgetDictionaryHandle  dict,
const char *  key,
char *  value,
int  valuelen 
)

Gets a key value. If more then one key matches, only the first value is returned.

Parameters:
dictA phidget dictionary handle.
keyA key value to look up.
valueA user array for the value to be stored in. Set to NULL if the key does not exist.
valuelenLength of the value array.

Definition at line 171 of file cphidgetdictionary.c.

PHIDGET21_API int CCONV CPhidgetDictionary_getServerAddress ( CPhidgetDictionaryHandle  dict,
const char **  address,
int *  port 
)

Gets the address and port.

Parameters:
dictA connected dictionary 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 108 of file cphidgetdictionary.c.

PHIDGET21_API int CCONV CPhidgetDictionary_getServerID ( CPhidgetDictionaryHandle  dict,
const char **  serverID 
)

Gets the server ID.

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

Definition at line 104 of file cphidgetdictionary.c.

Gets the connected to server status.

Parameters:
dictAn opened dictionary handle.
serverStatusAn int pointer for returning the server status. Possible codes are PHIDGET_ATTACHED and PHIDGET_NOTATTACHED.

Definition at line 112 of file cphidgetdictionary.c.

PHIDGET21_API int CCONV CPhidgetDictionary_openRemote ( CPhidgetDictionaryHandle  dict,
const char *  serverID,
const char *  password 
)

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

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

Definition at line 2540 of file csocketopen.c.

PHIDGET21_API int CCONV CPhidgetDictionary_openRemoteIP ( CPhidgetDictionaryHandle  dict,
const char *  address,
int  port,
const char *  password 
)

Opens a Phidget dictionary by address and port.

Parameters:
dictA phidget dictionary 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 2468 of file csocketopen.c.

Removes a key listener.

Parameters:
dictlistenerThe dictionary key listener created by CPhidgetDictionary_set_OnKeyChange_Handler

Definition at line 310 of file cphidgetdictionary.c.

Removes a set of keys from the dictionary.

Parameters:
dictA connected dictionary handle.
patternA regular expression representing th eset of keys to remove.

Definition at line 146 of file cphidgetdictionary.c.

PHIDGET21_API int CCONV CPhidgetDictionary_set_OnError_Handler ( CPhidgetDictionaryHandle  dict,
int(CCONV *fptr)(CPhidgetDictionaryHandle, void *userPtr, int errorCode, const char *errorString)  ,
void userPtr 
)

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

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

Adds a key listener to an opened dictionary. Note that this should only be called after the connection to the dictionary has been made - unlike all other events.

Parameters:
dictA connected dictionary handle.
dictlistenerA pointer to an unallocated dictionary key listener handle.
patternA regular expression representing the set of keys to monitor.
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 called when a connection to the sever has been made.

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

Definition at line 235 of file cphidgetdictionary.c.

Sets a server disconnect handler callback function. This is called when a connection to the server has been lost.

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

Definition at line 242 of file cphidgetdictionary.c.

int CPhidgetDictionaryListener_areEqual ( void arg1,
void arg2 
)

Definition at line 41 of file cphidgetdictionary.c.

Definition at line 47 of file cphidgetdictionary.c.



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