Class ReliabilityServiceBase
Provides base implementation of common ReliabilityService functionality
Assembly: Meadow.dll
View Source
public abstract class ReliabilityServiceBase : IReliabilityService
Implements:
Meadow.IReliabilityService
Properties
LastBootWasFromCrash
Returns true is the last device boot followed a crash
View Source
public bool LastBootWasFromCrash { get; }
LastResetReason
Gets the last system reset reason
View Source
public virtual ResetReason LastResetReason { get; }
SystemResetCount
Gets the total number of times the system has been reset
View Source
public virtual int SystemResetCount { get; }
SystemPowerCycleCount
Gets the total number of times the system has been power cycled
View Source
public virtual int SystemPowerCycleCount { get; }
UpTime
Gets the total time the device has been up since last reset or power cycle
View Source
public virtual TimeSpan UpTime { get; }
ErrorListenerIsAttached
Returns <b>true</b> if any listener has attached to the MeadowSystemError event
View Source
protected bool ErrorListenerIsAttached { get; }
IsCrashDataAvailable
Returns if there is crash data available
View Source
public bool IsCrashDataAvailable { get; }
Methods
OnBootFromCrash()
Override this method to provide specific behaviors the device boots after a crash
View Source
public abstract void OnBootFromCrash()
ProcessSystemError(MeadowSystemErrorInfo, out bool)
Processes a Meadow system error to determine if a device reset is recommended
View Source
protected virtual void ProcessSystemError(MeadowSystemErrorInfo errorInfo, out bool recommendReset)
Parameters
Type | Name | Description |
---|---|---|
Meadow.MeadowSystemErrorInfo | errorInfo | The error that has occurred |
System.Boolean | recommendReset | Return <b>true</b> to recommend device reset |
LogSystemError(MeadowSystemErrorInfo, bool)
Writes a system error to the App Crash file
View Source
protected void LogSystemError(MeadowSystemErrorInfo error, bool recommendedReset)
Parameters
Type | Name | Description |
---|---|---|
Meadow.MeadowSystemErrorInfo | error | The error info to write |
System.Boolean | recommendedReset | Whether or not reset was recommended |
OnMeadowSystemError(MeadowSystemErrorInfo)
Override this method to provide specific behaviors when System Errors occur
View Source
public void OnMeadowSystemError(MeadowSystemErrorInfo errorInfo)
Parameters
Type | Name | Description |
---|---|---|
Meadow.MeadowSystemErrorInfo | errorInfo | The MeadowSystemErrorInfo describing the error details |
ClearCrashData()
Erases all existing crash report data
View Source
public void ClearCrashData()
GetCrashData()
Gets all existing crash report data
View Source
public string[] GetCrashData()
Returns
System.String[]
: A list (typically with a length of 0 or 1) of on-device crash reports### GetStartupMessages()
Retrieves any messages generated by the Meadow host OS prior to starting the Meadow stack
View Source
public virtual IEnumerable<PlatformOsMessage>? GetStartupMessages()
Returns
System.Collections.Generic.IEnumerable<Meadow.PlatformOsMessage>
Events
MeadowSystemError
This event is raised in the event that an exception or error occurs outside of the managed stack, such as with a coprocessor
View Source
public event MeadowSystemErrorHandler MeadowSystemError
Event Type
Meadow.MeadowSystemErrorHandler