aboutsummaryrefslogtreecommitdiff
path: root/src/process_image.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2021-04-15 15:30:25 +0200
committerThomas White <taw@physics.org>2021-04-15 16:43:40 +0200
commitafcb7b568947c20fb3477a178be5aefe3203b603 (patch)
tree25d3d8a475bd4353083ce00f893e766525e1e625 /src/process_image.c
parent0dcd6c7e2fbfe78e4d2f26e01de0d4ea032d8fd6 (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 'src/process_image.c')
-rw-r--r--src/process_image.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/process_image.c b/src/process_image.c
index 825e57d9..52e0a9e0 100644
--- a/src/process_image.c
+++ b/src/process_image.c
@@ -193,10 +193,11 @@ void process_image(const struct index_args *iargs, struct pattern_args *pargs,
float **prefilter;
int any_crystals;
- if ( pargs->msgpack_obj != NULL ) {
+ if ( pargs->zmq_data != NULL ) {
set_last_task(last_task, "unpacking messagepack object");
image = image_msgpack_read(iargs->dtempl,
- pargs->msgpack_obj,
+ pargs->zmq_data,
+ pargs->zmq_data_size,
iargs->no_image_data);
if ( image == NULL ) return;
} else {
@@ -303,7 +304,8 @@ void process_image(const struct index_args *iargs, struct pattern_args *pargs,
case PEAK_MSGPACK:
image->features = image_msgpack_read_peaks(iargs->dtempl,
- pargs->msgpack_obj,
+ pargs->zmq_data,
+ pargs->zmq_data_size,
iargs->half_pixel_shift);
break;