MetaWear C# SDK  1.2.0
C# API for MbientLab's sensor platform
Public Member Functions | Properties | List of all members
MbientLab.MetaWear.Core.ISettings Interface Reference

Configures Bluetooth settings and auxiliary hardware and firmware features More...

Inheritance diagram for MbientLab.MetaWear.Core.ISettings:
MbientLab.MetaWear.IModule

Public Member Functions

Task< BleAdvertisementConfigReadBleAdConfigAsync ()
 Read the current ble advertising configuration More...
 
Task< BleConnectionParametersReadBleConnParamsAsync ()
 Read the current ble connection parameters More...
 
Task< sbyte > ReadTxPowerAsync ()
 Reads the radio's current transmitting power More...
 
void SetTxPower (sbyte power)
 Sets the radio's transmitting power More...
 
void EditBleConnParams (float minConnInterval=7.5f, float maxConnInterval=125f, ushort slaveLatency=0, ushort supervisorTimeout=6000)
 Edit the ble connection parameters More...
 
void EditBleAdConfig (string name=null, byte? timeout=null, ushort? interval=null, byte[] scanResponse=null)
 Edit the ble advertising configuration More...
 
void StartBleAdvertising ()
 Starts ble advertising More...
 
Task< IObserverOnDisconnectAsync (Action commands)
 Programs a task to the board that will be executed when a disconnect occurs More...
 

Properties

IForcedDataProducer Battery [get]
 Data producer representing the battery state More...
 
IActiveDataProducer< byte > PowerStatus [get]
 Data producer representing the power status. More...
 
IActiveDataProducer< byte > ChargeStatus [get]
 

Detailed Description

Configures Bluetooth settings and auxiliary hardware and firmware features

Member Function Documentation

◆ EditBleAdConfig()

void MbientLab.MetaWear.Core.ISettings.EditBleAdConfig ( string  name = null,
byte?  timeout = null,
ushort?  interval = null,
byte []  scanResponse = null 
)

Edit the ble advertising configuration

Parameters
nameAdvertising name, max of 8 ASCII characters
timeoutTime between advertise events, in milliseconds (ms)
intervalHow long to advertise for, between [0, 180] seconds where 0 indicates no timeout
scanResponseCustom scan response packet

◆ EditBleConnParams()

void MbientLab.MetaWear.Core.ISettings.EditBleConnParams ( float  minConnInterval = 7.5f,
float  maxConnInterval = 125f,
ushort  slaveLatency = 0,
ushort  supervisorTimeout = 6000 
)

Edit the ble connection parameters

Parameters
minConnIntervalLower bound of the connection interval, min 7.5ms
maxConnIntervalUpper bound of the connection interval, max 4000ms
slaveLatencyNumber of connection intervals to skip, between [0, 1000]
supervisorTimeoutMaximum amount of time between data exchanges until the connection is considered to be lost, between [10, 32000] ms

◆ OnDisconnectAsync()

Task<IObserver> MbientLab.MetaWear.Core.ISettings.OnDisconnectAsync ( Action  commands)

Programs a task to the board that will be executed when a disconnect occurs

Parameters
commandsMetaWear commands composing the task
Returns
Observer object representing the task

◆ ReadBleAdConfigAsync()

Task<BleAdvertisementConfig> MbientLab.MetaWear.Core.ISettings.ReadBleAdConfigAsync ( )

Read the current ble advertising configuration

Returns
Object representing the ad config

◆ ReadBleConnParamsAsync()

Task<BleConnectionParameters> MbientLab.MetaWear.Core.ISettings.ReadBleConnParamsAsync ( )

Read the current ble connection parameters

Returns
Object representing the ble connection parameters
Exceptions
NotSupportedExceptionIf the firmware revision does not support ble connection parameters

◆ ReadTxPowerAsync()

Task<sbyte> MbientLab.MetaWear.Core.ISettings.ReadTxPowerAsync ( )

Reads the radio's current transmitting power

Returns
Tx power

◆ SetTxPower()

void MbientLab.MetaWear.Core.ISettings.SetTxPower ( sbyte  power)

Sets the radio's transmitting power

Parameters
powerOne of: 4, 0, -4, -8, -12, -16, -20, or -30

◆ StartBleAdvertising()

void MbientLab.MetaWear.Core.ISettings.StartBleAdvertising ( )

Starts ble advertising

Property Documentation

◆ Battery

IForcedDataProducer MbientLab.MetaWear.Core.ISettings.Battery
get

Data producer representing the battery state

This property returns null if the current board or firmware does not report battery information

◆ ChargeStatus

IActiveDataProducer<byte> MbientLab.MetaWear.Core.ISettings.ChargeStatus
get

This property returns null if the current board or firmware does not support charge status notifications

◆ PowerStatus

IActiveDataProducer<byte> MbientLab.MetaWear.Core.ISettings.PowerStatus
get

Data producer representing the power status.

This property returns null if the current board or firmware does not support power status notifications


The documentation for this interface was generated from the following file: