SSCMA-Micro CPP SDK  v2.0.0
SSCMA-Micro is a cross-platform machine learning inference framework designed for embedded devices.
ma_definations.h
Go to the documentation of this file.
1 #ifndef _MA_DEFINATIONS_H_
2 #define _MA_DEFINATIONS_H_
3 
4 #define MA_SSCMA_CONFIG_DEFAULT_PATH "/etc/sscma.conf"
5 #define MA_SSCMA_MODEL_DEFAULT_PATH "/mnt/user/model/" // TODO change to model dir
6 
7 
8 #define MA_MQTT_CLIENTID_FMT "%s_%s"
9 #define MA_MQTT_TOPIC_FMT "sscma/v0/%s/%s"
10 
11 #define MA_EXECUTOR_WORKER_NAME_PREFIX "sscma#executor"
12 
13 #define MA_STORAGE_KEY_ID "device#id"
14 #define MA_STORAGE_KEY_NAME "device#name"
15 
16 
17 #define MA_STORAGE_DEFAULT_VALUE "N/A"
18 
19 #define MA_STORAGE_KEY_MODEL_ID "model#id"
20 #define MA_STORAGE_KEY_MODEL_DIR "model#addr"
21 
22 #define MA_STORAGE_KEY_SENSOR_ID "sensor#id"
23 #define MA_STORAGE_KEY_SENSOR_OPT_ID "sensor#opt_id"
24 
25 #define MA_STORAGE_KEY_WIFI_SSID "wifi#ssid"
26 #define MA_STORAGE_KEY_WIFI_BSSID "wifi#bssid"
27 #define MA_STORAGE_KEY_WIFI_PWD "wifi#password"
28 #define MA_STORAGE_KEY_WIFI_SECURITY "wifi#security"
29 
30 
31 #define MA_STORAGE_KEY_MQTT_HOST "mqtt#host"
32 #define MA_STORAGE_KEY_MQTT_PORT "mqtt#port"
33 #define MA_STORAGE_KEY_MQTT_CLIENTID "mqtt#client_id"
34 #define MA_STORAGE_KEY_MQTT_USER "mqtt#user"
35 #define MA_STORAGE_KEY_MQTT_PWD "mqtt#password"
36 #define MA_STORAGE_KEY_MQTT_PUB_TOPIC "mqtt#pub_topic"
37 #define MA_STORAGE_KEY_MQTT_PUB_QOS "mqtt#pub_qos"
38 #define MA_STORAGE_KEY_MQTT_SUB_TOPIC "mqtt#sub_topic"
39 #define MA_STORAGE_KEY_MQTT_SUB_QOS "mqtt#sub_qos"
40 #define MA_STORAGE_KEY_MQTT_SSL "mqtt#use_ssl"
41 #define MA_STORAGE_KEY_MQTT_SSL_CA "mqtt#ssl_ca"
42 
43 #define MA_STORAGE_KEY_TRIGGER_RULES "trigger#rules"
44 
45 
46 #define MA_AT_CMD_PREFIX "AT+"
47 #define MA_AT_CMD_QUERY "?"
48 #define MA_AT_CMD_SET "="
49 #define MA_AT_CMD_SUFFIX "\r\n"
50 
51 #define MA_AT_CMD_PREFIX_LEN (sizeof(MA_AT_CMD_PREFIX) - 1)
52 #define MA_AT_CMD_SUFFIX_LEN (sizeof(MA_AT_CMD_SUFFIX) - 1)
53 
54 #define MA_AT_CMD_WAIT_DELAY 2000 // ms
55 
56 #define MA_AT_CMD_ID "ID"
57 #define MA_AT_CMD_NAME "NAME"
58 #define MA_AT_CMD_VERSION "VER"
59 #define MA_AT_CMD_STATS "STAT"
60 #define MA_AT_CMD_BREAK "BREAK"
61 #define MA_AT_CMD_RESET "RST"
62 #define MA_AT_CMD_WIFI "WIFI"
63 #define MA_AT_CMD_MQTTSERVER "MQTTSERVER"
64 #define MA_AT_CMD_MQTTPUBSUB "MQTTPUBSUB"
65 #define MA_AT_CMD_INVOKE "INVOKE"
66 #define MA_AT_CMD_SAMPLE "SAMPLE"
67 #define MA_AT_CMD_INFO "INFO"
68 #define MA_AT_CMD_TSCORE "TSCORE"
69 #define MA_AT_CMD_TIOU "TIOU"
70 #define MA_AT_CMD_ALGOS "ALGOS"
71 #define MA_AT_CMD_MODELS "MODELS"
72 #define MA_AT_CMD_MODEL "MODEL"
73 #define MA_AT_CMD_SENSORS "SENSORS"
74 #define MA_AT_CMD_SENSOR "SENSOR"
75 #define MA_AT_CMD_ACTION "ACTION"
76 #define MA_AT_CMD_LED "LED"
77 #define MA_AT_CMD_OTA "OTA"
78 
79 #define MA_AT_EVENT_INVOKE "INVOKE"
80 #define MA_AT_EVENT_SAMPLE "SAMPLE"
81 #define MA_AT_EVENT_WIFI "WIFI"
82 #define MA_AT_EVENT_MQTT "TransportMQTT"
83 #define MA_AT_EVENT_SUPERVISOR "SUPERVISOR"
84 #define MA_AT_EVENT_INIT "INIT@STAT"
85 
86 #define MA_AT_LOG_AT "AT"
87 #define MA_AT_LOG_LOG "LOG"
88 
89 
90 #define MA_NODE_TOPIC_IN_FMT "sscma/v0/%d/node/in/%s"
91 #define MA_NODE_TOPIC_OUT_FMT "sscma/v0/%d/node/out/%s"
92 
93 #define MA_NODE_CMD_CLEAR "clear"
94 #define MA_NODE_CMD_CREATE "create"
95 #define MA_NODE_CMD_DESTROY "destroy"
96 #define MA_NODE_CMD_CONFIG "config"
97 #define MA_NODE_CMD_STREAM "stream"
98 #define MA_NODE_CMD_INVOKE "invoke"
99 
100 #endif