5.4 Initialization
This section describes the demo initialization as shown in Figure 4.
Figure 4. IP Gateway (Global Call) Object Oriented System Initialization
The application main( ) function calls the init( ) function, which does the following:
- Calls resourceManager.configure( ) to read the configuration file and command line options and prints the configuration
- Calls resourceManager.getChannelsNum( ) to get the number of channels defined by the user in the configuration file or command line -n switch.
- Calls gc_Start( ) to open all configured, call control libraries
- Calls printAllLibs( ) to print library status (open or failed).
- Sets-up the callback handler, PDLsr_enbhdlr( ). The callback handler handles events that it receives from the SRL library. For more details see Section 5.5.3, "Handling SRL Events".
- Calls resourceManager.init( ) to get the resources available in the system:
- Gets the number of IP channels in the system
- Gets the number of PSTN channels in the system
- Finds the minimum between the system channels and the user request
- Looks for a free IP device and returns a pointer to it
- Opens the IP device and if the open succeeds returns a pointer to it
- Looks for a free PSTN device and returns a pointer to it
- Opens the PSTN device and if the open success returns a pointer to it
- Initializes the devices on the channel
- The application main( ) function calls waitForKey( ), to receive keyboard input.
Click here to contact Telecom Support Resources
Copyright 2002, Intel Corporation