Class NanoDeviceBase
- Namespace
- nanoFramework.Tools.Debugger
- Assembly
- nanoFramework.Tools.DebugLibrary.Net.dll
public abstract class NanoDeviceBase : INotifyPropertyChanged
- Inheritance
-
NanoDeviceBase
- Implements
- Derived
- Inherited Members
- Extension Methods
Constructors
NanoDeviceBase()
protected NanoDeviceBase()
Properties
BooterVersion
Version of nanoBooter.
public Version BooterVersion { get; }
Property Value
CLRVersion
Version of nanoCLR.
public Version CLRVersion { get; }
Property Value
ConnectionId
Id of the connection to the device.
public string ConnectionId { get; set; }
Property Value
ConnectionPort
Port here this device is connected.
public IPort ConnectionPort { get; set; }
Property Value
DebugEngine
nanoFramework debug engine.
public Engine DebugEngine { get; set; }
Property Value
Description
Device description.
public string Description { get; }
Property Value
DeviceBase
public object DeviceBase { get; }
Property Value
DeviceInfo
Detailed info about the NanoFramework device hardware, solution and CLR.
public INanoFrameworkDeviceInfo DeviceInfo { get; }
Property Value
DeviceUniqueId
Unique ID of the NanoDevice.
public Guid DeviceUniqueId { get; set; }
Property Value
HasNanoBooter
This indicates if the target device has nanoBooter.
public bool HasNanoBooter { get; }
Property Value
HasProprietaryBooter
This indicates if the device has a proprietary bootloader.
public bool HasProprietaryBooter { get; }
Property Value
IsIFUCapable
This indicates if the target device is IFU capable.
public bool IsIFUCapable { get; }
Property Value
OnProgress
public object OnProgress { get; }
Property Value
Platform
Target platform.
public string Platform { get; set; }
Property Value
SerialNumber
Device serial number (if defined on the target).
public string SerialNumber { get; set; }
Property Value
TargetName
Target name.
public string TargetName { get; set; }
Property Value
Transport
Transport to the device.
public TransportType Transport { get; set; }
Property Value
Methods
ConnectToNanoBooter()
Attempt to establish a connection with nanoBooter (with reboot if necessary)
public bool ConnectToNanoBooter()
Returns
- bool
true connection was made, false otherwise
CreateDebugEngine()
Creates a new debug engine for this nanoDevice. Transport to the device.
public void CreateDebugEngine()
CreateDebugEngine(int)
Creates a new debug engine for this nanoDevice. Transport to the device.
public void CreateDebugEngine(int timeoutMilliseconds)
Parameters
timeoutMilliseconds
int
DeployBinaryFile(string, uint, IProgress<string>)
Attempts to deploy a binary (.bin) file to the connected nanoFramework device.
public bool DeployBinaryFile(string binFile, uint address, IProgress<string> progress = null)
Parameters
binFile
stringPath to the binary file (.bin).
address
uintAddress to write to.
progress
IProgress<string>
Returns
- bool
Returns false if the deployment fails, true otherwise.
Remarks
To perform the update the device has to be running:
- nanoCLR if this is meant to update the deployment region.
- nanoBooter if this is meant to update nanoCLR Failing to meet this condition will abort the operation.
Disconnect(bool)
public abstract void Disconnect(bool force = false)
Parameters
force
bool
Erase(EraseOptions, IProgress<MessageWithProgress>, IProgress<string>)
Erases the deployment sectors of the connected NanoDevice.
public bool Erase(EraseOptions options, IProgress<MessageWithProgress> progress = null, IProgress<string> log = null)
Parameters
options
EraseOptionsIdentifies which areas are to be erased.
progress
IProgress<MessageWithProgress>Progress report of execution.
log
IProgress<string>Progress report of execution
Returns
- bool
Returns false if the erase fails, true otherwise Possible exceptions: MFUserExitException, MFDeviceNoResponseException
Execute(uint)
Starts execution on the connected nanoDevice at the supplied address (parameter entrypoint). This method is generally used after the Deploy method to jump into the code that was deployed.
public bool Execute(uint entryPoint)
Parameters
entryPoint
uint
Returns
- bool
Returns false if execution fails, true otherwise
GetCLRStartAddress()
Start address of the CLR block. Returns (-1) as invalid value if the address can't be retrieved from the device properties.
public int GetCLRStartAddress()
Returns
GetDeploymentStartAddress()
Start address of the deployment block. Returns (-1) as invalid value if the address can't be retrieved from the device properties.
public int GetDeploymentStartAddress()
Returns
GetDeviceInfo(bool)
Get INanoFrameworkDeviceInfo from device. If the device information has been retrieved before this method returns the cached data, unless the force argument is true.
public INanoFrameworkDeviceInfo GetDeviceInfo(bool force = true)
Parameters
force
boolForce retrieving the information from the device.
Returns
- INanoFrameworkDeviceInfo
Return the INanoFrameworkDeviceInfo for this device.
OnPropertyChanged(PropertyChangedEventArgs)
protected virtual void OnPropertyChanged(PropertyChangedEventArgs eventArgs)
Parameters
eventArgs
PropertyChangedEventArgs
OnPropertyChanged(string?)
protected void OnPropertyChanged(string? propertyName = null)
Parameters
propertyName
string
Ping()
Attempts to communicate with the connected nanoFramework device
public ConnectionSource Ping()
Returns
Events
PropertyChanged
public event PropertyChangedEventHandler? PropertyChanged