Changed project structure.

This commit is contained in:
2024-01-14 09:38:57 -08:00
parent 7dcd903140
commit 039ab8cc0f
240 changed files with 696 additions and 573 deletions

View File

@@ -0,0 +1,56 @@
#pragma once
#include "ehs/EHS.h"
#include "ehs/Serializer.h"
namespace ehs
{
enum class EndDisp : UInt_8
{
UNKNOWN,
SERVICE,
ENDPOINT
};
enum class Status : UInt_8
{
ACTIVE,
PENDING,
IN_LOCAL_QUEUE,
IN_REMOTE_QUEUE,
};
struct Header
{
bool encrypted = true;
UInt_64 id = 0;
UInt_64 fragments = 0;
UInt_64 fragment = 0;
bool ensure = false;
EndDisp disposition = EndDisp::UNKNOWN;
UInt_64 endpointId = 0;
UInt_64 system = 0;
UInt_64 op = 0;
};
struct Packet
{
Header header;
Serializer<> payload;
};
struct Insurance
{
Header header;
Serializer<> payload;
float lastResend;
};
}
#ifndef COMMS_IPV4_PAYLOAD
#define COMMS_IPV4_PAYLOAD (EHS_IPV4_UDP_PAYLOAD - (UInt_16)sizeof(Header))
#endif
#ifndef COMMS_IPV6_PAYLOAD
#define COMMS_IPV6_PAYLOAD (EHS_IPV6_UDP_PAYLOAD - (UInt_16)sizeof(Header))
#endif