/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

  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 Frequency Parameter is associated with
  8. * Ring signal of Analog Line Supervision Package. This class defines all the
  9. * static information for this parameter.
  10. */
  11. public class AnalogLineSParamFreq extends PkgItemParam {
  12. /**
  13. *Identifies Frequency parameter of the MEGACO Analog Line Supervision Package. Its value shall be set equal to 0x0007.
  14. */
  15. public static final int ANALOG_LINE_PARAM_FREQ = 0x0006;
  16. protected int[] paramsItemIds = null;
  17. /**
  18. * Constructs a parameter class for Analog Line Supervision package that
  19. * specifies the parameter as Frequency.
  20. */
  21. public AnalogLineSParamFreq() {
  22. super();
  23. super.paramId = ANALOG_LINE_PARAM_FREQ;
  24. super.itemValueType = ParamValueType.M_INTEGER;
  25. super.paramsDescriptorIds = new int[] { DescriptorType.M_SIGNAL_DESC };
  26. // FIXME: ANALOG_LINE_RING_SIGNAL ??
  27. this.paramsItemIds = new int[] {};
  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_FREQ}.
  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_INTEGER}
  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 value corresponding to Ring. Thus this shall return
  56. * {@link ANALOG_LINE_RING_SIGNAL}.
  57. */
  58. public int[] getParamsItemIds() {
  59. return this.paramsItemIds;
  60. }
  61. /**
  62. * The method can be used to get the package id corresponding to the to
  63. * which the parameter can be set. This method specifies the package for
  64. * which the parameter is valid. Even though the parameter may be set for an
  65. * item, but the parameter may not be valid for package to which the item
  66. * belongs, but may be valid for a package which has extended this package.
  67. *
  68. * @return This shall return {@link PkgConsts.ANALOG_LINE_PACKAGE} as the
  69. * integer value. The integer values are defined in
  70. * {@link PkgConsts}.
  71. */
  72. public int getParamsPkgId() {
  73. return PkgConsts.ANALOG_LINE_PACKAGE;
  74. }
  75. /**
  76. * The method can be used to get the descriptor ids corresponding to the
  77. * parameters to which the parameter can be set.
  78. *
  79. * @return This parameter can be present in Event descriptor. It shall thus
  80. * return a value {@link DescriptorType.M_SIGNAL_DESC}
  81. */
  82. public int[] getParamsDescriptorIds() {
  83. return super.paramsDescriptorIds;
  84. }
  85. }