def get_function_elements(charging_functions_element): """ Get the function element from the given element_dict """ function_elements = xml_utils.get_child_elements( charging_functions_element) return function_elements
def get_breakpoints_dict(function_element): """ Get all of the breakpoint element information from the given function element """ breakpoint_elements = xml_utils.get_child_elements(function_element) breakpoints_dict = [ get_breakpoint_dict(breakpoint_element) for breakpoint_element in breakpoint_elements ] return breakpoints_dict
def get_nodes_dict(nodes_element): """ Get a dict of all the nodes with their nodes as keys """ node_elements = xml_utils.get_child_elements(nodes_element) node_dicts = [ get_node_dict(node_element) for node_element in node_elements ] nodes_dict = {node_dict["id"]: node_dict for node_dict in node_dicts} return nodes_dict
def get_requests_dict(requests_element): """ Get a dict of all the requests with their nodes as keys0 """ request_elements = xml_utils.get_child_elements(requests_element) request_dicts = [ get_request_dict(request_element) for request_element in request_elements ] requests_dict = { request_dict["node"]: request_dict for request_dict in request_dicts } return requests_dict
def get_charging_functions_dict(charging_functions_element): """ Get the information relating to the charging functions element """ function_elements = xml_utils.get_child_elements( charging_functions_element) function_dicts = [ get_function_dict(function_element) for function_element in function_elements ] charging_functions_dict = { function_dict["cs_type"]: function_dict for function_dict in function_dicts } return charging_functions_dict
def get_breakpoint_elements(function_element): """ Get the breakpoint elements from the given function element """ breakpoint_elements = xml_utils.get_child_elements(function_element) return breakpoint_elements
def get_vehicle_profile_elements(fleet_element): """ Get the vehicle profile elements from the given fleet element """ vehicle_profile_elements = xml_utils.get_child_elements(fleet_element) return vehicle_profile_elements
def get_request_elements(requests_element_dict): """ Get the request elements from the given element dict """ request_elements = xml_utils.get_child_elements(requests_element_dict) return request_elements