[asterisk-dev] Using the digium board drive. What's the meaning of num and order in struct t4?

Will nyphbl8d at gmail.com
Thu Oct 22 23:55:48 CDT 2009

2009/10/22 张Zhang <zlqhope at hotmail.com>

>  Recently I use two boards of digium, but I dont know how to recgonize
> which card is the first and second? I set the two cards ident wheel as 0 and
> 1, but in the zttool shows the first card is the ident wheel =1? Why!?
> I read the dirve of the cards, and found in the t4 struct
> struct t4 {
>  /* This structure exists one per card */
>  struct pci_dev *dev;  /* Pointer to PCI device */
>  unsigned int intcount;
> * int num*;   */* Which card we are */*
>  int t1e1;   /* T1/E1 select pins */
>  int globalconfig; /* Whether global setup has been done */
>  int syncsrc;   /* active sync source */
>  struct t4_span *tspans[4]; /* Individual spans */
>  int numspans;   /* Number of spans on the card */
>  int blinktimer;
> #ifdef FANCY_ALARM
>  int alarmpos;
> #endif
>  int irq;   /* IRQ used by device */
>  *int order*;  * /* Order */*
> ....
> }
> What is the difference between num and order?
> Can anybody tell me? Thanks very much!!
Firstly, the usage of the ident wheel is an asterisk-users question.  There
was no need to go digging around in the code for the answer to how the ident
wheel works, but for your edification, "num" is the value assigned that
shows the order in which the cards were recognized and "order" is the value
of the ident wheel. The card with the lowest ident wheel value will always
show up first in dahdi_tool or zttool and the card with the lowest ident
value will always contain the first span for that driver.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-dev/attachments/20091022/24adfa18/attachment.htm 

More information about the asterisk-dev mailing list