Complete the code to define the primary function of an RTU in a SCADA system.
def rtu_role(): return "[1]"
The RTU's main role is to collect data from field devices like sensors and send it to the control center.
Complete the code to show how an RTU communicates data to the SCADA master station.
def send_data_to_master(data): protocol = "[1]" # send data using protocol return f"Data sent via {protocol}"
RTUs commonly use Modbus protocol to communicate with SCADA master stations.
Fix the error in the RTU data processing function by completing the blank.
def process_rtu_data(raw_data): # Convert raw data to usable format processed = [1](raw_data) return processed
The function should parse raw data to convert it into a usable format before returning it.
Fill both blanks to create a dictionary comprehension that maps sensor IDs to their latest readings from RTU data.
latest_readings = {sensor_id: data[1] for sensor_id, data in rtu_data.items() if data[2] 0}The first blank selects the last reading from data list, and the second blank filters readings greater than zero.
Fill all three blanks to create a dictionary comprehension that maps sensor names (uppercase) to their values if the value is above threshold.
filtered_data = [1]: [2] for [3], [2] in sensor_data.items() if [2] > threshold}
The comprehension uses sensor.upper() as key, value as value, and sensor as loop variable.