1 #ifndef _MA_CODEC_BASE_H_
2 #define _MA_CODEC_BASE_H_
5 #include <forward_list>
25 virtual operator bool()
const = 0;
87 virtual const std::string&
toString()
const = 0;
94 virtual const void*
data()
const = 0;
101 virtual const size_t size()
const = 0;
208 virtual ma_err_t write(
const std::string& key,
const std::string& value) = 0;
257 virtual ma_err_t write(
const std::forward_list<ma_keypoint3f_t>& value) = 0;
283 virtual ma_err_t write(
int algo_id,
int cat,
int input_from,
int tscore,
int tiou) = 0;
290 virtual operator bool()
const = 0;
298 virtual std::string
name()
const = 0;
301 virtual ma_err_t read(
const std::string& key, int8_t& value)
const = 0;
302 virtual ma_err_t read(
const std::string& key, int16_t& value)
const = 0;
303 virtual ma_err_t read(
const std::string& key, int32_t& value)
const = 0;
304 virtual ma_err_t read(
const std::string& key, int64_t& value)
const = 0;
305 virtual ma_err_t read(
const std::string& key, uint8_t& value)
const = 0;
306 virtual ma_err_t read(
const std::string& key, uint16_t& value)
const = 0;
307 virtual ma_err_t read(
const std::string& key, uint32_t& value)
const = 0;
308 virtual ma_err_t read(
const std::string& key, uint64_t& value)
const = 0;
310 virtual ma_err_t read(
const std::string& key,
double& value)
const = 0;
311 virtual ma_err_t read(
const std::string& key, std::string& value)
const = 0;
Definition: ma_codec_base.h:286
virtual ma_err_t read(const std::string &key, uint16_t &value) const =0
virtual ma_err_t read(const std::string &key, uint32_t &value) const =0
virtual ma_err_t read(ma_perf_t &value)=0
virtual ma_err_t begin(const void *data, size_t size)=0
virtual ma_err_t read(const std::string &key, int8_t &value) const =0
virtual ma_err_t read(std::forward_list< ma_point_t > &value)=0
virtual ma_err_t read(std::forward_list< ma_bbox_t > &value)=0
virtual ma_err_t read(const std::string &key, float &value) const =0
virtual ma_err_t read(const std::string &key, int64_t &value) const =0
virtual ma_err_t read(const std::string &key, uint8_t &value) const =0
virtual ma_msg_type_t type() const =0
virtual ma_err_t code() const =0
virtual ma_err_t read(std::forward_list< ma_class_t > &value)=0
virtual ma_err_t read(const std::string &key, int16_t &value) const =0
virtual ma_err_t begin(const std::string &str)=0
virtual ma_err_t read(const std::string &key, std::string &value) const =0
virtual ~Decoder()=default
virtual ma_err_t read(const std::string &key, double &value) const =0
virtual std::string name() const =0
virtual ma_err_t read(const std::string &key, int32_t &value) const =0
virtual ma_err_t read(const std::string &key, uint64_t &value) const =0
Definition: ma_codec_base.h:14
virtual ma_err_t end()=0
Encoder type for end.
virtual ma_err_t write(const std::string &key, uint32_t value)=0
Encoder type for write uint32_t value.
virtual ma_err_t write(const std::forward_list< ma_class_t > &value)=0
Encoder type for write std::forward_list<ma_class_t> value.
virtual ma_err_t begin(ma_msg_type_t type, ma_err_t code, const std::string &name)=0
Encoder type for begin.
virtual ma_err_t write(const std::string &key, double value)=0
Encoder type for write double value.
virtual const void * data() const =0
Encoder type for get data.
virtual ma_err_t write(const std::string &key, uint16_t value)=0
Encoder type for write uint16_t value.
virtual ma_err_t write(const std::string &key, const char *buffer, size_t size)=0
virtual ma_err_t write(const std::string &key, uint64_t value)=0
Encoder type for write uint64_t value.
virtual ma_err_t reset()=0
Reset the proto object.
virtual ma_err_t write(const std::string &key, float value)=0
Encoder type for write float value.
virtual ma_err_t remove(const std::string &key)=0
Encoder type for remove.
virtual ma_err_t write(const in4_info_t &value)=0
virtual ~Encoder()=default
virtual const std::string & toString() const =0
Encoder type for convert to string.
virtual ma_err_t write(const std::string &key, int32_t value)=0
Encoder type for write int32_t value.
virtual ma_err_t write(ma_perf_t value)=0
Encoder type for write ma_perf_t.
virtual ma_err_t write(const std::string &key, int16_t value)=0
Encoder type for write int16_t value.
virtual ma_err_t write(const ma_mqtt_config_t &value, int *stat=nullptr)=0
virtual ma_err_t write(const std::forward_list< ma_keypoint3f_t > &value)=0
Encoder type for write std::forward_list<ma_keypoint3f_t> value.
virtual ma_err_t write(const ma_mqtt_topic_config_t &value)=0
virtual ma_err_t begin()=0
Encoder type for begin.
virtual ma_err_t write(const std::string &key, int8_t value)=0
Encoder type for write int8_t value.
virtual ma_err_t write(const std::string &key, ma_model_t value)=0
Encoder type for write ma_model_t value.
virtual ma_err_t write(int algo_id, int cat, int input_from, int tscore, int tiou)=0
virtual const size_t size() const =0
Encoder type for get size.
virtual ma_err_t write(const ma_wifi_config_t &value, int *stat=nullptr)=0
virtual ma_err_t begin(ma_msg_type_t type, ma_err_t code, const std::string &name, uint64_t data)=0
Encoder type for begin.
virtual ma_err_t write(const std::forward_list< ma_point_t > &value)=0
Encoder type for write std::vector<ma_point_t> value.
virtual ma_err_t write(const std::string &key, int64_t value)=0
Encoder type for write int64_t value.
virtual ma_err_t write(const std::string &key, uint8_t value)=0
Encoder type for write uint8_t value.
virtual ma_err_t begin(ma_msg_type_t type, ma_err_t code, const std::string &name, const std::string &data)=0
Encoder type for begin.
virtual ma_err_t write(const Sensor *value, size_t preset)=0
virtual ma_err_t write(const std::vector< Sensor * > &value)=0
virtual ma_err_t write(const std::forward_list< ma_bbox_t > &value)=0
Encoder type for write std::forward_list<ma_bbox_t> value.
virtual ma_err_t write(const std::string &key, const std::string &value)=0
Encoder type for write const std::string value.
virtual ma_err_t write(const in6_info_t &value)=0
virtual ma_err_t write(const std::vector< ma_model_t > &value)=0
Encoder type for write std::forward_list<ma_model_t> value.
Definition: ma_sensor.h:12
ma_msg_type_t
Definition: ma_types.h:252
ma_err_t
Definition: ma_types.h:21
Definition: ma_types.h:289
Definition: ma_types.h:314
Definition: ma_types.h:323
Definition: ma_types.h:138
Definition: ma_types.h:300