PageRenderTime 33ms CodeModel.GetById 24ms app.highlight 5ms RepoModel.GetById 1ms app.codeStats 0ms

/protocols/jain-megaco/megaco-api/src/main/java/javax/megaco/pkg/ToneDetPkg/ToneParamTl.java

http://mobicents.googlecode.com/
Java | 102 lines | 31 code | 13 blank | 58 comment | 0 complexity | 6977780edbd7ae7863f667a439204111 MD5 | raw file
  1package javax.megaco.pkg.ToneDetPkg;
  2
  3import javax.megaco.message.DescriptorType;
  4import javax.megaco.pkg.ParamValueType;
  5import javax.megaco.pkg.PkgConsts;
  6import javax.megaco.pkg.PkgItemParam;
  7
  8/**
  9 * The MEGACO parameter class for the Tonelist Parameter is associated with
 10 * Start Tone Detect, Long Tone Detect and End Tone Detect event of Network
 11 * Package. This class defines all the static information for this parameter.
 12 */
 13public class ToneParamTl extends PkgItemParam {
 14
 15	/**
 16	 * Identifies Duration parameter of the MEGACO Tone Detect Package. Its
 17	 * value shall be set equal to 0x0001.
 18	 */
 19	public static final int TONE_DET_PARAM_TL = 0x0001;
 20
 21	protected int[] paramsItemIds = null;
 22
 23	/**
 24	 * Constructs a Tone package parameter class that specifies the parameter as
 25	 * tone list.
 26	 */
 27	public ToneParamTl() {
 28		super();
 29		super.paramId = TONE_DET_PARAM_TL;
 30		super.itemValueType = ParamValueType.M_STRING;
 31		super.paramsDescriptorIds = new int[] { DescriptorType.M_EVENT_DESC };
 32		this.paramsItemIds = new int[] { ToneStdEvent.TONE_DET_STD_EVENT, ToneEtdEvent.TONE_DET_ETD_EVENT, ToneLtdEvent.TONE_DET_LTD_EVENT };
 33	}
 34
 35	/**
 36	 * The method can be used to get the parameter identifier as defined in the
 37	 * MEGACO packages. The implementation of this method in this class returns
 38	 * Id of Tone List parameter.
 39	 * 
 40	 * @return paramId - Returns param id as {@link TONE_DET_PARAM_TL}.
 41	 */
 42	public int getParamId() {
 43
 44		return super.paramId;
 45	}
 46
 47	/**
 48	 * The method can be used to get the type of the parameter as defined in the
 49	 * MEGACO packages. These could be one of string or enumerated value or
 50	 * integer or double value or boolean.
 51	 * 
 52	 * @return It returns {@link ParamValueType.M_STRING}
 53	 *         indicating that the parameter is a string.
 54	 */
 55	public int getParamValueType() {
 56
 57		return super.itemValueType;
 58	}
 59
 60	/**
 61	 * The method can be used to get the item ids corresponding to the
 62	 * parameters to which the parameter can be set. This method specifies the
 63	 * valid item (event/signal) ids to which the parameter can belong to.
 64	 * 
 65	 * @return The integer values corresponding to start tone detected, end tone
 66	 *         detected and long tone detected. Thus this shall return a vector
 67	 *         containing the elements {@link ToneStdEvent.TONE_DET_STD_EVENT},
 68	 *         {@link AnalogLineSOnEvt.TONE_DET_ETD_EVENT} and
 69	 *         {@link ToneLtdEvent.TONE_DET_LTD_EVENT}.
 70	 */
 71	public int[] getParamsItemIds() {
 72		return this.paramsItemIds;
 73	}
 74
 75	/**
 76	 * The method can be used to get the package id corresponding to the to
 77	 * which the parameter can be set. This method specifies the package for
 78	 * which the parameter is valid. Even though the parameter may be set for an
 79	 * item, but the parameter may not be valid for package to which the item
 80	 * belongs, but may be valid for a package which has extended this package.
 81	 * 
 82	 * @return This shall return {@link PkgConsts.TONE_DET_PACKAGE} as the
 83	 *         integer value. The integer values are defined in
 84	 *         {@link PkgConsts}.
 85	 */
 86	public int getParamsPkgId() {
 87		return PkgConsts.TONE_GEN_PACKAGE;
 88	}
 89
 90	/**
 91	 * The method can be used to get the descriptor ids corresponding to the
 92	 * parameters to which the parameter can be set.
 93	 * 
 94	 * @return This parameter can be present in Signal descriptor. It shall thus
 95	 *         return a value {@link DescriptorType.M_EVENT_DESC} as a part of
 96	 *         integer vector.
 97	 */
 98	public int[] getParamsDescriptorIds() {
 99		return super.paramsDescriptorIds;
100	}
101
102}