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
GroundSensorCommandPacketThe first GroundSensorCommandPacket to compare.
y
GroundSensorCommandPacketThe second GroundSensorCommandPacket to compare.
Returns
- int
A negative value if
x
precedesy
, a positive value ify
precedesx
, or zero if they are equivalent in terms of timestamp and priority.