Application Development
7.5 Port Multiplexing
(Page 6 of 11 in this chapter)
- AG Access can multiplex commands and events for multiple ports on a single
driver. In this case, the application opens the driver once and then opens multiple
ports using the same driver handle.
- Multiplexed ports may reside on different AG boards. For example, a port whose
DSP is on board 0 may be multiplexed on the same driver instance with a port
whose DSP is on board 1. If any port in a multiplexed set delivers an event to the
host computer, the mux handle is signaled as described in Section 7.4, Command
and Event Processing.
- The adiFetchAndProcess function determines which port generated the event
and updates the AG Access internal context accordingly. An event may be
delivered to the application upon returning from adiFetchAndProcess. The event
structure's porthd field identifies the port on which the event occurred. The
application port may use the ADI_EVENT userid field to map the event to an
application port context.
- Additionally, adiOpenDriver may be invoked multiple times within a single
process. Each invocation returns a unique driver handle and mux handle. The
application process can selectively wait on multiple mux handles in parallel. For
multi-threaded operating systems, each driver instance can be controlled by a
single thread, as discussed in Section 7.7.3, Multiple Ports Per Process - Multi-
threaded.
(Page 6 of 11 in this chapter)
Copyright 1996 Natural MicroSystems, Inc. All Rights Reserved.