importparamikoimportredefget_linux_dyn_user_params(type_params):
stdout=linxu_ssh('cat /rbctrl/dyn_user_params.xml')
dyn_user_params_xml=stdout.read().decode("utf-8")
dyn_user_params_one= {}
dyn_user_params_two= {}
str_list= ["<safety_power>(.+?)</safety_power>","<safety_momentum>(.+?)</safety_momentum>","<safety_tool_force>(.+?)</safety_tool_force>",
"<safety_elbow_force>(.+?)</safety_elbow_force>","<speed_percentage>(.+?)</speed_percentage>"]
key_list= ["power","momentum","tool_force","elbow_force","speed"]
foriinrange(len(str_list)):
findall_info=re.findall(str_list[i],dyn_user_params_xml)[0]
findall_list=findall_info.split(",")
dyn_user_params_one[key_list[i]] =abs(int(float(findall_list[0])))
dyn_user_params_two[key_list[i]] =abs(int(float(findall_list[1])))
iftype_params=="one":
returndyn_user_params_oneeliftype_params=="two":
returndyn_user_params_two