Usage Instructions
How to Run:
rosrun qbo_system_info plugin_system.py
How to Configure:
In the node directory there is a subdirectory called config with a file named main.conf In that file you can configure possible answer to service calls. The sintaxis for this file is:
[Descriptive Name]
input=ServiceString
command=CommandToExecute
■ Descriptive Name: This is a name for human use only. It is useful to look for plugins
■ ServiceString: This is the string that the node service is waiting for to return a value
■ CommandToExecute: The service will return the result of executing this command
Here are a example of the configure/main.conf file:
[hostname]
input=name
command=cat /etc/hostname
[weekday]
input=weekday
command=date +%A
[CPU Temperature]
input=cputemp
command=sensors | grep "CPU Temperature" | awk -F" " '{print $3}'
[Network IPs]
input=netconf
command=for interface in `ifconfig -s | grep -v -e Iface -e lo -e avahi | awk '{print $1}'`; do ip=`ifconfig $interface | grep "inet addr"| awk '{print $2}' | awk -F':' '{print $2}'`; echo $interface $ip; done
[Human date]
input=hdate
command=date +%A", the "%d" of "%B" of "%Y
[Hour]
input=hour
command=date +%l\ %M\ %p