-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdatastructs.h
45 lines (38 loc) · 994 Bytes
/
datastructs.h
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
// SPDX-License-Identifier: (MIT)
/*
* Copyright (c) 2020 Institute for Control Engineering of Machine Tools and Manufacturing Units, University of Stuttgart
* Author: Philipp Neher <philipp.neher@isw.uni-stuttgart.de>
*/
/*
* This defines some structs to hold common data.
*/
#ifndef _DATASTRUCTS_H_
#define _DATASTRUCTS_H_
#include <stdint.h>
#include <stdbool.h>
/* ID to identify the axis */
enum axsID_t {
x = 0,
y = 1,
z = 2,
s = 3,
};
/* struct for the information per axis, this can be either set point or current value */
struct axsnfo_t {
double cntrlvl;
double posset;
double poscur;
int8_t cntrlsw;
enum axsID_t axsID;
};
/* main information from the control */
struct cntrlnfo_t {
struct axsnfo_t x_set;
struct axsnfo_t y_set;
struct axsnfo_t z_set;
struct axsnfo_t s_set;
bool spindlebrake;
bool machinestatus;
bool estopstatus;
};
#endif /* _DATASTRUCTS_H_ */