コード例 #1
0
        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
                }
            }
            ;
        }
コード例 #2
0
 public override void ProcessParser(PidsParser parser, PidsMessageBaseContext context)
 {
     parser.StationCountry  = new string(countryCode);
     parser.StationFacility = facilityId;
 }
コード例 #3
0
 public override void ProcessParser(PidsParser parser, PidsMessageBaseContext context)
 {
     //This is depreciated, so it is not supported
 }