# OptionsViewController

    class OptionsViewController : UIViewController

Controller for handling the Custom Key input, readername filter and RSSI filter

- `delegate`

  delegate, set this to the class acting as delegate for this class using the CustomKeyViewControllerProtocol

  #### Declaration

  Swift

      private weak var delegate: OptionsViewControllerProtocol?

- `options`

  Options storage

  #### Declaration

  Swift

      private let options: Options

- `segmentedKeyType`

  Control outlet for Key Type UISegmentedControl

  #### Declaration

  Swift

      @IBOutlet
      weak var segmentedKeyType: UISegmentedControl!

- `customKeyTextView`

  Control outlet for Custom Key HexEditUITextView

  #### Declaration

  Swift

      @IBOutlet
      weak var customKeyTextView: HexEditUITextView!

- `nameFilterTextField`

  Control outlet for Name Filter UITextField

  #### Declaration

  Swift

      @IBOutlet
      weak var nameFilterTextField: UITextField!

- `rssiFilterTextField`

  Control outlet for RSSI Filter UITextField

  #### Declaration

  Swift

      @IBOutlet
      weak var rssiFilterTextField: NumericUITextField!

- `sliderRefresh`

  Control outlet for refresh rate slider

  #### Declaration

  Swift

      @IBOutlet
      weak var sliderRefresh: UISlider!

- `labelRefresh`

  Control outlet for refresh rate UILabel

  #### Declaration

  Swift

      @IBOutlet
      weak var labelRefresh: UILabel!

- `sliderThreshold`

  Control outlet for battery threshold UISlider

  #### Declaration

  Swift

      @IBOutlet
      weak var sliderThreshold: UISlider!

- `labelThreshold`

  Control outlet for battery threshold UILabel

  #### Declaration

  Swift

      @IBOutlet
      weak var labelThreshold: UILabel!

- `switchACKProtocol`

  Control outlet for ACK Protocol UISwitch

  #### Declaration

  Swift

      @IBOutlet
      weak var switchACKProtocol: UISwitch!

- `labelACKProtocolText`

  Control outlet for ACK Protocol Text UILabel

  #### Declaration

  Swift

      @IBOutlet
      weak var labelACKProtocolText: UILabel!

- `viewDidLoad()`

  Called after the controller’s view is loaded into memory. Initialises the local variables, the controls and starts the terminal list updater

  #### Declaration

  Swift

      override func viewDidLoad()

- `setInitialValues(parentViewController:options:)`

  Sets the initial values of the view

  #### Declaration

  Swift

      func setInitialValues(parentViewController: UIViewController, options: Options)

  #### Parameters

  `parentViewController` | Parent controller to use as delegate
  `useDefaultKey` | Initial flag indicating if default key is used
  `customKey` | Initial custom key

- `onKeyTypeChanged(_:)`

  Handles key type change

  #### Declaration

  Swift

      @IBAction
      func onKeyTypeChanged(_ sender: UISegmentedControl)

  #### Parameters

  `sender` | UI control

- `onRefreshValueChanged(_:)`

  Handles setting and showing of refresh rate

  #### Declaration

  Swift

      @IBAction
      func onRefreshValueChanged(_ sender: UISlider)

  #### Parameters

  `sender` | UISlider control

- `onThresholdValueChanged(_:)`

  Handles setting and showing of battery threshold

  #### Declaration

  Swift

      @IBAction
      func onThresholdValueChanged(_ sender: UISlider)

  #### Parameters

  `sender` | UISlider control

- `onACKProtocolChanged(_:)`

  Handles enabling or disabling ACK protocol (for readers with fw 109.00 or higher)

  #### Declaration

  Swift

      @IBAction
      func onACKProtocolChanged(_ sender: UISwitch)

  #### Parameters

  `sender` | UISwitch control

- `onOKClicked(_:)`

  OK button handler

  #### Declaration

  Swift

      @IBAction
      func onOKClicked(_ sender: UIButton)

  #### Parameters

  `sender` | UI control

- `onCloseClicked(_:)`

  Close button handler

  #### Declaration

  Swift

      @IBAction
      func onCloseClicked(_ sender: UIButton)

  #### Parameters

  `sender` | UI control

- `initialiseTextView(textView:)`

  Initialises the text view properties

  #### Declaration

  Swift

      private func initialiseTextView(textView: UITextView)

  #### Parameters

  `textView` | Textview control to initialise

- `enableUIFields()`

  Enable or disable UI

  #### Declaration

  Swift

      private func enableUIFields()

- `setLabelRefreshRate(value:)`

  Sets value label for monitor refresh rate

  #### Declaration

  Swift

      private func setLabelRefreshRate(value: UInt16)

  #### Parameters

  `value` | Refresh rate value

- `setLabelACKProtocol(value:)`

  Sets ACK Protocol text label

  #### Declaration

  Swift

      private func setLabelACKProtocol(value: Bool)

  #### Parameters

  `value` | ACK protocol value

- `setLabelThreshold(value:)`

  Sets value label for monitor battery threshold

  #### Declaration

  Swift

      private func setLabelThreshold(value: UInt8)

  #### Parameters

  `value` | Battery threshold value

- `closeThis()`

  Closes this view

  #### Declaration

  Swift

      private func closeThis()

Copyright (c) 2018-2024, AB Circle Ltd. All rights reserved.

Generated by jazzy ♪♫ v0.14.3, a Realm project.