node_query_handler module

This Modules handles all the query to the nodes.
it will receive the data from the router_handler and it will send the query to the nodes.
It will also retry sending the message if the node doesn’t answer right or if doesn’t answer at all.
If the nodes confirm the command was received then this module will tell onos to set the web object status
to reflect the new node status after the command was received.

node_query_handler.handle_new_query_to_network_node_thread()[source]
This is a thread function that will run until every request in the queryToNetworkNodeQueue is done.
It will get each query from queryToNetworkNodeQueue and call make_query_to_network_node()
While the query is running the current_node_handler_list will contain the node serialnumber being queried
In this way onos will avoid to make multiple simultaneos query to the same node.
node_query_handler.handle_new_query_to_radio_node_thread(serialCom)[source]
This is a thread function that will run until every request in the queryToRadioNodeQueue is done.
It will get each query from queryToRadioNodeQueue and call make_query_to_radio_node()
While the query is running the current_node_handler_list will contain the node serialnumber being queried
In this way onos will avoid to make multiple simultaneos query to the same node.
node_query_handler.make_query_to_network_node(node_serial_number, query, objName, status_to_set, user, priority, mail_report_list)[source]
This function make a query to a powerline/ethernet node and wait the answer from the node.
If the answer is positive
it will add to the priorityCmdQueue the command to change the web_object status
from pending to succesfully changed .
If the answer from the node is an error or the node is not responding
the query will be repeated x times before giving up.
node_query_handler.make_query_to_radio_node(serialCom, node_serial_number, query, number_of_retry_already_done)[source]
This function make a query to a radio/serial node and wait the answer from the serial gateway.
If the answer is positive
it will add to the priorityCmdQueue the command to change the web_object status
from pending to succesfully changed .
If the answer from the node is an error or the node is not responding
the query will be repeated x times before giving up.