Local device configuration on the AG 2000 board is controlled by the Switching service. The Switching service provides functions for accessing device configuration parameters defined by the underlying hardware and device driver.
swiConfigLocalTimeslot and swiGetLocalTimeslotInfo allow applications to configure a device on a given local stream and timeslot by specifying a particular parameter and providing a data structure specific to that parameter. The prototypes for these functions are repeated here for convenience.
For more information about the Switching service, refer to the Switching Service Developer's Reference Manual.
The syntax of swiConfigLocalTimeslot and swiConfigLocalTimeslotInfo is:
DWORD swiConfigLocalTimeslot ( SWIHD swihd, SWI_LOCALTIMESLOT_ARGS *args, void *buffer, unsigned size )
DWORD swiGetLocalTimeslotInfo ( SWIHD swihd, SWI_LOCALTIMESLOT_ARGS *args, void *buffer, unsigned size )
|
Argument |
Description |
|---|---|
|
swihd |
Switch handle returned by swiOpenSwitch. |
|
args |
Pointer to a SWI_LOCALTIMESLOT_ARGS structure. This structure indicates the specific parameter to be configured on the device indicated by localstream and localtimeslot. typedef struct |
|
buffer |
Pointer to a structure that is specific to the parameterid. |
|
size |
Size of buffer, in bytes. |
SUCCESS, or an error code from ctaerr.h or swidef.h.
Applications using swiConfigLocalTimeslot and swiGetLocalTimeslotInfo must open the Switching service. Refer to the Natural Access Developer's Reference Manual for more information about opening services.