Intel IP Gateway (Global Call) for Linux and Windows ユーザーズマニュアル

ページ / 56
6.  Demo Details
27
The threads are created as follows:
•  The first (main) thread is created by the demo application to get the keyboard
input.
•  The second thread is an SRL thread, created as a result of the demo
application calling sr_enblhdlr( ) in Windows. In Linux, the thread must be
explicitly created. All Global Call events are received through the SRL.
6.4.  Initializations
The application main() function calls gateInitialize(), which does the following:
1. Calls checkArg( ) to check for command line parameters and handle them
accordingly.
2. Calls 
IPTResetSession() to reset the demo data structures and initialize all
channels’ states to INIT.
3. Calls 
ClearAllBoards() to reset the board structures to default values.
4. Calls 
gateConfiguration() to read information from the configuration file
(gateway_R4.cfg or other CFG file determined by the user) and update the
ConfigFileParm in the Session data structure.
5. Calls gc_Start( ) to open all configured, call control libraries.
6. Calls 
printAllLibs() to print library status (open or failed).
7.  Sets-up the call-back handler, PDLsr_enbhdlr( ). The callback handler
handles events that it receives from the SRL library. For more details see
Section 6.5.2.  Handling SRL Events.
8. Calls pstnGetVOXChannels( ) which checks how many available PSTN
voice channels there are by doing the following:
•  Gets number of PSTN boards, by calling PDLsr_getboardcnt( ).
•  For each board that was found:
•  Calls dx_Open( ) to open an analog board, or dt_Open( ) to open a
digital board.
•  Calls ATDV_SUBDEVS( ) to get the number of channels on the
board.