diff options
author | Thomas White <taw@physics.org> | 2021-04-15 15:30:25 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2021-04-15 16:43:40 +0200 |
commit | afcb7b568947c20fb3477a178be5aefe3203b603 (patch) | |
tree | 25d3d8a475bd4353083ce00f893e766525e1e625 /libcrystfel/src/image-msgpack.h | |
parent | 0dcd6c7e2fbfe78e4d2f26e01de0d4ea032d8fd6 (diff) |
Separate ZMQ from MessagePack, switch to pub/sub socket
Indexamajig uses only ZMQ, to receive streaming data, while libcrystfel
uses only msgpack to implement another type of image format.
The two of these are eventually tied together in process_image, which
does this: if ( have_zmq_data ) interpret_zmq_data_as_msgpack;
- however, they would be easy to split up if we wanted to do something
else (CBF data over ZMQ, anyone?).
This commit also switches the ZMQ connector to use a pub/sub socket
instead of a request/reply one. This matches changes in OnDA.
At the moment, the MessagePack image reader simply dumps the object to
disk.
Diffstat (limited to 'libcrystfel/src/image-msgpack.h')
-rw-r--r-- | libcrystfel/src/image-msgpack.h | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/libcrystfel/src/image-msgpack.h b/libcrystfel/src/image-msgpack.h index a8e5af34..06fcffec 100644 --- a/libcrystfel/src/image-msgpack.h +++ b/libcrystfel/src/image-msgpack.h @@ -3,11 +3,11 @@ * * Image loading, MessagePack parts * - * Copyright © 2012-2020 Deutsches Elektronen-Synchrotron DESY, + * Copyright © 2012-2021 Deutsches Elektronen-Synchrotron DESY, * a research centre of the Helmholtz Association. * * Authors: - * 2020 Thomas White <taw@physics.org> + * 2020-2021 Thomas White <taw@physics.org> * * This file is part of CrystFEL. * @@ -33,27 +33,29 @@ #if defined(HAVE_MSGPACK) -#include <msgpack.h> - extern struct image *image_msgpack_read(DataTemplate *dtempl, - msgpack_object *obj, + void *data, + size_t data_size, int no_image_data); extern ImageFeatureList *image_msgpack_read_peaks(const DataTemplate *dtempl, - msgpack_object *obj, + void *data, + size_t data_size, int half_pixel_shift); #else /* defined(HAVE_MSGPACK) */ static UNUSED struct image *image_msgpack_read(DataTemplate *dtempl, - void *obj, - int no_image_data) + void *data, + size_t data_size, + int no_image_data) { return NULL; } static UNUSED ImageFeatureList *image_msgpack_read_peaks(const DataTemplate *dtempl, - void *obj, + void *data, + size_t data_size, int half_pixel_shift) { return NULL; |