HMessageQueue.h 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. /*****************************************************************************
  2. * HMessageQueue.h
  3. *****************************************************************************
  4. *
  5. * Projekt: Halcon/libhalcon
  6. * Description: implements a programming interface to HALCONs Message Queues.
  7. *
  8. * (c) 1996-2020 by MVTec Software GmbH
  9. * www.mvtec.com
  10. *
  11. *****************************************************************************/
  12. #ifndef HMESSAGEQUEUE_H
  13. #define HMESSAGEQUEUE_H
  14. #if defined(__cplusplus)
  15. extern "C" {
  16. #endif
  17. /* Message data structure typedef pushed to the header
  18. * to allow use from the message-queue unit. */
  19. typedef struct H_MESSAGE_DATA h_message_data_t;
  20. typedef struct H_MESSAGE_QUEUE h_message_queue_t;
  21. /* Helper struct used to encapsulate the object tuple which is passed
  22. * through operator interface as a simple Hkey array.
  23. * Analogy to Hctuple for control data tuples... */
  24. typedef struct HOTUPLE
  25. {
  26. INT4_8 num;
  27. Hkey* objects;
  28. HBOOL owns_objects;
  29. } Hotuple;
  30. /*
  31. * Functions exported for use by e.g. extension packages. This should probably
  32. * go into its own header file.
  33. */
  34. extern HLibExport Herror HotCreate(Hproc_handle proc_handle,
  35. Hotuple** obj_tuple, INT4_8 num_obj,
  36. const Hkey* objects, HINT memtype);
  37. extern HLibExport Herror HotClear(Hproc_handle proc_handle,
  38. Hotuple* obj_tuple);
  39. extern HLibExport Herror HDestroyMessageData(Hproc_handle proc_handle,
  40. h_message_data_t* msg_data);
  41. extern HLibExport Herror HAllocMessageData(Hproc_handle proc_handle,
  42. h_message_data_t** pmsg_data);
  43. extern HLibExport Herror HSetMessageDataTuple(Hproc_handle proc_handle,
  44. h_message_data_t* msg_data,
  45. char const* key,
  46. Hctuple const* ctrl_tuple);
  47. extern HLibExport Herror HSetMessageDataObject(Hproc_handle proc_handle,
  48. h_message_data_t* msg_data,
  49. char const* key,
  50. Hotuple const* ctrl_tuple);
  51. extern HLibExport Herror HQueueMessageData(Hproc_handle proc_handle,
  52. Hphandle queue,
  53. h_message_data_t* const* msgs,
  54. INT4_8 num_msgs);
  55. extern HLibExport HBOOL HIsMessageQueue(Hphandle handle);
  56. #if defined(__cplusplus)
  57. }
  58. #endif
  59. #endif /* HMESSAGEQUEUE_H */