// // Created by cfif on 18.05.2024. // #ifndef SMART_COMPONENTS_EGTSWORKEREXT_H #define SMART_COMPONENTS_EGTSWORKEREXT_H #include "egtsWorker.h" typedef enum { EGTS_COMPLETE_OK = 0x00, EGTS_COMPLETE_WAIT = 0x01, EGTS_COMPLETE_HEADER_ERR_CRC = 0x02, EGTS_COMPLETE_BODY_ERR_CRC = 0x03, EGTS_COMPLETE_ERR_VER = 0x04, EGTS_COMPLETE_ERR_OVERFLOW = 0x05 } eEgts_CompleteResult; typedef struct { eEgts_CompleteResult completeResult; uint8_t calcHeaderCrc; uint8_t receivedHeaderCrc; uint16_t calcBodyCrc; uint16_t receivedBodyCrc; uint16_t fullLength; } EgtsCompleteResult; bool EgtsParseHeaderExt(EgtsWorkerEnvironment *env); uint16_t EgtsParseSrvRecordExt(EgtsWorkerEnvironment *env, uint8_t *record); EgtsCompleteResult* EgtsCompleteTransportExt(EgtsWorkerEnvironment *env); eEgts_CompleteResult EgtsIsTransportCompleteExt(EgtsWorkerEnvironment *env); #endif //SMART_COMPONENTS_EGTSWORKEREXT_H