Class ExampleAccelerationSensingAgent
Example acceleration sensing agent. Demonstrates concepts related to control criterion checking as well as sensing control, in particular temporary device keep-awake and increased sampling rates.
Implements
System.ComponentModel.INotifyPropertyChanged
Inherited Members
Namespace: ExampleSensingAgent
Assembly: SensusiOS.dll
Syntax
public class ExampleAccelerationSensingAgent : SensingAgent, INotifyPropertyChanged
Constructors
ExampleAccelerationSensingAgent()
Initializes a new instance of the ExampleAccelerationSensingAgent class. As noted in the adaptive sensing article, this class provides the parameterless constructor required for run time initialization of the agent.
Declaration
public ExampleAccelerationSensingAgent()
Properties
AverageLinearMagnitudeThreshold
Gets or sets the average linear magnitude threshold.
Declaration
public double AverageLinearMagnitudeThreshold { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The average linear magnitude threshold. |
ControlAccelerometerMaxDataStoresPerSecond
Gets or sets the control accelerometer max data stores per second.
Declaration
public Nullable<double> ControlAccelerometerMaxDataStoresPerSecond { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Double> | The control accelerometer max data stores per second. |
IdleAccelerometerMaxDataStoresPerSecond
Gets or sets the idle accelerometer max data stores per second.
Declaration
public Nullable<double> IdleAccelerometerMaxDataStoresPerSecond { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Double> | The idle accelerometer max data stores per second. |
Methods
ObservedDataMeetControlCriterion(Dictionary<Type, List<IDatum>>)
Declaration
protected override bool ObservedDataMeetControlCriterion(Dictionary<Type, List<IDatum>> typeData)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.Dictionary<System.Type, System.Collections.Generic.List<IDatum>> | typeData |
Returns
Type | Description |
---|---|
System.Boolean |
OnStateChangedAsync(SensingAgentState, SensingAgentState, CancellationToken)
Declaration
protected override Task OnStateChangedAsync(SensingAgentState previousState, SensingAgentState currentState, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
SensingAgentState | previousState | |
SensingAgentState | currentState | |
System.Threading.CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
ProtectedSetPolicyAsync(JObject)
Declaration
protected override Task ProtectedSetPolicyAsync(JObject policy)
Parameters
Type | Name | Description |
---|---|---|
Newtonsoft.Json.Linq.JObject | policy |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Implements
System.ComponentModel.INotifyPropertyChanged