Skip to main content

Crate iot_core

Crate iot_core 

Source
Expand description

§iot-core

Foundation crate for the iot-protocols SDK. Defines the data model that every protocol implementation in the workspace agrees on:

  • thing — Eclipse-Ditto-style Thing / Feature / Value digital twin.
  • pathPropertyPath, the protocol-agnostic address of a single value.
  • bindingProtocolBinding / ThingMapping, the bridge that maps a PropertyPath onto a Modbus register, an MQTT topic, a CoAP URI, or an OPC UA NodeId.
  • error — the unified error::IotError every public API returns.
  • client — the client::IotClient async trait every protocol crate implements alongside its native API.

§Feature flags

FeatureAddsDefault
stdstd::error::Error impls, hashing
allocThing, Vec, dynamic BTreeMap maps
serdeserde::{Serialize,Deserialize} derives
validateJSON-Schema validation of Thing

With only alloc (no std) every public type continues to work, which is the configuration MCU targets compile.

Re-exports§

pub use binding::ByteOrder;
pub use binding::ContentFormat;
pub use binding::DataType;
pub use binding::PayloadCodec;
pub use binding::ProtocolBinding;
pub use binding::Qos;
pub use binding::RegisterArea;
pub use binding::ThingMapping;
pub use client::IotClient;
pub use client::PropertySample;
pub use error::CodecError;
pub use error::IotError;
pub use error::IotResult;
pub use error::TransportError;
pub use path::PropertyPath;
pub use thing::DefinitionIdentifier;
pub use thing::Feature;
pub use thing::FeatureId;
pub use thing::PolicyId;
pub use thing::PropertyId;
pub use thing::Thing;
pub use thing::ThingId;
pub use value::Value;

Modules§

binding
Bridge from the protocol-agnostic crate::path::PropertyPath to the concrete address used on the wire.
client
The unified IotClient async trait — the entry point of the “thick-unification” layer over MQTT, Modbus, CoAP, and OPC UA.
error
Unified error type returned across the SDK.
path
Protocol-agnostic property addressing.
thing
Identifiers and aggregates for the Eclipse-Ditto-style Thing model.
value
Self-describing scalar / collection values used by the Thing model.