BayEOS-PHP
|
Bugs and Feedback: holzh eu@b aycee r.un i-bay reut h.de
Source Code is available on https://github.com/BayCEER/BayEOS-PHP
Binary Packages for Debian Wheezy could be installed by adding
deb http://www.bayceer.uni-bayreuth.de/repos/apt/debian wheezy main
to /etc/apt/sources.list and installing the key via
wget -O - http://www.bayceer.uni-bayreuth.de/repos/apt/conf/bayceer_repo.gpg.key |apt-key add -
This classes allowes the user to build up own BayEOS-Device implementations in PHP
BayEOSWriter reads data either directly (sensor) or via different ways of communication (XBee, QLI, ...) and stores data in files in a queue directory
Example: BayEOSWriter.php
Storage structure:
BayEOSWriter only has one active file. Ending is ".act" Finished files have the ending ".rd" Per default exported files will get deleted. If "rm" is set to FALSE, files are kept as ".bak" files in the queue directory
File formate is binary. For each frame there is [timestamp double][length short][frame]
BayEOSSender looks for finished data files in queue-directory and trys to send the data to the configured BayEOS-Gateway
Example: BayEOSSender.php
BayEOSSimpleClient combines Write and Sender. The constructor automatically forks of one sender. Using BayEOSSimpleClient is probably the simpliest way to write own scripts.
Example: MySimpleClient.php
BayEOSGatewayClient is a wrapper class. Only works on systems with fork! It forks two processes for each device: one writer, one sender
To make use of the class one has do derive a class and overwrite the BayEOSGatewayClient::readData()
To set up a routing devices (e.g. XBee) one has to additionaly overwrite the BayEOSGatewayClient::saveData($data)
To init a writer process, one can overwrite BayEOSGatewayClient::initWriter()
Example: MyClient.php
BayEOSType is a helper Class to do binary transformations...