PageRenderTime 37ms CodeModel.GetById 19ms RepoModel.GetById 0ms app.codeStats 0ms

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

http://mobicents.googlecode.com/
Java | 99 lines | 31 code | 12 blank | 56 comment | 0 complexity | 81cb5ad3d012b00e2e402c2ea6d9b494 MD5 | raw file
Possible License(s): LGPL-3.0, GPL-3.0, LGPL-2.1, GPL-2.0, CC-BY-SA-3.0, CC0-1.0, Apache-2.0, BSD-3-Clause
  1. package javax.megaco.pkg.AnalogLineSPkg;
  2. import javax.megaco.message.DescriptorType;
  3. import javax.megaco.pkg.ParamValueType;
  4. import javax.megaco.pkg.PkgConsts;
  5. import javax.megaco.pkg.PkgItemParam;
  6. /**
  7. * The MEGACO parameter class for the Init Parameter is associated with On Hook
  8. * and Off Hook event of Analog Line Supervision Package. This class defines all
  9. * the static information for this parameter.
  10. */
  11. public class AnalogLineSParamInit extends PkgItemParam {
  12. /**
  13. *Identifies Init parameter of the MEGACO Analog Line Supervision Package.
  14. * Its value shall be set equal to 0x0002.
  15. */
  16. public static final int ANALOG_LINE_PARAM_INIT = 0x0002;
  17. protected int[] paramsItemIds = null;
  18. /**
  19. * Constructs a parameter class for Analog Line Supervision package that
  20. * specifies the parameter as Initial State.
  21. */
  22. public AnalogLineSParamInit() {
  23. super();
  24. super.paramId = ANALOG_LINE_PARAM_INIT;
  25. super.itemValueType = ParamValueType.M_STRING;
  26. super.paramsDescriptorIds = new int[] { DescriptorType.M_OBSERVED_EVENT_DESC };
  27. this.paramsItemIds = new int[] { AnalogLineSOnEvt.ANALOG_LINE_ONHOOK_EVENT, AnalogLineSOffEvt.ANALOG_LINE_OFFHOOK_EVENT };
  28. }
  29. /**
  30. * The method can be used to get the parameter identifier as defined in the
  31. * MEGACO packages. The implementation of this method in this class returns
  32. * Id of Cadence parameter.
  33. *
  34. * @return paramId - Returns param id as {@link ANALOG_LINE_PARAM_INIT}.
  35. */
  36. public int getParamId() {
  37. return super.paramId;
  38. }
  39. /**
  40. * The method can be used to get the type of the parameter as defined in the
  41. * MEGACO packages. These could be one of string or enumerated value or
  42. * integer or double value or boolean.
  43. *
  44. * @return It returns {@link ParamValueType.M_STRING}
  45. * indicating that the parameter is a string.
  46. */
  47. public int getParamValueType() {
  48. return super.itemValueType;
  49. }
  50. /**
  51. * The method can be used to get the item ids corresponding to the
  52. * parameters to which the parameter can be set. This method specifies the
  53. * valid item (event/signal) ids to which the parameter can belong to.
  54. *
  55. * @return The integer values corresponding to On Hook event and Off Hook
  56. * event. Thus this shall return a vector containing the elements
  57. * {@link ANALOG_LINE_ONHOOK_EVENT} and
  58. * {@link ANALOG_LINE_OFFHOOK_EVENT}.
  59. */
  60. public int[] getParamsItemIds() {
  61. return this.paramsItemIds;
  62. }
  63. /**
  64. * The method can be used to get the package id corresponding to the to
  65. * which the parameter can be set. This method specifies the package for
  66. * which the parameter is valid. Even though the parameter may be set for an
  67. * item, but the parameter may not be valid for package to which the item
  68. * belongs, but may be valid for a package which has extended this package.
  69. *
  70. * @return This shall return {@link PkgConsts.ANALOG_LINE_PACKAGE} as the
  71. * integer value. The integer values are defined in
  72. * {@link PkgConsts}.
  73. */
  74. public int getParamsPkgId() {
  75. return PkgConsts.ANALOG_LINE_PACKAGE;
  76. }
  77. /**
  78. * The method can be used to get the descriptor ids corresponding to the
  79. * parameters to which the parameter can be set.
  80. *
  81. * @return This parameter can be present in Event descriptor. It shall thus
  82. * return a value {@link DescriptorType.M_OBSERVED_EVENT_DESC}.
  83. */
  84. public int[] getParamsDescriptorIds() {
  85. return super.paramsDescriptorIds;
  86. }
  87. }