예제 #1
0
        public void Test_TAGProcessorStateBase_SetGPSMode()
        {
            var state = new TAGProcessorStateBase();

            Assert.True(state.GPSModes.GetLatest() == CellPassConsts.NullGPSMode, "Initial value incorrect");
            state.SetGPSMode(GPSMode.Fixed);
            Assert.True(state.GPSModes.NumAttrs == 2 && state.GPSModes.GetLatest() == GPSMode.Fixed, "Initial value incorrect");
        }
예제 #2
0
        public override bool ProcessUnsignedIntegerValue(TAGValueMatcherState state, TAGProcessorStateBase valueSink,
                                                         TAGDictionaryItem valueType, uint value)
        {
            bool result = (value >= GPSModeConstants.GPS_MODE_MIN_VALUE && value <= GPSModeConstants.GPS_MODE_MAX_VALUE) || value == (int)GPSMode.NoGPS;

            if (result)
            {
                valueSink.SetGPSMode((GPSMode)value);
            }

            return(result);
        }