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

http://mobicents.googlecode.com/ · Java · 99 lines · 31 code · 13 blank · 55 comment · 0 complexity · 7d49b0308276ca0f149a249d8ca78e1f 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 Minimum Duration Parameter is associated
  8. * with Flash Hook event of Analog Line Supervision Package. This class defines
  9. * all the static information for this parameter.
  10. */
  11. public class AnalogLineSParamMindur extends PkgItemParam {
  12. /**
  13. * Identifies Minimum Duration parameter of the MEGACO Analog Line
  14. * Supervision Package. Its value shall be set equal to 0x0004.
  15. */
  16. public static final int ANALOG_LINE_PARAM_MINDUR = 0x0004;
  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 AnalogLineSParamMindur() {
  23. super();
  24. super.paramId = ANALOG_LINE_PARAM_MINDUR;
  25. super.itemValueType = ParamValueType.M_INTEGER;
  26. super.paramsDescriptorIds = new int[] { DescriptorType.M_EVENT_DESC };
  27. this.paramsItemIds = new int[] { AnalogLineSFlashEvt.ANALOG_LINE_FLASH_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 Minimum Duration parameter.
  33. *
  34. * @return paramId - Returns param id as {@link ANALOG_LINE_PARAM_MINDUR}.
  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 Flash Hook. Thus this shall
  56. * return {@link ANALOG_LINE_FLASH_EVENT}.
  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} and
  81. * {@link DescriptorType.M_EVENT_DESC}.
  82. */
  83. public int[] getParamsDescriptorIds() {
  84. return super.paramsDescriptorIds;
  85. }
  86. }