int main(int ac, char **av) { PARAM p; int s,i; pvInit(ac,av,&p); /* here you may interpret ac,av and set p->user to your data */ for(i=1; i<ac; i++) { if(strcmp(av[i],"-1") == 0) { s = pvAccept(&p); if(s > 0) { p.s = s; p.free = 0; pvMain(&p); } else { printf("pvAccept error\n"); } return 0; } } while(1) { s = pvAccept(&p); if(s != -1) pvCreateThread(&p,s); else break; } return 0; }
int main(int ac, char **av) { PARAM p; int s; pvInit(ac,av,&p); /* here you may interpret ac,av and set p->user to your data */ while(1) { s = pvAccept(&p); if(s != -1) pvCreateThread(&p,s); else break; } return 0; }
int main(int ac, char **av) { PARAM p; int s; pvInit(ac,av,&p); luaInit(); while(1) { s = pvAccept(&p); if(s != -1) pvCreateThread(&p,s); else break; } return 0; }
int main(int ac, char **av) { PARAM p; int s; acqui = new rlDataAcquisition("/srv/automation/mbx/ethernetip1.mbx", "/srv/automation/shm/ethernetip1.shm",65536); pvInit(ac,av,&p); /* here you may interpret ac,av and set p->user to your data */ while(1) { s = pvAccept(&p); if(s != -1) pvCreateThread(&p,s); else break; } return 0; }
int main(int ac, char **av) { PARAM p; int s; pvInit(ac,av,&p); p.language = DEFAULT_LANGUAGE; rlSetTranslator("de","translations.ini"); /* here you may interpret ac,av and set p->user to your data */ while(1) { s = pvAccept(&p); if(s != -1) pvCreateThread(&p,s); else break; } return 0; }
int main(int ac, char **av) { PARAM p; int s; pvInit(ac,av,&p); /* here you may interpret ac,av and set p->user to your data */ memset(sendData,0,sizeof(sendData)); memset(receiveData,0,sizeof(receiveData)); pbus.create(profibus,NULL); while(1) { s = pvAccept(&p); if(s != -1) pvCreateThread(&p,s); else break; } return 0; }