fe-read-status.rst 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. .. -*- coding: utf-8; mode: rst -*-
  2. .. _FE_READ_STATUS:
  3. ********************
  4. ioctl FE_READ_STATUS
  5. ********************
  6. Name
  7. ====
  8. FE_READ_STATUS - Returns status information about the front-end. This call only requires - read-only access to the device
  9. Synopsis
  10. ========
  11. .. c:function:: int ioctl( int fd, FE_READ_STATUS, unsigned int *status )
  12. :name: FE_READ_STATUS
  13. Arguments
  14. =========
  15. ``fd``
  16. File descriptor returned by :ref:`open() <frontend_f_open>`.
  17. ``status``
  18. pointer to a bitmask integer filled with the values defined by enum
  19. :c:type:`fe_status`.
  20. Description
  21. ===========
  22. All DVB frontend devices support the ``FE_READ_STATUS`` ioctl. It is
  23. used to check about the locking status of the frontend after being
  24. tuned. The ioctl takes a pointer to an integer where the status will be
  25. written.
  26. .. note::
  27. The size of status is actually sizeof(enum fe_status), with
  28. varies according with the architecture. This needs to be fixed in the
  29. future.
  30. int fe_status
  31. =============
  32. The fe_status parameter is used to indicate the current state and/or
  33. state changes of the frontend hardware. It is produced using the enum
  34. :c:type:`fe_status` values on a bitmask
  35. .. c:type:: fe_status
  36. .. tabularcolumns:: |p{3.5cm}|p{14.0cm}|
  37. .. _fe-status:
  38. .. flat-table:: enum fe_status
  39. :header-rows: 1
  40. :stub-columns: 0
  41. - .. row 1
  42. - ID
  43. - Description
  44. - .. row 2
  45. - .. _FE-HAS-SIGNAL:
  46. ``FE_HAS_SIGNAL``
  47. - The frontend has found something above the noise level
  48. - .. row 3
  49. - .. _FE-HAS-CARRIER:
  50. ``FE_HAS_CARRIER``
  51. - The frontend has found a DVB signal
  52. - .. row 4
  53. - .. _FE-HAS-VITERBI:
  54. ``FE_HAS_VITERBI``
  55. - The frontend FEC inner coding (Viterbi, LDPC or other inner code)
  56. is stable
  57. - .. row 5
  58. - .. _FE-HAS-SYNC:
  59. ``FE_HAS_SYNC``
  60. - Synchronization bytes was found
  61. - .. row 6
  62. - .. _FE-HAS-LOCK:
  63. ``FE_HAS_LOCK``
  64. - The DVB were locked and everything is working
  65. - .. row 7
  66. - .. _FE-TIMEDOUT:
  67. ``FE_TIMEDOUT``
  68. - no lock within the last about 2 seconds
  69. - .. row 8
  70. - .. _FE-REINIT:
  71. ``FE_REINIT``
  72. - The frontend was reinitialized, application is recommended to
  73. reset DiSEqC, tone and parameters
  74. Return Value
  75. ============
  76. On success 0 is returned, on error -1 and the ``errno`` variable is set
  77. appropriately. The generic error codes are described at the
  78. :ref:`Generic Error Codes <gen-errors>` chapter.