In a first embodiment, an applications programming interface (API) implements
and manages isochronous and asychronous data transfer operations between an application
and a bus structure. During an asynchronous transfer the API includes the ability
to transfer any amount of data between one or more local data buffers within the
application and a range of addresses over the bus structure using one or more asynchronous
transactions. An automatic transaction generator may be used to automatically generate
the transactions necessary to complete the data transfer. The API also includes
the ability to transfer data between the application and another node on the bus
structure isochronously over a dedicated channel. During an isochronous data transfer,
a buffer management scheme is used to manage a linked list of data buffer descriptors.
During isochronous transfer of data, the API provides implementation of a resynchronization
event in the stream of data allowing for resynchronization by the application to
a specific point within the data. Implementation is also provided for a callback
routine for each buffer in the list which calls the application at a predetermined
point during the transfer of data. An isochronous API of the preferred embodiment
presents a virtual representation of a plug, using a plug handle, to the application.
The isochronous API notifies a client application of any state changes on a connected
plug through the event handle. The isochronous API also manages buffers utilized
during a data operation by attaching and detaching the buffers to the connected
plug, as appropriate, to mange the data flow.