def GetSimulatorState(self):
    'Gets the state of the simulator in real time.\n\n    Returns:\n      shared.ios_constants.SimState, the state of the simulator.\n\n    Raises:\n      ios_errors.SimError: The state can not be recognized.\n    '
    if (self.device_plist_object is None):
        return ios_constants.SimState.CREATING
    state_num = self.device_plist_object.GetPlistField('state')
    if (state_num not in _SIMULATOR_STATES_MAPPING.keys()):
        logging.warning('The state %s of simulator %s can not be recognized.', state_num, self.simulator_id)
        return ios_constants.SimState.UNKNOWN
    return _SIMULATOR_STATES_MAPPING[state_num]
Gets the state of the simulator in real time.

Returns:
  shared.ios_constants.SimState, the state of the simulator.

Raises:
  ios_errors.SimError: The state can not be recognized.
def GetSimulatorState(self):
    'Gets the state of the simulator in real time.\n\n    Returns:\n      shared.ios_constants.SimState, the state of the simulator.\n\n    Raises:\n      ios_errors.SimError: The state can not be recognized.\n    '
    if (self.device_plist_object is None):
        return ios_constants.SimState.CREATING
    state_num = self.device_plist_object.GetPlistField('state')
    if (state_num not in _SIMULATOR_STATES_MAPPING.keys()):
        logging.warning('The state %s of simulator %s can not be recognized.', state_num, self.simulator_id)
        return ios_constants.SimState.UNKNOWN
    return _SIMULATOR_STATES_MAPPING[state_num]