RVS_BTDriver_MacOS_Test_Harness_Device_ViewController
class RVS_BTDriver_MacOS_Test_Harness_Device_ViewController : RVS_BTDriver_MacOS_Test_Harness_Base_ViewController
extension RVS_BTDriver_MacOS_Test_Harness_Device_ViewController: NSTableViewDataSource
extension RVS_BTDriver_MacOS_Test_Harness_Device_ViewController: RVS_BTDriver_DeviceSubscriberProtocol
This class controls the device info listing screen (the one that displays a list of device information).
-
The Storyboard ID for this class.
Declaration
Swift
static let storyboardID: String
-
This will be used to hold an automatically-generated UUID for this subscriber.
Declaration
Swift
var _uuid: UUID!
-
Key for the “Key” column.
Declaration
Swift
let keyColumnID: String
-
Key for the “Value” column.
Declaration
Swift
let valueColumnID: String
-
The “OK” button was hit by the user in the delete confirm.
Declaration
Swift
let modalResponseOK: Int
-
The device instance, associated with this screen.
Declaration
Swift
var deviceInstance: RVS_BTDriver_DeviceProtocol!
-
This is an Array of tuples, used to populate the table.
The reason that this is an Array of tuples, is so we can enforce order without using a stupid key-sorting closure.
Declaration
Swift
var tableData: [RVS_BTDriver_MacOS_Test_Harness_Device_ViewController_TableDataTuple]
-
The Connect/Disconnect button.
Declaration
Swift
@IBOutlet weak var connectDisconnectButton: NSButton!
-
The Details button.
Declaration
Swift
@IBOutlet weak var detailsButton: NSButton!
-
The Delete button.
Declaration
Swift
@IBOutlet weak var deleteButton: NSButton!
-
The Delete button text display cell.
Declaration
Swift
@IBOutlet weak var deleteButtonCell: NSButtonCell!
-
The Table, Displaying the Properties.
Declaration
Swift
@IBOutlet weak var propertyTable: NSTableView!
-
Make sure that we clean up after ourselves.
Declaration
Swift
deinit
-
Called when the Connect/Disconnect button is hit.
Declaration
Swift
@IBAction func connectDisconnectHit(_: Any)
-
Called when the Delete button is hit.
Declaration
Swift
@IBAction func deleteButtonHit(_: Any)
-
Sets up the UI to reflect the current state.
Declaration
Swift
func setUpUI()
-
Sets up the table data.
Declaration
Swift
func setUpTableData()
-
Called to remove the device from the driver.
Declaration
Swift
func deleteMyself()
-
Sets up the table.
Declaration
Swift
func populateTable()
-
This displays a simple alert, with an OK button.
Declaration
Swift
func displayDeleteConfirmAlert()
-
Called after the view has loaded and initialized from the storyboard.
Declaration
Swift
override func viewDidLoad()
-
Called just before we switch to the device services and properties inspector screen.
Declaration
Swift
override func prepare(for segue: NSStoryboardSegue, sender inSender: Any?)
Parameters
for
The segue being executed.
sender
Any data to be associated with the calle (ignored).
-
Called to supply the number of rows in the table.
Declaration
Swift
func numberOfRows(in inTableView: NSTableView) -> Int
Parameters
inTableView
The table instance.
Return Value
A 1-based Int, with 0 being no rows.
-
This is called to supply the string display for one row that corresponds to a device.
Declaration
Swift
func tableView(_ inTableView: NSTableView, objectValueFor inTableColumn: NSTableColumn?, row inRow: Int) -> Any?
Parameters
inTableView
The table instance.
viewFor
Container object for the column that holds the row.
row
0-based Int, with the index of the row, within the column.
Return Value
A new Text View, with the device model name.
-
Declaration
Swift
public func subscribedDevice(_ device: RVS_BTDriver_DeviceProtocol, encounteredThisError: RVS_BTDriver.Errors)
-
Called if the device encounters an error.
Declaration
Swift
public func device(_ inDevice: RVS_BTDriver_DeviceProtocol, encounteredThisError inError: RVS_BTDriver.Errors)
Parameters
inDevice
The device instance that is calling this.
encounteredThisError
The error that is being returned.
-
Called if the device state changes, in some way.
Declaration
Swift
public func deviceStatusUpdate(_ inDevice: RVS_BTDriver_DeviceProtocol)
Parameters
inDevice
The device instance that is calling this.