CGA_Bluetooth_Service
public class CGA_Bluetooth_Service : CGA_Bluetooth_Service_Protocol_Internal
extension CGA_Bluetooth_Service: CGA_Class_Protocol_UpdateDescriptor
extension CGA_Bluetooth_Service: CGA_ServiceFactory
This class “wraps” instances of CBService, adding some functionality, and linking the hierarchy.
-
This is the type we’re aggregating.
Declaration
Swift
public typealias Element = CGA_Bluetooth_Characteristic -
This is our main cache Array. It contains wrapped instances of our aggregate CB type.
Declaration
Swift
public var sequence_contents: Array<Element> -
This is used to reference an “owning instance” of this instance, and it should be a CGA_Bluetooth_Peripheral
Declaration
Swift
public weak var parent: CGA_Class_Protocol? -
This returns a unique UUID String for the instance.
Declaration
Swift
public var id: String { get } -
This returns the parent Central Manager
Declaration
Swift
public var central: RVS_BlueThoth? { get }
-
The required init, with a “primed” sequence.
Declaration
Swift
public required init(sequence_contents inSequence_Contents: [Element])Parameters
sequence_contentsThe initial value of the Array cache.
-
This casts the parent as a Peripheral Wrapper.
Declaration
Swift
public var peripheral: CGA_Bluetooth_Peripheral? { get }
-
This eliminates all of the stored and staged results.
Declaration
Swift
public func clear() -
This eliminates all of the stored results, and asks the Bluetooth subsystem to start over from scratch.
Declaration
Swift
public func startOver()
-
This searches the hierarchy, and will return any instance that has an ID that matches the string passed in. This could be a Peripheral, Service, Characteristic or Descriptor. The response will need to be cast.
Declaration
Swift
public func findEntityByUUIDString(_ inUUIDString: String) -> CGA_Class_Protocol?Parameters
inUUIDStringThe String for the UUID for which we are searching.
Return Value
Any element in the hierarchy with a UUID that matches the one passed in, or nil.
View on GitHub
CGA_Bluetooth_Service Class Reference