-
Name of the tag.
Declaration
Swift
var name: String { get }
-
Once the BLE device name is known, this stream will publish immediately on connection, in addition to future updates.
Declaration
Swift
var namePublisher: AnyPublisher<String, Never> { get }
-
Publishes one signal strength value in response to each
readRSSI()
function call.Declaration
Swift
var rssiPublisher: AnyPublisher<Float, Never> { get }
-
Tags have component capabilities (like attached Gear), eg. LED.
Declaration
Swift
var tagComponent: Component { get }
-
Gear information when tag is attached with any gear.
Nil, If ujt is detached from gear.
Declaration
Swift
var gearComponent: Component? { get }
-
Provides firmware updates related apis.
Declaration
Swift
var firmwareUpdateManager: FirmwareUpdateManager { get }
-
Publishes a value every time Gear is attached or detached.
See also
Components and Gear
Declaration
Swift
var connectedGear: AnyPublisher<Component?, Never> { get }
-
Writes the specified tag name into the connected tag hardware.
This causes the tag to disconnect, the tag firmware will then automatically reconnect.
Throws
throwsSetNameError
if the new name to be set is same as existing one, or is an empty string or is longer than 21 characters.Declaration
Swift
func setName(_ name: String) throws -> AnyPublisher<Void, Error>
Parameters
name
the new name to be set.
-
Send a command, retrying in case of failure.
This will attempt to send up to three times.
The published event will be received on the queue passed into
JacquardManager.init(publishQueue:)
Declaration
Swift
func enqueue<R>(_ commandRequest: R) -> AnyPublisher<R.Response, Error> where R : CommandRequest
Parameters
commandRequest
the request.
-
Send a command, retrying in case of failure.
The published event will be received on the queue passed into
JacquardManager.init(publishQueue:)
Declaration
Swift
func enqueue<R: CommandRequest>(_ commandRequest: R, retries: Int) -> AnyPublisher< R.Response, Error >
Parameters
commandRequest
the request.
retries
number of retries for serializing the request data to be sent over BLE (eg. a value of 2 means attempt a totally of three times).
-
Provides access to a
SubscribableTag
instance, allowing registering tag notification subscriptions.The
SubscribableTag
instance should only be used within the closure. It is important that you register all notifications that should work in the background the first time you use this method on each connected tag instance.See also
Notifications
Declaration
Swift
func registerSubscriptions(_ subscriptions: (SubscribableTag) -> Void)
Parameters
subscriptions
A closure where the subscriptions may be registered.
-
Each call to this function results in one signal strength value being published by the
rssiPublisher
publisher.Declaration
Swift
func readRSSI()
-
Send data to the Tag over the command characteristic. The expected format is the output of creating a protobuf message, with all the required fields for that particular message populated.
Declaration
Swift
func send(data: Data)
Parameters
data
data to be sent to the Tag. This is a fragment of the entire message we send to the Device, to be assembled and processed after we’re done writing.