PRODUCTS
 


Main Page   Data Structures   File List   Data Fields   Globals  

TeleoMioDin.h File Reference

Device Wrapper API. More...

#include "TeleoTypes.h"
#include "TeleoDeviceManager.h"
#include "TeleoError.h"
#include "TeleoUtil.h"
#include "TeleoModuleDefines.h"

Go to the source code of this file.

Data Structures

struct  TMioDin
 TeleoMioDin reference structure. More...


Functions

TeleoError TMioDin_Create (TeleoDeviceManager *tdm, cchar *address, uint8 dinDeviceIndex, bool *bound, TMioDin **tmdin)
 Create a TMioDin.

TeleoError TMioDin_boundGet (TMioDin *tmdin, bool *bound)
 Gets the current bound state.

TeleoError TMioDin_boundCallbackSet (TMioDin *tmdin, TeleoError(*boundUpdate)(TMioDin *tmdin, bool bound))
 Set the callback for bound updates.

TeleoError TMioDin_valueGet (TMioDin *tmdin, bool *value)
 Gets the current ain value.

TeleoError TMioDin_valueCallbackSet (TMioDin *tmdin, TeleoError(*valueUpdate)(TMioDin *tmdin, bool value))
 Set the callback for value updates.

TeleoError TMioDin_invertGet (TMioDin *tmdin, bool *invert)
 Gets the current invert value.

TeleoError TMioDin_invertSet (TMioDin *tmdin, bool invert)
 Sets the current invert value.

TeleoError TMioDin_invertCallbackSet (TMioDin *tmdin, TeleoError(*invertUpdate)(TMioDin *tmdin, bool invert))
 Set the callback for invert updates.

TeleoError TMioDin_sampleRateGet (TMioDin *tmdin, int16 *sampleRate)
 Gets the Sample Rate in ms.

TeleoError TMioDin_sampleRateSet (TMioDin *tmdin, int16 sampleRate)
 Sets the current sample rate value.

TeleoError TMioDin_sampleRateCallbackSet (TMioDin *tmdin, TeleoError(*sampleRateUpdate)(TMioDin *tmdin, int16 sampleRate))
 Set the callback for sampleRate updates.


Detailed Description

Device Wrapper API.

Contains the structures, definitions and functions for a set of functions that wrap TeleoDevice entities providing a very Teleo Module-like interface.

These functions work on top of the Device Manager, so require the device manager to be functioning properly.

Definition in file TeleoMioDin.h.


Function Documentation

TeleoError TMioDin_boundCallbackSet TMioDin   tmdin,
TeleoError(*    boundUpdate)(TMioDin *tmdin, bool bound)
 

Set the callback for bound updates.

Parameters:
tmdin TMioDin
boundUpdate bound callback function
Returns:
TELEO_OK or appropriate error code

TeleoError TMioDin_boundGet TMioDin   tmdin,
bool   bound
 

Gets the current bound state.

Parameters:
tmdin TMioDin reference returned from TMioDin_create( )
bound pointer to the bound variable
Returns:
TELEO_OK or an error (see TeleoError.h)

TeleoError TMioDin_Create TeleoDeviceManager   tdm,
cchar   address,
uint8    dinDeviceIndex,
bool   bound,
TMioDin **    tmdin
 

Create a TMioDin.

Parameters:
tdm TeleoDeviceManager reference
address module address (or 0 if don't care)
dinDeviceIndex Din device on the MultiIO (0 - 3)
bound is the module specified already bound?
tmdin a variable to hold the new device
Returns:
TELEO_OK (0) or an error value

Referenced by main().

TeleoError TMioDin_invertCallbackSet TMioDin   tmdin,
TeleoError(*    invertUpdate)(TMioDin *tmdin, bool invert)
 

Set the callback for invert updates.

Parameters:
tmdin TMioDin
invertUpdate invertUpdate callback function
Returns:
TELEO_OK or appropriate error code

Referenced by main().

TeleoError TMioDin_invertGet TMioDin   tmdin,
bool   invert
 

Gets the current invert value.

Parameters:
tmdin TMioDin reference returned from TMioDin_create( )
invert pointer to the invert value
Returns:
TELEO_OK or an error (see TeleoError.h)

TeleoError TMioDin_invertSet TMioDin   tmdin,
bool    invert
 

Sets the current invert value.

Parameters:
tmdin TMioDin reference returned from TMioDin_create( )
invert the new invert value
Returns:
TELEO_OK or an error (see TeleoError.h)

TeleoError TMioDin_sampleRateCallbackSet TMioDin   tmdin,
TeleoError(*    sampleRateUpdate)(TMioDin *tmdin, int16 sampleRate)
 

Set the callback for sampleRate updates.

Parameters:
tmdin TMioDin
sampleRateUpdate sampleRateUpdate callback function
Returns:
TELEO_OK or appropriate error code

Referenced by main().

TeleoError TMioDin_sampleRateGet TMioDin   tmdin,
int16   sampleRate
 

Gets the Sample Rate in ms.

Parameters:
tmdin TMioDin reference returned from TMioDin_create( )
sampleRate sample rate in ms.
Returns:
TELEO_OK or an error (see TeleoError.h)

TeleoError TMioDin_sampleRateSet TMioDin   tmdin,
int16    sampleRate
 

Sets the current sample rate value.

Parameters:
tmdin TMioDin reference returned from TMioDin_create( )
sampleRate the new sample rate
Returns:
TELEO_OK or an error (see TeleoError.h)

TeleoError TMioDin_valueCallbackSet TMioDin   tmdin,
TeleoError(*    valueUpdate)(TMioDin *tmdin, bool value)
 

Set the callback for value updates.

Parameters:
tmdin TMioDin
valueUpdate valueUpdate callback function
Returns:
TELEO_OK or appropriate error code

Referenced by main().

TeleoError TMioDin_valueGet TMioDin   tmdin,
bool   value
 

Gets the current ain value.

Parameters:
tmdin TMioDin reference returned from TMioDin_create( )
value pointer to the value
Returns:
TELEO_OK or an error (see TeleoError.h)

 

copyright © 2002, 2003 MakingThings LLC