Characteristic | Locus |
---|---|
Inherited Members | IPowerController.BeforeReset IPowerController.BeforeSleep IPowerController.AfterWake IPowerController.Reset() IPowerController.Sleep(TimeSpan) IPowerController.Sleep(DateTime) IPowerController.RegisterForSleep(ISleepAwarePeripheral) |
Namespace | Meadow |
Assembly | Meadow.Contracts.dll |
Syntax
public interface IPlatformOS : IPowerController
Properties
AutomaticallyStartNetwork
Should a WiFi connection be made on startup.
Declaration
bool AutomaticallyStartNetwork { get; }
Property Value
Type | Description |
---|---|
bool |
Remarks
This assumes that the default access point is configured through wifi.config.yaml.
FileSystem
Provides an abstraction for OS services such as configuration so that Meadow can operate on different OS's and platforms.
Declaration
IPlatformOS.FileSystemInfo FileSystem { get; }
Property Value
Type | Description |
---|---|
IPlatformOS.FileSystemInfo |
InitializationTimeout
Number of seconds allowed for the system to initialize.
Declaration
uint InitializationTimeout { get; }
Property Value
Type | Description |
---|---|
uint |
LaunchArguments
The command line arguments provided when the Meadow application was launched
Declaration
string[]? LaunchArguments { get; }
Property Value
Type | Description |
---|---|
string[] |
NtpClient
Gets the OS INtpClient instance
Declaration
INtpClient NtpClient { get; }
Property Value
Type | Description |
---|---|
INtpClient |
OSBuildDate
OS build date and time.
Declaration
string OSBuildDate { get; }
Property Value
Type | Description |
---|---|
string |
OSVersion
OS version.
Declaration
string OSVersion { get; }
Property Value
Type | Description |
---|---|
string |
RebootOnUnhandledException
Should the system reboot on an exception?
Declaration
bool RebootOnUnhandledException { get; }
Property Value
Type | Description |
---|---|
bool |
ReservedPins
Names of any pins that should be reserved for OS use.
Declaration
string ReservedPins { get; }
Property Value
Type | Description |
---|---|
string |
Remarks
This should be a semicolon list of pin names that will be reserved for OS use.
RuntimeVersion
.NET Runtime version install on the device.
Declaration
string RuntimeVersion { get; }
Property Value
Type | Description |
---|---|
string |
SdStorageSupported
Should SD card support be enabled on this platform?
Declaration
bool SdStorageSupported { get; }
Property Value
Type | Description |
---|---|
bool |
SelectedNetwork
Which network is selected in meadow.config.yaml.
Declaration
IPlatformOS.NetworkConnectionType SelectedNetwork { get; }
Property Value
Type | Description |
---|---|
IPlatformOS.NetworkConnectionType |
Methods
AesDecrypt(byte[], byte[], byte[])
Performs AES decryption of a value using the Meadow device certificate.
Declaration
byte[] AesDecrypt(byte[] encryptedValue, byte[] key, byte[] iv)
Parameters
Type | Name | Description |
---|---|---|
byte[] | encryptedValue | The value to decrypt |
byte[] | key | The key used for encrypting the buffer |
byte[] | iv | The initialization vector to use for decryption |
Returns
Type | Description |
---|---|
byte[] | The decrypted value |
Remarks
This method is used by the Update Service
GetConfigurationValue<T>(ConfigurationValues)
Get a configuration value, as specified in meadow.config.yaml, from the OS.
Declaration
T GetConfigurationValue<T>(IPlatformOS.ConfigurationValues item) where T : struct
Parameters
Type | Name | Description |
---|---|---|
IPlatformOS.ConfigurationValues | item | Item to retrieve. |
Returns
Type | Description |
---|---|
T | Value for the specified item. |
Type Parameters
Name | Description |
---|---|
T | Type of the object being retrieved. |
GetCpuTemperature()
Gets the current CPU temperature
Declaration
Temperature GetCpuTemperature()
Returns
Type | Description |
---|---|
Temperature |
GetSerialPortName(string)
Finds a platform serial port name by either friendly or system name
Declaration
SerialPortName? GetSerialPortName(string portName)
Parameters
Type | Name | Description |
---|---|---|
string | portName |
Returns
Type | Description |
---|---|
SerialPortName |
GetSerialPortNames()
Gets a list of currently available serial ports
Declaration
SerialPortName[] GetSerialPortNames()
Returns
Type | Description |
---|---|
SerialPortName[] |
GetStartupMessages()
Retrieves any messages generated by the Meadow host OS prior to starting the Meadow stack
Declaration
IEnumerable<PlatformOsMessage>? GetStartupMessages()
Returns
Type | Description |
---|---|
IEnumerable<PlatformOsMessage> |
Initialize(DeviceCapabilities, string[]?)
Initializes platform-specific OS features
Declaration
void Initialize(DeviceCapabilities capabilities, string[]? args)
Parameters
Type | Name | Description |
---|---|---|
DeviceCapabilities | capabilities | |
string[] | args | The command line arguments provided when the Meadow application was launched |
RsaDecrypt(byte[])
Performs RSA decryption of a value using the Meadow device certificate.
Declaration
byte[] RsaDecrypt(byte[] encryptedValue)
Parameters
Type | Name | Description |
---|---|---|
byte[] | encryptedValue | The value to decrypt |
Returns
Type | Description |
---|---|
byte[] | The decrypted value |
Remarks
This method is used by the Update Service
SetClock(DateTime)
Sets the platform OS clock
Declaration
void SetClock(DateTime dateTime)
Parameters
Type | Name | Description |
---|---|---|
DateTime | dateTime |
SetConfigurationValue<T>(ConfigurationValues, T)
Send a configuration value to the OS.
Declaration
void SetConfigurationValue<T>(IPlatformOS.ConfigurationValues item, T value) where T : struct
Parameters
Type | Name | Description |
---|---|---|
IPlatformOS.ConfigurationValues | item | Item to set. |
T | value | Value of item. |
Type Parameters
Name | Description |
---|---|
T | Type of the object being set. |