Skip to content

FlakeObject

Representaion of an Instance conforming to a Flake Service

swift
actor FlakeObject

Operators

==(:😃

swift
static func == (FlakeObject, FlakeObject) -> Bool

Equality for FlakeObjects are defined by their objectType and their objectAddress

Instance Properties

groupAddress

swift
var groupAddress: Address?

Address of the Group the Object belongs to

objectAddress

swift
let objectAddress: Address

Address the Object was assigned to by the router

objectType

swift
let objectType: UUID

Service ID the object conforms to

properties

swift
var properties: [FlakePropertyProtocol.Id : FlakePropertyProtocol]

Dictionary of all currently known Properties of the Object

Instance Methods

getProperties()

swift
func getProperties() async throws -> [FlakePropertyProtocol]

Function to request an update to all Properties

hash(into:)

swift
func hash(into: inout Hasher)

Hashes for FlakeObjects include theirobjectType and their objectAddress

registerForUpdates(updateHandler:)

swift
func registerForUpdates(updateHandler: ([FlakePropertyProtocol]) -> Void) async throws

Register for updates to this objects properties

send(_😃

swift
func send(CustomMessage) async throws -> [FlakePropertyProtocol]

Function to send a custom message to the object

set(properties:)

swift
func set(properties: [FlakePropertyProtocol]) async throws -> [FlakePropertyProtocol]

Function to change the value of multiple properties in a single message

set(property:)

swift
func set(property: FlakePropertyProtocol) async throws -> [FlakePropertyProtocol]

Function to change the value of a property

set(propertyId:to:)

swift
func set<T>(propertyId: UInt16, to: T) async throws -> [FlakePropertyProtocol]

Function to change the value of a property

Default Implementations

Equatable-Implementations