public void StramatelMessagePartParser_ParseStramatelPossessionTest()
 {
     Assert.Null(StramatelMessagePartParser.ParseStramatelPossession(0x5));
     Assert.Equal(PossessionState.None, StramatelMessagePartParser.ParseStramatelPossession(0x20));
     Assert.Equal(PossessionState.Home, StramatelMessagePartParser.ParseStramatelPossession(0x31));
     Assert.Equal(PossessionState.Guest, StramatelMessagePartParser.ParseStramatelPossession(0x32));
 }
Example #2
0
 public static IStramatelMessage Parse(byte[] messageData)
 {
     // The parsing algorithm intends to extract as many information as possible and set non-parseable data to null.
     StramatelMessage0x33 message = new()
     {
         Possession         = StramatelMessagePartParser.ParseStramatelPossession(messageData[3]),
         GameClock          = StramatelMessagePartParser.ParseStramatelGameClock(messageData[4..8]),
         PointsHome         = StramatelMessagePartParser.ParseStramatelNumber(messageData[8..11]),
Example #3
0
 public static IStramatelMessage Parse(byte[] messageData)
 {
     StramatelMessage0x37 message = new()
     {
         Possession          = StramatelMessagePartParser.ParseStramatelPossession(messageData[3]),
         GameClock           = StramatelMessagePartParser.ParseStramatelGameClock(messageData[4..8]),
         Horn                = StramatelMessagePartParser.ParseStramatelBoolean(messageData[19]),
         GameClockRunning    = StramatelMessagePartParser.ParseStramatelBoolean(messageData[20]),
         PointsGuestPlayer1  = StramatelMessagePartParser.ParseStramatelNumber(messageData[22..24]),