⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 asteriskchantablepdu.java

📁 无线网络管理
💻 JAVA
📖 第 1 页 / 共 5 页
字号:
// NAME//      $RCSfile: AsteriskChanTablePdu.java,v $// DESCRIPTION//      [given below in javadoc format]// DELTA//      $Revision: 1.2 $// CREATED//      $Date: 2006/11/29 16:12:50 $// COPYRIGHT//      Westhawk Ltd// TO DO//package uk.co.westhawk.examplev2c;import uk.co.westhawk.snmp.stack.*;import uk.co.westhawk.snmp.pdu.*;import java.util.*;/** * The class AsteriskChanTablePdu. * * This file is auto generated by the StubBrowser utility, using Mibble. * See the uk/co/westhawk/stub/ directory. * * Make sure that you replace the package name and classname placeholders.  * Also, move this file to the correct package directory. * If these things are not done, this class will not compile correctly!! * * @version $Revision: 1.2 $ $Date: 2006/11/29 16:12:50 $ */public class AsteriskChanTablePdu extends GetNextPdu{    private static final String version_id =        "@(#)$Id: AsteriskChanTablePdu.java,v 1.2 2006/11/29 16:12:50 birgit Exp $ Copyright Westhawk Ltd";    public final static String astNumChannels_OID = "1.3.6.1.4.1.22736.1.5.1";    public final static String astChanIndex_OID = "1.3.6.1.4.1.22736.1.5.2.1.1";    public final static String astChanName_OID = "1.3.6.1.4.1.22736.1.5.2.1.2";    public final static String astChanLanguage_OID = "1.3.6.1.4.1.22736.1.5.2.1.3";    public final static String astChanType_OID = "1.3.6.1.4.1.22736.1.5.2.1.4";    public final static String astChanMusicClass_OID = "1.3.6.1.4.1.22736.1.5.2.1.5";    public final static String astChanBridge_OID = "1.3.6.1.4.1.22736.1.5.2.1.6";    public final static String astChanMasq_OID = "1.3.6.1.4.1.22736.1.5.2.1.7";    public final static String astChanMasqr_OID = "1.3.6.1.4.1.22736.1.5.2.1.8";    public final static String astChanWhenHangup_OID = "1.3.6.1.4.1.22736.1.5.2.1.9";    public final static String astChanApp_OID = "1.3.6.1.4.1.22736.1.5.2.1.10";    public final static String astChanData_OID = "1.3.6.1.4.1.22736.1.5.2.1.11";    public final static String astChanContext_OID = "1.3.6.1.4.1.22736.1.5.2.1.12";    public final static String astChanMacroContext_OID = "1.3.6.1.4.1.22736.1.5.2.1.13";    public final static String astChanMacroExten_OID = "1.3.6.1.4.1.22736.1.5.2.1.14";    public final static String astChanMacroPri_OID = "1.3.6.1.4.1.22736.1.5.2.1.15";    public final static String astChanExten_OID = "1.3.6.1.4.1.22736.1.5.2.1.16";    public final static String astChanPri_OID = "1.3.6.1.4.1.22736.1.5.2.1.17";    public final static String astChanAccountCode_OID = "1.3.6.1.4.1.22736.1.5.2.1.18";    public final static String astChanForwardTo_OID = "1.3.6.1.4.1.22736.1.5.2.1.19";    public final static String astChanUniqueId_OID = "1.3.6.1.4.1.22736.1.5.2.1.20";    public final static String astChanCallGroup_OID = "1.3.6.1.4.1.22736.1.5.2.1.21";    public final static String astChanPickupGroup_OID = "1.3.6.1.4.1.22736.1.5.2.1.22";    public final static String astChanState_OID = "1.3.6.1.4.1.22736.1.5.2.1.23";    public final static String astChanMuted_OID = "1.3.6.1.4.1.22736.1.5.2.1.24";    public final static String astChanRings_OID = "1.3.6.1.4.1.22736.1.5.2.1.25";    public final static String astChanCidDNID_OID = "1.3.6.1.4.1.22736.1.5.2.1.26";    public final static String astChanCidNum_OID = "1.3.6.1.4.1.22736.1.5.2.1.27";    public final static String astChanCidName_OID = "1.3.6.1.4.1.22736.1.5.2.1.28";    public final static String astCanCidANI_OID = "1.3.6.1.4.1.22736.1.5.2.1.29";    public final static String astChanCidRDNIS_OID = "1.3.6.1.4.1.22736.1.5.2.1.30";    public final static String astChanCidPresentation_OID = "1.3.6.1.4.1.22736.1.5.2.1.31";    public final static String astChanCidANI2_OID = "1.3.6.1.4.1.22736.1.5.2.1.32";    public final static String astChanCidTON_OID = "1.3.6.1.4.1.22736.1.5.2.1.33";    public final static String astChanCidTNS_OID = "1.3.6.1.4.1.22736.1.5.2.1.34";    public final static String astChanAMAFlags_OID = "1.3.6.1.4.1.22736.1.5.2.1.35";    public final static String astChanADSI_OID = "1.3.6.1.4.1.22736.1.5.2.1.36";    public final static String astChanToneZone_OID = "1.3.6.1.4.1.22736.1.5.2.1.37";    public final static String astChanHangupCause_OID = "1.3.6.1.4.1.22736.1.5.2.1.38";    public final static String astChanVariables_OID = "1.3.6.1.4.1.22736.1.5.2.1.39";    public final static String astChanFlags_OID = "1.3.6.1.4.1.22736.1.5.2.1.40";    public final static String astChanTransferCap_OID = "1.3.6.1.4.1.22736.1.5.2.1.41";    public final static int NO_SCAL = 1;    public final static int NO_COL = 41;    public final static int NO_OID = NO_SCAL + NO_COL;    public final static String scal_oids[] =    {        astNumChannels_OID,    };    public final static String col_oids[] =    {        astChanIndex_OID,        astChanName_OID,        astChanLanguage_OID,        astChanType_OID,        astChanMusicClass_OID,        astChanBridge_OID,        astChanMasq_OID,        astChanMasqr_OID,        astChanWhenHangup_OID,        astChanApp_OID,        astChanData_OID,        astChanContext_OID,        astChanMacroContext_OID,        astChanMacroExten_OID,        astChanMacroPri_OID,        astChanExten_OID,        astChanPri_OID,        astChanAccountCode_OID,        astChanForwardTo_OID,        astChanUniqueId_OID,        astChanCallGroup_OID,        astChanPickupGroup_OID,        astChanState_OID,        astChanMuted_OID,        astChanRings_OID,        astChanCidDNID_OID,        astChanCidNum_OID,        astChanCidName_OID,        astCanCidANI_OID,        astChanCidRDNIS_OID,        astChanCidPresentation_OID,        astChanCidANI2_OID,        astChanCidTON_OID,        astChanCidTNS_OID,        astChanAMAFlags_OID,        astChanADSI_OID,        astChanToneZone_OID,        astChanHangupCause_OID,        astChanVariables_OID,        astChanFlags_OID,        astChanTransferCap_OID,    };    public final static String all_oids[] =    {        astNumChannels_OID,        astChanIndex_OID,        astChanName_OID,        astChanLanguage_OID,        astChanType_OID,        astChanMusicClass_OID,        astChanBridge_OID,        astChanMasq_OID,        astChanMasqr_OID,        astChanWhenHangup_OID,        astChanApp_OID,        astChanData_OID,        astChanContext_OID,        astChanMacroContext_OID,        astChanMacroExten_OID,        astChanMacroPri_OID,        astChanExten_OID,        astChanPri_OID,        astChanAccountCode_OID,        astChanForwardTo_OID,        astChanUniqueId_OID,        astChanCallGroup_OID,        astChanPickupGroup_OID,        astChanState_OID,        astChanMuted_OID,        astChanRings_OID,        astChanCidDNID_OID,        astChanCidNum_OID,        astChanCidName_OID,        astCanCidANI_OID,        astChanCidRDNIS_OID,        astChanCidPresentation_OID,        astChanCidANI2_OID,        astChanCidTON_OID,        astChanCidTNS_OID,        astChanAMAFlags_OID,        astChanADSI_OID,        astChanToneZone_OID,        astChanHangupCause_OID,        astChanVariables_OID,        astChanFlags_OID,        astChanTransferCap_OID,    };    protected Integer _astNumChannels;    protected Integer _astChanIndex;    protected String _astChanName;    protected String _astChanLanguage;    protected String _astChanType;    protected String _astChanMusicClass;    protected String _astChanBridge;    protected String _astChanMasq;    protected String _astChanMasqr;    protected Long _astChanWhenHangup;    protected String _astChanApp;    protected String _astChanData;    protected String _astChanContext;    protected String _astChanMacroContext;    protected String _astChanMacroExten;    protected Integer _astChanMacroPri;    protected String _astChanExten;    protected Integer _astChanPri;    protected String _astChanAccountCode;    protected String _astChanForwardTo;    protected String _astChanUniqueId;    protected Long _astChanCallGroup;    protected Long _astChanPickupGroup;    protected java.util.HashMap _astChanStateMap = new java.util.HashMap(10);    protected Integer _astChanState;    protected java.util.HashMap _astChanMutedMap = new java.util.HashMap(2);    protected Integer _astChanMuted;    protected Integer _astChanRings;    protected String _astChanCidDNID;    protected String _astChanCidNum;    protected String _astChanCidName;    protected String _astCanCidANI;    protected String _astChanCidRDNIS;    protected String _astChanCidPresentation;    protected Integer _astChanCidANI2;    protected Integer _astChanCidTON;    protected Integer _astChanCidTNS;    protected java.util.HashMap _astChanAMAFlagsMap = new java.util.HashMap(4);    protected Integer _astChanAMAFlags;    protected java.util.HashMap _astChanADSIMap = new java.util.HashMap(4);    protected Integer _astChanADSI;    protected String _astChanToneZone;    protected java.util.HashMap _astChanHangupCauseMap = new java.util.HashMap(8);    protected Integer _astChanHangupCause;    protected String _astChanVariables;    protected java.util.HashMap _astChanFlagsMap = new java.util.HashMap(10);    protected byte[] _astChanFlags;    protected java.util.HashMap _astChanTransferCapMap = new java.util.HashMap(6);    protected Integer _astChanTransferCap;    protected boolean _invalid = false;    protected int _tmpErrorInd = -1;    protected int _tmpErrorStat = 0;/** * Constructor. * * @param con The context of the request */public AsteriskChanTablePdu(SnmpContextBasisFace con){    super(con);    _astChanStateMap.put(new Integer(3), "stateDialing");    _astChanStateMap.put(new Integer(2), "stateOffHook");    _astChanStateMap.put(new Integer(9), "statePreRing");    _astChanStateMap.put(new Integer(8), "stateDialingOffHook");    _astChanStateMap.put(new Integer(7), "stateBusy");    _astChanStateMap.put(new Integer(4), "stateRing");    _astChanStateMap.put(new Integer(0), "stateDown");    _astChanStateMap.put(new Integer(1), "stateReserved");    _astChanStateMap.put(new Integer(6), "stateUp");    _astChanStateMap.put(new Integer(5), "stateRinging");    _astChanMutedMap.put(new Integer(1), "true");    _astChanMutedMap.put(new Integer(2), "false");    _astChanAMAFlagsMap.put(new Integer(2), "Billing");    _astChanAMAFlagsMap.put(new Integer(3), "Documentation");    _astChanAMAFlagsMap.put(new Integer(0), "Default");    _astChanAMAFlagsMap.put(new Integer(1), "Omit");    _astChanADSIMap.put(new Integer(0), "Unknown");    _astChanADSIMap.put(new Integer(3), "OffHookOnly");    _astChanADSIMap.put(new Integer(1), "Available");    _astChanADSIMap.put(new Integer(2), "Unavailable");    _astChanHangupCauseMap.put(new Integer(38), "Failure");    _astChanHangupCauseMap.put(new Integer(66), "NoSuchDriver");    _astChanHangupCauseMap.put(new Integer(0), "NotDefined");    _astChanHangupCauseMap.put(new Integer(17), "Busy");    _astChanHangupCauseMap.put(new Integer(34), "Congestion");    _astChanHangupCauseMap.put(new Integer(19), "NoAnswer");    _astChanHangupCauseMap.put(new Integer(3), "Unregistered");    _astChanHangupCauseMap.put(new Integer(16), "Normal");    _astChanFlagsMap.put(new Integer(5), "Exception");    _astChanFlagsMap.put(new Integer(4), "Zombie");    _astChanFlagsMap.put(new Integer(1), "DeferDTMF");    _astChanFlagsMap.put(new Integer(6), "MusicOnHold");    _astChanFlagsMap.put(new Integer(3), "Blocking");    _astChanFlagsMap.put(new Integer(9), "AutoIncrementingLoop");    _astChanFlagsMap.put(new Integer(7), "Spying");    _astChanFlagsMap.put(new Integer(2), "WriteInterrupt");    _astChanFlagsMap.put(new Integer(0), "WantsJitter");    _astChanFlagsMap.put(new Integer(8), "NativeBridge");    _astChanTransferCapMap.put(new Integer(24), "Video");    _astChanTransferCapMap.put(new Integer(9), "RestrictedDigital");    _astChanTransferCapMap.put(new Integer(8), "Digital");    _astChanTransferCapMap.put(new Integer(16), "ThreeKAudio");    _astChanTransferCapMap.put(new Integer(17), "DigitalWithTones");    _astChanTransferCapMap.put(new Integer(0), "Speech");    _invalid = false;    _tmpErrorInd = -1;    _tmpErrorStat = 0;}/** * Constructor that will send the first request immediately. * * @param con The context of the request * @param o the Observer that will be notified when the answer is * received */public AsteriskChanTablePdu(SnmpContextBasisFace con, Observer o)throws PduException, java.io.IOException{    this(con);    addOids(null);    if (o != null)    {        addObserver(o);    }    send();}/** * The method addOids is the basis for the GetNext functionality. * * If old is null, it initialises the varbinds from all_oids. * If old is not null, it copies the column OIDs from the * old AsteriskChanTablePdu object. * so the request continues where the previous one left. * * Note, the scalars and the columns OIDs are handled differently. The * scalars are always copied from the original scal_oids, only the * column OIDs are copied from the old * AsteriskChanTablePdu object. */public void addOids(AsteriskChanTablePdu old){    if (old != null)    {        for (int i=0; i<NO_SCAL; i++)        {            addOid(scal_oids[i]);        }        for (int i=NO_SCAL; i<NO_OID; i++)        {            varbind var = (varbind) old.respVarbinds.elementAt(i);            addOid(var.getOid());        }    }    else    {        for (int i=0; i<NO_OID; i++)        {            addOid(all_oids[i]);        }    }}/** * This method sets the column index. By doing this, the request will * return (only) the row after row index. * * The index parameters only applies to the column OIDs. * The scalars are copied from the original scal_oids. */public void addOids(int index){    for (int i=0; i<NO_SCAL; i++)    {        addOid(scal_oids[i]);    }    for (int i=0; i<NO_COL; i++)    {        addOid(col_oids[i] + "." + index);    }}/** * The value of the request is set. This will be called by * Pdu.fillin(). * * I check if the variables are still in range. * I do this because I'm only interessed in a part of the MIB. If I * would not do this check, I'll get the whole MIB from the starting * point, instead of the variables in the table. * * @param n the index of the value * @param res the value * @see Pdu#new_value */protected void new_value(int n, varbind res){    if (getErrorStatus() == AsnObject.SNMP_ERR_NOERROR)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -