-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtask.h
More file actions
executable file
·28 lines (21 loc) · 829 Bytes
/
task.h
File metadata and controls
executable file
·28 lines (21 loc) · 829 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#pragma once
#include "coordinate_set.h"
typedef enum { OPEN_DISTANCE, OUT_AND_RETURN, GOAL, TRIANGLE, FLAT_TRIANGLE } task_type;
typedef struct task_t {
coordinate_t **coordinate;
coordinate_t **gap;
int16_t size;
task_type type;
} task_t;
double get_task_distance(task_t *task);
int get_task_time(task_t *task);
int8_t task_completes_task(task_t *obj, coordinate_set_t *set);
char *task_get_coordinate_ids(task_t *obj);
char *task_get_gridref(task_t *obj);
char *task_get_duration(task_t *obj);
void task_init(task_t *obj, task_type type, int8_t size, ...);
void task_init_ex(task_t *obj, size_t size, coordinate_t **coordinate);
void task_deinit(task_t *obj);
void task_add_gap(task_t *obj, coordinate_t *start, coordinate_t *end);
struct json_t;
typedef struct json_t json_t;