18 lines
334 B
Swift
18 lines
334 B
Swift
import Foundation
|
|
|
|
protocol DeviceRequest {
|
|
|
|
associatedtype Response
|
|
|
|
static var type: BluetoothRequestType { get }
|
|
|
|
var payload: Data { get }
|
|
|
|
func makeResponse(from responseData: Data, responseType: BluetoothResponseType) -> Response?
|
|
}
|
|
|
|
extension DeviceRequest {
|
|
|
|
var type: BluetoothRequestType { Self.type }
|
|
}
|