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

http://mobicents.googlecode.com/ · Java · 99 lines · 31 code · 13 blank · 55 comment · 0 complexity · f2dc6f300540f6b12627aaf8b374e8cc MD5 · raw file

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