MacOS_CharacteristicViewController

class MacOS_CharacteristicViewController : RVS_BlueThoth_MacOS_Test_Harness_Base_SplitView_ViewController
extension MacOS_CharacteristicViewController: MacOS_ControllerList_Protocol

This controls the screen for a selected Characteristic. It appears in the screen just to the right of the Peripheral Screen.

  • This is the storyboard ID that we use to create an instance of this view.

    Declaration

    Swift

    static let storyboardID: String
  • This is a carriage return/linefeed pair, which will always be used in place of a simple CR or LF, alone.

    Declaration

    Swift

    private static let _crlf: String
  • This is the initial width of the new section.

    Declaration

    Swift

    static let minimumThickness: CGFloat
  • This is the read button. Selecting this, sends a read command to the Peripheral.

    Declaration

    Swift

    @IBOutlet
    weak var readButton: NSButton!
  • This checkbox controls the notification state for the Characteristic.

    Declaration

    Swift

    @IBOutlet
    weak var notifyButton: NSButton!
  • This is an indicator for indication.

    Declaration

    Swift

    @IBOutlet
    weak var indicateLabel: NSTextField!
  • This is the label that says there are extended attributes in a Descriptor.

    Declaration

    Swift

    @IBOutlet
    weak var extendedLabel: NSTextField!
  • This is the stack view that wraps the read header items.

    Declaration

    Swift

    @IBOutlet
    weak var readHeaderStackView: NSStackView!
  • This is the label for the Read Value text area.

    Declaration

    Swift

    @IBOutlet
    weak var valueTextFieldLabel: NSTextFieldCell!
  • This is the wrapper for the value text area.

    Declaration

    Swift

    @IBOutlet
    weak var valueTextViewContainer: NSTextField!
  • This is the actual text item for the value text area.

    Declaration

    Swift

    @IBOutlet
    weak var valueTextView: NSTextFieldCell!
  • This wraps the write text entry area label.

    Declaration

    Swift

    @IBOutlet
    weak var writeTextFieldLabelContainer: NSTextField!
  • This is the actual text item for the write text label.

    Declaration

    Swift

    @IBOutlet
    weak var writeTextFieldLabel: NSTextFieldCell!
  • This wraps the text entry text view.

    Declaration

    Swift

    @IBOutlet
    weak var writeTextViewContainer: NSScrollView!
  • This is the text entry text view.

    Declaration

    Swift

    @IBOutlet
    var writeTextView: NSTextView!
  • This wraps the send buttons.

    Declaration

    Swift

    @IBOutlet
    weak var sendButtonContainer: NSView!
  • This is the send (no response) button text.

    Declaration

    Swift

    @IBOutlet
    weak var sendButton: NSButton!
  • This is the send (with response) button text.

    Declaration

    Swift

    @IBOutlet
    weak var sendResponseButton: NSButton!
  • This label is displayed to indicate a successful write.

    Declaration

    Swift

    @IBOutlet
    weak var writeConfirmationLabel: NSTextField!
  • This stack view will contain any Descriptors.

    Declaration

    Swift

    @IBOutlet
    weak var descriptorStackView: NSStackView!
  • This is the Characteristic instance associated with this screen. When this is changed, we wipe the cache.

    Declaration

    Swift

    var characteristicInstance: CGA_Bluetooth_Characteristic? { get set }

IBAction Methods

  • Declaration

    Swift

    @IBAction
    func readButtonHit(_: Any)
  • Declaration

    Swift

    @IBAction
    func notifyButtonChanged(_ inButton: NSButton)

    Parameters

    inButton

    The Notify checkbox button

  • Declaration

    Swift

    @IBAction
    func sendButtonHit(_ inButton: Any! = nil)

    Parameters

    inButton

    used as a flag. If nil, then we are sending with response.

  • Declaration

    Swift

    @IBAction
    func sendButtonResponseHit(_: Any)

Instance Methods

Base Class Overrides

  • Called when the view hierachy has loaded.

    Declaration

    Swift

    override func viewDidLoad()
  • Called just before the screen appears. We use this to register with the app delegate.

    Declaration

    Swift

    override func viewWillAppear()
  • Called just before the screen disappears. We use this to un-register with the app delegate.

    Declaration

    Swift

    override func viewWillDisappear()
  • Sets up the various accessibility labels.

    Declaration

    Swift

    override func setUpAccessibility()

MacOS_Base_ViewController_Protocol Conformance

  • key

    This is a String key that uniquely identifies this screen.

    Declaration

    Swift

    var key: String { get }
  • This forces the UI elements to be updated.

    Declaration

    Swift

    func updateUI()