Skip to content

hwstar/xplevent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

xplevent is a program which responds to xPL trigger messages, and executes
a tiny perl-like language to send xPL commands. It contains a built in scheduler
to send xPL commands on a certain time/date or an event like sunrise, sunset,
dusk, dawn, or startup. The scheduler uses cron-like expressions to trigger
scripts to be executed. 

The tiny scripting language supports tests, assignment and if-else conditionals, and
stores data in hashes. Some predefined hashes e.g. %xplnvin, %xplin, are passed in 
to trigaction scripts so that the data can be tested and reformatted into an 
appropriate series of xPL commands which are sent using the xplcmd() function. 

The database keeps track of the most recent heartbeat and trigger messages
received. The database also contains a trigger table which matches trigger
messages to an appropriate script to execute. The scripts are stored
in the database to keep them in one central location. 

This is a program in development. It is nowhere near complete.

It can be run as a daemon, or in the foreground. There are command line options
to select the, log file, debug level, and broadcast interface. For a complete
list of command line options, type ./xplevent --help once the program is built.

Dependencies:

1. Lemon parser
2. Flex
3. libtalloc_devel
4. sqlite3_devel

To compile xplevent use the provided Makefile.

Only Linux 2.6.30 or later is supported by the the code.