12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- // // ******************************************************************
- // // /\ /| @File iic_decode_result.h
- // // \ V/ @Brief
- // // | "") @Author lijinwen, ghz005@uni-trend.com.cn
- // // / | @Creation 2024-07-19
- // // / \\ @Modified 2024-07-25
- // // *(__\_\
- // // ******************************************************************
- #pragma once
- //#include <utility>
- //#include "protocol_iic_enums.h"
- //#include "iic_decode_event.h"
- #include "iic_packet.h"
- #include "../decode_result.h"
- //#include "iic_packet.h"
- //#include "../decode_event.h"
- namespace Protocol
- {
- class IicDecodeResultCell : DecodeResultCell
- {
- };
- struct IicDecodeResult //: DecodeResult
- {
- bool decode_event_need_update = false;
- uint64_t decode_event_count; //事件数量
- IicEvent* decode_events_ptr; //解码结事件指针
- IicDataInfo* decode_data_cell_ptr; //解码结果数据指针
- intptr_t decoder_ptr;
- IicDecodeResult() : decode_event_count(0),
- decode_events_ptr(nullptr),
- decoder_ptr(0)
- {
- }
- IicDecodeResult(const IicDecodeResult& result)
- {
- decode_event_need_update = result.decode_event_need_update;
- decode_events_ptr = result.decode_events_ptr;
- decoder_ptr = 0;
- decode_event_count = result.decode_event_count;
- }
- ~IicDecodeResult() = default;
- IicDecodeResult(IicDecodeResult&& other) noexcept
- : decode_event_need_update(other.decode_event_need_update),
- decode_event_count(other.decode_event_count),
- decode_events_ptr(other.decode_events_ptr),
- decoder_ptr(other.decoder_ptr)
- {
- }
- IicDecodeResult& operator=(const IicDecodeResult& other)
- {
- if (this == &other) return *this;
- decode_event_need_update = other.decode_event_need_update;
- decode_events_ptr = other.decode_events_ptr;
- decode_event_count = other.decode_event_count;
- return *this;
- }
- IicDecodeResult& operator=(IicDecodeResult&& other) noexcept
- {
- if (this == &other) return *this;
- decode_event_need_update = other.decode_event_need_update;
- decode_events_ptr = other.decode_events_ptr;
- decode_event_count = other.decode_event_count;
- return *this;
- }
- };
- }
|