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 instanceerror: 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 instanceerror: 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 instanceaction: BleAction- The action that was executederror: 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 dBmstrength: 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 instancevehicleStats: VehicleStats?- The vehicle statistics if successfulerror: BleError?- Error if request failed, nil if successful
See Also
- BleTerminal - Terminal interface
- BleError - Error types
- BleAction - Available actions
- VehicleStats - Vehicle statistics model
- BleSignalStrength - Signal strength levels