lts-api: lts.h

File lts.h, 1.7 KB (added by vladimir, 2 years ago)
Line 
1/*
2 * lts.h
3 *
4 *  Created on: 28 Ќая. 2022 г.
5 *      Author: vladimir
6 */
7
8#ifndef LTS_H_
9#define LTS_H_
10
11#include <stdint.h>
12
13typedef enum {
14        LTS_STATE_IDLE = 0,
15        LTS_STATE_AUTO = 1,
16        LTS_STATE_MAINTANCE = 2,
17        LTS_STATE_ERROR = 3,
18        LTS_STATE_MAX = 4,
19} LtsState;
20
21typedef enum {
22        LTS_IOPOINT_LTS_STATE_IDLE = 0,
23        LTS_IOPOINT_LTS_STATE_AUTO = 1,
24        LTS_IOPOINT_LTS_STATE_MAINTANCE = 2,
25        LTS_IOPOINT_LTS_STATE_MAINTANCE_ALLOW_FOCUS = 3,
26        LTS_IOPOINT_LTS_STATE_MAINTANCE_FOCUSED = 4,
27        LTS_IOPOINT_LTS_STATE_ERROR = 5,
28        LTS_IOPOINT_LTS_STATE_EXT_ERROR = 6,
29        LTS_IOPOINT_LTS_STATE_MAX = 7,
30} LtsIOPointLtsState;
31
32
33typedef enum {
34        LTS_ERROR_OFFLINE = 0,
35        LTS_ERROR_FCONVERTER_OFFLINE = 1,
36        LTS_ERROR_BW_JAM = 2,
37        LTS_ERROR_FW_JAM = 3,
38        LTS_ERROR_UPPER_JAM = 4,
39        LTS_ERROR_MAX = 5,
40} LtsError;
41
42
43typedef enum {
44        LTS_PROFILE_TRANSIT_FULL = 0,
45        LTS_PROFILE_TRANSIT_HALF = 1,
46        LTS_PROFILE_CAROUSEL = 2,
47        LTS_PROFILE_MAX = 3,
48} LtsProfile;
49
50typedef enum {
51        LTS_DRIVE_STATE_STOP = 0,
52        LTS_DRIVE_STATE_BW = 1,
53        LTS_DRIVE_STATE_FW = 2,
54        LTS_DRIVE_STATE_MAX = 3,
55} LtsDriveState;
56
57extern const char* const lts_state_names[LTS_STATE_MAX];
58extern const char* const lts_iopoint_lts_state_names[LTS_IOPOINT_LTS_STATE_MAX];
59extern const char* const lts_error_names[LTS_ERROR_MAX];
60extern const char* const lts_profile_names[LTS_PROFILE_MAX];
61extern const char* const lts_drive_state_names[LTS_DRIVE_STATE_MAX];
62
63#pragma pack(push)
64#pragma pack(1)
65
66
67typedef union {
68        struct {
69                uint8_t drive_state : 2;
70                uint8_t bw_sensor_state : 1;
71                uint8_t fw_sensor_state : 1;
72                uint8_t accept_ready : 1;
73                uint8_t luggage_present : 1;
74        };
75        uint16_t data;
76} LtsIOPointLtsOperateStatus;
77
78#pragma pack(pop)
79
80
81#endif /* LTS_H_ */