Skip to main content

BleTerminalDelegate

Protocol: BleTerminalDelegate : AnyObject

Delegate methods that will be called when Ble terminal received responses or changed states

Methods

bleTerminalDidSavedKey(terminal:error:)

func bleTerminalDidSavedKey(terminal: BleTerminal, error: BleError?)

Called when saveAuthKey() function call has received response or error

Parameters

  • terminal: BleTerminal - The terminal instance
  • error: BleError? - Error if save failed, nil if successful

bleTerminalDidConnect(terminal:error:)

func bleTerminalDidConnect(terminal: BleTerminal, error: BleError?)

Called when connect() function call has received response or error

Parameters

  • terminal: BleTerminal - The terminal instance
  • error: BleError? - Error if connection failed, nil if successful

bleTerminalDidAction(terminal:action:error:)

func bleTerminalDidAction(terminal: BleTerminal, action: BleAction, error: BleError?)

Called when sendAction() function call has received response or error

Parameters

  • terminal: BleTerminal - The terminal instance
  • action: BleAction - The action that was executed
  • error: BleError? - Error if action failed, nil if successful

bleTerminalDisconnected(terminal:)

func bleTerminalDisconnected(terminal: BleTerminal)

Called when Ble Terminal get disconnected

Parameters

  • terminal: BleTerminal - The terminal instance

bleTerminalSignalUpdate(rssi:strength:)

func bleTerminalSignalUpdate(rssi: Int, strength: BleSignalStrength)

Called periodically to update the BLE signal strength to Ble Terminal

Parameters

  • rssi: Int - The RSSI value in dBm
  • strength: BleSignalStrength - The interpreted signal strength level

bleTerminalDidGetVehicleStats(terminal:vehicleStats:error:)

func bleTerminalDidGetVehicleStats(terminal: BleTerminal, vehicleStats: VehicleStats?, error: BleError?)

Called when getVehicleStats() function has received response or error

Parameters

  • terminal: BleTerminal - The terminal instance
  • vehicleStats: VehicleStats? - The vehicle statistics if successful
  • error: BleError? - Error if request failed, nil if successful

See Also