dmx-get-event.rst 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. .. -*- coding: utf-8; mode: rst -*-
  2. .. _DMX_GET_EVENT:
  3. =============
  4. DMX_GET_EVENT
  5. =============
  6. Name
  7. ----
  8. DMX_GET_EVENT
  9. Synopsis
  10. --------
  11. .. c:function:: int ioctl( int fd, DMX_GET_EVENT, struct dmx_event *ev)
  12. :name: DMX_GET_EVENT
  13. Arguments
  14. ---------
  15. ``fd``
  16. File descriptor returned by :c:func:`open() <dvb-dmx-open>`.
  17. ``ev``
  18. Pointer to the location where the event is to be stored.
  19. Description
  20. -----------
  21. This ioctl call returns an event if available. If an event is not
  22. available, the behavior depends on whether the device is in blocking or
  23. non-blocking mode. In the latter case, the call fails immediately with
  24. errno set to ``EWOULDBLOCK``. In the former case, the call blocks until an
  25. event becomes available.
  26. Return Value
  27. ------------
  28. On success 0 is returned, on error -1 and the ``errno`` variable is set
  29. appropriately. The generic error codes are described at the
  30. :ref:`Generic Error Codes <gen-errors>` chapter.
  31. .. flat-table::
  32. :header-rows: 0
  33. :stub-columns: 0
  34. - .. row 1
  35. - ``EWOULDBLOCK``
  36. - There is no event pending, and the device is in non-blocking mode.