Client class
An mcumgr client.
Pass your own transport layer to the constructor. Call methods on this class to execute commands.
Multiple commands may be executed at the same time.
- Available extensions
Constructors
-
Client({required Stream<
List< input, required WriteCallback output, Encoding encoding = smp})int> > - Creates a client.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
close(
) → Future< void> -
confirmImageState(
Duration timeout) → Future< ImageState> -
Available on Client, provided by the ClientImgExtension extension
Confirms the currently running image. -
continueImageUpload(
int offset, List< int> data, Duration timeout) → Future<ImageUploadResponse> -
Available on Client, provided by the ClientImgExtension extension
Sends a chunk of a firmware upload. -
echo(
String msg, Duration timeout) → Future< String> -
Available on Client, provided by the ClientOsExtension extension
Sends an echo message to the device. -
erase(
Duration timeout) → Future< void> -
Available on Client, provided by the ClientImgExtension extension
Erases the image in the inactive slot. -
execute(
Message msg, Duration timeout) → Future< Message> - Executes a message.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
readImageState(
Duration timeout) → Future< ImageState> -
Available on Client, provided by the ClientImgExtension extension
Reads which images are currently present on the device. -
reset(
Duration timeout) → Future< void> -
Available on Client, provided by the ClientOsExtension extension
Resets (reboots) the device. -
setPendingImage(
List< int> hash, bool confirm, Duration timeout) → Future<ImageState> -
Available on Client, provided by the ClientImgExtension extension
Marks the image with the specified hash as pending. -
startImageUpload(
int image, List< int> data, int length, List<int> sha256, Duration timeout) → Future<ImageUploadResponse> -
Available on Client, provided by the ClientImgExtension extension
Sends the first chunk of a firmware upload. -
toString(
) → String -
A string representation of this object.
inherited
-
uploadImage(
int image, List< int> data, List<int> hash, Duration chunkTimeout, {int chunkSize = 128, void onProgress(int)?, int windowSize = 3}) → Future<void> -
Available on Client, provided by the ClientImgExtension extension
Uploads an image to the device.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited