31#ifndef PROTOCORE_EDGE_MESH_H
32#define PROTOCORE_EDGE_MESH_H
36#if PROTOCORE_ENABLE_EDGE_MESH
44#define PROTOCORE_EDGE_MESH_MAGIC0 ('E')
46#define PROTOCORE_EDGE_MESH_MAGIC1 ('M')
48#define PROTOCORE_EDGE_MESH_VERSION 1
50#define PROTOCORE_EDGE_MESH_OP_GET 1
52#define PROTOCORE_EDGE_MESH_REQ_MAX (2 + 1 + 1 + 32 + 2 + PROTOCORE_EDGE_KEY_MAX + 2 + PROTOCORE_MESH_HDRS_MAX)
57 EDGE_MESH_PARSE_MALFORMED = -1,
58 EDGE_MESH_PARSE_INCOMPLETE = 0,
59 EDGE_MESH_PARSE_MISS = 1,
60 EDGE_MESH_PARSE_HIT = 2,
65 EDGE_MESH_STATUS_PENDING,
67 EDGE_MESH_STATUS_MISS,
68 EDGE_MESH_STATUS_FAILED,
97 const uint8_t *digest;
103} EdgeMeshBuildRequestArgs;
115} EdgeMeshParseRequestArgs;
120 const struct EdgeEntry *e;
124} EdgeMeshSerializeEntryArgs;
134} EdgeMeshDeserializeEntryArgs;
140 const uint8_t *entry;
144} EdgeMeshBuildResponseArgs;
153} EdgeMeshParseResponseArgs;
162 const uint8_t *request;
167} EdgeMeshFetchBeginArgs;
175} EdgeMeshFetchPumpArgs;
182} EdgeMeshFetchEndArgs;
228 EdgeMeshBuildRequestArgs build_request_args;
229 EdgeMeshParseRequestArgs parse_request_args;
230 EdgeMeshSerializeEntryArgs serialize_entry_args;
231 EdgeMeshDeserializeEntryArgs deserialize_entry_args;
232 EdgeMeshBuildResponseArgs build_response_args;
233 EdgeMeshParseResponseArgs parse_response_args;
234 EdgeMeshFetchBeginArgs fetch_begin_args;
235 EdgeMeshFetchPumpArgs fetch_pump_args;
236 EdgeMeshFetchEndArgs fetch_end_args;
240 EdgeMeshStatus status;
244extern EdgeMeshVars EdgeMeshV;
249 void (*
const build_request)(
const uint8_t *work);
250 void (*
const parse_request)(
const uint8_t *work);
251 void (*
const serialize_entry)(
const uint8_t *work);
252 void (*
const deserialize_entry)(uint8_t *work);
253 void (*
const build_response)(
const uint8_t *work);
254 void (*
const parse_response)(
const uint8_t *work);
255 void (*
const fetch_begin)(
const uint8_t *work);
256 void (*
const fetch_pump)(
const uint8_t *work);
257 void (*
const fetch_end)(
const uint8_t *work);
262void protocore_edge_mesh_build_request(
const uint8_t *work);
263void protocore_edge_mesh_parse_request(
const uint8_t *work);
264void protocore_edge_mesh_serialize_entry(
const uint8_t *work);
265void protocore_edge_mesh_deserialize_entry(uint8_t *work);
266void protocore_edge_mesh_build_response(
const uint8_t *work);
267void protocore_edge_mesh_parse_response(
const uint8_t *work);
268void protocore_edge_mesh_fetch_begin(
const uint8_t *work);
269void protocore_edge_mesh_fetch_pump(
const uint8_t *work);
270void protocore_edge_mesh_fetch_end(
const uint8_t *work);
276static const EdgeMeshNs EdgeMesh __attribute__((unused)) = {
277 .build_request = protocore_edge_mesh_build_request,
278 .parse_request = protocore_edge_mesh_parse_request,
279 .serialize_entry = protocore_edge_mesh_serialize_entry,
280 .deserialize_entry = protocore_edge_mesh_deserialize_entry,
281 .build_response = protocore_edge_mesh_build_response,
282 .parse_response = protocore_edge_mesh_parse_response,
283 .fetch_begin = protocore_edge_mesh_fetch_begin,
284 .fetch_pump = protocore_edge_mesh_fetch_pump,
285 .fetch_end = protocore_edge_mesh_fetch_end,
EMBED_ENUM_BYTE(ProtoConn, PROTO_NONE=0, PROTO_HTTP=1, PROTO_TELNET=2, PROTO_SSH=3, PROTO_MODBUS=4, PROTO_OPCUA=5, PROTO_SSH_RFWD=6, PROTO_RELAY=7, PROTO_BRIDGE=8, PROTO_NTRIP_CASTER=9, PROTO_MESH=10, PROTO_UDP=11,)
Application protocol spoken on a listener port or connection slot.
The origin transport, bound to protocore_client on the device and a mock in host tests.