1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798 |
- // // ******************************************************************
- // // /\ /| @File spi_decode_result.h
- // // \ V/ @Brief
- // // | "") @Author lijinwen, ghz005@uni-trend.com.cn
- // // / | @Creation 2024-07-19
- // // / \\ @Modified 2024-07-23
- // // *(__\_\
- // // ******************************************************************
- #pragma once
- //#include <utility>
- //#include "protocol_spi_enums.h"
- #include "spi_packet.h"
- #include "../decode_result.h"
- //#include "spi_packet.h"
- //#include "../decode_event.h"
- namespace Protocol
- {
- class SpiDecodeResultCell : DecodeResultCell
- {
- };
- struct SpiDecodeResult //: DecodeResult
- {
- //bool decode_result_need_update = false;
- bool decode_event_need_update = false;
- //SpiDecodeResultCell* decode_result_cells_ptr; //解码数据结果指针
- SpiPacket* decode_events_ptr; //解码结果事件指针
- //uint64_t decode_result_count; //结果数量
- uint64_t decode_event_count; //事件数量
- intptr_t decoder_ptr;
- /* SpiDecodeResult() : decode_result_cells_ptr(nullptr), decode_events_ptr(nullptr), decode_result_count(0),
- decode_event_count(0) */
- SpiDecodeResult() : decode_event_need_update(false), decode_events_ptr(nullptr), decode_event_count(0), decoder_ptr(0)
- {
- }
- SpiDecodeResult(const SpiDecodeResult& result)
- {
- //decode_result_need_update = result.decode_result_need_update;
- decode_event_need_update = result.decode_event_need_update;
- //decode_result_cells_ptr = result.decode_result_cells_ptr;
- decode_events_ptr = result.decode_events_ptr;
- //decode_result_count = result.decode_result_count;
- decode_event_count = result.decode_event_count;
- decoder_ptr = result.decoder_ptr;
- }
- ~SpiDecodeResult() = default;
- /*SpiDecodeResult(SpiDecodeResult&& other) noexcept
- : decode_result_need_update(other.decode_result_need_update),
- decode_event_need_update(other.decode_event_need_update),
- decode_result_cells_ptr(other.decode_result_cells_ptr),
- decode_events_ptr(other.decode_events_ptr),
- decode_result_count(other.decode_result_count),
- decode_event_count(other.decode_event_count)*/
- SpiDecodeResult(SpiDecodeResult&& other) noexcept
- : decode_event_need_update(other.decode_event_need_update),
- decode_events_ptr(other.decode_events_ptr),
- decode_event_count(other.decode_event_count),
- decoder_ptr(0)
- {
- }
- SpiDecodeResult& operator=(const SpiDecodeResult& other)
- {
- if (this == &other) return *this;
- //decode_result_need_update = other.decode_result_need_update;
- decode_event_need_update = other.decode_event_need_update;
- //decode_result_cells_ptr = other.decode_result_cells_ptr;
- decode_events_ptr = other.decode_events_ptr;
- //decode_result_count = other.decode_result_count;
- decode_event_count = other.decode_event_count;
- decoder_ptr = other.decoder_ptr;
- return *this;
- }
- SpiDecodeResult& operator=(SpiDecodeResult&& other) noexcept
- {
- if (this == &other) return *this;
- //decode_result_need_update = other.decode_result_need_update;
- decode_event_need_update = other.decode_event_need_update;
- //decode_result_cells_ptr = other.decode_result_cells_ptr;
- decode_events_ptr = other.decode_events_ptr;
- //decode_result_count = other.decode_result_count;
- decode_event_count = other.decode_event_count;
- decoder_ptr = other.decoder_ptr;
- return *this;
- }
- };
- }
|