Expand description
rusty_rtos_mqtt-core — the pure heart of rusty_rtos_mqtt.
Rules this crate lives by (from the Kairos mission plan):
no_stdby default;allocis a feature, never an assumption.- No CPU, no registers, no allocator, no operating system. Ports and backends are separate WRAP crates.
- Every type that crosses to another Kairos package comes from
rusty_rtos_core, so packages compose without conversions. - Handles are indices, never pointers; nothing on a hot path allocates.
forbid(unsafe). The C kernel’s trace is the oracle; the scalar path is the oracle; any faster path is gated identical against it.
Re-exports§
pub use ack::AckError;pub use ack::AckInfo;pub use ack::Limits;pub use ack::PINGRESP_REMAINING_LENGTH;pub use ack::PUBREL;pub use ack::PacketInfo;pub use ack::deserialize_ack;pub use builder::BuilderError;pub use builder::PropertyBuilder;pub use builder::allowed_properties;pub use client::ClientError;pub use client::ConnectionStatus;pub use client::MqttContext;pub use client::RetainHandling as SubscribeRetainHandling;pub use client::Subscription as ClientSubscription;pub use client::SubscriptionType;pub use connack::CONNACK_MINIMUM_SIZE;pub use connack::ClientSettings;pub use connack::ConnAck;pub use connack::ConnAckError;pub use connack::SESSION_PRESENT_MASK;pub use connack::ServerSettings;pub use connack::deserialize_connack;pub use connect::CONNECT_HEADER_SIZE;pub use connect::Connect;pub use connect::ConnectError;pub use connect::ConnectSize;pub use connect::Will;pub use connect::connect_packet_size;pub use connect::serialize_connect;pub use context::ClientLimits;pub use context::ConnectionProperties;pub use context::ContextError;pub use context::MAX_PACKET_SIZE;pub use context::ServerLimits;pub use context::update_with_connect_props;pub use cursor::CursorError;pub use cursor::PropertyCursor;pub use cursor::Width;pub use cursor::width_of;pub use disconnect::Disconnect;pub use disconnect::DisconnectError;pub use disconnect::DisconnectSize;pub use disconnect::deserialize_disconnect;pub use disconnect::disconnect_packet_size;pub use disconnect::reason_code_allowed;pub use disconnect::serialize_disconnect;pub use disconnect::validate_outgoing_properties;pub use header::HeaderError;pub use header::MAX_REMAINING_LENGTH;pub use header::PacketHeader;pub use header::REMAINING_LENGTH_INVALID;pub use header::encode_variable_length;pub use header::incoming_packet_valid;pub use header::process_incoming_packet_type_and_length;pub use header::variable_length_encoded_size;pub use outbound::OutboundError;pub use outbound::RetainHandling;pub use outbound::Subscription;pub use outbound::ack_reason_code_allowed;pub use outbound::serialize_ack;pub use outbound::serialize_pingreq;pub use outbound::serialize_subscribe;pub use outbound::serialize_unsubscribe;pub use outbound::subscription_options;pub use outpublish::OutgoingError;pub use outpublish::OutgoingPublish;pub use outpublish::PublishSize;pub use outpublish::publish_packet_size;pub use outpublish::serialize_publish;pub use outpublish::serialize_publish_header;pub use outpublish::serialize_publish_header_without_topic;pub use outpublish::update_duplicate_flag;pub use property::PropertyError;pub use property::PropertyReader;pub use property::decode_variable_length;pub use property::encode_string;pub use publish::PublishError;pub use publish::PublishInfo;pub use publish::deserialize_publish;pub use reader::IncomingHeader;pub use reader::ReadError;pub use reader::Received;pub use reader::Sent;pub use reader::Transport;pub use reader::read_header;pub use size::ListPacket;pub use size::PINGREQ_PACKET_SIZE;pub use size::PacketSize;pub use size::SizeError;pub use size::ack_packet_size;pub use size::list_packet_size;pub use size::subscribe_packet_size;pub use size::unsubscribe_packet_size;pub use state::AckType;pub use state::Cursor;pub use state::Operation;pub use state::PACKET_ID_INVALID;pub use state::PublishRecords;pub use state::PublishState;pub use state::QoS;pub use state::Record;pub use state::StateError;pub use state::calculate_state_ack;pub use state::calculate_state_publish;pub use topic::TopicError;pub use topic::matches;pub use topic::packet_type_name;pub use topic::status_name;pub use topic::suback_status_codes;pub use topic::unsuback_status_codes;pub use validate::ConnectValidation;pub use validate::ValidateError;pub use validate::validate_connect_properties;pub use validate::validate_publish_ack_properties;pub use validate::validate_publish_params;pub use validate::validate_publish_properties;pub use validate::validate_subscribe_properties;pub use validate::validate_unsubscribe_properties;pub use validate::validate_will_properties;pub use writer::ConnectInfo;pub use writer::PINGREQ;pub use writer::VERSION_5;pub use writer::WillInfo;pub use writer::serialize_ack_fixed;pub use writer::serialize_connect_fixed_header;pub use writer::serialize_disconnect_fixed;pub use writer::serialize_subscribe_header;pub use writer::serialize_unsubscribe_header;pub use rusty_rtos_core as rtos_core;
Modules§
- ack
- Reading an acknowledgement off the wire. Reading an acknowledgement off the wire.
- builder
- The buffer an outgoing property section is written into. The buffer an outgoing property section is written into.
- client
- The client context, and what it refuses before it sends anything. The client context, and what it refuses before it sends anything.
- connack
- Reading the CONNACK, which sets every limit the session then runs under.
Reading the CONNACK — the one packet
ackrefuses. - connect
- Building a CONNECT, the packet that starts a session. Building a CONNECT — the packet that starts a session.
- context
- Every limit a session runs under, and where each one came from. Every limit a session runs under, and where each one came from.
- cursor
- Walking a property section back, one property at a time. Walking a property section back, one property at a time.
- disconnect
- The DISCONNECT, which in MQTT 5 travels both ways. The DISCONNECT, both directions.
- header
- The MQTT fixed header: a packet type, and a variable-byte length. The MQTT fixed header: a packet type, and a variable-byte length.
- loop_
- The receive loop and the acknowledgements that come out of it. The receive loop: one pass over whatever the transport has, and the acknowledgements that come out of it.
- outbound
- The rest of what a client sends: SUBSCRIBE, UNSUBSCRIBE, acks and PINGREQ. The rest of what a client sends: SUBSCRIBE, UNSUBSCRIBE, the publish acknowledgements and PINGREQ.
- outpublish
- Building an outgoing PUBLISH: three serializers, one packet. Building an outgoing PUBLISH — three serializers, one packet.
- prelude
- The names a firmware wants in scope.
- property
- The MQTT 5 property primitives: bounded reads out of a packet. The MQTT 5 property primitives: bounded reads out of a packet.
- publish
- Reading an incoming PUBLISH, the packet that carries application data. Reading an incoming PUBLISH — the packet that carries application data.
- reader
- Pulling a packet’s header off a transport, one byte at a time. Pulling a packet’s header off a transport, one byte at a time.
- session
- Opening a connection: CONNECT, CONNACK and what a resumed session owes. Opening a connection: the CONNECT, the CONNACK, and what a resumed session owes the broker.
- size
- How big an outgoing packet will be. How big an outgoing packet will be.
- state
core_mqtt_state.c: the QoS publish state machine.core_mqtt_state.cremade: the QoS publish state machine.- topic
- Does this topic name match that topic filter? Does this topic name match that topic filter?
- validate
- Which property may go in which outgoing packet: six tables, swept. Which property may go in which outgoing packet.
- writer
- The fixed header of every outgoing MQTT packet. The fixed header of every outgoing MQTT packet.
Constants§
- VERSION
- Crate version, for manifests and logs.