def get_value_from_hash(self, value_hash): if self.BIT_TAG in value_hash: bit_hash = value_hash[self.BIT_TAG] self.index = get_value_from_hash_helper(self.BIT_INDEX_TAG, bit_hash, (-1)) self.delay = get_value_from_hash_helper(self.BIT_DELAY_TAG, bit_hash, 0) self.is_on = get_value_from_hash_helper(self.BIT_VALUE_TAG, bit_hash, False)
def get_value_from_hash(self, value_hash): if self.VARIABLE_TAG in value_hash: variable_hash = value_hash[self.VARIABLE_TAG] self.addr = get_value_from_hash_helper(self.VARIABLE_ADDR_TAG, variable_hash, 0) self.delay = get_value_from_hash_helper(self.VARIABLE_DELAY_TAG, variable_hash, 0) self.value = get_value_from_hash_helper(self.VARIABLE_VALUE_TAG, variable_hash, 0)
def get_value_from_hash(self, value_hash): if self.ACTION_TAG in value_hash: action_hash = value_hash[self.ACTION_TAG] self.name = get_value_from_hash_helper(self.ACTION_NAME_TAG, action_hash, "") self.init_para_sec = get_value_from_hash_helper( self.ACTION_INIT_PARA_SEC_TAG, action_hash, {}) if self.ACTION_CASES_TAG in action_hash: self.cases = [ICActionTestCase(x) for x in action_hash[self.ACTION_CASES_TAG]]
def get_value_from_hash(self, value_hash): if self.DAOUTPUT_TAG in value_hash: da_output_hash = value_hash[self.DAOUTPUT_TAG] self.pressure = get_value_from_hash_helper( self.DAOUTPUT_PRESSURE_TAG, da_output_hash, 0) self.back_pressure = get_value_from_hash_helper( self.DAOUTPUT_BACK_PRESSURE_TAG, da_output_hash, 0) self.flow = get_value_from_hash_helper(self.DAOUTPUT_FLOW_TAG, da_output_hash, 0)
def get_value_from_hash(self, value_hash): if self.CASE_TAG in value_hash: case_hash = value_hash[self.CASE_TAG] self.name = get_value_from_hash_helper(self.CASE_NAME_TAG, case_hash, "") self.para_sec = get_value_from_hash_helper(self.CASE_PARA_SEC_TAG, case_hash, {}) self.command = get_value_from_hash_helper(self.CASE_COMMAND_TAG, case_hash, 0) if self.CASE_RUNTIME_STATUS_TAG in case_hash: self.runtime_status.get_value_from_hash(case_hash) if self.CASE_EXPECTED_TAG in case_hash: self.case_expected.get_value_from_hash(case_hash)