The reference PC node is short Python application which can be used for measuring CPU load and physical memory usage. The implementation uses the psutil library which provides easy access to PC measurement values (phymem_usage() and cpu_percent()). The PC node measures PC sensors and sends them to via TCP/IP socket to OpenAPI software via WSN OpenAPI interface. The sent messages are printed on the console.
Note: The PC Node application is not click-and-run as other WSN OpenAPI Gateway Kit applications. It is targeted at programmer's as an example OpenAPI application.
- Memory usage
- CPU load
- Python 2.x
- psutil package (http://code.google.com/p/psutil/)
The PC node is run by issuing the following command in shell.
python openapi_pc_node.py SERVER PORT USER PASSWORD INTERVAL NETWORK_ID NODE_ID
SERVER- OpenAPI gateway (DNS name or IP address).
PORT- OpenAPI gateway port.
USER- OpenAPI gateway user name.
PASSWORD- OpenAPI gateway password.
INTERVAL- Update interval in seconds. Determines how often sensor values are transmitted to the gateway.
NETWORK_ID- Network identifier (string).
NODE_ID- Node identifier (string).
NODE_ID are user selectable identifiers that allow distinguishing this PC node from other nodes.