aboutsummaryrefslogtreecommitdiffstats
path: root/include/proto.h
blob: a9307f01a6ca7af8cfa63754a1002afe38d74783 (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
/*
 * File Name:       proto.h
 * Description:     demo communication protocal
 */

#ifndef __DEMO_PROTOCOL__
#define __DEMO_PROTOCOL__

/* demo message queue struct */
typedef struct demo_mq_struct {
  long mtype;
  _Bool tswitch;
} MQ_STRUCT;

/* demo shared memory struct */
typedef struct zigbee_th_struct {
  unsigned short tempNow;
  unsigned short humiNow;
} SHM_STRUCT;

/* resources child threads need */
typedef struct thread_resource_struct {
  int rw_fd;
  int shm_id;
  int mq_id;
} ARG_STRUCT;

#endif