5
* \brief implementation of interprocess communication
6
* primitives between r.li.daemon and r.li.worker
9
* This program is free software under the GPL (>=v2)
10
* Read the COPYING file that comes with GRASS for details.
13
* \author Lucio Davide Spano
21
#include <grass/gis.h>
22
#include <grass/glocale.h>
26
int send(int pipe, msg * m)
31
check = write(pipe, m, sizeof(msg));
38
int receive(int pipe, msg * m)
40
return read(pipe, m, sizeof(msg));
48
G_message(_(" AREA MESSAGE: \n \
53
cl = %i \n "), m.f.f_a.aid, m.f.f_a.x, m.f.f_a.y, m.f.f_a.rl, m.f.f_a.cl);
57
G_message(_(" MASKEDAREA MESSAGE: \n \
64
m.f.f_ma.aid, m.f.f_ma.x, m.f.f_ma.y, m.f.f_ma.rl, m.f.f_ma.cl, m.f.f_ma.mask);
68
G_message(_(" DONE MESSAGE: \n \
71
result = %f \n "), m.f.f_d.aid, m.f.f_d.pid, m.f.f_d.res);
75
G_message(_(" ERROR MESSAGE: \n \
77
pid = %i \n "), m.f.f_e.aid, m.f.f_e.pid);
81
G_message(_(" TERM MESSAGE: \n \
82
pid = %i \n "), m.f.f_t.pid);