CGA_Bluetooth_Descriptor
public class CGA_Bluetooth_Descriptor : CGA_Bluetooth_Descriptor_Protocol_Internal, CGA_Bluetooth_Writable, CGA_Class_Protocol
extension CGA_Bluetooth_Descriptor: CGA_DescriptorFactory
This class “wraps” instances of CBDescriptor, adding some functionality, and linking the hierarchy.
-
If the Descriptor has a value, it is returned here. It is completely untyped, as each descriptor has its own types.
Declaration
Swift
public var value: Any? { get }
-
This attempts to cast the value of the Descriptor into a Data object.
Declaration
Swift
public var dataValue: Data? { get }
-
If the Descriptor has a value, and that value can be expressed as a String, it is returned here.
Declaration
Swift
public var stringValue: String? { get }
-
Returns the number (if possible) as an Int64. This assumes littlendian. This computed property is defined here, so it can be overridden by subclasses.
Declaration
Swift
public var intValue: Int64? { get }
-
Returns the number (if possible) as a UInt8. This computed property is defined here, so it can be overridden by subclasses.
Declaration
Swift
public var uInt8Value: UInt8? { get }
-
Returns the number (if possible) as a UInt16. This computed property is defined here, so it can be overridden by subclasses.
Declaration
Swift
public var uInt16Value: UInt16? { get }
-
Returns the number (if possible) as a UInt32. This computed property is defined here, so it can be overridden by subclasses.
Declaration
Swift
public var uInt32Value: UInt32? { get }
-
Returns the number (if possible) as a UInt64. This computed property is defined here, so it can be overridden by subclasses.
Declaration
Swift
public var uInt64Value: UInt64? { get }
-
Returns the value as a Boolean. It should be noted that ANY non-zero number will return true. This computed property is defined here, so it can be overridden by subclasses.
Declaration
Swift
public var boolValue: Bool? { get }
-
Returns the value as a Double. This computed property is defined here, so it can be overridden by subclasses.
Declaration
Swift
public var doubleValue: Double? { get }
-
This returns a unique UUID String for the instance.
Declaration
Swift
public var id: String { get }
-
This holds the instance of CBDescriptor that is used by this instance.
Declaration
Swift
public weak var cbElementInstance: CBDescriptor?
-
The Peripheral is asked to read our value.
Declaration
Swift
public func readValue()
-
The Peripheral is asked to write the given data into its value.
Declaration
Swift
public func writeValue(_ inData: Data)
Parameters
inData
The Data instance to write.
-
This is used to reference an “owning instance” of this instance, and it should be a CGA_Bluetooth_Characteristic
Declaration
Swift
public weak var parent: CGA_Class_Protocol?
-
This casts the parent as a Characteristic Wrapper.
Declaration
Swift
public var characteristic: CGA_Bluetooth_Characteristic? { get }
-
This returns the parent Central Manager
Declaration
Swift
public var central: RVS_BlueThoth? { get }