DeterministicESPAsyncWebServer v6.28.0
Zero-allocation, bounded-execution async HTTP server for ESP32
Loading...
Searching...
No Matches
mtconnect.h File Reference

MTConnect agent response codec (DETWS_ENABLE_MTCONNECT). More...

#include "ServerConfig.h"
#include <stddef.h>
#include <stdint.h>

Go to the source code of this file.

Detailed Description

MTConnect agent response codec (DETWS_ENABLE_MTCONNECT).

MTConnect (ANSI/MTC1.4) is the manufacturing-equipment read standard: an HTTP agent answers probe, current, sample, and asset requests with XML documents. This builds the two most-used response documents into a caller buffer, so the web server is an MTConnect agent over the existing HTTP stack:

  • MTConnectStreams (the current / sample response): a header carrying the agent instanceId + nextSequence, then per-DataItem <Samples>/<Events>/<Condition> values.
  • MTConnectDevices (the probe response): the device model - a <Device> with its <DataItems> (each category/id/type, optional name/units) - that a client discovers before it streams.
  • MTConnectAssets (the asset response): the tool/fixture inventory - a <CuttingTool> with its <CuttingToolLifeCycle> (<ToolLife> remaining minutes / part count) - that a client reads out of band from the observation stream.
  • MTConnectError (a request error): the header + an <Errors><Error errorCode=..> element.

A streams document is assembled incrementally: open it, add each observation, close it. The instanceId (an agent-boot id) + a monotonically increasing sequence number give a subscriber the from/count long-poll semantics. Pure text framing, zero heap, no stdlib, host-testable; values are XML-escaped.

Definition in file mtconnect.h.