#include <stdlib.h>
#include <sapi.h>
#include "midas.h"
#include "msystem.h"
Go to the source code of this file.
◆ main()
Definition at line 86 of file mspeaker.cpp.
87{
91
92
94
95
96 strcpy(
mtTalkStr,
"\\Windows\\Media\\notify.wav");
97 strcpy(
mtUserStr,
"\\Windows\\Media\\notify.wav");
98
99
101 if (
argv[
i][0] ==
'-') {
104 if (
argv[
i][1] ==
'e')
106 else if (
argv[
i][1] ==
'h')
108 else if (
argv[
i][1] ==
't')
110 else if (
argv[
i][1] ==
'u')
112 else if (
argv[
i][1] ==
's')
114 else {
116 printf(
"usage: mspeaker [-h <hostname>] [-e <experiment>]\n\n");
117 printf(
" [-t <file>] Specify the alert wave file for MT_TALK messages\n");
118 printf(
" [-u <file>] Specify the alert wave file for MT_USER messages\n");
119 printf(
" [-s <sec>] Specify the min time interval between alert [s]\n");
120 return 0;
121 }
122 }
123 }
124
125
127
128
131 printf(
"Cannot initialize speech system\n");
132 return 1;
133 }
134
136
137
140 return 1;
141
143
144
146
147 printf(
"Midas Message Talker connected to %s. Press \"!\" to exit\n",
149
150 do {
157 break;
158 }
159
162 printf(
"Trying to reconnect...\n");
165 }
166
168
169
172
173
175
177 return 1;
178}
INT cm_yield(INT millisec)
INT cm_connect_experiment(const char *host_name, const char *exp_name, const char *client_name, void(*func)(char *))
INT cm_disconnect_experiment(void)
INT cm_get_environment(char *host_name, int host_name_size, char *exp_name, int exp_name_size)
INT cm_set_watchdog_params(BOOL call_watchdog, DWORD timeout)
INT ss_sleep(INT millisec)
INT cm_msg_register(EVENT_HANDLER *func)
char exp_name[NAME_LENGTH]
char host_name[HOST_NAME_LENGTH]
void receive_message(HNDLE hBuf, HNDLE id, EVENT_HEADER *header, void *message)
TH1X EXPRT * h1_book(const char *name, const char *title, int bins, double min, double max)
◆ receive_message()
Definition at line 37 of file mspeaker.cpp.
38{
41
42
44
45
47
48
51 while (*
sp ==
' ' || *
sp ==
'\t')
54
60 break;
64 break;
65 }
66
67
70
72
75
76
78 }
79 }
80
81 return;
82}
#define message(type, str)
◆ mtTalkStr
◆ mtUserStr
◆ shutupTime
◆ type_name
Initial value:= {
"ERROR",
"INFO",
"DEBUG" "USER",
"LOG",
"TALK",
"CALL",
}
Definition at line 26 of file mspeaker.cpp.
26 {
27 "ERROR",
28 "INFO",
29 "DEBUG" "USER",
30 "LOG",
31 "TALK",
32 "CALL",
33};
◆ Voice