Arduino yun - modbus ip

Hi guys, I wonder if they could help me with a problem I'm encountering with Arduino yun. I would like to read the analog inputs and trigger some digital outputs on the arduino yun and do this reading and commands from a supervisor (ScadaBR). I believe I will have to use the bridge library to communicate the ATmega32U4 mic controller with the AR9331 microcontroller and the modbus ip library to send the data from the AR9331 microcontroller to the supervisor via ethernet or wifi. Could someone help me with libraries or ideas on how to write this code? Thank you.