Dialogic
Search
Worldwide
中文 (CHINA)
CANADA English [EN]
CANADA Français [FR]
D/A/CH
NORTHERN EUROPE
日本 (JAPAN)
Contact
DEN
PRODUCTS
SOLUTIONS
TECHNOLOGIES
PURCHASE
PARTNERS
SERVICE CENTER
COMPANY
Dialogic Service Center
Service Contracts
Dialogic
®
Pro™ Contracts
Dialogic
®
Pro™ Summary
Value Per Unit Plan
Standard Per Unit Plan
Premium Per Unit Plan
Standard Service Agreement
Premium Service Agreement
Carrier Pack
Contracts by Product
Contracts by Customer Type
Contracts by Requirement
Technical Helpweb
Helpweb Menu
Helpweb Menu
Dialogic API information
DM3 & JCT products
Host Media Processing (HMP)
Brooktrout
®
Fax
IP Media Server
IMG Gateways
CSP Platforms
MSP Platforms
DMG-series Media Gateways
Signaling & SS7 Components
Multimedia Platform for ATCA
®
Diva
®
Media Boards
Diva
®
SDK
Vision™ Servers & Gateways
NaturalAccess™ products
Diva
®
Client
Eiconcards (X.25)
Other Dialogic products
Downloads
Software Download wizard
Software Download listing
Manuals & Documentation
Document Finder
Contact Support
Select Support region
Americas Support
AsiaPac Support
EMEA Support
Online Service Request
Developer Forums
Developer Forums Menu
Dialogic
®
Global Call Forum
Dialogic
®
Diva
®
SDK Forum
SS7 and Sigtran Signaling Forum
Training
Training Menu
On-line training courses
Share
Home
Service Center
Technical Helpweb
Dialogic® DM3 & JCT Media Boards
Technical Helpweb
Dialogic® DM3 and JCT Media Boards
Improving the performance of SCbus routing
Problem Description:
When using the SCbus convenience functions, there may be a significant delay during routing of timeslots.
Solution Summary:
The use of the individual SCbus functions, getxmitslot, unlisten, and listen can greatly improve the performance of programs which perform a significant amount of SCbus routing.
Technical Discussion:
Each time the nr_scroute() function is called, it makes 4 function calls:
xx_getxmitslot() - once for each device
xx_listen() - once for each device.
The call to xx_listen() each time is required in order to connect the channels local receive time slot to an SCBus time slot, but it is not necessary to repetitively call xx_getxmitslot() to retrieve the SCbus transmit timeslot for each device. SCbus timeslots are set up each time the Dialogic services are started and dont change until the services are re-started. Thus, a way to speed up your application is to get the SCbus transmit information in the beginning of the program, store it in arrays, and use the individual instructions to perform the routing.
For example:
nr_scroute(chan1, SC_LSI, chan2, SC_LSI, SC_FULLDUP);
would be replaced with:
// Setup the sc_tsinfo for chan2 to listen to chan1
sc_tsinfo.sc_numts = 1; // timeslot for 1 device
sc_tsinfo.sc_tsarrayp = &scts[0]; // pointer to first timeslot
if (ag_listen(chan2, &sc_tsinfo) == -1)
{
printf("Unable to perform ag_listen on chan #2: %s\n", ATDV_ERRMSGP(chan2));
exit(1);
}
// Setup the sc_tsinfo for chan1 to listen to chan2
sc_tsinfo.sc_numts = 1; // timeslot for 1 device
sc_tsinfo.sc_tsarrayp = &scts[1]; // pointer to second timeslot
if (ag_listen(chan1, &sc_tsinfo) == -1)
{
printf("Unable to perform ag_listen on chan #1: %s\n", ATDV_ERRMSGP(chan1));
exit(1);
}
This code assumes that the timeslots for channels 1 & 2 would have been setup in the beginning of the program as scts[0] and scts[1] respectively. The code below shows how this is done:
// Get the scbus transmit slot assignments for the analog frontends
sc_tsinfo.sc_numts = 1; // get the timeslot for 1 device
sc_tsinfo.sc_tsarrayp = &scts[0]; // pointer to first element of array
if (ag_getxmitslot(chan1, &sc_tsinfo) == -1)
{
printf("error getting transmit slot for chan #1: %s\n", ATDV_ERRMSGP(chan1));
exit(1);
}
sc_tsinfo.sc_numts = 1; // get the timeslot for 1 device
sc_tsinfo.sc_tsarrayp = &scts[1]; // pointer to first element of array
if (ag_getxmitslot(chan2, &sc_tsinfo) == -1)
{
printf("error getting transmit slot for chan #2: %s\n", ATDV_ERRMSGP(chan2));
exit(1);
}
Attachments:
scbusr1.c
which shows the routing of 2 analog timeslots using convenience functions under Win NT.
scbusr2.c
which shows the same routing performed with individual SCbus routing functions under Win NT.
screcord.zip
Feedback
Please rate the usefulness of this page:
0 - not useful at all
1 - potentially useful
2 - quite useful
3 - very useful
4 - exactly the information I needed
Please enter a comment about this page: