The chantype instruction enables scripts to determine on which type of channel they are running.
Synopsis
chantype ()
Description
The chantype instruction returns in r.0 the following positive integer values from the /att/include/irDefines.h header file:
Value |
Channel type |
IRD_T1 |
T1 (E&M) or E1 (CAS) protocol |
IRD_PRI |
IDSN PRI protocol |
IRD_VIRT_CHAN |
Virtual channel |
A negative value is returned if an error occurs.
Example
#include "/att/include/irDefines.h"
/* get channel type */
chantype()
load(int.F_chantype, r.0)
/* channel type must be T1 or PRI */
jmp(int.F_chantype == IRD_T1, L__chan_OK)
jmp(int.F_chantype == IRD_PRI, L__chan_OK)