-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathcontrol_module.h
More file actions
43 lines (34 loc) · 1.16 KB
/
control_module.h
File metadata and controls
43 lines (34 loc) · 1.16 KB
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
/*
* File: function_module.h
* Author: m79lol
*
*/
#ifndef CONTROL_MODULE_H
#define CONTROL_MODULE_H
typedef void (*sendAxisState_t)(system_value, variable_value);
class ControlModule {
protected:
ControlModule() {}
public:
//init
virtual const char *getUID() = 0;
virtual void prepare(colorPrintf_t *colorPrintf_p, colorPrintfVA_t *colorPrintfVA_p) = 0;
//compiler only
virtual AxisData** getAxis(unsigned int *count_axis) = 0;
virtual void *writePC(unsigned int *buffer_length) = 0;
//intepreter - devices
virtual int init() = 0;
virtual void execute(sendAxisState_t sendAxisState) = 0;
virtual void final() = 0;
//intepreter - program
virtual int startProgram(int uniq_index, void *buffer, unsigned int buffer_length) = 0;
virtual int endProgram(int uniq_index) = 0;
//destructor
virtual void destroy() = 0;
virtual ~ControlModule() {}
};
typedef ControlModule* (*getControlModuleObject_t)();
extern "C" {
PREFIX_FUNC_DLL ControlModule* getControlModuleObject();
}
#endif /* CONTROL_MODULE_H */