PageRenderTime 28ms CodeModel.GetById 17ms app.highlight 6ms RepoModel.GetById 2ms app.codeStats 0ms

/protocols/jain-megaco/megaco-api/src/main/java/javax/megaco/pkg/AnalogLineSPkg/AnalogLineSParamFreq.java

http://mobicents.googlecode.com/
Java | 98 lines | 31 code | 13 blank | 54 comment | 0 complexity | 0e38223a0f359c2a8d093d5b856aadfe MD5 | raw file
 1package javax.megaco.pkg.AnalogLineSPkg;
 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 Frequency Parameter is associated with
10 * Ring signal of Analog Line Supervision Package. This class defines all the
11 * static information for this parameter.
12 */
13public class AnalogLineSParamFreq extends PkgItemParam {
14
15	/**
16	 *Identifies Frequency parameter of the MEGACO Analog Line Supervision Package. Its value shall be set equal to 0x0007.
17	 */
18	public static final int ANALOG_LINE_PARAM_FREQ = 0x0006;
19
20	protected int[] paramsItemIds = null;
21
22	/**
23	 * Constructs a parameter class for Analog Line Supervision package that
24	 * specifies the parameter as Frequency.
25	 */
26	public AnalogLineSParamFreq() {
27		super();
28		super.paramId = ANALOG_LINE_PARAM_FREQ;
29		super.itemValueType = ParamValueType.M_INTEGER;
30		super.paramsDescriptorIds = new int[] { DescriptorType.M_SIGNAL_DESC };
31
32		// FIXME: ANALOG_LINE_RING_SIGNAL ??
33		this.paramsItemIds = new int[] {};
34	}
35
36	/**
37	 * The method can be used to get the parameter identifier as defined in the
38	 * MEGACO packages. The implementation of this method in this class returns
39	 * Id of Cadence parameter.
40	 * 
41	 * @return paramId - Returns param id as {@link ANALOG_LINE_PARAM_FREQ}.
42	 */
43	public int getParamId() {
44
45		return super.paramId;
46	}
47
48	/**
49	 * The method can be used to get the type of the parameter as defined in the
50	 * MEGACO packages. These could be one of string or enumerated value or
51	 * integer or double value or boolean.
52	 * 
53	 * @return It returns {@link ParamValueType.M_INTEGER}
54	 *         indicating that the parameter is a string.
55	 */
56	public int getParamValueType() {
57
58		return super.itemValueType;
59	}
60
61	/**
62	 * The method can be used to get the item ids corresponding to the
63	 * parameters to which the parameter can be set. This method specifies the
64	 * valid item (event/signal) ids to which the parameter can belong to.
65	 * 
66	 * @return The integer value corresponding to Ring. Thus this shall return
67	 *         {@link ANALOG_LINE_RING_SIGNAL}.
68	 */
69	public int[] getParamsItemIds() {
70		return this.paramsItemIds;
71	}
72
73	/**
74	 * The method can be used to get the package id corresponding to the to
75	 * which the parameter can be set. This method specifies the package for
76	 * which the parameter is valid. Even though the parameter may be set for an
77	 * item, but the parameter may not be valid for package to which the item
78	 * belongs, but may be valid for a package which has extended this package.
79	 * 
80	 * @return This shall return {@link PkgConsts.ANALOG_LINE_PACKAGE} as the
81	 *         integer value. The integer values are defined in
82	 *         {@link PkgConsts}.
83	 */
84	public int getParamsPkgId() {
85		return PkgConsts.ANALOG_LINE_PACKAGE;
86	}
87
88	/**
89	 * The method can be used to get the descriptor ids corresponding to the
90	 * parameters to which the parameter can be set.
91	 * 
92	 * @return This parameter can be present in Event descriptor. It shall thus
93	 *         return a value {@link DescriptorType.M_SIGNAL_DESC} 
94	 */
95	public int[] getParamsDescriptorIds() {
96		return super.paramsDescriptorIds;
97	}
98}