Preserves FSM but resets starting state and current record.
480188
def Reset(self):
    """"""

    # Current state is Start state.
    self._cur_state = self.states['Start']
    self._cur_state_name = 'Start'

    # Clear table of results and current record.
    self._result = []
    self._ClearAllRecord()
880481
private static function _reset()
    {
        if (self::PROCMODE_FILE === self::$_mode && self::$_closeHandle && 'resource' === gettype(self::$_fh))
            fclose(self::$_fh);

        self::$_input = null;
        self::$_mode = null;
        self::$_closeHandle = true;
        self::$_fh = null;

        self::$_headers = array();
        self::$_lineNum = 0;
        self::$_rns = 0;
        self::$_headerNum = 0;
        self::$_possibleHeader = array();
        self::$_innerHeaderLineCount = 0;
        self::$_bodyStartByteOffset = 0;
    }
74748
def preserve_batch_state():
    
    with LOCK:
        old = ROOT.gROOT.IsBatch()
        try:
            yield
        finally:
            ROOT.gROOT.SetBatch(old)
478161
protected function reset()
    {
        $this->startedIterating = false;
        $this->cursorNeedsAdvancing = true;
        $this->cursor = null;
        $this->iterator = null;
        $this->storeIteratorState();
    }
521456
def restore_state(self):
        
        current_mask = get_IO_reg(ControlCluster.bus,
                                 self.IOexpander, 
                                 self.bank)
        if current_mask & (1 << ControlCluster.pump_pin):
            self.manage_pump("on")
        if current_mask & (1 << self.fan):
            self.manage_fan("on")
        if current_mask & (1 << self.light):
            self.manage_fan("on")
195271
def run_to_selected_state(self, path, state_machine_id=None):
        
        if self.state_machine_manager.get_active_state_machine() is not None:
            self.state_machine_manager.get_active_state_machine().root_state.recursively_resume_states()

        if not self.finished_or_stopped():
            logger.debug("Resume execution engine and run to selected state!")
            self.run_to_states = []
            self.run_to_states.append(path)
            self.set_execution_mode(StateMachineExecutionStatus.RUN_TO_SELECTED_STATE)
        else:
            logger.debug("Start execution engine and run to selected state!")
            if state_machine_id is not None:
                self.state_machine_manager.active_state_machine_id = state_machine_id
            self.set_execution_mode(StateMachineExecutionStatus.RUN_TO_SELECTED_STATE)
            self.run_to_states = []
            self.run_to_states.append(path)
            self._run_active_state_machine()
888847
def store_mo(self, state, new_mo, overwrite=True): #pylint:disable=unused-argument
        
        start, end = self._resolve_range(new_mo)
        if overwrite:
            self.store_overwrite(state, new_mo, start, end)
        else:
            self.store_underwrite(state, new_mo, start, end)
909838
def reset_dirty_flags(self):
        """"""
        for sm_id, sm in self.state_machines.items():
            sm.marked_dirty = False
691234
def set_initial_state(self, initial_state, initial_frames):
    """"""
    self._initial_state = initial_state
    self._initial_frames = initial_frames[:, -1, ...]
    self._should_preprocess_on_reset = False
736056
def reset(self, mode=InputMode.INSERT):
        
        # Go back to insert mode.
        self.input_mode = mode

        self.waiting_for_digraph = False
        self.operator_func = None
        self.operator_arg = None
166105
def restart(state, host, ctid, force=False):
    '''
    
    '''

    yield stop(state, host, ctid)
    yield start(state, host, ctid, force=force)
17246
def removeRecordState( self, state ):
        
        curr_state = self.recordState()
        if curr_state & state:
            self.setRecordState(curr_state ^ state)
801598
void resetState(Log log) {
    nextSnapshotIndex = 0;
    nextSnapshotOffset = 0;
    matchIndex = 0;
    nextIndex = log.lastIndex() + 1;
    heartbeatTime = 0;
    heartbeatStartTime = 0;
    appending = 0;
    timeBuffer.reset();
    configuring = false;
    installing = false;
    appendSucceeded = false;
    failures = 0;
  }
1275452
def Reset(self):
        '  '
        spi.SPI_write(self.CS, [0xC0, 0x60])      # reset
#        spi.SPI_write(self.CS, [0x14, 0x14])      # Stall Treshold setup
#        spi.SPI_write(self.CS, [0xFF, 0xFF])  
#        spi.SPI_write(self.CS, [0x13, 0x13])      # Over Current Treshold setup 
#        spi.SPI_write(self.CS, [0xFF, 0xFF])  
        spi.SPI_write(self.CS, [0x15, 0xFF])      # Full Step speed 
        spi.SPI_write(self.CS, [0xFF, 0xFF])
        spi.SPI_write(self.CS, [0xFF, 0xFF]) 
        spi.SPI_write(self.CS, [0x05, 0x05])      # ACC 
        spi.SPI_write(self.CS, [0x01, 0x01])
        spi.SPI_write(self.CS, [0xF5, 0xF5]) 
        spi.SPI_write(self.CS, [0x06, 0x06])      # DEC 
        spi.SPI_write(self.CS, [0x01, 0x01])
        spi.SPI_write(self.CS, [0xF5, 0xF5]) 
        spi.SPI_write(self.CS, [0x0A, 0x0A])      # KVAL_RUN
        spi.SPI_write(self.CS, [0x10, 0x10])
        spi.SPI_write(self.CS, [0x0B, 0x0B])      # KVAL_ACC
        spi.SPI_write(self.CS, [0x20, 0x20])
        spi.SPI_write(self.CS, [0x0C, 0x0C])      # KVAL_DEC
        spi.SPI_write(self.CS, [0x20, 0x20])
        spi.SPI_write(self.CS, [0x18, 0x18])      # CONFIG
        spi.SPI_write(self.CS, [0b00111000, 0b00111000])
        spi.SPI_write(self.CS, [0b00000000, 0b00000000])
705865
def copy_reset(self):
        """"""
        # Reset settings
        self._filters = []
        self._filter_or = False
        self._paginate = True
        self._paginate_count = 0
        self._result_count = None
        self._result_limit = 500
        self._result_start = 0
1240391
private void reset() {
    md5.getMD().reset();
    if(flacWriter != null)
      flacWriter = new FLACStreamController(flacWriter.getFLACOutputStream(),streamConfig);
  }
30924
def reset_state(self):
        
        self.active_message = None
        self.measurement = None
        if self.is_waiting_to_shutdown:
            self.shutdown_connections()
        elif self.is_processing:
            self.set_state(self.STATE_IDLE)
        elif self.is_idle or self.is_connecting or self.is_shutting_down:
            pass
        else:
            LOGGER.critical('Unexepected state: %s', self.state_description)
        LOGGER.debug('State reset to %s (%s in pending)',
                     self.state_description, len(self.pending))