Vocabulary to represent MQTT packets in RDF.

This document is a work in progress

Introduction

To use in TD forms.

Axiomatization

Classes

Client

IRI: https://www.w3.org/2019/wot/mqtt#Client

A program or device that uses MQTT. A Client always establishes the Network Connection to a Server

Control Packet

IRI: https://www.w3.org/2019/wot/mqtt#ControlPacket

An MQTT Control Packet consists of up to three parts: fixed header (prsesent in all Control Packets), variable header, payload
Super-class of PublishPacket
SubscribePacket
UnsubscribePacket
In the domain of fixedHeaderFlag
hasPayload
hasVariableHeaderFlag
Enumeration members PublishPacket
SubscribePacket
UnsubscribePacket

Network Connection

IRI: https://www.w3.org/2019/wot/mqtt#NetworkConnection

The MQTT protocol requires an underlying transport that provides an ordered, lossless, stream of bytes from the Client to Server and Server to Client. See NetworkConnection

PublishPacket

IRI: https://www.w3.org/2019/wot/mqtt#PUBLISH

A PUBLISH packet is sent from a Client to a Server or from a Server to a Client to transport an Application Message.
Sub-class of Control Packet
In the domain of hasTopicName

QualityOfService

IRI: https://www.w3.org/2019/wot/mqtt#QualityOfService

MQTT delivers Application Messages according to the Quality of Service (QoS) levels defined in this ontology.
Enumeration members atMostOnce
atLeastOnce
exactlyOnce

SubscribePacket

IRI: https://www.w3.org/2019/wot/mqtt#SUBSCRIBE

The SUBSCRIBE packet is sent from the Client to the Server to create one or more Subscriptions. Each Subscription registers a Client’s interest in one or more Topics.
Sub-class of Control Packet
In the domain of hasDUPFlag
hasQoSFlag
hasRetainFlag
hasTopicFilters

Server

IRI: https://www.w3.org/2019/wot/mqtt#Server

A program or device that acts as an intermediary between clients. Sometimes servers are referred as Brokers

Topic Filter

IRI: https://www.w3.org/2019/wot/mqtt#TopicFilter

An expression contained in a Subscription, to indicate an interest in one or more topics. A Topic Filter can include wildcard characters. TopicFilter is used for subscriptions to indicate a topic or a set of topics when a wildcard character is used.
In the range of hasTopicFilters

Topic Name

IRI: https://www.w3.org/2019/wot/mqtt#TopicName

The label attached to an Application Message which is matched against the Subscriptions known to the Server. The Server sends a copy of the Application Message to each Client that has a matching Subscription. TopicName is used only for publication to indicate a single topic, and thus MUST not contain any wildcards.
In the range of hasTopicName

UnsubscribePacket

IRI: https://www.w3.org/2019/wot/mqtt#UNSUBSCRIBE

An UNSUBSCRIBE packet is sent by the Client to the Server, to unsubscribe from topics.
Sub-class of Control Packet
In the domain of hasTopicFilters

Object Properties

hasPayload

IRI: https://www.w3.org/2019/wot/mqtt#hasPayload

Some MQTT Control Packets contain a Payload as the final part of the packet. In the PUBLISH packet this is the Application Message.
Domain includes Control Packet
Range Control Packet

hasQoSFlag

IRI: https://www.w3.org/2019/wot/mqtt#hasQoSFlag

This field indicates the level of assurance for delivery of an Application Message.
Domain includes SubscribePacket
Domain SubscribePacket
Range QualityOfService

hasTopicFilters

IRI: https://www.w3.org/2019/wot/mqtt#hasTopicFilters

This field reports the list of TopicFilters of a packet
Domain includes SubscribePacket
UnsubscribePacket
Range includes Topic Filter
Domain SubscribePacket
UnsubscribePacket
Range Topic Filter

hasTopicName

IRI: https://www.w3.org/2019/wot/mqtt#hasTopicName

This field reports the TopicName of a packet
Domain includes PublishPacket
Range includes Topic Name
Domain PublishPacket
Range Topic Name

sendsControlPacket

IRI: https://www.w3.org/2019/wot/mqtt#sendsControlPacket

In MQTT protocol clients sends control packets between each other using and intermediary called Server (or broker). This property describes the action of sending a ControlPacket in a NetworkConnection
Domain Client
Range Control Packet

Datatype Properties

fixedHeaderFlag

IRI: https://www.w3.org/2019/wot/mqtt#fixedHeaderFlag

Each MQTT Control Packet contains a Fixed Header.
Domain includes Control Packet

hasDUPFlag

IRI: https://www.w3.org/2019/wot/mqtt#hasDUPFlag

If the DUP flag is set, it indicates that this might be re-delivery of an earlier attempt to send the packet.
Domain includes SubscribePacket
Range boolean

hasRetainFlag

IRI: https://www.w3.org/2019/wot/mqtt#hasRetainFlag

If the RETAIN flag is set to 1 in a PUBLISH packet sent by a Client to a Server, the Server must replace any existing retained message for this topic and store the Application Message, so that it can be delivered to future subscribers whose subscriptions match its Topic Name.
Domain includes SubscribePacket
Range boolean

hasVariableHeaderFlag

IRI: https://www.w3.org/2019/wot/mqtt#hasVariableHeaderFlag

Some types of MQTT Control Packet contain a Variable Header component. It resides between the Fixed Header and the Payload. The content of the Variable Header varies depending on the packet type.
Domain includes Control Packet

Named Individuals

atMostOnce

IRI: https://www.w3.org/2019/wot/mqtt/qualitfyOfService#0

The Server delivers the Application Message to the Client at most once
Instance of QualityOfService

atLeastOnce

IRI: https://www.w3.org/2019/wot/mqtt/qualitfyOfService#1

The message is delivered at least once.
Instance of QualityOfService

exactlyOnce

IRI: https://www.w3.org/2019/wot/mqtt/qualitfyOfService#2

The message is delivered exactly once.
Instance of QualityOfService