forked from JanuszBedkowski/mandeye_controller
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstate.h
More file actions
39 lines (38 loc) · 1.07 KB
/
state.h
File metadata and controls
39 lines (38 loc) · 1.07 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
#pragma once
#include <map>
namespace mandeye
{
enum class States
{
WAIT_FOR_RESOURCES = -10,
IDLE = 0,
STARTING_SCAN = 10,
SCANNING = 20,
STOPPING = 30,
STOPPING_STAGE_1 = 31,
STOPPING_STAGE_2 = 32,
STOPPED = 40,
STARTING_STOP_SCAN = 100,
STOP_SCAN_IN_PROGRESS = 150,
STOP_SCAN_IN_INITIAL_PROGRESS = 160,
STOPING_STOP_SCAN = 190,
LIDAR_ERROR = 200,
USB_IO_ERROR = 210,
};
const std::map<States, std::string> StatesToString{
{States::WAIT_FOR_RESOURCES, "WAIT_FOR_RESOURCES"},
{States::IDLE, "IDLE"},
{States::STARTING_SCAN, "STARTING_SCAN"},
{States::SCANNING, "SCANNING"},
{States::STOPPING, "STOPPING"},
{States::STOPPING_STAGE_1, "STOPPING_STAGE_1"},
{States::STOPPING_STAGE_2, "STOPPING_STAGE_2"},
{States::STOPPED, "STOPPED"},
{States::STARTING_STOP_SCAN, "STARTING_STOP_SCAN"},
{States::STOP_SCAN_IN_PROGRESS, "STOP_SCAN_IN_PROGRESS"},
{States::STOP_SCAN_IN_INITIAL_PROGRESS, "STOP_SCAN_IN_INITIAL_PROGRESS"},
{States::STOPING_STOP_SCAN, "STOPING_STOP_SCAN"},
{States::LIDAR_ERROR, "LIDAR_ERROR"},
{States::USB_IO_ERROR, "USB_IO_ERROR"},
};
} // namespace mandeye