Table of Contents

Class GroundSensorCommandComparer

Namespace
NominalSystems.Classes
Assembly
NominalSystems.Classes.dll

Custom comparer for GroundSensorCommandPacket that orders commands first by their timestamp (including sub-second precision), and if the timestamps are equal, by their priority flags.


public class GroundSensorCommandComparer : IComparer<GroundSensorCommandPacket>
Inheritance
GroundSensorCommandComparer
Implements

Constructors

GroundSensorCommandComparer()

public GroundSensorCommandComparer()

Methods

Compare(GroundSensorCommandPacket, GroundSensorCommandPacket)

Compares two GroundSensorCommandPacket objects, first by their timestamp and if the timestamps are equal, by their priority.

public int Compare(GroundSensorCommandPacket x, GroundSensorCommandPacket y)

Parameters

x GroundSensorCommandPacket

The first GroundSensorCommandPacket to compare.

y GroundSensorCommandPacket

The second GroundSensorCommandPacket to compare.

Returns

int

A negative value if x precedes y, a positive value if y precedes x, or zero if they are equivalent in terms of timestamp and priority.