Add stdin mode to rc_balance
Created by: jadonk
I need some way to drive over the network or from some other daemon. Providing input through stdin seems like the easy way.
Invoke with: rc_balance -i stdin
Input is in the form: n_X__V_n_X__V_ n_X__V_n_X__V_
Where X is the channel number and V is the value. Newlines are optional delimiters. V is not error checked currently. The 'n' above is literal... I'm searching for 'n' to begin new data. V is limited to 9 characters, and, come to think of it, I likely need to add a null terminator within my code!
Example: n10.12345n2-0.12345 n10.12345 n20.12345
At timeout should occur setting the drive to 0 if no input is provided for more than 1 second.
This is UNTESTED! I'm just looking for some review in terms of its design.