Main Page | Directories | File List | Globals | Examples

bsDeviceInterface.h File Reference

device proxy description More...

#include <bluemelon/types.h>
#include <bluemelon/dex/types.h>
#include <bluesense/types.h>

Defines

#define MAX_REGISTERED_DEVICETYPES   255

Typedefs

typedef _bsDeviceInterface_registeredDeviceInterfaces * bsDeviceInterface_registeredDeviceInterfaces_t

Functions

DECLSPEC char * bsDeviceInterface_getProxyTypeName (bsDeviceInterface_registeredDeviceInterfaces_t interfaceTablePtr, bluesense_proxytype_t pt)
DECLSPEC char * bsDeviceInterface_getDeviceTypeName (bsDeviceInterface_registeredDeviceInterfaces_t interfaceTablePtr, dex_devtype_t dt)
DECLSPEC bsDeviceInterface_registeredDeviceInterfaces_t bsDeviceInterface_allocInterfaceTable (void)
DECLSPEC void bsDeviceInterface_freeInterfaceTable (bsDeviceInterface_registeredDeviceInterfaces_t interfaceTablePtr)


Detailed Description

device proxy description

Each hardware device has a software description. This socalled interface contains the information which is general across different types of devices. Each interface also contains a pointer to device specific data.


Define Documentation

#define MAX_REGISTERED_DEVICETYPES   255
 

In an application we can register a maximum of 255 different TYPES of devices. Note: This is different from the fotal number of devices. They are stored in the device instance table.


Typedef Documentation

typedef struct _bsDeviceInterface_registeredDeviceInterfaces* bsDeviceInterface_registeredDeviceInterfaces_t
 

An opaque datastructure pointer to a device interface

Examples:
analogue_in.c, analogue_out.c, blink_output.c, counter.c, list_devices.c, motor.c, rotary.c, servo.c, set_ocoutput.c, set_ocoutputpwm.c, stepper.c, and switch.c.


Function Documentation

DECLSPEC bsDeviceInterface_registeredDeviceInterfaces_t bsDeviceInterface_allocInterfaceTable void   ) 
 

Allocates space for a interface table. The table is initalized as well.

Returns:
a pointer to the newly created table instance
Examples:
analogue_in.c, analogue_out.c, blink_output.c, counter.c, list_devices.c, motor.c, rotary.c, servo.c, set_ocoutput.c, set_ocoutputpwm.c, stepper.c, and switch.c.

DECLSPEC void bsDeviceInterface_freeInterfaceTable bsDeviceInterface_registeredDeviceInterfaces_t  interfaceTablePtr  ) 
 

Frees a interface table.

Parameters:
interfaceTablePtr the table to free.
Examples:
analogue_in.c, analogue_out.c, blink_output.c, counter.c, list_devices.c, motor.c, rotary.c, servo.c, set_ocoutput.c, set_ocoutputpwm.c, stepper.c, and switch.c.

DECLSPEC char* bsDeviceInterface_getDeviceTypeName bsDeviceInterface_registeredDeviceInterfaces_t  interfaceTablePtr,
dex_devtype_t  dt
 

Returns the name of a device class

Parameters:
dt the device type
interfaceTablePtr a pointer to a device interface table.
Returns:
a string consisting of the device name
Examples:
list_devices.c.

DECLSPEC char* bsDeviceInterface_getProxyTypeName bsDeviceInterface_registeredDeviceInterfaces_t  interfaceTablePtr,
bluesense_proxytype_t  pt
 

Returns the name of a device proxy class

Parameters:
pt the proxy type
interfaceTablePtr a pointer to a device interface table.
Returns:
a string consisting of the device name


Generated on Mon Jan 21 17:51:55 2008 for BlueSense by  doxygen 1.4.4