107{
108
109
110
111
112 string rbufin = string(m_conf->getconf("system", "unitname")) + ":" +
113 string(m_conf->getconf("processor", "ringbufin"));
114
115 string rbufout = string(m_conf->getconf("system", "unitname")) + ":" +
116 string(m_conf->getconf("processor", "ringbufout"));
117
118 string shmname = string(m_conf->getconf("system", "unitname")) + ":" +
119 string(m_nodename);
120
121
122 char* hrecv = m_conf->getconf("processor", "historecv", "script");
123 char* hport = m_conf->getconf("processor", "historecv", "port");
124 char* mapfile = m_conf->getconf("processor", "historecv", "mapfile");
125 m_pid_hrecv = m_proc->
Execute(hrecv, hport, mapfile);
126
127 sleep(5);
128
129
130 char* hrelay = m_conf->getconf("processor", "historelay", "script");
131 char* dqmdest = m_conf->getconf("dqmserver", "host");
132 char* dqmport = m_conf->getconf("dqmserver", "port");
133 char* interval = m_conf->getconf("processor", "historelay", "interval");
134 m_pid_hrelay = m_proc->
Execute(hrelay, mapfile, dqmdest, dqmport, interval);
135
136
137 char* sender = m_conf->getconf("processor", "sender", "script");
138 char* port = m_conf->getconf("processor", "sender", "port");
139 m_pid_sender = m_proc->
Execute(sender, (
char*)rbufout.c_str(), port, (
char*)shmname.c_str(), (
char*)
"1");
140 m_flow->clear(1);
141
142
143
144
145
146
147
148
149
150
151
152
153 char* receiver = m_conf->getconf("processor", "receiver", "script");
154 char* srchost = m_conf->getconf("distributor", "host");
155
156 int portbase = m_conf->getconfi("distributor", "sender", "portbase");
157
158
159
160
161
162
163
164
165
166 int rport;
167 sscanf(&m_nodename[strlen(m_nodename) - 2], "%d", &rport);
168 rport += portbase;
169 char portchar[256];
170 sprintf(portchar, "%d", rport);
171 m_pid_receiver = m_proc->
Execute(receiver, (
char*)rbufin.c_str(), srchost, portchar, (
char*)shmname.c_str(), (
char*)
"0");
172 m_flow->clear(0);
173
174 printf("Configure : done\n");
175 fflush(stdout);
176
177
180
181 return 0;
182
183}
int Execute(char *script, int nargs, char **args)
void forceClear()
Forcefully clear the RingBuffer with resetting semaphore.