-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmachine_learning.h
More file actions
87 lines (74 loc) · 1.97 KB
/
machine_learning.h
File metadata and controls
87 lines (74 loc) · 1.97 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
#ifndef ML_LAYER_H
#define ML_LAYER_H
/**
* @brief Enum representing collision threat levels.
*/
typedef enum {
none, /**< No collision threat. */
low, /**< Low collision threat. */
medium, /**< Medium collision threat. */
high, /**< High collision threat. */
imminent /**< Imminent collision threat. */
} CollisionThreat;
/**
* @brief Placeholder for lane position data.
*/
typedef struct {
// Add any necessary fields for LanePosition data.
} LanePosition;
/**
* @brief Placeholder for slot data.
*/
typedef struct {
// Add any necessary fields for Slot data.
} Slot;
/**
* @brief Abstract class representing a machine learning layer.
*/
typedef struct {
/**
* @brief Enables lane detection with a specified interval.
*
* @param msInterval The minimum detection interval in milliseconds.
*/
void (*enableLaneDetection)(int msInterval);
/**
* @brief Disables lane detection.
*/
void (*disableLaneDetection)();
/**
* @brief Handles the current lane position.
*
* @param currentLanePosition The current lane position data.
*/
void (*handleLanePosition)(LanePosition currentLanePosition);
/**
* @brief Enables slot search mode.
*/
void (*enableSlotSearchMode)();
/**
* @brief Disables slot search mode.
*/
void (*disableSlotSearchMode)();
/**
* @brief Handles the found slot.
*
* @param foundSlot The found slot data.
*/
void (*onSlotFound)(Slot foundSlot);
/**
* @brief Enables collision threat detection.
*/
void (*enableCollisionThreat)();
/**
* @brief Disables collision threat detection.
*/
void (*disableCollisionThreat)();
/**
* @brief Handles the current collision threat.
*
* @param currentCollisionThreat The current collision threat level.
*/
void (*handleCollisionThreat)(CollisionThreat currentCollisionThreat);
} MLLayer;
#endif /* ML_LAYER_H */