OptionsViewController

class OptionsViewController : UIViewController

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

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

    Declaration

    Swift

    private weak var delegate: OptionsViewControllerProtocol?
  • Options storage

    Declaration

    Swift

    private let options: Options
  • Control outlet for Key Type UISegmentedControl

    Declaration

    Swift

    @IBOutlet
    weak var segmentedKeyType: UISegmentedControl!
  • Control outlet for Custom Key HexEditUITextView

    Declaration

    Swift

    @IBOutlet
    weak var customKeyTextView: HexEditUITextView!
  • Control outlet for Name Filter UITextField

    Declaration

    Swift

    @IBOutlet
    weak var nameFilterTextField: UITextField!
  • Control outlet for RSSI Filter UITextField

    Declaration

    Swift

    @IBOutlet
    weak var rssiFilterTextField: NumericUITextField!
  • Control outlet for refresh rate slider

    Declaration

    Swift

    @IBOutlet
    weak var sliderRefresh: UISlider!
  • Control outlet for refresh rate UILabel

    Declaration

    Swift

    @IBOutlet
    weak var labelRefresh: UILabel!
  • Control outlet for battery threshold UISlider

    Declaration

    Swift

    @IBOutlet
    weak var sliderThreshold: UISlider!
  • Control outlet for battery threshold UILabel

    Declaration

    Swift

    @IBOutlet
    weak var labelThreshold: UILabel!
  • Control outlet for ACK Protocol UISwitch

    Declaration

    Swift

    @IBOutlet
    weak var switchACKProtocol: UISwitch!
  • Control outlet for ACK Protocol Text UILabel

    Declaration

    Swift

    @IBOutlet
    weak var labelACKProtocolText: UILabel!
  • 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()
  • 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

  • Handles key type change

    Declaration

    Swift

    @IBAction
    func onKeyTypeChanged(_ sender: UISegmentedControl)

    Parameters

    sender

    UI control

  • Handles setting and showing of refresh rate

    Declaration

    Swift

    @IBAction
    func onRefreshValueChanged(_ sender: UISlider)

    Parameters

    sender

    UISlider control

  • Handles setting and showing of battery threshold

    Declaration

    Swift

    @IBAction
    func onThresholdValueChanged(_ sender: UISlider)

    Parameters

    sender

    UISlider control

  • 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

  • OK button handler

    Declaration

    Swift

    @IBAction
    func onOKClicked(_ sender: UIButton)

    Parameters

    sender

    UI control

  • Close button handler

    Declaration

    Swift

    @IBAction
    func onCloseClicked(_ sender: UIButton)

    Parameters

    sender

    UI control

  • Initialises the text view properties

    Declaration

    Swift

    private func initialiseTextView(textView: UITextView)

    Parameters

    textView

    Textview control to initialise

  • Enable or disable UI

    Declaration

    Swift

    private func enableUIFields()
  • Sets value label for monitor refresh rate

    Declaration

    Swift

    private func setLabelRefreshRate(value: UInt16)

    Parameters

    value

    Refresh rate value

  • Sets ACK Protocol text label

    Declaration

    Swift

    private func setLabelACKProtocol(value: Bool)

    Parameters

    value

    ACK protocol value

  • Sets value label for monitor battery threshold

    Declaration

    Swift

    private func setLabelThreshold(value: UInt8)

    Parameters

    value

    Battery threshold value

  • Closes this view

    Declaration

    Swift

    private func closeThis()