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, const_cast<char*>(rbufout.c_str()), port, const_cast<char*>(shmname.c_str()),
140 const_cast<char*>("1"));
141 m_flow->clear(1);
142
143
144
145
146
147
148
149
150
151
152
153
154 char* receiver = m_conf->getconf("processor", "receiver", "script");
155 char* srchost = m_conf->getconf("distributor", "host");
156
157 int portbase = m_conf->getconfi("distributor", "sender", "portbase");
158
159
160
161
162
163
164
165
166
167 int rport;
168 sscanf(&m_nodename[strlen(m_nodename) - 2], "%d", &rport);
169 rport += portbase;
170 char portchar[256];
171 sprintf(portchar, "%d", rport);
172 m_pid_receiver = m_proc->Execute(receiver, const_cast<char*>(rbufin.c_str()), srchost, portchar, const_cast<char*>(shmname.c_str()),
173 const_cast<char*>("0"));
174 m_flow->clear(0);
175
176 printf("Configure : done\n");
177 fflush(stdout);
178
179
180 m_rbufin->forceClear();
181 m_rbufout->forceClear();
182
183 return 0;
184
185}