MNE-CPP
beta 1.0
Main Page
Related Pages
Modules
Classes
Files
File List
File Members
applications
mne_rt_server
connectors
Neuromag
types_definitions.h
Go to the documentation of this file.
1
//=============================================================================================================
36
#ifndef TYPESDEFINITIONS_H
37
#define TYPESDEFINITIONS_H
38
39
40
//*************************************************************************************************************
41
//=============================================================================================================
42
// DEFINE NAMESPACE NeuromagPlugin
43
//=============================================================================================================
44
45
namespace
NeuromagPlugin
46
{
47
48
49
//*************************************************************************************************************
50
//=============================================================================================================
51
// DEFINES
52
//=============================================================================================================
53
54
#define DACQ_AUTOSTART
55
56
#define DACQ_REPLY_PACKET 1
57
#define DACQ_REPLY_RFC 2
58
#define DACQ_REPLY_BINARY 4
59
#define DACQ_REPLY_ASCII 8
60
61
#define DACQ_DRAIN_INPUT 0
62
#define DACQ_KEEP_INPUT 1
63
64
#define DACQ_REPLY_GOOD 1
65
#define DACQ_REPLY_BAD 0
66
#define DACQ_REPLY_ERROR -1
67
68
#define DACQ_CMD_PASSWORD "pass"
69
#define DACQ_CMD_NAME "name"
70
#define DACQ_CMD_ABOUT "abou"
71
#define DACQ_CMD_MONITOR "moni"
72
#define DACQ_CMD_HELP "help"
73
#define DACQ_CMD_QUIT "quit"
74
75
76
77
78
#define COLLECTOR_PORT 11122 //"collector"
79
#define COLLECTOR_PASS "homunculus122"
80
#define COLLECTOR_BUFS 32768
81
82
#define COLLECTOR_GETVARS "vars"
83
#define COLLECTOR_SETVARS "vara"
84
#define COLLECTOR_DOSETUP "setu"
85
#define COLLECTOR_STAT "stat"
86
#define COLLECTOR_BUFVAR "maxBuflen"
87
88
#define MIN_BUFLEN 1*28
89
#define CLIENT_ID 13014
91
#define SOCKET_UMASK 0x000
93
#define SOCKET_PATH "/neuro/dacq/sockets/dacq_server"
94
#define SOCKET_PATHCLNT "/neuro/dacq/sockets/dacq_client_"
95
96
//#define sockfd int /**< Defines a primitive data type for socket descriptor. */
97
98
#define OK 0
99
#define FAIL -1
100
101
//
102
// compat.h
103
//
104
105
//typedef int socklen_t;
106
107
108
//
109
// dacq_shmem.h
110
//
111
#define SHM_FILE "/neuro/dacq/shmem/data_server"
112
#define SHM_FAIL_FILE "/neuro/dacq/raw/data_server_shmem"
113
#define SHM_MAX_CLIENT 10
114
115
//#ifdef OLD_SHM
116
//#define SHM_MAX_DATA 2*2*2*31*1024
117
//#define SHM_NUM_BLOCKS 10
118
//#else
119
//#define SHM_MAX_DATA 450*2*3000
120
//#define SHM_NUM_BLOCKS 5
121
//#endif
122
//#define SHM_NO_BUF -1
123
124
#define SHM_MAX_DATA 500*1500*4
125
#define SHM_NUM_BLOCKS 100
126
#define SHM_NO_BUF -1
127
128
typedef
struct
{
129
int
client_id;
130
int
done;
131
} *
dacqShmClient
,
dacqShmClientRec
;
132
133
typedef
struct
{
134
dacqShmClientRec clients[SHM_MAX_CLIENT];
135
unsigned
char
data[SHM_MAX_DATA];
136
} *
dacqShmBlock
,
dacqShmBlockRec
;
137
138
#define SHM_SIZE SHM_NUM_BLOCKS*sizeof(dacqShmBlockRec)
139
140
141
142
//
143
// data_message.h
144
//
145
typedef
struct
{
146
int
kind;
/* What is this data? */
147
int
type;
/* What is its type */
148
int
size;
/* Size of item */
149
int
loc;
/* Position in file */
150
int
shmem_buf;
/* Shared mem block */
151
int
shmem_loc;
/* Not used, set to -1 */
152
}
dacqDataMessageRec
,*
dacqDataMessage
;
153
154
#define DATA_MESS_SIZE sizeof(dacqDataMessageRec)
155
156
}
157
158
#endif // TYPESDEFINITIONS_H
NeuromagPlugin
Definition:
collectorsocket.h:60
NeuromagPlugin::dacqShmBlock
Definition:
types_definitions.h:133
NeuromagPlugin::dacqShmClient
Definition:
types_definitions.h:128
NeuromagPlugin::dacqDataMessageRec
Definition:
types_definitions.h:145
Generated on Fri Mar 27 2015 22:54:26 for MNE-CPP by
1.8.9.1