VLDPeripheral

Objective-C

@interface VLDPeripheral : VLDModel

Swift

class VLDPeripheral : VLDModel

The VLDPeripheral class is an abstract class. You should never instantiate a VLDPeripheral object directly. Instead, you always work with one of its concrete subclasses: VLDBluetoothPeripheral or VLDOCRPeripheral.

  • A unique identifer for a particular peripheral model.

    Instead of storing an actual VLDPeripheral object for persistence, it is preferred to store the peripheralID and then later retrieve the object using peripheralForID: with VLDBluetoothPeripheral or VLDOCRPeripheral.

    Declaration

    Objective-C

    @property (nonatomic) NSUInteger peripheralID;

    Swift

    var peripheralID: UInt { get set }
  • The type of the peripheral, used to identify its function.

    Declaration

    Objective-C

    @property (nonatomic) VLDPeripheralType type;

    Swift

    var type: VLDPeripheralType { get set }
  • Model number of the peripheral.

    Declaration

    Objective-C

    @property (nonatomic, copy) NSString *model;

    Swift

    var model: String! { get set }
  • Manufacturer name of the peripheral.

    Declaration

    Objective-C

    @property (nonatomic, copy) NSString *manufacturer;

    Swift

    var manufacturer: String! { get set }
  • URL for an image of the peripheral.

    Declaration

    Objective-C

    @property (nonatomic, strong) NSURL *imageURL;

    Swift

    var imageURL: URL! { get set }
  • Indication if support for a peripheral has been discontinued. Peripherals are marked as disabled instead of removed so that historical records can continue to be associated with the peripheral that created them.

    If a peripheral is disabled, it should not be displayed to the user when selecting a new peripheral.

    Declaration

    Objective-C

    @property (nonatomic) BOOL disabled;

    Swift

    var disabled: Bool { get set }
  • Name of the peripheral comprised of the the manufacturer name and model number.

    Declaration

    Objective-C

    - (NSString *)name;

    Swift

    func name() -> String!
  • The mechanism used to connect to the peripheral, used to identify the VLDPeripheral subclass.

    Declaration

    Objective-C

    + (NSString *)connectionType;

    Swift

    class func connectionType() -> String!
  • Descriptive name for a type of peripheral.

    Declaration

    Objective-C

    + (NSString *)nameForType:(VLDPeripheralType)type;

    Swift

    class func name(for type: VLDPeripheralType) -> String!

    Parameters

    type

    A value of VLDPeripheralType to get the name for.

  • List of supported VLDPeripheral objects.

    Declaration

    Objective-C

    + (NSArray *)supportedPeripherals;

    Swift

    class func supportedPeripherals() -> [Any]!
  • Returns array containing set of supported peripherals of specified type.

    Declaration

    Objective-C

    + (NSArray *)peripheralsOfType:(VLDPeripheralType)type;

    Swift

    class func peripherals(of type: VLDPeripheralType) -> [Any]!

    Parameters

    type

    A value of VLDPeripheralType to get the list of peripherals for.

  • Returns record for peripheral

    Declaration

    Objective-C

    - (VLDRecord *)record;

    Swift

    func record() -> VLDRecord!