Skip to main content

Crate sedsnet

Crate sedsnet 

Source
Expand description

SEDSnet is a compact networking stack for embedded and host telemetry systems.

It provides runtime schema registration, compact packet packing, discovery-driven routing, reliable delivery, managed state synchronization, time synchronization, P2P service ports and streams, optional E2E payload cryptography, and C/Python bindings.

Most user-facing APIs live in:

  • config: schema + data type/endpoint configuration.
  • router: routers, relays, sides, discovery, routing policy, P2P, and managed variables.
  • packet: Packet and friends.
  • wire_format: packet packing, unpacking, and wire inspection helpers.

Version 4.0.0 highlights:

  • Telemetry endpoints and data types are runtime IDs with process-local registry metadata.
  • The build no longer reads telemetry_config.json or generates schema-specific Rust enums.
  • A JSON schema can still seed the runtime registry with SEDSNET_STATIC_SCHEMA_PATH.
  • Nodes can export known endpoints/types, sync schemas through discovery, and register new schema entries over time.
  • Discovery assigns compact node addresses and hostnames for P2P service traffic while broadcast endpoint telemetry continues to use endpoint subscriptions.

Modules§

config
Runtime telemetry configuration and schema registry.
crypto
Feature-gated cryptography provider interfaces.
diagnostics
discovery
packet
Telemetry packet core type and formatting helpers.
relay
router
Telemetry Router
timesync
Time synchronization primitives, packet helpers, and network-clock utilities.
wire_format
Wire-format packing and unpacking of telemetry packets.

Macros§

do_vec_log_typed
Helper macro used by the C FFI (c_api) to:
impl_data_as_prim
Helper macros for implementing Packet data accessors for primitive slices.
impl_from_prim_slices
Helper macros for implementing Packet constructors and accessors for primitive slices.
impl_ledecode_auto
Implement the [LeDecode] trait for a numeric type with fixed size.
impl_letype_num
Implement the [LeBytes] trait for a numeric type with a fixed byte width.
impl_repr_i32_enum
Implement [ReprI32Enum] for a concrete #[repr(i32)] enum and perform a compile-time size check to ensure it really is the same size as i32.
impl_repr_u32_enum
Implement [ReprU32Enum] for a concrete #[repr(u32)] enum and perform a compile-time size check to ensure it really is the same size as u32.

Structs§

EndpointMeta
MessageMeta
Static metadata for a message type: element count and valid endpoints.

Enums§

E2eEncryptionPolicy
End-to-end cryptography preference for a data type.
MessageClass
High-level classification of message kind.
MessageDataType
Primitive element type used by a message.
MessageElement
Describes how many elements are present for a given message type.
ReliableMode
Reliable delivery mode for a data type.
RouteSelectionMode
TelemetryError
Rich error type used throughout the telemetry crate.
TelemetryErrorCode
Numeric error codes used on the C/Python FFI boundary.

Constants§

MAX_VALUE_DATA_ENDPOINT
Maximum enum value for DataEndpoint (inclusive), derived from the schema.
MAX_VALUE_DATA_TYPE
Maximum enum value for DataType (inclusive), derived from the schema.
MAX_VALUE_ROUTE_SELECTION_MODE
Maximum enum value for RouteSelectionMode (inclusive).

Functions§

current_max_data_type_id
current_max_endpoint_id
data_type_size
Size in bytes of a single element for the given MessageDataType.
endpoints_from_datatype
Return the default endpoints for a given DataType.
get_data_type
Return the element data type (e.g., Float32, Int16, String) for a given DataType.
get_info_type
Return the logical “info” type (Info/Error) for a given DataType.
get_message_name
Return the message name for a given DataType.
get_needed_message_size
Return the total payload size (in bytes) required for a given DataType under the static schema.
is_reliable_type
Return whether the given DataType is configured for reliable delivery.
message_e2e_encryption_policy
Return the end-to-end cryptography policy for a data type.
message_meta
Lookup MessageMeta for a given DataType using the generated config.
message_priority
Return the queue priority for the given DataType.
parse_f64
parse_u8
parse_u128
reliable_mode
Return the reliable delivery mode for the given DataType.
try_enum_from_i32
Try to convert an i32 into a #[repr(i32)] enum E.
try_enum_from_u32
Try to convert a u32 into a #[repr(u32)] enum E.

Type Aliases§

TelemetryResult
Common result alias for telemetry operations.