Subscriptions โ
Subscriptions are a record of a request to receive specific message types at a requested interval.
These make use of the Method header (5), and possible values of SUBSCRIBE and UNSUBSCRIBE, followed by additional headers to define other subscription related information.
- Interval (6)
- Duration (7)
- Timeout (8)
- Storage Level (15)
- Message Level (16)
- Subscription ID (17), see IDs section below.
Default Subscriptions โ
Chasm Link โ
๐งช Alpha Default Subscriptions
This default subscriptions are still being developed, and if you explicitly want data at a set interval, you should send your own subscriptions.
By default, when a device connects to the Chasm link, subscriptions for Position messages and Status messages are created automatically.
- Position: Valid only, RAM, 1000ms
- Status: Changes only, RAM, 500ms
These can be altered by sending new subscription requests with different parameters for ID 0, or with no ID. Alternatively they can be explicitly UNSUBSCRIBED.
Examples โ
Position Subscription Request โ
A real subscription request for position data: No message level specified, RAM storage, every 1000ms, with implied Subscription ID 0.
IDs โ
๐งช Alpha
New feature, subject to alterations, for advanced usage
Subscription IDs are an advanced feature, and can be used to uniquely identify multiple different subscriptions for the same message type.
Subscriptions that do not include a Subscription ID are considered to have a default ID of 0. This includes any default subscriptions
Requests โ
When creating a subscription, you can optionally include the Subscription ID (17) header.
Only one subscription per message type and Subscription ID combination can exist at a time. If a new subscription is created with the same message type and Subscription ID as an existing subscription, the existing subscription will be replaced.
Responses โ
When a message is generated as part of a subscription, the Subscription ID header may be included to indicate which subscription this message is fulfilling.
In the case that the subscription was created without a Subscription ID (defaulting to 0), the Subscription ID header will be omitted from the message.