Skip to main content

Class ReliabilityServiceBase

Provides base implementation of common ReliabilityService functionality

Assembly: Meadow.dll
View Source
Declaration
public abstract class ReliabilityServiceBase : IReliabilityService

Implements:
Meadow.IReliabilityService

Properties

LastBootWasFromCrash

Returns true is the last device boot followed a crash

View Source
Declaration
public bool LastBootWasFromCrash { get; }

LastResetReason

Gets the last system reset reason

View Source
Declaration
public virtual ResetReason LastResetReason { get; }

SystemResetCount

Gets the total number of times the system has been reset

View Source
Declaration
public virtual int SystemResetCount { get; }

SystemPowerCycleCount

Gets the total number of times the system has been power cycled

View Source
Declaration
public virtual int SystemPowerCycleCount { get; }

UpTime

Gets the total time the device has been up since last reset or power cycle

View Source
Declaration
public virtual TimeSpan UpTime { get; }

ErrorListenerIsAttached

Returns <b>true</b> if any listener has attached to the MeadowSystemError event

View Source
Declaration
protected bool ErrorListenerIsAttached { get; }

IsCrashDataAvailable

Returns if there is crash data available

View Source
Declaration
public bool IsCrashDataAvailable { get; }

Methods

OnBootFromCrash()

Override this method to provide specific behaviors the device boots after a crash

View Source
Declaration
public abstract void OnBootFromCrash()

ProcessSystemError(MeadowSystemErrorInfo, out bool)

Processes a Meadow system error to determine if a device reset is recommended

View Source
Declaration
protected virtual void ProcessSystemError(MeadowSystemErrorInfo errorInfo, out bool recommendReset)
Parameters
TypeNameDescription
Meadow.MeadowSystemErrorInfoerrorInfoThe error that has occurred
System.BooleanrecommendResetReturn <b>true</b> to recommend device reset

LogSystemError(MeadowSystemErrorInfo, bool)

Writes a system error to the App Crash file

View Source
Declaration
protected void LogSystemError(MeadowSystemErrorInfo error, bool recommendedReset)
Parameters
TypeNameDescription
Meadow.MeadowSystemErrorInfoerrorThe error info to write
System.BooleanrecommendedResetWhether or not reset was recommended

OnMeadowSystemError(MeadowSystemErrorInfo)

Override this method to provide specific behaviors when System Errors occur

View Source
Declaration
public void OnMeadowSystemError(MeadowSystemErrorInfo errorInfo)
Parameters
TypeNameDescription
Meadow.MeadowSystemErrorInfoerrorInfoThe MeadowSystemErrorInfo describing the error details

ClearCrashData()

Erases all existing crash report data

View Source
Declaration
public void ClearCrashData()

GetCrashData()

Gets all existing crash report data

View Source
Declaration
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
Declaration
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
Declaration
public event MeadowSystemErrorHandler MeadowSystemError
Event Type

Meadow.MeadowSystemErrorHandler

Implements