Table of Contents

Class GroundSensorCommandPacket

Namespace
NominalSystems.Classes
Assembly
NominalSystems.Classes.dll

Represents a command packet for tasking a ground sensor.


public class GroundSensorCommandPacket : IComparable<GroundSensorCommandPacket>
Inheritance
GroundSensorCommandPacket
Implements

Constructors

GroundSensorCommandPacket(string)

Attempts to parse a string into a CommandPacket.

public GroundSensorCommandPacket(string data)

Parameters

data string

The string to load from

GroundSensorCommandPacket(string, int, string, double, AccessMessage, double)

Constructor to create a new CommandPacket.

public GroundSensorCommandPacket(string sensorId, int priority, string taskType, double timestamp, AccessMessage inAccessMsg, double duration = 60)

Parameters

sensorId string

The ID of the sensor to target.

priority int

The priority of the command.

taskType string

The type of task to execute.

timestamp double

The timestamp (in UTC) for command execution.

inAccessMsg AccessMessage

The access message that contains properties for the ground sensor

duration double

The duration to spend sensing

GroundSensorCommandPacket(string, int, string, double, Dictionary<string, object>, double)

Constructor to create a new CommandPacket.

public GroundSensorCommandPacket(string sensorId, int priority, string taskType, double timestamp, Dictionary<string, object> taskDetails, double duration = 60)

Parameters

sensorId string

The ID of the sensor to target.

priority int

The priority of the command.

taskType string

The type of task to execute.

timestamp double

The timestamp (in UTC) for command execution.

taskDetails Dictionary<string, object>

Additional details about the task.

duration double

The duration that the sensor should sense for for this task

Fields

In_AccessMsg

Define an access message that can help direct the command.

public AccessMessage? In_AccessMsg

Field Value

AccessMessage

Properties

CommandID

The unique ID of the command.

public Guid CommandID { get; }

Property Value

Guid

Duration

The duration that the sensor should spend sensing

public double Duration { get; }

Property Value

double

Priority

The priority of the command. Higher values indicate higher priority.

public int Priority { get; }

Property Value

int

SensorID

The ID of the sensor to which this command is targeted.

public string SensorID { get; }

Property Value

string

TaskDetails

The details of the task associated with the command.

public Dictionary<string, object> TaskDetails { get; }

Property Value

Dictionary<string, object>

TaskType

The type of task associated with the command.

public string TaskType { get; }

Property Value

string

Timestamp

The timestamp (in UTC) at which the command should be executed.

public double Timestamp { get; }

Property Value

double

Methods

CompareTo(GroundSensorCommandPacket?)

Compares this command to another, prioritizing by timestamp and then by priority.

public int CompareTo(GroundSensorCommandPacket? other)

Parameters

other GroundSensorCommandPacket

The command to compare with.

Returns

int

A value less than 0 if this command has a lower priority. 0 if both have the same priority and timestamp. A value greater than 0 if this command has a higher priority.

ParseString(string)

Converts the command packet to a string for serialization.

public void ParseString(string data)

Parameters

data string

The data that was valid as a string

ToString()

Provides a string representation of the command packet.

public override string ToString()

Returns

string