blob: 0d1edbb21a003dae58e91392e397b697a247af26 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
/*
* Copyright (C) 2011-2017 Karlsruhe Institute of Technology
*
* This file is part of Ufo.
*
* This library is free software: you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation, either
* version 3 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __UFO_ZMQ_COMMON_H
#define __UFO_ZMQ_COMMON_H
#include <stdint.h>
#define ZMQ_MAX_DIMENSIONS 16
#define ZMQ_MAX_DIMENSION_LENGTH 32768
#define ZMQ_REQUEST_REGISTER 0
#define ZMQ_REQUEST_DATA 1
#define ZMQ_REPLY_ACK 0
#define ZMQ_REPLY_STOP 1
#define ZMQ_ERROR_OKAY 0
#define ZMQ_ERROR_REGISTRATION_EXPECTED 1
#define ZMQ_ERROR_ALREADY_REGISTERED 2
#define ZMQ_ERROR_NOT_REGISTERED 3
#define ZMQ_ERROR_DATA_ALREADY_SENT 4
typedef struct {
int32_t id;
guint8 type;
} __attribute__((packed)) ZmqRequest;
typedef struct {
guint8 error;
guint8 type;
} __attribute__((packed)) ZmqReply;
#endif
|