[Asterisk-Users] TDM users: modified zttest.c for testing

Rich Adamson radamson at routers.com
Wed May 4 05:48:27 MST 2005


> On Tue, 2005-05-03 at 09:48 -0600, Rich Adamson wrote:
> > TDM & X100P card users:
> > 
> > Attached is a modified zaptel/zttest.c app called "attest-mod.c". It
> > has been modified to report the "delay" in receiving 8,192 bytes
> > from the TDM card (instead of reporting a percentage). It works with
> > the digium x100p cards as well.
> > 
> > Drop the attachment in your zaptel directory and compile it with:
> >   gcc zttest-mod.c -o zttest-mod.o
> > Then run the executable like this:
> >   ./zttest-mod.o -v
> > and report the results.
> > 
> > The output should look like:
> > 8192 bytes in 1.023843 seconds
> > 8192 bytes in 1.023866 seconds
> > 8192 bytes in 1.023853 seconds
> > 8192 bytes in 1.023876 seconds
> > 8192 bytes in 1.023841 secondsr
> > --- Results after 5 passes ---
> > Best: 1.023876 -- Worst: 1.023841 -- Average: 1.023856
> > 
> > The design objective of the TDM (and x100p) cards was to transfer
> > 8,192 bytes of data from the card in exactly 1.00000 seconds.
> > The above sample indicates my system required 1.023856 seconds to
> > accomplish this, or 23856 microseconds too late.
> 
> Isn't the design objective to read 8000 bytes in one second?  The
> reported (roughly) 1.024 second time frame is correct for 8192 bytes.
> 
> I get average numbers very close to 1.024 (especially if I take some
> rounding error into account).

That's a very good point. Now I'm not sure since the only thing I've
got to go by is existing code in zttest.c which implies 8192, and
data arrives in 1024 byte frames. 

I'll dig a little deeper to see if I can figure out which one _is_
correct.





More information about the asterisk-users mailing list