79 #if MA_USE_ENGINE_TENSOR_INDEX
82 #if MA_USE_ENGINE_TENSOR_NAME
100 void* external_handler =
nullptr;
191 struct ma_bbox_ext_t :
public ma_bbox_t {
202 struct ma_keypoint2f_t {
204 std::vector<ma_pt2f_t> pts;
207 struct ma_keypoint3f_t {
209 std::vector<ma_pt3f_t> pts;
212 struct ma_keypoint4f_t {
214 std::vector<ma_pt4f_t> pts;
222 std::vector<uint8_t> data;
254 #define MA_INPUT_TYPE_MASK 0xF000
255 #define MA_OUTPUT_TYPE_MASK 0x0F00
256 #define MA_MODEL_TYPE_MASK 0x00FF
346 ipv4_addr_t() : addr{0} {}
348 ~ipv4_addr_t() =
default;
353 static decltype(
auto) from_str(std::
string s) {
357 for (std::size_t i = 0; i < s.length(); ++i) {
358 if (!std::isdigit(s[i]))
362 for (; (++i < s.length()) & (++n < 3);)
363 if (!std::isdigit(s[i]))
366 auto num{s.substr(i - n, n)};
367 r.addr[l++] =
static_cast<uint8_t
>(std::atoi(num.c_str()));
376 decltype(
auto) to_str()
const {
378 r.reserve(
sizeof "255.255.255.255.");
379 for (std::size_t i = 0; i < 4; ++i) {
380 r += std::to_string(addr[i]);
383 return r.substr(0, r.length() - 1);
388 ipv6_addr_t() : addr{0} {}
389 ~ipv6_addr_t() =
default;
393 static decltype(
auto) from_str(std::
string s) {
397 for (std::size_t i = 0; i < s.length(); ++i) {
398 if (!std::isxdigit(s[i]))
402 for (; (++i < s.length()) & (++n < 4);)
403 if (!std::isxdigit(s[i]))
406 auto num{s.substr(i - n, n)};
407 r.addr[l++] =
static_cast<uint16_t
>(std::strtol(num.c_str(),
nullptr, 16));
416 decltype(
auto) to_str()
const {
417 static const char* digits =
"0123456789abcdef";
419 r.reserve(
sizeof "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff:");
420 for (std::size_t i = 0; i < 8; ++i) {
424 for (uint16_t n = addr[i]; n; n >>= 4)
425 t += digits[n & 0x0f];
426 r.append(t.rbegin(), t.rend());
431 return r.substr(0, r.length() - 1);
435 typedef struct in4_info_t {
441 typedef struct in6_info_t {
#define MA_MQTT_MAX_PASSWORD_LENGTH
Definition: ma_config_internal.h:68
#define MA_MQTT_MAX_BROKER_LENGTH
Definition: ma_config_internal.h:52
#define MA_MQTT_MAX_CLIENT_ID_LENGTH
Definition: ma_config_internal.h:56
#define MA_MAX_WIFI_SSID_LENGTH
Definition: ma_config_internal.h:40
#define MA_MQTT_MAX_USERNAME_LENGTH
Definition: ma_config_internal.h:64
#define MA_MAX_WIFI_PASSWORD_LENGTH
Definition: ma_config_internal.h:48
#define MA_ENGINE_SHAPE_MAX_DIM
Definition: ma_config_internal.h:36
#define MA_MQTT_MAX_TOPIC_LENGTH
Definition: ma_config_internal.h:60
#define MA_MAX_WIFI_BSSID_LENGTH
Definition: ma_config_internal.h:44
ma_model_type_t
Definition: ma_types.h:274
@ MA_MODEL_TYPE_YOLOV5
Definition: ma_types.h:278
@ MA_MODEL_TYPE_PFLD
Definition: ma_types.h:277
@ MA_MODEL_TYPE_YOLOV8_POSE
Definition: ma_types.h:280
@ MA_MODEL_TYPE_IMCLS
Definition: ma_types.h:279
@ MA_MODEL_TYPE_FOMO
Definition: ma_types.h:276
@ MA_MODEL_TYPE_NVIDIA_DET
Definition: ma_types.h:282
@ MA_MODEL_TYPE_YOLO11_POSE
Definition: ma_types.h:285
@ MA_MODEL_TYPE_YOLO_WORLD
Definition: ma_types.h:283
@ MA_MODEL_TYPE_UNDEFINED
Definition: ma_types.h:275
@ MA_MODEL_TYPE_YOLO11
Definition: ma_types.h:284
@ MA_MODEL_TYPE_YOLO11_SEG
Definition: ma_types.h:286
@ MA_MODEL_TYPE_YOLOV8
Definition: ma_types.h:281
ma_wifi_security_t
Definition: ma_types.h:298
@ SEC_WPA1_WPA2
Definition: ma_types.h:298
@ SEC_NONE
Definition: ma_types.h:298
@ SEC_WPA2_WPA3
Definition: ma_types.h:298
@ SEC_WEP
Definition: ma_types.h:298
@ SEC_WPA3
Definition: ma_types.h:298
@ SEC_AUTO
Definition: ma_types.h:298
ma_msg_type_t
Definition: ma_types.h:252
@ MA_MSG_TYPE_LOG
Definition: ma_types.h:252
@ MA_MSG_TYPE_REQ
Definition: ma_types.h:252
@ MA_MSG_TYPE_HB
Definition: ma_types.h:252
@ MA_MSG_TYPE_RESP
Definition: ma_types.h:252
@ MA_MSG_TYPE_EVT
Definition: ma_types.h:252
ma_err_t
Definition: ma_types.h:21
@ MA_ELOG
Definition: ma_types.h:25
@ MA_EIO
Definition: ma_types.h:27
@ MA_ETIMEOUT
Definition: ma_types.h:26
@ MA_EPERM
Definition: ma_types.h:32
@ MA_ENOENT
Definition: ma_types.h:33
@ MA_ENOMEM
Definition: ma_types.h:29
@ MA_FAILED
Definition: ma_types.h:22
@ MA_EBUSY
Definition: ma_types.h:30
@ MA_ENOTSUP
Definition: ma_types.h:31
@ MA_OK
Definition: ma_types.h:23
@ MA_EEXIST
Definition: ma_types.h:34
@ MA_AGAIN
Definition: ma_types.h:24
@ MA_EINVAL
Definition: ma_types.h:28
@ MA_OVERFLOW
Definition: ma_types.h:35
enum MA_ATTR_PACKED ma_camera_event_t
ma_model_cfg_opt_t
Definition: ma_types.h:229
@ MA_MODEL_CFG_OPT_NMS
Definition: ma_types.h:231
@ MA_MODEL_CFG_OPT_TOPK
Definition: ma_types.h:232
@ MA_MODEL_CFG_OPT_THRESHOLD
Definition: ma_types.h:230
ma_output_type_t
Definition: ma_types.h:264
@ MA_OUTPUT_TYPE_KEYPOINT
Definition: ma_types.h:269
@ MA_OUTPUT_TYPE_SEGMENTATION
Definition: ma_types.h:270
@ MA_OUTPUT_TYPE_TENSOR
Definition: ma_types.h:265
@ MA_OUTPUT_TYPE_CLASS
Definition: ma_types.h:266
@ MA_OUTPUT_TYPE_BBOX
Definition: ma_types.h:268
@ MA_OUTPUT_TYPE_POINT
Definition: ma_types.h:267
MA_ATTR_PACKED
Definition: ma_types.h:330
@ CAM_EVT_CLOSE
Definition: ma_types.h:332
@ CAM_EVT_STOP
Definition: ma_types.h:334
@ CAM_EVT_START
Definition: ma_types.h:333
@ CAM_EVT_CAPTURE
Definition: ma_types.h:335
@ CAM_EVT_OPEN
Definition: ma_types.h:331
@ CAM_EVT_CLEANUP
Definition: ma_types.h:337
@ CAM_EVT_FRAME
Definition: ma_types.h:336
ma_pixel_format_t
Definition: ma_types.h:103
@ MA_PIXEL_FORMAT_RGB565
Definition: ma_types.h:106
@ MA_PIXEL_FORMAT_GRAYSCALE
Definition: ma_types.h:108
@ MA_PIXEL_FORMAT_RGB888
Definition: ma_types.h:105
@ MA_PIXEL_FORMAT_H265
Definition: ma_types.h:111
@ MA_PIXEL_FORMAT_UNKNOWN
Definition: ma_types.h:113
@ MA_PIXEL_FORMAT_H264
Definition: ma_types.h:110
@ MA_PIXEL_FORMAT_RGB888_PLANAR
Definition: ma_types.h:112
@ MA_PIXEL_FORMAT_JPEG
Definition: ma_types.h:109
@ MA_PIXEL_FORMAT_AUTO
Definition: ma_types.h:104
@ MA_PIXEL_FORMAT_YUV422
Definition: ma_types.h:107
ma_pixel_rotate_t
Definition: ma_types.h:116
@ MA_PIXEL_ROTATE_90
Definition: ma_types.h:118
@ MA_PIXEL_ROTATE_UNKNOWN
Definition: ma_types.h:121
@ MA_PIXEL_ROTATE_270
Definition: ma_types.h:120
@ MA_PIXEL_ROTATE_180
Definition: ma_types.h:119
@ MA_PIXEL_ROTATE_0
Definition: ma_types.h:117
ma_tensor_type_t
Definition: ma_types.h:54
@ MA_TENSOR_TYPE_NMS_BBOX_U16
Definition: ma_types.h:70
@ MA_TENSOR_TYPE_U8
Definition: ma_types.h:56
@ MA_TENSOR_TYPE_S32
Definition: ma_types.h:61
@ MA_TENSOR_TYPE_BF16
Definition: ma_types.h:69
@ MA_TENSOR_TYPE_U64
Definition: ma_types.h:62
@ MA_TENSOR_TYPE_S8
Definition: ma_types.h:57
@ MA_TENSOR_TYPE_F64
Definition: ma_types.h:66
@ MA_TENSOR_TYPE_STR
Definition: ma_types.h:67
@ MA_TENSOR_TYPE_F16
Definition: ma_types.h:64
@ MA_TENSOR_TYPE_S64
Definition: ma_types.h:63
@ MA_TENSOR_TYPE_NONE
Definition: ma_types.h:55
@ MA_TENSOR_TYPE_F32
Definition: ma_types.h:65
@ MA_TENSOR_TYPE_S16
Definition: ma_types.h:59
@ MA_TENSOR_TYPE_U32
Definition: ma_types.h:60
@ MA_TENSOR_TYPE_U16
Definition: ma_types.h:58
@ MA_TENSOR_TYPE_NMS_BBOX_F32
Definition: ma_types.h:71
@ MA_TENSOR_TYPE_BOOL
Definition: ma_types.h:68
ma_input_type_t
Definition: ma_types.h:258
@ MA_INPUT_TYPE_AUDIO
Definition: ma_types.h:261
@ MA_INPUT_TYPE_IMAGE
Definition: ma_types.h:260
@ MA_INPUT_TYPE_TENSOR
Definition: ma_types.h:259
ma_transport_type_t
Definition: ma_types.h:235
@ MA_TRANSPORT_SERIAL
Definition: ma_types.h:238
@ MA_TRANSPORT_UDP
Definition: ma_types.h:243
@ MA_TRANSPORT_I2C
Definition: ma_types.h:240
@ MA_TRANSPORT_SPI
Definition: ma_types.h:239
@ MA_TRANSPORT_RTSP
Definition: ma_types.h:244
@ MA_TRANSPORT_CONSOLE
Definition: ma_types.h:237
@ MA_TRANSPORT_UNKOWN
Definition: ma_types.h:236
@ MA_TRANSPORT_MQTT
Definition: ma_types.h:241
@ MA_TRANSPORT_TCP
Definition: ma_types.h:242
ma_transport_cfg_opt_t
Definition: ma_types.h:247
@ MA_TRANSPORT_CFG_OPT_TIMEOUT
Definition: ma_types.h:249
@ MA_TRANSPORT_CFG_OPT_NONE
Definition: ma_types.h:248
Definition: ma_types.h:162
size_t stride
Definition: ma_types.h:163
size_t size
Definition: ma_types.h:165
size_t start
Definition: ma_types.h:166
size_t split
Definition: ma_types.h:164
Definition: ma_types.h:181
float h
Definition: ma_types.h:185
float y
Definition: ma_types.h:183
int target
Definition: ma_types.h:187
float score
Definition: ma_types.h:186
float w
Definition: ma_types.h:184
float x
Definition: ma_types.h:182
Definition: ma_types.h:176
float score
Definition: ma_types.h:177
int target
Definition: ma_types.h:178
Definition: ma_types.h:124
uint8_t * data
Definition: ma_types.h:135
uint32_t size
Definition: ma_types.h:125
bool physical
Definition: ma_types.h:134
uint8_t count
Definition: ma_types.h:133
uint32_t timestamp
Definition: ma_types.h:130
uint16_t width
Definition: ma_types.h:126
uint16_t height
Definition: ma_types.h:127
bool key
Definition: ma_types.h:131
ma_pixel_rotate_t rotate
Definition: ma_types.h:129
ma_pixel_format_t format
Definition: ma_types.h:128
uint8_t index
Definition: ma_types.h:132
Definition: ma_types.h:38
size_t size
Definition: ma_types.h:40
bool own
Definition: ma_types.h:41
void * pool
Definition: ma_types.h:39
Definition: ma_types.h:289
uint8_t id
Definition: ma_types.h:290
uint32_t size
Definition: ma_types.h:291
const void * name
Definition: ma_types.h:293
ma_model_type_t type
Definition: ma_types.h:295
const void * addr
Definition: ma_types.h:294
Definition: ma_types.h:314
int16_t port
Definition: ma_types.h:316
int8_t use_ssl
Definition: ma_types.h:320
Definition: ma_types.h:307
char * client_cert
Definition: ma_types.h:310
char * client_key
Definition: ma_types.h:311
char * certification_authority
Definition: ma_types.h:309
Definition: ma_types.h:323
int8_t sub_qos
Definition: ma_types.h:327
int8_t pub_qos
Definition: ma_types.h:326
Definition: ma_types.h:138
int64_t preprocess
Definition: ma_types.h:139
int64_t inference
Definition: ma_types.h:140
int64_t postprocess
Definition: ma_types.h:141
Definition: ma_types.h:169
float x
Definition: ma_types.h:170
float score
Definition: ma_types.h:172
int target
Definition: ma_types.h:173
float y
Definition: ma_types.h:171
Definition: ma_types.h:144
float x
Definition: ma_types.h:145
float y
Definition: ma_types.h:146
Definition: ma_types.h:149
float z
Definition: ma_types.h:152
float x
Definition: ma_types.h:150
float y
Definition: ma_types.h:151
Definition: ma_types.h:155
float z
Definition: ma_types.h:158
float x
Definition: ma_types.h:156
float t
Definition: ma_types.h:159
float y
Definition: ma_types.h:157
Definition: ma_types.h:44
int32_t zero_point
Definition: ma_types.h:46
float scale
Definition: ma_types.h:45
Definition: ma_types.h:49
uint32_t size
Definition: ma_types.h:50
Definition: ma_types.h:74
ma_shape_t shape
Definition: ma_types.h:75
ma_quant_param_t quant_param
Definition: ma_types.h:76
bool is_physical
Definition: ma_types.h:98
uint16_t * u16
Definition: ma_types.h:89
size_t size
Definition: ma_types.h:78
uint8_t * u8
Definition: ma_types.h:87
void * data
Definition: ma_types.h:86
int16_t * s16
Definition: ma_types.h:90
int32_t * s32
Definition: ma_types.h:92
int8_t * s8
Definition: ma_types.h:88
int64_t * s64
Definition: ma_types.h:94
uint64_t * u64
Definition: ma_types.h:93
double * f64
Definition: ma_types.h:96
float * f32
Definition: ma_types.h:95
bool is_variable
Definition: ma_types.h:99
uint32_t * u32
Definition: ma_types.h:91
ma_tensor_type_t type
Definition: ma_types.h:77
Definition: ma_types.h:197
Definition: ma_types.h:300
int8_t security
Definition: ma_types.h:304