forked from JuulLabs-OSS/mcumgr-ios
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request JuulLabs-OSS#17 from NordicSemiconductor/develop
Merge 'Develop' branch into 'master'
- Loading branch information
Showing
7 changed files
with
495 additions
and
189 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
// | ||
// BasicManager.swift | ||
// | ||
// | ||
// Created by Dinesh Harjani on 21/9/21. | ||
// | ||
|
||
import Foundation | ||
import SwiftCBOR | ||
|
||
// MARK: - BasicManager | ||
|
||
/// Sends commands belonging to the Basic Group. | ||
/// | ||
public class BasicManager: McuManager { | ||
override class var TAG: McuMgrLogCategory { .basic } | ||
|
||
// MARK: - Constants | ||
|
||
enum ID: UInt8 { | ||
case Reset = 0 | ||
} | ||
|
||
// MARK: - Init | ||
|
||
public init(transporter: McuMgrTransport) { | ||
super.init(group: .basic, transporter: transporter) | ||
} | ||
|
||
// MARK: - Commands | ||
|
||
/// Erase stored Application-Level Settings from the Application Core. | ||
/// | ||
/// - parameter callback: The response callback with a ``McuMgrResponse``. | ||
public func eraseAppSettings(callback: @escaping McuMgrCallback<McuMgrResponse>) { | ||
send(op: .write, commandId: ID.Reset.rawValue, payload: [:], callback: callback) | ||
} | ||
} |
Oops, something went wrong.