SidewalkMessage
public struct SidewalkMessage
Class encapsulating a message sent / received on Amazon Sidewalk.
-
The Amazon Sidewalk library message types.
The messages from cloud / mobile services to the Amazon Sidewalk device are designated as “Downlink Messages” The messages from Amazon Sidewalk device to cloud / mobile services are designated as “Uplink Messages”.
See moreDeclaration
Swift
public enum MessageType -
Creates an instance of
SidewalkMessage.Declaration
Swift
public init(id: UInt16? = nil, type: MessageType, message: Data)Parameters
idOptional 14 bit id associated with a message, must be between 0 and 16383 (0x3FFF).
typeThe message type.
messageThe message payload. Payload length must be in range [1-255].
-
14 bit id associated with a message, if not provided will be generated by the Amazon Sidewalk library.
Must be between 0 and 16383 (0x3FFF).
Declaration
Swift
public let id: UInt16? -
The message type.
Declaration
Swift
public let type: MessageType -
The message payload.
Declaration
Swift
public let message: Data