public override void ProcessParser(PidsParser parser, PidsMessageBaseContext context)
        {
            //Get real context
            var ctx = context.GetContext(new LocationContext());

            //Apply
            if (isLatitude)
            {
                ctx.latitude = pos;
            }
            else
            {
                ctx.longitude = pos;
            }

            //If complete, update
            if (ctx.longitude.HasValue && ctx.latitude.HasValue)
            {
                parser.StationLocation = new PidsLocationData
                {
                    Altitude  = altitude,
                    Latitude  = ctx.latitude.Value,
                    Longitude = ctx.longitude.Value
                }
            }
            ;
        }
Ejemplo n.º 2
0
 public override void ProcessParser(PidsParser parser, PidsMessageBaseContext context)
 {
     parser.StationCountry  = new string(countryCode);
     parser.StationFacility = facilityId;
 }
 public override void ProcessParser(PidsParser parser, PidsMessageBaseContext context)
 {
     //This is depreciated, so it is not supported
 }