jg.h 1008 Bytes
Newer Older
Sven Gestegård Robertz's avatar
Sven Gestegård Robertz committed
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
52
53
54
55
56
57
58
59
60
61
62
/* LabComm declarations:
sample struct {
  double b;
  int c;
  int d;
  string e;
  boolean f;
  short g;
  long h;
  float i;
} foo;
*/


#ifndef __LABCOMM_jg_H__
#define __LABCOMM_jg_H__

#include <stdint.h>
#include "labcomm.h"

#ifndef PREDEFINED_jg_foo
typedef struct {
  double b;
  int32_t c;
  int32_t d;
  char* e;
  uint8_t f;
  int16_t g;
  int64_t h;
  float i;
} jg_foo;
#endif
int labcomm_decoder_register_jg_foo(
  struct labcomm_decoder *d,
  void (*handler)(
    jg_foo *v,
    void *context
  ),
  void *context
);
int labcomm_decoder_ioctl_jg_foo(
  struct labcomm_decoder *d,
  int ioctl_action,
  ...
);
int labcomm_encoder_register_jg_foo(
  struct labcomm_encoder *e);
int labcomm_encode_jg_foo(
  struct labcomm_encoder *e,
  jg_foo *v
);
int labcomm_encoder_ioctl_jg_foo(
  struct labcomm_encoder *e,
  int ioctl_action,
  ...
);
extern int labcomm_sizeof_jg_foo(jg_foo *v);

void init_jg__signatures(void);
#define LABCOMM_FORALL_SAMPLES_jg(func, sep) \
  func(foo, jg_foo)
#endif