├── .gitignore ├── .tdldb ├── Changes ├── MANIFEST ├── META.yml ├── Makefile.PL ├── README ├── bin ├── xpl-apcups ├── xpl-bench ├── xpl-bluetooth ├── xpl-bridge ├── xpl-clock ├── xpl-config ├── xpl-ctx35 ├── xpl-currentcost ├── xpl-datetime ├── xpl-dawndusk ├── xpl-dg834 ├── xpl-dmx ├── xpl-easydaq ├── xpl-fdnotify ├── xpl-heyu ├── xpl-heyu-helper ├── xpl-hub ├── xpl-jabber ├── xpl-lcdproc ├── xpl-linux ├── xpl-linux-cpu ├── xpl-lirc ├── xpl-logger ├── xpl-monitor ├── xpl-mpd ├── xpl-mythtv ├── xpl-ownet ├── xpl-packet-trace ├── xpl-perl-setup ├── xpl-rfxcom ├── xpl-rfxcom-rx ├── xpl-rfxcom-tx ├── xpl-rrd ├── xpl-rrd-graphs ├── xpl-send.c ├── xpl-send.sh ├── xpl-sender ├── xpl-smart ├── xpl-sms-send ├── xpl-tcp-helper ├── xpl-tcp-inject ├── xpl-tcphelp ├── xpl-tty-tcp ├── xpl-udin ├── xpl-viom ├── xpl-w800 ├── xpl-wol ├── xpl-xosd └── xpl-xvkbd ├── debian ├── changelog ├── compat ├── control ├── copyright ├── rules ├── sv │ ├── env │ │ ├── DATALIMIT │ │ └── FILELIMIT │ ├── log │ │ └── run │ ├── run │ └── run-xpl-hub ├── xpl-apcups-perl.README.Debian ├── xpl-apcups-perl.postinst ├── xpl-apcups-perl.postrm ├── xpl-apcups-perl.prerm ├── xpl-bluetooth-perl.README.Debian ├── xpl-bluetooth-perl.postinst ├── xpl-bluetooth-perl.postrm ├── xpl-bluetooth-perl.prerm ├── xpl-common-perl.README.Debian ├── xpl-common-perl.postrm ├── xpl-common-perl.preinst ├── xpl-ctx35-perl.README.Debian ├── xpl-ctx35-perl.postinst ├── xpl-ctx35-perl.postrm ├── xpl-ctx35-perl.prerm ├── xpl-currentcost-perl.README.Debian ├── xpl-currentcost-perl.postinst ├── xpl-currentcost-perl.postrm ├── xpl-currentcost-perl.prerm ├── xpl-datetime-perl.README.Debian ├── xpl-datetime-perl.postinst ├── xpl-datetime-perl.postrm ├── xpl-datetime-perl.prerm ├── xpl-dawndusk-perl.README.Debian ├── xpl-dawndusk-perl.postinst ├── xpl-dawndusk-perl.postrm ├── xpl-dawndusk-perl.prerm ├── xpl-dmx-perl.README.Debian ├── xpl-dmx-perl.postinst ├── xpl-dmx-perl.postrm ├── xpl-dmx-perl.prerm ├── xpl-easydaq-perl.README.Debian ├── xpl-easydaq-perl.postinst ├── xpl-easydaq-perl.postrm ├── xpl-easydaq-perl.prerm ├── xpl-hddtemp-perl.README.Debian ├── xpl-hddtemp-perl.postinst ├── xpl-hddtemp-perl.postrm ├── xpl-hddtemp-perl.prerm ├── xpl-heyu-perl.README.Debian ├── xpl-heyu-perl.postinst ├── xpl-heyu-perl.postrm ├── xpl-heyu-perl.prerm ├── xpl-hub-perl.README.Debian ├── xpl-hub-perl.postinst ├── xpl-hub-perl.postrm ├── xpl-hub-perl.prerm ├── xpl-jabber-perl.README.Debian ├── xpl-jabber-perl.postinst ├── xpl-jabber-perl.postrm ├── xpl-jabber-perl.prerm ├── xpl-lcdproc-perl.README.Debian ├── xpl-lcdproc-perl.postinst ├── xpl-lcdproc-perl.postrm ├── xpl-lcdproc-perl.prerm ├── xpl-lirc-perl.README.Debian ├── xpl-lirc-perl.postinst ├── xpl-lirc-perl.postrm ├── xpl-lirc-perl.prerm ├── xpl-mpd-perl.README.Debian ├── xpl-mpd-perl.postinst ├── xpl-mpd-perl.postrm ├── xpl-mpd-perl.prerm ├── xpl-mythtv-perl.README.Debian ├── xpl-mythtv-perl.postinst ├── xpl-mythtv-perl.postrm ├── xpl-mythtv-perl.prerm ├── xpl-owfs-perl.README.Debian ├── xpl-owfs-perl.postinst ├── xpl-owfs-perl.postrm ├── xpl-owfs-perl.prerm ├── xpl-rfxcom-perl.README.Debian ├── xpl-rfxcom-perl.postinst ├── xpl-rfxcom-perl.postrm ├── xpl-rfxcom-perl.prerm ├── xpl-rfxcom-rx-perl.README.Debian ├── xpl-rfxcom-rx-perl.postinst ├── xpl-rfxcom-rx-perl.postrm ├── xpl-rfxcom-rx-perl.prerm ├── xpl-rfxcom-tx-perl.README.Debian ├── xpl-rfxcom-tx-perl.postinst ├── xpl-rfxcom-tx-perl.postrm ├── xpl-rfxcom-tx-perl.prerm ├── xpl-sms-send-perl.README.Debian ├── xpl-sms-send-perl.postinst ├── xpl-sms-send-perl.postrm ├── xpl-sms-send-perl.prerm ├── xpl-udin-perl.README.Debian ├── xpl-udin-perl.postinst ├── xpl-udin-perl.postrm ├── xpl-udin-perl.prerm ├── xpl-viom-perl.README.Debian ├── xpl-viom-perl.postinst ├── xpl-viom-perl.postrm ├── xpl-viom-perl.prerm ├── xpl-w800-perl.README.Debian ├── xpl-w800-perl.postinst ├── xpl-w800-perl.postrm ├── xpl-w800-perl.prerm ├── xpl-xosd-perl.README.Debian ├── xpl-xosd-perl.postinst ├── xpl-xosd-perl.postrm ├── xpl-xosd-perl.prerm ├── xpl-xvkbd-perl.README.Debian ├── xpl-xvkbd-perl.postinst ├── xpl-xvkbd-perl.postrm └── xpl-xvkbd-perl.prerm ├── doc ├── Makefile ├── footer.tex └── header.tex ├── lib └── xPL │ ├── Base.pm │ ├── Bridge.pm │ ├── Client.pm │ ├── Config.pm │ ├── ConfigUnion.pm │ ├── Dock.pm │ ├── Dock │ ├── APCUPS.pm │ ├── Anomaly.pm │ ├── Bluetooth.pm │ ├── CurrentCost.pm │ ├── DMX.pm │ ├── DateTime.pm │ ├── DawnDusk.pm │ ├── EasyDAQ.pm │ ├── FDNotify.pm │ ├── Heyu.pm │ ├── Jabber.pm │ ├── LCDproc.pm │ ├── LIRC.pm │ ├── Linux.pm │ ├── MPD.pm │ ├── Mythtv.pm │ ├── OWNet.pm │ ├── Plug.pm │ ├── RFXComRX.pm │ ├── RFXComTX.pm │ ├── SMART.pm │ ├── TCPHelp.pm │ ├── UDIN.pm │ ├── VIOM.pm │ ├── W800.pm │ ├── WOL.pm │ ├── XOSD.pm │ └── Xvkbd.pm │ ├── Gtk2Client.pm │ ├── Hub.pm │ ├── IOHandler.pm │ ├── IORecord │ ├── CRLFLine.pm │ ├── CRLine.pm │ ├── Hex.pm │ ├── LFLine.pm │ ├── Line.pm │ ├── Simple.pm │ ├── VariableLength.pm │ ├── XML.pm │ └── ZeroSplitLine.pm │ ├── Listener.pm │ ├── Message.pm │ ├── Queue.pm │ ├── Timer.pm │ ├── Timer │ ├── cron.pm │ ├── recurrence.pm │ ├── simple.pm │ ├── sunrise.pm │ └── sunset.pm │ ├── Utils.pm │ ├── ValidatedMessage.pm │ ├── Validation.pm │ ├── Validation │ ├── Any.pm │ ├── IP.pm │ ├── Integer.pm │ ├── IntegerRange.pm │ ├── Pattern.pm │ ├── PositiveInteger.pm │ └── Set.pm │ ├── config │ └── bnz-jabber.yaml │ └── schema │ ├── ac.basic.yaml │ ├── audio.basic.yaml │ ├── audio.request.yaml │ ├── cid.basic.yaml │ ├── clock.update.yaml │ ├── config.app.yaml │ ├── config.basic.yaml │ ├── config.current.yaml │ ├── config.end.yaml │ ├── config.list.yaml │ ├── config.response.yaml │ ├── control.basic.yaml │ ├── datetime.basic.yaml │ ├── datetime.request.yaml │ ├── dawndusk.basic.yaml │ ├── dawndusk.request.yaml │ ├── dmx.basic.yaml │ ├── dmx.confirm.yaml │ ├── hbeat.app.yaml │ ├── hbeat.basic.yaml │ ├── hbeat.end.yaml │ ├── hbeat.request.yaml │ ├── homeeasy.basic.yaml │ ├── im.basic.yaml │ ├── im.confirm.yaml │ ├── osd.basic.yaml │ ├── ping.request.yaml │ ├── ping.response.yaml │ ├── ping.status.yaml │ ├── remote.basic.yaml │ ├── remote.confirm.yaml │ ├── security.zone.yaml │ ├── sendmsg.basic.yaml │ ├── sendmsg.confirm.yaml │ ├── sensor.basic.yaml │ ├── sensor.network.yaml │ ├── tts.basic.yaml │ ├── ups.basic.yaml │ ├── wol.basic.yaml │ ├── wol.confirm.yaml │ ├── x10.basic.yaml │ ├── x10.confirm.yaml │ └── x10.security.yaml ├── misc ├── README ├── energy-usage-graph.cgi ├── notes.txt ├── process_variable_length └── xpl-rrd-graph.cgi ├── t ├── 00-helpers.t ├── 01-pod.t ├── 01-use.t ├── 01-xpl-base.t ├── 01-xpl-interfaces.t ├── 01-xpl-message.t ├── 01-xpl-slowmessage.t ├── 01-xpl-utils.t ├── 01-xpl-validation.t ├── 02-message-v.t ├── 02-message.t ├── 02-schema-yaml.t ├── 02-timer.t ├── 03-message-errors-v.t ├── 03-message-errors.t ├── 03-message-from-payload.t ├── 03-message-method-maker.t ├── 04-clock.t ├── 04-collection-api.t ├── 04-config.t ├── 04-hbeat-errors.t ├── 04-osd-errors.t ├── 04-queue.t ├── 05-listener-anyevent.t ├── 05-listener-send-methods.t ├── 05-listener.t ├── 06-hub.t ├── 07-client-config.t ├── 07-client-gtk.t ├── 07-client-hubless.t ├── 07-client-ping.t ├── 07-client-stealth.t ├── 07-client.t ├── 08-bridge-client.t ├── 08-bridge.t ├── 09-hub-ignore-remote-hbeat.t ├── 09-targetting.t ├── 10-mainloop.t ├── 12-dock.t ├── 13-dock-plug.t ├── 13-iohandler.t ├── 13-iorecords.t ├── 14-dock-apcups.t ├── 14-dock-bluetooth.t ├── 14-dock-currentcost.t ├── 14-dock-datetime.t ├── 14-dock-dawndusk.t ├── 14-dock-dmx.t ├── 14-dock-easydaq.t ├── 14-dock-fdnotify.t ├── 14-dock-heyu.t ├── 14-dock-lcdproc.t ├── 14-dock-linux.t ├── 14-dock-lirc.t ├── 14-dock-mythtv.t ├── 14-dock-ownet.t ├── 14-dock-rfxcom-rx.t ├── 14-dock-rfxcom-tx.t ├── 14-dock-smart.t ├── 14-dock-udin.t ├── 14-dock-viom.t ├── 14-dock-w800.t ├── 14-dock-wol.t ├── 14-dock-xosd.t ├── 14-dock-xvkbd.t ├── Dock.pm ├── Helpers.pm ├── author-critic.t ├── bin │ ├── heyu │ ├── sudo │ └── xvkbd ├── config │ └── xPL │ │ └── config │ │ ├── acme-config.yaml │ │ ├── invalid.yaml │ │ ├── test.yaml │ │ ├── test2.yaml │ │ ├── test3.yaml │ │ ├── test4.yaml │ │ ├── test5.yaml │ │ └── test6.yaml ├── interfaces │ ├── ifconfig.empty │ │ └── ifconfig │ ├── ifconfig.freebsd │ │ └── ifconfig │ ├── ifconfig.linux │ │ └── ifconfig │ ├── ifconfig.loopback.only │ │ └── ifconfig │ ├── ifconfig.macosx │ │ └── ifconfig │ └── ip.addr.show.linux │ │ └── ip ├── lib │ ├── Net │ │ └── DBus.pm │ ├── X │ │ └── Osd.pm │ └── xPL │ │ └── Dock │ │ ├── Test.pm │ │ └── Wrap.pm ├── linux │ ├── 1 │ │ └── sys │ │ │ └── class │ │ │ └── power_supply │ │ │ ├── AC │ │ │ └── online │ │ │ ├── BAT0 │ │ │ ├── energy_full │ │ │ └── energy_now │ │ │ ├── BAT1 │ │ │ └── charge_full │ │ │ ├── BAT2 │ │ │ ├── charge_full │ │ │ └── charge_now │ │ │ └── BAT3 │ │ │ └── charge_full │ ├── 2 │ │ └── sys │ │ │ └── class │ │ │ └── power_supply │ │ │ ├── AC │ │ │ └── online │ │ │ └── BAT0 │ │ │ ├── charge_full │ │ │ └── charge_now │ └── 3 │ │ └── sys │ │ └── class │ │ └── power_supply │ │ ├── AC │ │ └── online │ │ └── BAT0 │ │ ├── charge_full │ │ └── charge_now ├── msg │ ├── 000.xpl.test.txt │ ├── 001.hbeat.basic.txt │ ├── 002.hbeat.basic.def.txt │ ├── 003.hbeat.app.txt │ ├── 003.hbeat.end.txt │ ├── 003.hbeat.request.txt │ ├── 004.osd.basic.minimal.txt │ ├── 004.osd.basic.txt │ ├── 005.clock.update.minimal.txt │ ├── 005.clock.update.txt │ ├── 006.x10.basic.device.txt │ ├── 006.x10.basic.house.txt │ ├── 006.x10.confirm.device.txt │ ├── 006.x10.confirm.house.txt │ ├── 007.ups.basic.minimal.txt │ ├── 007.ups.basic.txt │ ├── 008.cid.basic.minimal.txt │ ├── 008.cid.basic.txt │ ├── 009.tts.basic.txt │ ├── 010.dawndusk.basic.stat.txt │ ├── 010.dawndusk.basic.txt │ ├── 010.dawndusk.request.txt │ ├── 011.sensor.basic.txt │ ├── 012.control.basic.txt │ ├── 014.sensor.network.txt │ ├── 015.remote.basic.txt │ ├── 016.dmx.basic.txt │ ├── 017.audio.basic.txt │ └── 018.osd.basic.txt ├── ow │ ├── 1 │ │ ├── 28.FEFEFE000000 │ │ │ └── temperature │ │ └── statistics │ │ │ ├── errors │ │ │ ├── CRC16_errors │ │ │ ├── CRC16_tries │ │ │ ├── CRC8_errors │ │ │ └── CRC8_tries │ │ │ ├── read │ │ │ ├── cachesuccess │ │ │ ├── calls │ │ │ ├── success │ │ │ ├── tries.0 │ │ │ ├── tries.1 │ │ │ └── tries.2 │ │ │ └── write │ │ │ ├── calls │ │ │ ├── success │ │ │ ├── tries.0 │ │ │ ├── tries.1 │ │ │ └── tries.2 │ └── 2 │ │ ├── 05.CFCFCF000000 │ │ └── type │ │ ├── 1F.EFEFEF000000 │ │ └── main │ │ │ └── 26.ABABAB000000 │ │ │ ├── humidity │ │ │ └── temperature │ │ └── statistics │ │ ├── read │ │ └── calls │ │ └── write │ │ └── calls ├── release-eol.t ├── release-kwalitee.t ├── release-no-tabs.t ├── release-pod-coverage.t ├── release-pod-syntax.t ├── rf │ ├── electrisave-01.txt │ ├── electrisave-02-invalid-byte1.txt │ ├── electrisave-03-invalid-byte9.txt │ ├── electrisave-04-invalid-byte10.txt │ ├── homeeasy-01-off.txt │ ├── homeeasy-02-group-on.txt │ ├── oregon-bthr918-01-bad-forecast.txt │ ├── oregon-bthr918-01.txt │ ├── oregon-bwr102-01.txt │ ├── oregon-bwr102-02-invalid.txt │ ├── oregon-bwr102-03-invalid.txt │ ├── oregon-bwr102-04-invalid.txt │ ├── oregon-device-test-01.txt │ ├── oregon-gr101-01.txt │ ├── oregon-gr101-02-invalid.txt │ ├── oregon-pcr800-01.txt │ ├── oregon-rgr918-01.txt │ ├── oregon-rtgr328n-01-temphydro.txt │ ├── oregon-rtgr328n-02-datetime.txt │ ├── oregon-rtgr328n-03-invalid-checksum.txt │ ├── oregon-rtgr328n-04-invalid-checksum-dt.txt │ ├── oregon-rtgr328n-05-negativetemp.txt │ ├── oregon-rtgr328n-06-low-battery.txt │ ├── oregon-thgr228n-01-temphydro.txt │ ├── oregon-thgr810-01.txt │ ├── oregon-thr128-01-temp.txt │ ├── oregon-uv138-01.txt │ ├── oregon-uv138-02-invalid-checksum.txt │ ├── oregon-uv138-03-dangerous.txt │ ├── oregon-uvn800-01.txt │ ├── oregon-wgr918-01-wind.txt │ ├── oregon-wtgr800-01-wind.txt │ ├── oregon-wtgr800-02-temphydro.txt │ ├── oregon-wtgr800-03-low-battery.txt │ ├── rfxmeter-01.txt │ ├── rfxmeter-02-parity-error.txt │ ├── rfxmeter-03-unsupported.txt │ ├── rfxmeter-04-invalid.txt │ ├── rfxsensor-01-humidity.txt │ ├── rfxsensor-02-voltage.txt │ ├── rfxsensor-03-humidity.txt │ ├── rfxsensor-04-temp.txt │ ├── rfxsensor-05-humidity.txt │ ├── rfxsensor-06-unsupported-type.txt │ ├── rfxsensor-07-low-battery.txt │ ├── rfxsensor-08-error.txt │ ├── rfxsensor-09-unknown-status.txt │ ├── rfxsensor-10-negative-temp.txt │ ├── rfxsensor-11-init.txt │ ├── rfxsensor-12-init-slow.txt │ ├── rfxsensor-13-sensor-info.txt │ ├── rfxsensor-14-sensor-unknown.txt │ ├── rfxsensor-15-sensor-bad-len.txt │ ├── visonic-01-codesecure.txt │ ├── visonic-02-powercode.txt │ ├── visonic-03-powercode-secondary.txt │ ├── visonic-04-powercode-parity-error.txt │ ├── visonic-05-codesecure-invalid.txt │ ├── visonic-06-codesecure-flags.txt │ ├── x10-01-a11-on.txt │ ├── x10-02-a11-on-dup.txt │ ├── x10-03-a11-on-no-dup.txt │ ├── x10-04-a11-off.txt │ ├── x10-05-a11-bright.txt │ ├── x10-06-a11-dim.txt │ ├── x10-07-a-dim-no-unitcode.txt │ ├── x10-08-non-x10.txt │ ├── x10sec-01.txt │ ├── x10sec-02-alert-tamper-min.txt │ ├── x10sec-03-lowbat.txt │ ├── x10sec-04-kr21-arm-away.txt │ ├── x10sec-05-kr21-lights-on.txt │ └── x10sec-06-unsupported.txt ├── schema │ └── test.basic.yaml └── x10 │ ├── a10-on.txt │ ├── i5-off.txt │ ├── j-dim.txt │ ├── l-bright.txt │ └── m4-off.txt └── xpl-perl.spec /.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | /temp 3 | /blib 4 | /cover_db 5 | /Makefile 6 | /Makefile.old 7 | /pm_to_blib 8 | /install-stamp 9 | /build-stamp 10 | /.tdldb.bak 11 | /doc/xpl-perl-*.* 12 | /doc/tmp.*.tex 13 | /Makefile.local 14 | -------------------------------------------------------------------------------- /.tdldb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beanz/xpl-perl/37b7a758cfd13f68d9bc31c5bea16158b5b8d47d/.tdldb -------------------------------------------------------------------------------- /META.yml: -------------------------------------------------------------------------------- 1 | # http://module-build.sourceforge.net/META-spec.html 2 | #XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX# 3 | name: xPL-Perl 4 | version: 0.01 5 | version_from: lib/xPL/Base.pm 6 | installdirs: vendor 7 | requires: 8 | 9 | distribution_type: module 10 | generated_by: ExtUtils::MakeMaker version 6.17 11 | -------------------------------------------------------------------------------- /Makefile.PL: -------------------------------------------------------------------------------- 1 | use 5.006; 2 | use ExtUtils::MakeMaker; 3 | 4 | my @exe = (); 5 | open my $fh, '<'. 'MANIFEST'; 6 | while (<$fh>) { 7 | chomp; 8 | push @exe, $_ if (m!^bin/!); 9 | } 10 | close $fh; 11 | 12 | eval { require YAML::Syck; }; 13 | if ($@) { 14 | eval { require YAML; }; 15 | die "Missing required YAML::Syck (recommended) or YAML module\n" if ($@); 16 | warn "Found YAML module which is sufficient but YAML::Syck would be better\n"; 17 | } 18 | eval { require DB_File; }; 19 | warn "DB_File is required for xPL config.basic support but was not found\n" 20 | if ($@); 21 | 22 | WriteMakefile( 23 | NAME => 'xPL-Perl', 24 | VERSION_FROM => 'lib/xPL/Base.pm', 25 | EXE_FILES => \@exe, 26 | ($] >= 5.005 ? ## Add these new keywords supported since 5.005 27 | (ABSTRACT => 'lib/xPL/Listener.pm', 28 | AUTHOR => 'Mark Hindess ', 29 | PREREQ_PM => { 30 | 'Module::Pluggable' => 0, 31 | 'Date::Parse' => 0, 32 | 'AnyEvent' => 0, 33 | 'Sub::Name' => 0, 34 | }, 35 | ) : ()), 36 | ); 37 | open F, ">Makefile" or exit(0); 39 | while () { 40 | print M; 41 | } 42 | close M; 43 | close F; 44 | -------------------------------------------------------------------------------- /bin/xpl-apcups: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl -w 2 | 3 | use xPL::Dock qw/-run/; 4 | 5 | =head1 NAME 6 | 7 | xpl-apcups - Perl script for an xPL apcups daemon monitor 8 | 9 | =head1 SYNOPSIS 10 | 11 | xpl-apcups [flags] [options] 12 | where valid flags are: 13 | --help - show this help text 14 | --verbose - verbose mode (for the xPL layer) 15 | --apcups-verbose - verbose mode (for the APC UPS layer) 16 | and valid options are (default shown in brackets): 17 | --interface if0 - the interface for xPL messages (first 18 | non-loopback or loopback) 19 | --apcups-poll-interval nn - number of seconds between polling the 20 | daemon (60) 21 | --apcups-server host:port - APC UPS daemon to contact (127.0.0.1:3551) 22 | 23 | # start the apcups client with poll interval of 120 seconds 24 | xpl-apcups --apcups-poll-interval 120 25 | 26 | =head1 DESCRIPTION 27 | 28 | This script is an xPL client that polls an APC UPS daemon. 29 | 30 | =head1 SEE ALSO 31 | 32 | xPL::Client(3), xPL::Dock(3) 33 | 34 | Project website: http://www.xpl-perl.org.uk/ 35 | 36 | =head1 AUTHOR 37 | 38 | Mark Hindess, Esoft-xpl-perl@temporalanomaly.comE 39 | 40 | =head1 COPYRIGHT 41 | 42 | Copyright (C) 2006, 2009 by Mark Hindess 43 | 44 | This library is free software; you can redistribute it and/or modify 45 | it under the same terms as Perl itself, either Perl version 5.8.7 or, 46 | at your option, any later version of Perl 5 you may have available. 47 | 48 | =cut 49 | -------------------------------------------------------------------------------- /bin/xpl-datetime: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl -w 2 | 3 | use xPL::Dock qw/-run/; 4 | 5 | =head1 NAME 6 | 7 | xpl-datetime - Perl script for an xPL datetime 8 | 9 | =head1 SYNOPSIS 10 | 11 | xpl-datetime [flags] [options] 12 | where valid flags are: 13 | --help - show this help text 14 | --verbose - verbose mode (for the xPL layer) 15 | --xosd-verbose - verbose mode (for the X OSD layer) 16 | and valid options are (default shown in brackets): 17 | --interface if0 - the interface for xPL messages (first 18 | non-loopback or loopback) 19 | --datetime-interval nn - number of seconds between xpl-trig message (60) 20 | 0 to disable 21 | 22 | # start the datetime on first Ethernet interface in verbose mode 23 | xpl-datetime --verbose --datetime-verbose 24 | 25 | =head1 DESCRIPTION 26 | 27 | This script is an xPL client that implements the C schema. 28 | 29 | =head1 SEE ALSO 30 | 31 | xPL::Dock(3), xPL::Dock::DateTime(3) 32 | 33 | Project website: http://www.xpl-perl.org.uk/ 34 | 35 | =head1 AUTHOR 36 | 37 | Mark Hindess, Esoft-xpl-perl@temporalanomaly.comE 38 | 39 | =head1 COPYRIGHT 40 | 41 | Copyright (C) 2005, 2009 by Mark Hindess 42 | 43 | This library is free software; you can redistribute it and/or modify 44 | it under the same terms as Perl itself, either Perl version 5.8.7 or, 45 | at your option, any later version of Perl 5 you may have available. 46 | 47 | =cut 48 | -------------------------------------------------------------------------------- /bin/xpl-fdnotify: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl -w 2 | 3 | use xPL::Dock qw/-run/; 4 | 5 | =head1 NAME 6 | 7 | xpl-fdnotify - Perl script for an xPL desktop notification application 8 | 9 | =head1 SYNOPSIS 10 | 11 | xpl-fdnotify [flags] [options] 12 | where valid flags are: 13 | --help - show this help text 14 | --verbose - verbose mode (for the xPL layer) 15 | --fdnotify-verbose - verbose mode (for the X OSD layer) 16 | and valid options are (default shown in brackets): 17 | --interface if0 - the interface for xPL messages (first 18 | non-loopback or loopback) 19 | 20 | # start the notify client on first Ethernet interface in verbose mode 21 | xpl-fdnotify --verbose --fdnotify-verbose 22 | 23 | =head1 DESCRIPTION 24 | 25 | This script is an xPL client that displays xPL C messages using 26 | freedesktop notification service. 27 | 28 | =head1 SEE ALSO 29 | 30 | xPL::Dock(3), xPL::Dock::FDNotify(3) 31 | 32 | Project website: http://www.xpl-perl.org.uk/ 33 | 34 | =head1 AUTHOR 35 | 36 | Mark Hindess, Esoft-xpl-perl@temporalanomaly.comE 37 | 38 | =head1 COPYRIGHT 39 | 40 | Copyright (C) 2005, 2009 by Mark Hindess 41 | 42 | This library is free software; you can redistribute it and/or modify 43 | it under the same terms as Perl itself, either Perl version 5.8.7 or, 44 | at your option, any later version of Perl 5 you may have available. 45 | 46 | =cut 47 | -------------------------------------------------------------------------------- /bin/xpl-heyu: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl -w 2 | 3 | use xPL::Dock qw/-run/; 4 | 5 | =head1 NAME 6 | 7 | xpl-heyu - Perl script for an xPL X10 application 8 | 9 | =head1 SYNOPSIS 10 | 11 | xpl-heyu [flags] [options] 12 | where valid flags are: 13 | --help - show this help text 14 | --verbose - verbose mode (for the xPL layer) 15 | --heyu-verbose - verbose mode (for the heyu layer) 16 | and valid options are (default shown in brackets): 17 | --interface if0 - the interface for xPL messages (first 18 | non-loopback or loopback) 19 | 20 | # start the x10 application on first Ethernet interface in verbose mode 21 | xpl-heyu --interface eth0 --verbose --heyu-verbose 22 | 23 | =head1 DESCRIPTION 24 | 25 | This script is an xPL client that interfaces with an X10 controller using 26 | the 'heyu' tools. 27 | 28 | =head1 SEE ALSO 29 | 30 | xPL::Dock::Heyu(3), xPL::Dock(3), heyu(1) 31 | 32 | Project website: http://www.xpl-perl.org.uk/ 33 | 34 | =head1 AUTHOR 35 | 36 | Mark Hindess, Esoft-xpl-perl@temporalanomaly.comE 37 | 38 | =head1 COPYRIGHT 39 | 40 | Copyright (C) 2005, 2009 by Mark Hindess 41 | 42 | This library is free software; you can redistribute it and/or modify 43 | it under the same terms as Perl itself, either Perl version 5.8.7 or, 44 | at your option, any later version of Perl 5 you may have available. 45 | 46 | =cut 47 | -------------------------------------------------------------------------------- /bin/xpl-lcdproc: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl -w 2 | 3 | use xPL::Dock qw/-run/; 4 | 5 | =head1 NAME 6 | 7 | xpl-lcdproc - Perl script for an xPL LCDproc OSD application 8 | 9 | =head1 SYNOPSIS 10 | 11 | xpl-lcdproc [flags] [options] 12 | where valid flags are: 13 | --help - show this help text 14 | --verbose - verbose mode (for the xPL layer) 15 | --lcdproc-verbose - verbose mode (for the LCDproc layer) 16 | and valid options are (default shown in brackets): 17 | --interface if0 - the interface for xPL messages (first 18 | non-loopback or loopback) 19 | --lcdproc-delay nnn - the maximum delay in seconds that a message 20 | is allowed to remain on screen for (10) 21 | --lcdproc-server host:port - the lcdproc server to use (127.0.0.1:13666) 22 | 23 | # start the lcdproc on first Ethernet interface in verbose mode 24 | xpl-lcdproc --interface eth0 --verbose --lcdproc-verbose 25 | 26 | =head1 DESCRIPTION 27 | 28 | This script is an xPL client that displays OSD messages using an LCD 29 | connected via the LCDproc api. This script requires an LCDproc server. 30 | 31 | =head1 SEE ALSO 32 | 33 | xPL::Client(3), xPL::Listener(3) 34 | 35 | Project website: http://www.xpl-perl.org.uk/ 36 | 37 | LCDProc website: http://lcdproc.sourceforge.net/ 38 | 39 | =head1 AUTHOR 40 | 41 | Mark Hindess, Esoft-xpl-perl@temporalanomaly.comE 42 | 43 | =head1 COPYRIGHT 44 | 45 | Copyright (C) 2008, 2009 by Mark Hindess 46 | 47 | This library is free software; you can redistribute it and/or modify 48 | it under the same terms as Perl itself, either Perl version 5.8.7 or, 49 | at your option, any later version of Perl 5 you may have available. 50 | 51 | =cut 52 | -------------------------------------------------------------------------------- /bin/xpl-linux: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl -w 2 | 3 | use xPL::Dock qw/-run/; 4 | 5 | =head1 NAME 6 | 7 | xpl-linux - Perl script for an xPL Linux monitor 8 | 9 | =head1 SYNOPSIS 10 | 11 | xpl-linux [flags] [options] 12 | where valid flags are: 13 | --help - show this help text 14 | --verbose - verbose mode (for the xPL layer) 15 | --linux-verbose - verbose mode (for the Linux layer) 16 | and valid options are (default shown in brackets): 17 | --interface if0 - the interface for xPL messages (first 18 | non-loopback or loopback) 19 | --linux-poll-interval nn - number of seconds between polling the 20 | system (120) 21 | 22 | # start the Linux client listening and broadcasting on first Ethernet 23 | # interface in verbose mode using poll interval of 120 seconds 24 | xpl-linux --interface eth0 --verbose --linux-verbose 25 | 26 | =head1 DESCRIPTION 27 | 28 | This script is an xPL client that polls a Linux server for "health" 29 | related information. 30 | 31 | =head1 SEE ALSO 32 | 33 | xPL::Client(3), xPL::Dock(3) 34 | 35 | Project website: http://www.xpl-perl.org.uk/ 36 | 37 | =head1 AUTHOR 38 | 39 | Mark Hindess, Esoft-xpl-perl@temporalanomaly.comE 40 | 41 | =head1 COPYRIGHT 42 | 43 | Copyright (C) 2006, 2009 by Mark Hindess 44 | 45 | This library is free software; you can redistribute it and/or modify 46 | it under the same terms as Perl itself, either Perl version 5.8.7 or, 47 | at your option, any later version of Perl 5 you may have available. 48 | 49 | =cut 50 | -------------------------------------------------------------------------------- /bin/xpl-lirc: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl -w 2 | 3 | use xPL::Dock qw/-run/; 4 | 5 | =head1 NAME 6 | 7 | xpl-lirc - Perl script for an xPL interface to an LIRC daemon 8 | 9 | =head1 SYNOPSIS 10 | 11 | xpl-lirc [flags] [options] 12 | where valid flags are: 13 | --help - show this help text 14 | --verbose - verbose mode (for the xPL layer) 15 | --lirc-verbose - verbose mode (for the LIRC layer) 16 | and valid options are (default shown in brackets): 17 | --interface if0 - the interface for xPL messages (first 18 | non-loopback or loopback) 19 | --lirc-server server - server to connect to. A _full_ path to unix 20 | domain socket a host or a host:port 21 | pair (/dev/lircd) 22 | 23 | # start the lirc client on first Ethernet interface in verbose mode 24 | # using socket /dev/lircd 25 | xpl-lirc --interface eth0 --verbose --lirc-verbose 26 | 27 | =head1 DESCRIPTION 28 | 29 | This script is an xPL client that interfaces with the lirc client that 30 | comes with lirc. It reads the remote control signals that are reported 31 | and transmits them as xPL C messages. 32 | 33 | =head1 SEE ALSO 34 | 35 | xPL::Dock(3), lircd(8) 36 | 37 | Project website: http://www.xpl-perl.org.uk/ 38 | 39 | DigiTemp website: http://www.digitemp.com/ 40 | 41 | =head1 AUTHOR 42 | 43 | Mark Hindess, Esoft-xpl-perl@temporalanomaly.comE 44 | 45 | =head1 COPYRIGHT 46 | 47 | Copyright (C) 2007, 2009 by Mark Hindess 48 | 49 | This library is free software; you can redistribute it and/or modify 50 | it under the same terms as Perl itself, either Perl version 5.8.7 or, 51 | at your option, any later version of Perl 5 you may have available. 52 | 53 | =cut 54 | -------------------------------------------------------------------------------- /bin/xpl-mythtv: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl -w 2 | 3 | use xPL::Dock qw/-run/; 4 | 5 | =head1 NAME 6 | 7 | xpl-mythtv - Perl script for an xPL mythtv monitor 8 | 9 | =head1 SYNOPSIS 10 | 11 | xpl-mythtv [flags] [options] 12 | where valid flags are: 13 | --help - show this help text 14 | --verbose - verbose mode (for the xPL layer) 15 | --mythtv-verbose - verbose mode (for the MythTV layer) 16 | and valid options are (default shown in brackets): 17 | --interface if0 - the interface for xPL messages (first 18 | non-loopback or loopback) 19 | --mythtv-poll-interval nn - number of seconds between polling the 20 | server (120) 21 | --mythtv-server host:port - MythTV server to contact (127.0.0.1:6544) 22 | 23 | # start the mythtv client with poll interval of 180 seconds 24 | xpl-mythtv --mythtv-poll-interval 180 25 | 26 | =head1 DESCRIPTION 27 | 28 | This script is an xPL client that polls the mythtv backend daemon 29 | (listening on the loopback interface) to check the utilization of the 30 | encoders. 31 | 32 | =head1 SEE ALSO 33 | 34 | xPL::Client(3), xPL::Listener(3) 35 | 36 | Project website: http://www.xpl-perl.org.uk/ 37 | 38 | MythTV website: http://www.mythtv.org/ 39 | 40 | =head1 AUTHOR 41 | 42 | Mark Hindess, Esoft-xpl-perl@temporalanomaly.comE 43 | 44 | =head1 COPYRIGHT 45 | 46 | Copyright (C) 2006, 2009 by Mark Hindess 47 | 48 | This library is free software; you can redistribute it and/or modify 49 | it under the same terms as Perl itself, either Perl version 5.8.7 or, 50 | at your option, any later version of Perl 5 you may have available. 51 | 52 | =cut 53 | -------------------------------------------------------------------------------- /bin/xpl-send.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | addr=$1 4 | shift 5 | 6 | type='xpl-cmnd' 7 | case "$1" in 8 | xpl-cmnd|xpl-stat|xpl-trig) 9 | type=$1 10 | shift 11 | ;; 12 | esac 13 | 14 | target='target=*' 15 | case "$1" in 16 | target=*) 17 | target=$1 18 | shift 19 | ;; 20 | esac 21 | 22 | schema='osd.basic' 23 | case "$1" in 24 | *.*) 25 | schema=$1 26 | shift 27 | ;; 28 | esac 29 | 30 | body="" 31 | while read x ;do 32 | body="$body$x 33 | " 34 | done 35 | 36 | echo "$type 37 | { 38 | hop=1 39 | source=bnz-nc."`uname -n`" 40 | $target 41 | } 42 | $schema 43 | { 44 | $body}" | nc -q0 -b -u $addr 3865 45 | -------------------------------------------------------------------------------- /bin/xpl-smart: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | use warnings; 3 | use strict; 4 | use AnyEvent; 5 | use xPL::Dock qw/-run/; 6 | 7 | =head1 NAME 8 | 9 | xpl-smart - Perl script for an xPL hard disk SMART monitor 10 | 11 | =head1 SYNOPSIS 12 | 13 | xpl-smart [flags] [options] 14 | where valid flags are: 15 | --help - show this help text 16 | --verbose - verbose mode (for the xPL layer) 17 | --smart-verbose - verbose mode (for the SMART layer) 18 | and valid options are (default shown in brackets): 19 | --interface if0 - the interface for xPL messages (first 20 | non-loopback or loopback) 21 | --smart-poll-interval nn - number of seconds between polling 22 | the SMART status (120) 23 | 24 | # start the SMART application with poll interval of 60 seconds 25 | xpl-smart --smart-poll-interval 60 26 | 27 | # start the SMART listening and broadcasting on first Ethernet 28 | # interface in verbose mode using poll interval of 120 seconds 29 | xpl-smart --interface eth0 --verbose --smart-verbose 30 | 31 | =head1 DESCRIPTION 32 | 33 | This script is an xPL client that polls the hard disk SMART status to 34 | check for temperature changes of hard disks. 35 | 36 | =head1 SEE ALSO 37 | 38 | xPL::Client(3), xPL::Listener(3), smartctl(8) 39 | 40 | Project website: http://www.xpl-perl.org.uk/ 41 | 42 | =head1 AUTHOR 43 | 44 | Mark Hindess, Esoft-xpl-perl@temporalanomaly.comE 45 | 46 | =head1 COPYRIGHT 47 | 48 | Copyright (C) 2006, 2011 by Mark Hindess 49 | 50 | This library is free software; you can redistribute it and/or modify 51 | it under the same terms as Perl itself, either Perl version 5.8.7 or, 52 | at your option, any later version of Perl 5 you may have available. 53 | 54 | =cut 55 | -------------------------------------------------------------------------------- /bin/xpl-tcp-inject: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl -w 2 | use strict; 3 | use IO::Socket::INET; 4 | use Digest::SHA qw/hmac_sha1_hex/; 5 | 6 | my $peer = shift; 7 | my $secret = shift; 8 | my $sock = IO::Socket::INET->new($peer) or die $!, "\n"; 9 | my $msg; 10 | { local $/ = undef; 11 | $msg = <>; 12 | } 13 | my $version = '1.0'; 14 | my $time = time; 15 | my $body = $version."\n".$time."\n".$msg; 16 | my $hmac = hmac_sha1_hex($body, $secret); 17 | $sock->print($hmac."\n".$body); 18 | $sock->close; 19 | -------------------------------------------------------------------------------- /bin/xpl-tcphelp: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl -w 2 | 3 | use xPL::Dock qw/-run/; 4 | 5 | =head1 NAME 6 | 7 | xpl-tcphelp - Perl script for an xPL TCP Helper 8 | 9 | =head1 SYNOPSIS 10 | 11 | xpl-tcphelper [flags] [options] 12 | where valid flags are: 13 | --help - show this help text 14 | --verbose - verbose mode (for the xPL layer) 15 | --tcphelp-verbose - verbose mode (for the TCP Helper layer) 16 | and valid options are (default shown in brackets): 17 | --interface if0 - the interface for xPL messages (first 18 | non-loopback or loopback) 19 | --tcphelp-address ip-address - the address to listen on (0.0.0.0) 20 | --tcphelp-port tcp-port - the TCP port to listen on (38650) 21 | --tcphelp-secret shared-secret - the share secret used by connecting 22 | clients 23 | 24 | # start the notify client on first Ethernet interface in verbose mode 25 | xpl-tcphelp --verbose --tcphelp-secret "this is a rubbish secret" 26 | 27 | =head1 DESCRIPTION 28 | 29 | This script is an xPL client that listens on a TCP port and allows 30 | remote clients to inject messages over (untrusted) networks. It uses a 31 | trivial HMAC shared secret mechanism with a timestamp field to prevent 32 | reply attacks. 33 | 34 | =head1 SEE ALSO 35 | 36 | xPL::Dock(3), xPL::Dock::TCPHelp(3) 37 | 38 | Project website: http://www.xpl-perl.org.uk/ 39 | 40 | =head1 AUTHOR 41 | 42 | Mark Hindess, Esoft-xpl-perl@temporalanomaly.comE 43 | 44 | =head1 COPYRIGHT 45 | 46 | Copyright (C) 2005, 2009 by Mark Hindess 47 | 48 | This library is free software; you can redistribute it and/or modify 49 | it under the same terms as Perl itself, either Perl version 5.8.7 or, 50 | at your option, any later version of Perl 5 you may have available. 51 | 52 | =cut 53 | -------------------------------------------------------------------------------- /bin/xpl-w800: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl -w 2 | 3 | use AnyEvent; 4 | use xPL::Dock qw/-run/; 5 | 6 | =head1 NAME 7 | 8 | xpl-w800 - Perl script for an xPL W800 RF receiver application 9 | 10 | =head1 SYNOPSIS 11 | 12 | xpl-w800 [flags] [options] --w800-tty 13 | where valid flags are: 14 | --help - show this help text 15 | --verbose - verbose mode (for the xPL layer) 16 | --w800-verbose - verbose mode (for the W800 layer) 17 | and valid options are (default shown in brackets): 18 | --interface if0 - the interface for xPL messages (first 19 | non-loopback or loopback) 20 | --w800-tty - the tty device for the W800 receiver 21 | --w800-baud nnnn - the baud rate (4800) 22 | 23 | # start the w800 application on first Ethernet interface in verbose mode 24 | xpl-w800 --interface eth0 --verbose \ 25 | --w800-verbose --w800-tty /dev/ttyUSB0 26 | 27 | =head1 DESCRIPTION 28 | 29 | This script is an xPL client that interfaces with a W800 RF receiver. 30 | 31 | =head1 SEE ALSO 32 | 33 | xPL::Dock(3), xPL::Listener(3) 34 | 35 | Project website: http://www.xpl-perl.org.uk/ 36 | 37 | W800 website: http://www.wgldesigns.com/w800.html 38 | 39 | =head1 AUTHOR 40 | 41 | Mark Hindess, Esoft-xpl-perl@temporalanomaly.comE 42 | 43 | =head1 COPYRIGHT 44 | 45 | Copyright (C) 2006, 2009 by Mark Hindess 46 | 47 | This library is free software; you can redistribute it and/or modify 48 | it under the same terms as Perl itself, either Perl version 5.8.7 or, 49 | at your option, any later version of Perl 5 you may have available. 50 | 51 | =cut 52 | -------------------------------------------------------------------------------- /bin/xpl-wol: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl -w 2 | 3 | use xPL::Dock qw/-run/; 4 | 5 | =head1 NAME 6 | 7 | xpl-wol - Perl script for a wake-on-lan sender application 8 | 9 | =head1 SYNOPSIS 10 | 11 | xpl-wol [flags] [options] 12 | where valid flags are: 13 | --help - show this help text 14 | --verbose - verbose mode (for the xPL layer) 15 | --wol-verbose - verbose mode (for the WOL layer) 16 | and valid options are (default shown in brackets): 17 | --interface if0 - the interface for xPL messages (first 18 | non-loopback or loopback) 19 | 20 | # start the wol on first Ethernet interface in verbose mode 21 | xpl-wol --verbose --wol-verbose 22 | 23 | =head1 DESCRIPTION 24 | 25 | This script is an xPL client that sends WOL messages using the command 26 | C. This script requires: 27 | 28 | =over 4 29 | 30 | =item the etherwake command 31 | 32 | Most Linux distributions will probably provide a package for this. 33 | 34 | =item the sudo command 35 | 36 | Most Linux distributions will probably provide a package for this. It 37 | must be configured to allow the user running the client to execute 38 | the C command. Typically, something like: 39 | 40 | xplperl ALL=(ALL) NOPASSWD: /usr/sbin/etherwake 41 | 42 | =back 43 | 44 | =head1 SEE ALSO 45 | 46 | xPL::Dock(3), xPL::Dock::WOL(3), etherwake(8) 47 | 48 | Project website: http://www.xpl-perl.org.uk/ 49 | 50 | =head1 AUTHOR 51 | 52 | Mark Hindess, Esoft-xpl-perl@temporalanomaly.comE 53 | 54 | =head1 COPYRIGHT 55 | 56 | Copyright (C) 2010 by Mark Hindess 57 | 58 | This library is free software; you can redistribute it and/or modify 59 | it under the same terms as Perl itself, either Perl version 5.8.7 or, 60 | at your option, any later version of Perl 5 you may have available. 61 | 62 | =cut 63 | -------------------------------------------------------------------------------- /bin/xpl-xvkbd: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl -w 2 | 3 | use xPL::Dock qw/-run/; 4 | 5 | =head1 NAME 6 | 7 | xpl-xvkbd - Perl script for an xPL virtual keyboard application 8 | 9 | =head1 SYNOPSIS 10 | 11 | xpl-xvkbd [flags] [options] 12 | where valid flags are: 13 | -h - show this help text 14 | -v - verbose mode 15 | and valid options are (default shown in brackets): 16 | -i if0 - the interface for xPL messages (first non-loopback or loopback) 17 | 18 | # start the xvkbd application on first Ethernet interface in verbose mode 19 | xpl-xvkbd -i eth0 -v 20 | 21 | =head1 DESCRIPTION 22 | 23 | This script is an xPL client that interfaces with xvkbd to send key strokes 24 | to an X11 application. 25 | 26 | =head1 SEE ALSO 27 | 28 | xPL::Dock::Xvkbd(3), xvkbd(1) 29 | 30 | Project website: http://www.xpl-perl.org.uk/ 31 | 32 | =head1 AUTHOR 33 | 34 | Mark Hindess, Esoft-xpl-perl@temporalanomaly.comE 35 | 36 | =head1 COPYRIGHT 37 | 38 | Copyright (C) 2007, 2009 by Mark Hindess 39 | 40 | This library is free software; you can redistribute it and/or modify 41 | it under the same terms as Perl itself, either Perl version 5.8.7 or, 42 | at your option, any later version of Perl 5 you may have available. 43 | 44 | =cut 45 | -------------------------------------------------------------------------------- /debian/compat: -------------------------------------------------------------------------------- 1 | 5 2 | -------------------------------------------------------------------------------- /debian/copyright: -------------------------------------------------------------------------------- 1 | This is the debian package for the xPL-Perl module. 2 | It was created by Mark Hindess . 3 | 4 | Copyright (C) 2005, 2008 by Mark Hindess 5 | 6 | This library is free software; you can redistribute it and/or modify 7 | it under the same terms as Perl itself, either Perl version 5.8.7 or, 8 | at your option, any later version of Perl 5 you may have available. 9 | 10 | On Debian GNU/Linux systems, the complete text of the Artistic License can 11 | be found in '/usr/share/common-licenses/Artistic'. 12 | -------------------------------------------------------------------------------- /debian/sv/env/DATALIMIT: -------------------------------------------------------------------------------- 1 | 300000 2 | -------------------------------------------------------------------------------- /debian/sv/env/FILELIMIT: -------------------------------------------------------------------------------- 1 | 100 2 | -------------------------------------------------------------------------------- /debian/sv/log/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exec setuidgid xplperllog multilog t s1000000 n1000 ./main 3 | -------------------------------------------------------------------------------- /debian/sv/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exec 2>&1 3 | exec envdir /etc/xpl-perl/env envdir ./env sh -c ' 4 | exec envuidgid xplperl softlimit -o "$FILELIMIT" -d "$DATALIMIT" \ 5 | /usr/bin/PROGNAME --define "ip=$IP" --define "broadcast=$IPSEND" \ 6 | $COMMON_ARGUMENTS 7 | ' 8 | -------------------------------------------------------------------------------- /debian/sv/run-xpl-hub: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exec 2>&1 3 | exec envdir /etc/xpl-perl/env envdir ./env sh -c ' 4 | exec envuidgid xplperl softlimit -o "$FILELIMIT" -d "$DATALIMIT" \ 5 | /usr/bin/xpl-hub --define "ip=$IPSEND" --define "broadcast=$IPSEND" \ 6 | $COMMON_ARGUMENTS 7 | ' 8 | -------------------------------------------------------------------------------- /debian/xpl-apcups-perl.README.Debian: -------------------------------------------------------------------------------- 1 | xpl-apcups-perl 2 | --------------- 3 | 4 | This package automatically sets up the xPL Perl hub service. By 5 | default the xPL Perl hub listens on IP address 127.0.0.1 and 6 | broadcasts on the same address. These defaults can be modified 7 | for all xPL Perl clients by editing the /etc/xpl-perl/env/IP 8 | and /etc/xpl-perl/env/IPSEND files respectively. 9 | 10 | -- Mark Hindess Sun, 24 Jan 2010 20:11:27 +0000 11 | -------------------------------------------------------------------------------- /debian/xpl-apcups-perl.postinst: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | test "$1" = 'configure' || exit 0 5 | 6 | if test -e /etc/service/xpl-apcups; then 7 | echo 'Restarting xpl-apcups service...' 8 | svc -t /etc/service/xpl-apcups || : 9 | else 10 | update-service --add /etc/sv/xpl-apcups 11 | fi 12 | 13 | test -z "$2" || exit 0 14 | 15 | chown xplperllog:adm /var/log/xpl-perl/xpl-apcups 16 | -------------------------------------------------------------------------------- /debian/xpl-apcups-perl.postrm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | test "$1" = 'purge' || exit 0 5 | 6 | svc -x /etc/sv/xpl-apcups || : 7 | rm -rf /etc/sv/xpl-apcups 8 | rm -rf /var/lib/supervise/xpl-apcups /var/lib/supervise/xpl-apcups.log 9 | for i in '@*' current config lock state; do 10 | rm -f /var/log/xpl-perl/xpl-apcups/$i 11 | done 12 | rmdir /var/log/xpl-perl/xpl-apcups || : 13 | -------------------------------------------------------------------------------- /debian/xpl-apcups-perl.prerm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | test "$1" = 'remove' || test "$1" = 'deconfigure' || 5 | test "$1" = 'failed-upgrade' || exit 0 6 | 7 | update-service --remove /etc/sv/xpl-apcups || : 8 | -------------------------------------------------------------------------------- /debian/xpl-bluetooth-perl.README.Debian: -------------------------------------------------------------------------------- 1 | xpl-bluetooth-perl 2 | --------------- 3 | 4 | This package automatically sets up the xPL Perl hub service. By 5 | default the xPL Perl hub listens on IP address 127.0.0.1 and 6 | broadcasts on the same address. These defaults can be modified 7 | for all xPL Perl clients by editing the /etc/xpl-perl/env/IP 8 | and /etc/xpl-perl/env/IPSEND files respectively. 9 | 10 | -- Mark Hindess Sun, 24 Jan 2010 20:11:27 +0000 11 | -------------------------------------------------------------------------------- /debian/xpl-bluetooth-perl.postinst: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | test "$1" = 'configure' || exit 0 5 | 6 | if test -e /etc/service/xpl-bluetooth; then 7 | echo 'Restarting xpl-bluetooth service...' 8 | svc -t /etc/service/xpl-bluetooth || : 9 | else 10 | update-service --add /etc/sv/xpl-bluetooth 11 | fi 12 | 13 | test -z "$2" || exit 0 14 | 15 | chown xplperllog:adm /var/log/xpl-perl/xpl-bluetooth 16 | -------------------------------------------------------------------------------- /debian/xpl-bluetooth-perl.postrm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | test "$1" = 'purge' || exit 0 5 | 6 | svc -x /etc/sv/xpl-bluetooth || : 7 | rm -rf /etc/sv/xpl-bluetooth 8 | rm -rf /var/lib/supervise/xpl-bluetooth /var/lib/supervise/xpl-bluetooth.log 9 | for i in '@*' current config lock state; do 10 | rm -f /var/log/xpl-perl/xpl-bluetooth/$i 11 | done 12 | rmdir /var/log/xpl-perl/xpl-bluetooth || : 13 | -------------------------------------------------------------------------------- /debian/xpl-bluetooth-perl.prerm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | test "$1" = 'remove' || test "$1" = 'deconfigure' || 5 | test "$1" = 'failed-upgrade' || exit 0 6 | 7 | update-service --remove /etc/sv/xpl-bluetooth || : 8 | -------------------------------------------------------------------------------- /debian/xpl-common-perl.README.Debian: -------------------------------------------------------------------------------- 1 | xpl-common-perl 2 | --------------- 3 | 4 | This package provides common configuration files for all xPL Perl clients. 5 | It provides: 6 | 7 | /etc/xpl-perl/env/IP 8 | 9 | which is the IP address for xPL clients to listen on (default 10 | is 127.0.0.1), 11 | 12 | /etc/xpl-perl/env/IPSEND 13 | 14 | which is the IP address for xPL clients to send (broadcast) on (default 15 | is 127.0.0.1), and 16 | 17 | /etc/xpl-perl/env/COMMON_ARGUMENTS 18 | 19 | which can be any additional arguments to pass to all xPL clients (default 20 | is "--verbose" since that tends to be useful for debugging). 21 | 22 | -- Mark Hindess Sun, 24 Jan 2010 20:11:27 +0000 23 | -------------------------------------------------------------------------------- /debian/xpl-common-perl.postrm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | test "$1" = 'purge' || exit 0 5 | 6 | for i in xplperl xplperllog; do 7 | ! getent passwd $i >/dev/null || 8 | userdel $i || : 9 | done 10 | rmdir /var/cache/xpl-perl 11 | -------------------------------------------------------------------------------- /debian/xpl-common-perl.preinst: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | test "$1" = 'install' || exit 0 5 | test -z "$2" || exit 0 6 | 7 | # not upgrading 8 | for i in xplperl xplperllog; do 9 | getent passwd $i >/dev/null || 10 | adduser --quiet --system --force-badname --shell /bin/false --group \ 11 | --home /nonexistent --no-create-home $i || exit 1; 12 | done 13 | install -m 0755 -o xplperl -g xplperl -d /var/cache/xpl-perl 14 | -------------------------------------------------------------------------------- /debian/xpl-ctx35-perl.README.Debian: -------------------------------------------------------------------------------- 1 | xpl-ctx35-perl 2 | --------------- 3 | 4 | This package automatically sets up the xPL Perl hub service. By 5 | default the xPL Perl hub listens on IP address 127.0.0.1 and 6 | broadcasts on the same address. These defaults can be modified 7 | for all xPL Perl clients by editing the /etc/xpl-perl/env/IP 8 | and /etc/xpl-perl/env/IPSEND files respectively. 9 | 10 | -- Mark Hindess Sun, 24 Jan 2010 20:11:27 +0000 11 | -------------------------------------------------------------------------------- /debian/xpl-ctx35-perl.postinst: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | test "$1" = 'configure' || exit 0 5 | 6 | if test -e /etc/service/xpl-ctx35; then 7 | echo 'Restarting xpl-ctx35 service...' 8 | svc -t /etc/service/xpl-ctx35 || : 9 | else 10 | update-service --add /etc/sv/xpl-ctx35 11 | fi 12 | 13 | test -z "$2" || exit 0 14 | 15 | chown xplperllog:adm /var/log/xpl-perl/xpl-ctx35 16 | -------------------------------------------------------------------------------- /debian/xpl-ctx35-perl.postrm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | test "$1" = 'purge' || exit 0 5 | 6 | svc -x /etc/sv/xpl-ctx35 || : 7 | rm -rf /etc/sv/xpl-ctx35 8 | rm -rf /var/lib/supervise/xpl-ctx35 /var/lib/supervise/xpl-ctx35.log 9 | for i in '@*' current config lock state; do 10 | rm -f /var/log/xpl-perl/xpl-ctx35/$i 11 | done 12 | rmdir /var/log/xpl-perl/xpl-ctx35 || : 13 | -------------------------------------------------------------------------------- /debian/xpl-ctx35-perl.prerm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | test "$1" = 'remove' || test "$1" = 'deconfigure' || 5 | test "$1" = 'failed-upgrade' || exit 0 6 | 7 | update-service --remove /etc/sv/xpl-ctx35 || : 8 | -------------------------------------------------------------------------------- /debian/xpl-currentcost-perl.README.Debian: -------------------------------------------------------------------------------- 1 | xpl-currentcost-perl 2 | --------------- 3 | 4 | This package automatically sets up the xPL Perl hub service. By 5 | default the xPL Perl hub listens on IP address 127.0.0.1 and 6 | broadcasts on the same address. These defaults can be modified 7 | for all xPL Perl clients by editing the /etc/xpl-perl/env/IP 8 | and /etc/xpl-perl/env/IPSEND files respectively. 9 | 10 | -- Mark Hindess Sun, 24 Jan 2010 20:11:27 +0000 11 | -------------------------------------------------------------------------------- /debian/xpl-currentcost-perl.postinst: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | test "$1" = 'configure' || exit 0 5 | 6 | if test -e /etc/service/xpl-currentcost; then 7 | echo 'Restarting xpl-currentcost service...' 8 | svc -t /etc/service/xpl-currentcost || : 9 | else 10 | update-service --add /etc/sv/xpl-currentcost 11 | fi 12 | 13 | test -z "$2" || exit 0 14 | 15 | chown xplperllog:adm /var/log/xpl-perl/xpl-currentcost 16 | -------------------------------------------------------------------------------- /debian/xpl-currentcost-perl.postrm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | test "$1" = 'purge' || exit 0 5 | 6 | svc -x /etc/sv/xpl-currentcost || : 7 | rm -rf /etc/sv/xpl-currentcost 8 | rm -rf /var/lib/supervise/xpl-currentcost /var/lib/supervise/xpl-currentcost.log 9 | for i in '@*' current config lock state; do 10 | rm -f /var/log/xpl-perl/xpl-currentcost/$i 11 | done 12 | rmdir /var/log/xpl-perl/xpl-currentcost || : 13 | -------------------------------------------------------------------------------- /debian/xpl-currentcost-perl.prerm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | test "$1" = 'remove' || test "$1" = 'deconfigure' || 5 | test "$1" = 'failed-upgrade' || exit 0 6 | 7 | update-service --remove /etc/sv/xpl-currentcost || : 8 | -------------------------------------------------------------------------------- /debian/xpl-datetime-perl.README.Debian: -------------------------------------------------------------------------------- 1 | xpl-datetime-perl 2 | --------------- 3 | 4 | This package automatically sets up the xPL Perl hub service. By 5 | default the xPL Perl hub listens on IP address 127.0.0.1 and 6 | broadcasts on the same address. These defaults can be modified 7 | for all xPL Perl clients by editing the /etc/xpl-perl/env/IP 8 | and /etc/xpl-perl/env/IPSEND files respectively. 9 | 10 | -- Mark Hindess Sun, 24 Jan 2010 20:11:27 +0000 11 | -------------------------------------------------------------------------------- /debian/xpl-datetime-perl.postinst: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | test "$1" = 'configure' || exit 0 5 | 6 | if test -e /etc/service/xpl-datetime; then 7 | echo 'Restarting xpl-datetime service...' 8 | svc -t /etc/service/xpl-datetime || : 9 | else 10 | update-service --add /etc/sv/xpl-datetime 11 | fi 12 | 13 | test -z "$2" || exit 0 14 | 15 | chown xplperllog:adm /var/log/xpl-perl/xpl-datetime 16 | -------------------------------------------------------------------------------- /debian/xpl-datetime-perl.postrm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | test "$1" = 'purge' || exit 0 5 | 6 | svc -x /etc/sv/xpl-datetime || : 7 | rm -rf /etc/sv/xpl-datetime 8 | rm -rf /var/lib/supervise/xpl-datetime /var/lib/supervise/xpl-datetime.log 9 | for i in '@*' current config lock state; do 10 | rm -f /var/log/xpl-perl/xpl-datetime/$i 11 | done 12 | rmdir /var/log/xpl-perl/xpl-datetime || : 13 | -------------------------------------------------------------------------------- /debian/xpl-datetime-perl.prerm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | test "$1" = 'remove' || test "$1" = 'deconfigure' || 5 | test "$1" = 'failed-upgrade' || exit 0 6 | 7 | update-service --remove /etc/sv/xpl-datetime || : 8 | -------------------------------------------------------------------------------- /debian/xpl-dawndusk-perl.README.Debian: -------------------------------------------------------------------------------- 1 | xpl-dawndusk-perl 2 | --------------- 3 | 4 | This package automatically sets up the xPL Perl hub service. By 5 | default the xPL Perl hub listens on IP address 127.0.0.1 and 6 | broadcasts on the same address. These defaults can be modified 7 | for all xPL Perl clients by editing the /etc/xpl-perl/env/IP 8 | and /etc/xpl-perl/env/IPSEND files respectively. 9 | 10 | -- Mark Hindess Sun, 24 Jan 2010 20:11:27 +0000 11 | -------------------------------------------------------------------------------- /debian/xpl-dawndusk-perl.postinst: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | test "$1" = 'configure' || exit 0 5 | 6 | if test -e /etc/service/xpl-dawndusk; then 7 | echo 'Restarting xpl-dawndusk service...' 8 | svc -t /etc/service/xpl-dawndusk || : 9 | else 10 | update-service --add /etc/sv/xpl-dawndusk 11 | fi 12 | 13 | test -z "$2" || exit 0 14 | 15 | chown xplperllog:adm /var/log/xpl-perl/xpl-dawndusk 16 | -------------------------------------------------------------------------------- /debian/xpl-dawndusk-perl.postrm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | test "$1" = 'purge' || exit 0 5 | 6 | svc -x /etc/sv/xpl-dawndusk || : 7 | rm -rf /etc/sv/xpl-dawndusk 8 | rm -rf /var/lib/supervise/xpl-dawndusk /var/lib/supervise/xpl-dawndusk.log 9 | for i in '@*' current config lock state; do 10 | rm -f /var/log/xpl-perl/xpl-dawndusk/$i 11 | done 12 | rmdir /var/log/xpl-perl/xpl-dawndusk || : 13 | -------------------------------------------------------------------------------- /debian/xpl-dawndusk-perl.prerm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | test "$1" = 'remove' || test "$1" = 'deconfigure' || 5 | test "$1" = 'failed-upgrade' || exit 0 6 | 7 | update-service --remove /etc/sv/xpl-dawndusk || : 8 | -------------------------------------------------------------------------------- /debian/xpl-dmx-perl.README.Debian: -------------------------------------------------------------------------------- 1 | xpl-dmx-perl 2 | --------------- 3 | 4 | This package automatically sets up the xPL Perl hub service. By 5 | default the xPL Perl hub listens on IP address 127.0.0.1 and 6 | broadcasts on the same address. These defaults can be modified 7 | for all xPL Perl clients by editing the /etc/xpl-perl/env/IP 8 | and /etc/xpl-perl/env/IPSEND files respectively. 9 | 10 | -- Mark Hindess Sun, 24 Jan 2010 20:11:27 +0000 11 | -------------------------------------------------------------------------------- /debian/xpl-dmx-perl.postinst: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | test "$1" = 'configure' || exit 0 5 | 6 | if test -e /etc/service/xpl-dmx; then 7 | echo 'Restarting xpl-dmx service...' 8 | svc -t /etc/service/xpl-dmx || : 9 | else 10 | update-service --add /etc/sv/xpl-dmx 11 | fi 12 | 13 | test -z "$2" || exit 0 14 | 15 | chown xplperllog:adm /var/log/xpl-perl/xpl-dmx 16 | -------------------------------------------------------------------------------- /debian/xpl-dmx-perl.postrm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | test "$1" = 'purge' || exit 0 5 | 6 | svc -x /etc/sv/xpl-dmx || : 7 | rm -rf /etc/sv/xpl-dmx 8 | rm -rf /var/lib/supervise/xpl-dmx /var/lib/supervise/xpl-dmx.log 9 | for i in '@*' current config lock state; do 10 | rm -f /var/log/xpl-perl/xpl-dmx/$i 11 | done 12 | rmdir /var/log/xpl-perl/xpl-dmx || : 13 | -------------------------------------------------------------------------------- /debian/xpl-dmx-perl.prerm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | test "$1" = 'remove' || test "$1" = 'deconfigure' || 5 | test "$1" = 'failed-upgrade' || exit 0 6 | 7 | update-service --remove /etc/sv/xpl-dmx || : 8 | -------------------------------------------------------------------------------- /debian/xpl-easydaq-perl.README.Debian: -------------------------------------------------------------------------------- 1 | xpl-easydaq-perl 2 | --------------- 3 | 4 | This package automatically sets up the xPL Perl hub service. By 5 | default the xPL Perl hub listens on IP address 127.0.0.1 and 6 | broadcasts on the same address. These defaults can be modified 7 | for all xPL Perl clients by editing the /etc/xpl-perl/env/IP 8 | and /etc/xpl-perl/env/IPSEND files respectively. 9 | 10 | -- Mark Hindess Sun, 24 Jan 2010 20:11:27 +0000 11 | -------------------------------------------------------------------------------- /debian/xpl-easydaq-perl.postinst: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | test "$1" = 'configure' || exit 0 5 | 6 | if test -e /etc/service/xpl-easydaq; then 7 | echo 'Restarting xpl-easydaq service...' 8 | svc -t /etc/service/xpl-easydaq || : 9 | else 10 | update-service --add /etc/sv/xpl-easydaq 11 | fi 12 | 13 | test -z "$2" || exit 0 14 | 15 | chown xplperllog:adm /var/log/xpl-perl/xpl-easydaq 16 | -------------------------------------------------------------------------------- /debian/xpl-easydaq-perl.postrm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | test "$1" = 'purge' || exit 0 5 | 6 | svc -x /etc/sv/xpl-easydaq || : 7 | rm -rf /etc/sv/xpl-easydaq 8 | rm -rf /var/lib/supervise/xpl-easydaq /var/lib/supervise/xpl-easydaq.log 9 | for i in '@*' current config lock state; do 10 | rm -f /var/log/xpl-perl/xpl-easydaq/$i 11 | done 12 | rmdir /var/log/xpl-perl/xpl-easydaq || : 13 | -------------------------------------------------------------------------------- /debian/xpl-easydaq-perl.prerm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | test "$1" = 'remove' || test "$1" = 'deconfigure' || 5 | test "$1" = 'failed-upgrade' || exit 0 6 | 7 | update-service --remove /etc/sv/xpl-easydaq || : 8 | -------------------------------------------------------------------------------- /debian/xpl-hddtemp-perl.README.Debian: -------------------------------------------------------------------------------- 1 | xpl-hddtemp-perl 2 | --------------- 3 | 4 | This package automatically sets up the xPL Perl hub service. By 5 | default the xPL Perl hub listens on IP address 127.0.0.1 and 6 | broadcasts on the same address. These defaults can be modified 7 | for all xPL Perl clients by editing the /etc/xpl-perl/env/IP 8 | and /etc/xpl-perl/env/IPSEND files respectively. 9 | 10 | -- Mark Hindess Sun, 24 Jan 2010 20:11:27 +0000 11 | -------------------------------------------------------------------------------- /debian/xpl-hddtemp-perl.postinst: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | test "$1" = 'configure' || exit 0 5 | 6 | if test -e /etc/service/xpl-hddtemp; then 7 | echo 'Restarting xpl-hddtemp service...' 8 | svc -t /etc/service/xpl-hddtemp || : 9 | else 10 | update-service --add /etc/sv/xpl-hddtemp 11 | fi 12 | 13 | test -z "$2" || exit 0 14 | 15 | chown xplperllog:adm /var/log/xpl-perl/xpl-hddtemp 16 | -------------------------------------------------------------------------------- /debian/xpl-hddtemp-perl.postrm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | test "$1" = 'purge' || exit 0 5 | 6 | svc -x /etc/sv/xpl-hddtemp || : 7 | rm -rf /etc/sv/xpl-hddtemp 8 | rm -rf /var/lib/supervise/xpl-hddtemp /var/lib/supervise/xpl-hddtemp.log 9 | for i in '@*' current config lock state; do 10 | rm -f /var/log/xpl-perl/xpl-hddtemp/$i 11 | done 12 | rmdir /var/log/xpl-perl/xpl-hddtemp || : 13 | -------------------------------------------------------------------------------- /debian/xpl-hddtemp-perl.prerm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | test "$1" = 'remove' || test "$1" = 'deconfigure' || 5 | test "$1" = 'failed-upgrade' || exit 0 6 | 7 | update-service --remove /etc/sv/xpl-hddtemp || : 8 | -------------------------------------------------------------------------------- /debian/xpl-heyu-perl.README.Debian: -------------------------------------------------------------------------------- 1 | xpl-heyu-perl 2 | --------------- 3 | 4 | This package automatically sets up the xPL Perl hub service. By 5 | default the xPL Perl hub listens on IP address 127.0.0.1 and 6 | broadcasts on the same address. These defaults can be modified 7 | for all xPL Perl clients by editing the /etc/xpl-perl/env/IP 8 | and /etc/xpl-perl/env/IPSEND files respectively. 9 | 10 | -- Mark Hindess Sun, 24 Jan 2010 20:11:27 +0000 11 | -------------------------------------------------------------------------------- /debian/xpl-heyu-perl.postinst: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | test "$1" = 'configure' || exit 0 5 | 6 | if test -e /etc/service/xpl-heyu; then 7 | echo 'Restarting xpl-heyu service...' 8 | svc -t /etc/service/xpl-heyu || : 9 | else 10 | update-service --add /etc/sv/xpl-heyu 11 | fi 12 | 13 | test -z "$2" || exit 0 14 | 15 | chown xplperllog:adm /var/log/xpl-perl/xpl-heyu 16 | -------------------------------------------------------------------------------- /debian/xpl-heyu-perl.postrm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | test "$1" = 'purge' || exit 0 5 | 6 | svc -x /etc/sv/xpl-heyu || : 7 | rm -rf /etc/sv/xpl-heyu 8 | rm -rf /var/lib/supervise/xpl-heyu /var/lib/supervise/xpl-heyu.log 9 | for i in '@*' current config lock state; do 10 | rm -f /var/log/xpl-perl/xpl-heyu/$i 11 | done 12 | rmdir /var/log/xpl-perl/xpl-heyu || : 13 | -------------------------------------------------------------------------------- /debian/xpl-heyu-perl.prerm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | test "$1" = 'remove' || test "$1" = 'deconfigure' || 5 | test "$1" = 'failed-upgrade' || exit 0 6 | 7 | update-service --remove /etc/sv/xpl-heyu || : 8 | -------------------------------------------------------------------------------- /debian/xpl-hub-perl.README.Debian: -------------------------------------------------------------------------------- 1 | xpl-hub-perl 2 | --------------- 3 | 4 | This package automatically sets up the xPL Perl hub service. By 5 | default the xPL Perl hub listens on IP address 127.0.0.1 and 6 | broadcasts on the same address. These defaults can be modified 7 | for all xPL Perl clients by editing the /etc/xpl-perl/env/IP 8 | and /etc/xpl-perl/env/IPSEND files respectively. 9 | 10 | -- Mark Hindess Sun, 24 Jan 2010 20:11:27 +0000 11 | -------------------------------------------------------------------------------- /debian/xpl-hub-perl.postinst: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | test "$1" = 'configure' || exit 0 5 | 6 | if test -e /etc/service/xpl-hub; then 7 | echo 'Restarting xpl-hub service...' 8 | svc -t /etc/service/xpl-hub || : 9 | else 10 | update-service --add /etc/sv/xpl-hub 11 | fi 12 | 13 | test -z "$2" || exit 0 14 | 15 | chown xplperllog:adm /var/log/xpl-perl/xpl-hub 16 | -------------------------------------------------------------------------------- /debian/xpl-hub-perl.postrm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | test "$1" = 'purge' || exit 0 5 | 6 | svc -x /etc/sv/xpl-hub || : 7 | rm -rf /etc/sv/xpl-hub 8 | rm -rf /var/lib/supervise/xpl-hub /var/lib/supervise/xpl-hub.log 9 | for i in '@*' current config lock state; do 10 | rm -f /var/log/xpl-perl/xpl-hub/$i 11 | done 12 | rmdir /var/log/xpl-perl/xpl-hub || : 13 | -------------------------------------------------------------------------------- /debian/xpl-hub-perl.prerm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | test "$1" = 'remove' || test "$1" = 'deconfigure' || 5 | test "$1" = 'failed-upgrade' || exit 0 6 | 7 | update-service --remove /etc/sv/xpl-hub || : 8 | -------------------------------------------------------------------------------- /debian/xpl-jabber-perl.README.Debian: -------------------------------------------------------------------------------- 1 | xpl-jabber-perl 2 | --------------- 3 | 4 | This package automatically sets up the xPL Perl hub service. By 5 | default the xPL Perl hub listens on IP address 127.0.0.1 and 6 | broadcasts on the same address. These defaults can be modified 7 | for all xPL Perl clients by editing the /etc/xpl-perl/env/IP 8 | and /etc/xpl-perl/env/IPSEND files respectively. 9 | 10 | -- Mark Hindess Sun, 24 Jan 2010 20:11:27 +0000 11 | -------------------------------------------------------------------------------- /debian/xpl-jabber-perl.postinst: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | test "$1" = 'configure' || exit 0 5 | 6 | if test -e /etc/service/xpl-jabber; then 7 | echo 'Restarting xpl-jabber service...' 8 | svc -t /etc/service/xpl-jabber || : 9 | else 10 | update-service --add /etc/sv/xpl-jabber 11 | fi 12 | 13 | test -z "$2" || exit 0 14 | 15 | chown xplperllog:adm /var/log/xpl-perl/xpl-jabber 16 | -------------------------------------------------------------------------------- /debian/xpl-jabber-perl.postrm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | test "$1" = 'purge' || exit 0 5 | 6 | svc -x /etc/sv/xpl-jabber || : 7 | rm -rf /etc/sv/xpl-jabber 8 | rm -rf /var/lib/supervise/xpl-jabber /var/lib/supervise/xpl-jabber.log 9 | for i in '@*' current config lock state; do 10 | rm -f /var/log/xpl-perl/xpl-jabber/$i 11 | done 12 | rmdir /var/log/xpl-perl/xpl-jabber || : 13 | rm -f /var/cache/xpl-perl/bnz-jabber.*.db 14 | -------------------------------------------------------------------------------- /debian/xpl-jabber-perl.prerm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | test "$1" = 'remove' || test "$1" = 'deconfigure' || 5 | test "$1" = 'failed-upgrade' || exit 0 6 | 7 | update-service --remove /etc/sv/xpl-jabber || : 8 | -------------------------------------------------------------------------------- /debian/xpl-lcdproc-perl.README.Debian: -------------------------------------------------------------------------------- 1 | xpl-lcdproc-perl 2 | --------------- 3 | 4 | This package automatically sets up the xPL Perl hub service. By 5 | default the xPL Perl hub listens on IP address 127.0.0.1 and 6 | broadcasts on the same address. These defaults can be modified 7 | for all xPL Perl clients by editing the /etc/xpl-perl/env/IP 8 | and /etc/xpl-perl/env/IPSEND files respectively. 9 | 10 | -- Mark Hindess Sun, 24 Jan 2010 20:11:27 +0000 11 | -------------------------------------------------------------------------------- /debian/xpl-lcdproc-perl.postinst: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | test "$1" = 'configure' || exit 0 5 | 6 | if test -e /etc/service/xpl-lcdproc; then 7 | echo 'Restarting xpl-lcdproc service...' 8 | svc -t /etc/service/xpl-lcdproc || : 9 | else 10 | update-service --add /etc/sv/xpl-lcdproc 11 | fi 12 | 13 | test -z "$2" || exit 0 14 | 15 | chown xplperllog:adm /var/log/xpl-perl/xpl-lcdproc 16 | -------------------------------------------------------------------------------- /debian/xpl-lcdproc-perl.postrm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | test "$1" = 'purge' || exit 0 5 | 6 | svc -x /etc/sv/xpl-lcdproc || : 7 | rm -rf /etc/sv/xpl-lcdproc 8 | rm -rf /var/lib/supervise/xpl-lcdproc /var/lib/supervise/xpl-lcdproc.log 9 | for i in '@*' current config lock state; do 10 | rm -f /var/log/xpl-perl/xpl-lcdproc/$i 11 | done 12 | rmdir /var/log/xpl-perl/xpl-lcdproc || : 13 | -------------------------------------------------------------------------------- /debian/xpl-lcdproc-perl.prerm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | test "$1" = 'remove' || test "$1" = 'deconfigure' || 5 | test "$1" = 'failed-upgrade' || exit 0 6 | 7 | update-service --remove /etc/sv/xpl-lcdproc || : 8 | -------------------------------------------------------------------------------- /debian/xpl-lirc-perl.README.Debian: -------------------------------------------------------------------------------- 1 | xpl-lirc-perl 2 | --------------- 3 | 4 | This package automatically sets up the xPL Perl hub service. By 5 | default the xPL Perl hub listens on IP address 127.0.0.1 and 6 | broadcasts on the same address. These defaults can be modified 7 | for all xPL Perl clients by editing the /etc/xpl-perl/env/IP 8 | and /etc/xpl-perl/env/IPSEND files respectively. 9 | 10 | -- Mark Hindess Sun, 24 Jan 2010 20:11:27 +0000 11 | -------------------------------------------------------------------------------- /debian/xpl-lirc-perl.postinst: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | test "$1" = 'configure' || exit 0 5 | 6 | if test -e /etc/service/xpl-lirc; then 7 | echo 'Restarting xpl-lirc service...' 8 | svc -t /etc/service/xpl-lirc || : 9 | else 10 | update-service --add /etc/sv/xpl-lirc 11 | fi 12 | 13 | test -z "$2" || exit 0 14 | 15 | chown xplperllog:adm /var/log/xpl-perl/xpl-lirc 16 | -------------------------------------------------------------------------------- /debian/xpl-lirc-perl.postrm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | test "$1" = 'purge' || exit 0 5 | 6 | svc -x /etc/sv/xpl-lirc || : 7 | rm -rf /etc/sv/xpl-lirc 8 | rm -rf /var/lib/supervise/xpl-lirc /var/lib/supervise/xpl-lirc.log 9 | for i in '@*' current config lock state; do 10 | rm -f /var/log/xpl-perl/xpl-lirc/$i 11 | done 12 | rmdir /var/log/xpl-perl/xpl-lirc || : 13 | -------------------------------------------------------------------------------- /debian/xpl-lirc-perl.prerm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | test "$1" = 'remove' || test "$1" = 'deconfigure' || 5 | test "$1" = 'failed-upgrade' || exit 0 6 | 7 | update-service --remove /etc/sv/xpl-lirc || : 8 | -------------------------------------------------------------------------------- /debian/xpl-mpd-perl.README.Debian: -------------------------------------------------------------------------------- 1 | xpl-mpd-perl 2 | --------------- 3 | 4 | This package automatically sets up the xPL Perl hub service. By 5 | default the xPL Perl hub listens on IP address 127.0.0.1 and 6 | broadcasts on the same address. These defaults can be modified 7 | for all xPL Perl clients by editing the /etc/xpl-perl/env/IP 8 | and /etc/xpl-perl/env/IPSEND files respectively. 9 | 10 | -- Mark Hindess Sun, 24 Jan 2010 20:11:27 +0000 11 | -------------------------------------------------------------------------------- /debian/xpl-mpd-perl.postinst: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | test "$1" = 'configure' || exit 0 5 | 6 | if test -e /etc/service/xpl-mpd; then 7 | echo 'Restarting xpl-mpd service...' 8 | svc -t /etc/service/xpl-mpd || : 9 | else 10 | update-service --add /etc/sv/xpl-mpd 11 | fi 12 | 13 | test -z "$2" || exit 0 14 | 15 | chown xplperllog:adm /var/log/xpl-perl/xpl-mpd 16 | -------------------------------------------------------------------------------- /debian/xpl-mpd-perl.postrm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | test "$1" = 'purge' || exit 0 5 | 6 | svc -x /etc/sv/xpl-mpd || : 7 | rm -rf /etc/sv/xpl-mpd 8 | rm -rf /var/lib/supervise/xpl-mpd /var/lib/supervise/xpl-mpd.log 9 | for i in '@*' current config lock state; do 10 | rm -f /var/log/xpl-perl/xpl-mpd/$i 11 | done 12 | rmdir /var/log/xpl-perl/xpl-mpd || : 13 | -------------------------------------------------------------------------------- /debian/xpl-mpd-perl.prerm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | test "$1" = 'remove' || test "$1" = 'deconfigure' || 5 | test "$1" = 'failed-upgrade' || exit 0 6 | 7 | update-service --remove /etc/sv/xpl-mpd || : 8 | -------------------------------------------------------------------------------- /debian/xpl-mythtv-perl.README.Debian: -------------------------------------------------------------------------------- 1 | xpl-mythtv-perl 2 | --------------- 3 | 4 | This package automatically sets up the xPL Perl hub service. By 5 | default the xPL Perl hub listens on IP address 127.0.0.1 and 6 | broadcasts on the same address. These defaults can be modified 7 | for all xPL Perl clients by editing the /etc/xpl-perl/env/IP 8 | and /etc/xpl-perl/env/IPSEND files respectively. 9 | 10 | -- Mark Hindess Sun, 24 Jan 2010 20:11:27 +0000 11 | -------------------------------------------------------------------------------- /debian/xpl-mythtv-perl.postinst: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | test "$1" = 'configure' || exit 0 5 | 6 | if test -e /etc/service/xpl-mythtv; then 7 | echo 'Restarting xpl-mythtv service...' 8 | svc -t /etc/service/xpl-mythtv || : 9 | else 10 | update-service --add /etc/sv/xpl-mythtv 11 | fi 12 | 13 | test -z "$2" || exit 0 14 | 15 | chown xplperllog:adm /var/log/xpl-perl/xpl-mythtv 16 | -------------------------------------------------------------------------------- /debian/xpl-mythtv-perl.postrm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | test "$1" = 'purge' || exit 0 5 | 6 | svc -x /etc/sv/xpl-mythtv || : 7 | rm -rf /etc/sv/xpl-mythtv 8 | rm -rf /var/lib/supervise/xpl-mythtv /var/lib/supervise/xpl-mythtv.log 9 | for i in '@*' current config lock state; do 10 | rm -f /var/log/xpl-perl/xpl-mythtv/$i 11 | done 12 | rmdir /var/log/xpl-perl/xpl-mythtv || : 13 | -------------------------------------------------------------------------------- /debian/xpl-mythtv-perl.prerm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | test "$1" = 'remove' || test "$1" = 'deconfigure' || 5 | test "$1" = 'failed-upgrade' || exit 0 6 | 7 | update-service --remove /etc/sv/xpl-mythtv || : 8 | -------------------------------------------------------------------------------- /debian/xpl-owfs-perl.README.Debian: -------------------------------------------------------------------------------- 1 | xpl-owfs-perl 2 | --------------- 3 | 4 | This package automatically sets up the xPL Perl hub service. By 5 | default the xPL Perl hub listens on IP address 127.0.0.1 and 6 | broadcasts on the same address. These defaults can be modified 7 | for all xPL Perl clients by editing the /etc/xpl-perl/env/IP 8 | and /etc/xpl-perl/env/IPSEND files respectively. 9 | 10 | -- Mark Hindess Sun, 24 Jan 2010 20:11:27 +0000 11 | -------------------------------------------------------------------------------- /debian/xpl-owfs-perl.postinst: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | test "$1" = 'configure' || exit 0 5 | 6 | if test -e /etc/service/xpl-owfs; then 7 | echo 'Restarting xpl-owfs service...' 8 | svc -t /etc/service/xpl-owfs || : 9 | else 10 | update-service --add /etc/sv/xpl-owfs 11 | fi 12 | 13 | test -z "$2" || exit 0 14 | 15 | chown xplperllog:adm /var/log/xpl-perl/xpl-owfs 16 | -------------------------------------------------------------------------------- /debian/xpl-owfs-perl.postrm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | test "$1" = 'purge' || exit 0 5 | 6 | svc -x /etc/sv/xpl-owfs || : 7 | rm -rf /etc/sv/xpl-owfs 8 | rm -rf /var/lib/supervise/xpl-owfs /var/lib/supervise/xpl-owfs.log 9 | for i in '@*' current config lock state; do 10 | rm -f /var/log/xpl-perl/xpl-owfs/$i 11 | done 12 | rmdir /var/log/xpl-perl/xpl-owfs || : 13 | -------------------------------------------------------------------------------- /debian/xpl-owfs-perl.prerm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | test "$1" = 'remove' || test "$1" = 'deconfigure' || 5 | test "$1" = 'failed-upgrade' || exit 0 6 | 7 | update-service --remove /etc/sv/xpl-owfs || : 8 | -------------------------------------------------------------------------------- /debian/xpl-rfxcom-perl.README.Debian: -------------------------------------------------------------------------------- 1 | xpl-rfxcom-perl 2 | --------------- 3 | 4 | This package automatically sets up the xPL Perl hub service. By 5 | default the xPL Perl hub listens on IP address 127.0.0.1 and 6 | broadcasts on the same address. These defaults can be modified 7 | for all xPL Perl clients by editing the /etc/xpl-perl/env/IP 8 | and /etc/xpl-perl/env/IPSEND files respectively. 9 | 10 | -- Mark Hindess Sun, 24 Jan 2010 20:11:27 +0000 11 | -------------------------------------------------------------------------------- /debian/xpl-rfxcom-perl.postinst: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | test "$1" = 'configure' || exit 0 5 | 6 | if test -e /etc/service/xpl-rfxcom; then 7 | echo 'Restarting xpl-rfxcom service...' 8 | svc -t /etc/service/xpl-rfxcom || : 9 | else 10 | update-service --add /etc/sv/xpl-rfxcom 11 | fi 12 | 13 | test -z "$2" || exit 0 14 | 15 | chown xplperllog:adm /var/log/xpl-perl/xpl-rfxcom 16 | -------------------------------------------------------------------------------- /debian/xpl-rfxcom-perl.postrm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | test "$1" = 'purge' || exit 0 5 | 6 | svc -x /etc/sv/xpl-rfxcom || : 7 | rm -rf /etc/sv/xpl-rfxcom 8 | rm -rf /var/lib/supervise/xpl-rfxcom /var/lib/supervise/xpl-rfxcom.log 9 | for i in '@*' current config lock state; do 10 | rm -f /var/log/xpl-perl/xpl-rfxcom/$i 11 | done 12 | rmdir /var/log/xpl-perl/xpl-rfxcom || : 13 | -------------------------------------------------------------------------------- /debian/xpl-rfxcom-perl.prerm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | test "$1" = 'remove' || test "$1" = 'deconfigure' || 5 | test "$1" = 'failed-upgrade' || exit 0 6 | 7 | update-service --remove /etc/sv/xpl-rfxcom || : 8 | -------------------------------------------------------------------------------- /debian/xpl-rfxcom-rx-perl.README.Debian: -------------------------------------------------------------------------------- 1 | xpl-rfxcom-rx-perl 2 | --------------- 3 | 4 | This package automatically sets up the xPL Perl hub service. By 5 | default the xPL Perl hub listens on IP address 127.0.0.1 and 6 | broadcasts on the same address. These defaults can be modified 7 | for all xPL Perl clients by editing the /etc/xpl-perl/env/IP 8 | and /etc/xpl-perl/env/IPSEND files respectively. 9 | 10 | -- Mark Hindess Sun, 24 Jan 2010 20:11:27 +0000 11 | -------------------------------------------------------------------------------- /debian/xpl-rfxcom-rx-perl.postinst: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | test "$1" = 'configure' || exit 0 5 | 6 | if test -e /etc/service/xpl-rfxcom-rx; then 7 | echo 'Restarting xpl-rfxcom-rx service...' 8 | svc -t /etc/service/xpl-rfxcom-rx || : 9 | else 10 | update-service --add /etc/sv/xpl-rfxcom-rx 11 | fi 12 | 13 | test -z "$2" || exit 0 14 | 15 | chown xplperllog:adm /var/log/xpl-perl/xpl-rfxcom-rx 16 | -------------------------------------------------------------------------------- /debian/xpl-rfxcom-rx-perl.postrm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | test "$1" = 'purge' || exit 0 5 | 6 | svc -x /etc/sv/xpl-rfxcom-rx || : 7 | rm -rf /etc/sv/xpl-rfxcom-rx 8 | rm -rf /var/lib/supervise/xpl-rfxcom-rx /var/lib/supervise/xpl-rfxcom-rx.log 9 | for i in '@*' current config lock state; do 10 | rm -f /var/log/xpl-perl/xpl-rfxcom-rx/$i 11 | done 12 | rmdir /var/log/xpl-perl/xpl-rfxcom-rx || : 13 | -------------------------------------------------------------------------------- /debian/xpl-rfxcom-rx-perl.prerm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | test "$1" = 'remove' || test "$1" = 'deconfigure' || 5 | test "$1" = 'failed-upgrade' || exit 0 6 | 7 | update-service --remove /etc/sv/xpl-rfxcom-rx || : 8 | -------------------------------------------------------------------------------- /debian/xpl-rfxcom-tx-perl.README.Debian: -------------------------------------------------------------------------------- 1 | xpl-rfxcom-tx-perl 2 | --------------- 3 | 4 | This package automatically sets up the xPL Perl hub service. By 5 | default the xPL Perl hub listens on IP address 127.0.0.1 and 6 | broadcasts on the same address. These defaults can be modified 7 | for all xPL Perl clients by editing the /etc/xpl-perl/env/IP 8 | and /etc/xpl-perl/env/IPSEND files respectively. 9 | 10 | -- Mark Hindess Sun, 24 Jan 2010 20:11:27 +0000 11 | -------------------------------------------------------------------------------- /debian/xpl-rfxcom-tx-perl.postinst: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | test "$1" = 'configure' || exit 0 5 | 6 | if test -e /etc/service/xpl-rfxcom-tx; then 7 | echo 'Restarting xpl-rfxcom-tx service...' 8 | svc -t /etc/service/xpl-rfxcom-tx || : 9 | else 10 | update-service --add /etc/sv/xpl-rfxcom-tx 11 | fi 12 | 13 | test -z "$2" || exit 0 14 | 15 | chown xplperllog:adm /var/log/xpl-perl/xpl-rfxcom-tx 16 | -------------------------------------------------------------------------------- /debian/xpl-rfxcom-tx-perl.postrm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | test "$1" = 'purge' || exit 0 5 | 6 | svc -x /etc/sv/xpl-rfxcom-tx || : 7 | rm -rf /etc/sv/xpl-rfxcom-tx 8 | rm -rf /var/lib/supervise/xpl-rfxcom-tx /var/lib/supervise/xpl-rfxcom-tx.log 9 | for i in '@*' current config lock state; do 10 | rm -f /var/log/xpl-perl/xpl-rfxcom-tx/$i 11 | done 12 | rmdir /var/log/xpl-perl/xpl-rfxcom-tx || : 13 | -------------------------------------------------------------------------------- /debian/xpl-rfxcom-tx-perl.prerm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | test "$1" = 'remove' || test "$1" = 'deconfigure' || 5 | test "$1" = 'failed-upgrade' || exit 0 6 | 7 | update-service --remove /etc/sv/xpl-rfxcom-tx || : 8 | -------------------------------------------------------------------------------- /debian/xpl-sms-send-perl.README.Debian: -------------------------------------------------------------------------------- 1 | xpl-sms-send-perl 2 | --------------- 3 | 4 | This package automatically sets up the xPL Perl hub service. By 5 | default the xPL Perl hub listens on IP address 127.0.0.1 and 6 | broadcasts on the same address. These defaults can be modified 7 | for all xPL Perl clients by editing the /etc/xpl-perl/env/IP 8 | and /etc/xpl-perl/env/IPSEND files respectively. 9 | 10 | -- Mark Hindess Sun, 24 Jan 2010 20:11:27 +0000 11 | -------------------------------------------------------------------------------- /debian/xpl-sms-send-perl.postinst: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | test "$1" = 'configure' || exit 0 5 | 6 | if test -e /etc/service/xpl-sms-send; then 7 | echo 'Restarting xpl-sms-send service...' 8 | svc -t /etc/service/xpl-sms-send || : 9 | else 10 | update-service --add /etc/sv/xpl-sms-send 11 | fi 12 | 13 | test -z "$2" || exit 0 14 | 15 | chown xplperllog:adm /var/log/xpl-perl/xpl-sms-send 16 | -------------------------------------------------------------------------------- /debian/xpl-sms-send-perl.postrm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | test "$1" = 'purge' || exit 0 5 | 6 | svc -x /etc/sv/xpl-sms-send || : 7 | rm -rf /etc/sv/xpl-sms-send 8 | rm -rf /var/lib/supervise/xpl-sms-send /var/lib/supervise/xpl-sms-send.log 9 | for i in '@*' current config lock state; do 10 | rm -f /var/log/xpl-perl/xpl-sms-send/$i 11 | done 12 | rmdir /var/log/xpl-perl/xpl-sms-send || : 13 | -------------------------------------------------------------------------------- /debian/xpl-sms-send-perl.prerm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | test "$1" = 'remove' || test "$1" = 'deconfigure' || 5 | test "$1" = 'failed-upgrade' || exit 0 6 | 7 | update-service --remove /etc/sv/xpl-sms-send || : 8 | -------------------------------------------------------------------------------- /debian/xpl-udin-perl.README.Debian: -------------------------------------------------------------------------------- 1 | xpl-udin-perl 2 | --------------- 3 | 4 | This package automatically sets up the xPL Perl hub service. By 5 | default the xPL Perl hub listens on IP address 127.0.0.1 and 6 | broadcasts on the same address. These defaults can be modified 7 | for all xPL Perl clients by editing the /etc/xpl-perl/env/IP 8 | and /etc/xpl-perl/env/IPSEND files respectively. 9 | 10 | -- Mark Hindess Sun, 24 Jan 2010 20:11:27 +0000 11 | -------------------------------------------------------------------------------- /debian/xpl-udin-perl.postinst: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | test "$1" = 'configure' || exit 0 5 | 6 | if test -e /etc/service/xpl-udin; then 7 | echo 'Restarting xpl-udin service...' 8 | svc -t /etc/service/xpl-udin || : 9 | else 10 | update-service --add /etc/sv/xpl-udin 11 | fi 12 | 13 | test -z "$2" || exit 0 14 | 15 | chown xplperllog:adm /var/log/xpl-perl/xpl-udin 16 | -------------------------------------------------------------------------------- /debian/xpl-udin-perl.postrm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | test "$1" = 'purge' || exit 0 5 | 6 | svc -x /etc/sv/xpl-udin || : 7 | rm -rf /etc/sv/xpl-udin 8 | rm -rf /var/lib/supervise/xpl-udin /var/lib/supervise/xpl-udin.log 9 | for i in '@*' current config lock state; do 10 | rm -f /var/log/xpl-perl/xpl-udin/$i 11 | done 12 | rmdir /var/log/xpl-perl/xpl-udin || : 13 | -------------------------------------------------------------------------------- /debian/xpl-udin-perl.prerm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | test "$1" = 'remove' || test "$1" = 'deconfigure' || 5 | test "$1" = 'failed-upgrade' || exit 0 6 | 7 | update-service --remove /etc/sv/xpl-udin || : 8 | -------------------------------------------------------------------------------- /debian/xpl-viom-perl.README.Debian: -------------------------------------------------------------------------------- 1 | xpl-viom-perl 2 | --------------- 3 | 4 | This package automatically sets up the xPL Perl hub service. By 5 | default the xPL Perl hub listens on IP address 127.0.0.1 and 6 | broadcasts on the same address. These defaults can be modified 7 | for all xPL Perl clients by editing the /etc/xpl-perl/env/IP 8 | and /etc/xpl-perl/env/IPSEND files respectively. 9 | 10 | -- Mark Hindess Sun, 24 Jan 2010 20:11:27 +0000 11 | -------------------------------------------------------------------------------- /debian/xpl-viom-perl.postinst: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | test "$1" = 'configure' || exit 0 5 | 6 | if test -e /etc/service/xpl-viom; then 7 | echo 'Restarting xpl-viom service...' 8 | svc -t /etc/service/xpl-viom || : 9 | else 10 | update-service --add /etc/sv/xpl-viom 11 | fi 12 | 13 | test -z "$2" || exit 0 14 | 15 | chown xplperllog:adm /var/log/xpl-perl/xpl-viom 16 | -------------------------------------------------------------------------------- /debian/xpl-viom-perl.postrm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | test "$1" = 'purge' || exit 0 5 | 6 | svc -x /etc/sv/xpl-viom || : 7 | rm -rf /etc/sv/xpl-viom 8 | rm -rf /var/lib/supervise/xpl-viom /var/lib/supervise/xpl-viom.log 9 | for i in '@*' current config lock state; do 10 | rm -f /var/log/xpl-perl/xpl-viom/$i 11 | done 12 | rmdir /var/log/xpl-perl/xpl-viom || : 13 | -------------------------------------------------------------------------------- /debian/xpl-viom-perl.prerm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | test "$1" = 'remove' || test "$1" = 'deconfigure' || 5 | test "$1" = 'failed-upgrade' || exit 0 6 | 7 | update-service --remove /etc/sv/xpl-viom || : 8 | -------------------------------------------------------------------------------- /debian/xpl-w800-perl.README.Debian: -------------------------------------------------------------------------------- 1 | xpl-w800-perl 2 | --------------- 3 | 4 | This package automatically sets up the xPL Perl hub service. By 5 | default the xPL Perl hub listens on IP address 127.0.0.1 and 6 | broadcasts on the same address. These defaults can be modified 7 | for all xPL Perl clients by editing the /etc/xpl-perl/env/IP 8 | and /etc/xpl-perl/env/IPSEND files respectively. 9 | 10 | -- Mark Hindess Sun, 24 Jan 2010 20:11:27 +0000 11 | -------------------------------------------------------------------------------- /debian/xpl-w800-perl.postinst: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | test "$1" = 'configure' || exit 0 5 | 6 | if test -e /etc/service/xpl-w800; then 7 | echo 'Restarting xpl-w800 service...' 8 | svc -t /etc/service/xpl-w800 || : 9 | else 10 | update-service --add /etc/sv/xpl-w800 11 | fi 12 | 13 | test -z "$2" || exit 0 14 | 15 | chown xplperllog:adm /var/log/xpl-perl/xpl-w800 16 | -------------------------------------------------------------------------------- /debian/xpl-w800-perl.postrm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | test "$1" = 'purge' || exit 0 5 | 6 | svc -x /etc/sv/xpl-w800 || : 7 | rm -rf /etc/sv/xpl-w800 8 | rm -rf /var/lib/supervise/xpl-w800 /var/lib/supervise/xpl-w800.log 9 | for i in '@*' current config lock state; do 10 | rm -f /var/log/xpl-perl/xpl-w800/$i 11 | done 12 | rmdir /var/log/xpl-perl/xpl-w800 || : 13 | -------------------------------------------------------------------------------- /debian/xpl-w800-perl.prerm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | test "$1" = 'remove' || test "$1" = 'deconfigure' || 5 | test "$1" = 'failed-upgrade' || exit 0 6 | 7 | update-service --remove /etc/sv/xpl-w800 || : 8 | -------------------------------------------------------------------------------- /debian/xpl-xosd-perl.README.Debian: -------------------------------------------------------------------------------- 1 | xpl-xosd-perl 2 | --------------- 3 | 4 | This package automatically sets up the xPL Perl hub service. By 5 | default the xPL Perl hub listens on IP address 127.0.0.1 and 6 | broadcasts on the same address. These defaults can be modified 7 | for all xPL Perl clients by editing the /etc/xpl-perl/env/IP 8 | and /etc/xpl-perl/env/IPSEND files respectively. 9 | 10 | -- Mark Hindess Sun, 24 Jan 2010 20:11:27 +0000 11 | -------------------------------------------------------------------------------- /debian/xpl-xosd-perl.postinst: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | test "$1" = 'configure' || exit 0 5 | 6 | if test -e /etc/service/xpl-xosd; then 7 | echo 'Restarting xpl-xosd service...' 8 | svc -t /etc/service/xpl-xosd || : 9 | else 10 | update-service --add /etc/sv/xpl-xosd 11 | fi 12 | 13 | test -z "$2" || exit 0 14 | 15 | chown xplperllog:adm /var/log/xpl-perl/xpl-xosd 16 | -------------------------------------------------------------------------------- /debian/xpl-xosd-perl.postrm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | test "$1" = 'purge' || exit 0 5 | 6 | svc -x /etc/sv/xpl-xosd || : 7 | rm -rf /etc/sv/xpl-xosd 8 | rm -rf /var/lib/supervise/xpl-xosd /var/lib/supervise/xpl-xosd.log 9 | for i in '@*' current config lock state; do 10 | rm -f /var/log/xpl-perl/xpl-xosd/$i 11 | done 12 | rmdir /var/log/xpl-perl/xpl-xosd || : 13 | -------------------------------------------------------------------------------- /debian/xpl-xosd-perl.prerm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | test "$1" = 'remove' || test "$1" = 'deconfigure' || 5 | test "$1" = 'failed-upgrade' || exit 0 6 | 7 | update-service --remove /etc/sv/xpl-xosd || : 8 | -------------------------------------------------------------------------------- /debian/xpl-xvkbd-perl.README.Debian: -------------------------------------------------------------------------------- 1 | xpl-xvkbd-perl 2 | --------------- 3 | 4 | This package automatically sets up the xPL Perl hub service. By 5 | default the xPL Perl hub listens on IP address 127.0.0.1 and 6 | broadcasts on the same address. These defaults can be modified 7 | for all xPL Perl clients by editing the /etc/xpl-perl/env/IP 8 | and /etc/xpl-perl/env/IPSEND files respectively. 9 | 10 | -- Mark Hindess Sun, 24 Jan 2010 20:11:27 +0000 11 | -------------------------------------------------------------------------------- /debian/xpl-xvkbd-perl.postinst: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | test "$1" = 'configure' || exit 0 5 | 6 | if test -e /etc/service/xpl-xvkbd; then 7 | echo 'Restarting xpl-xvkbd service...' 8 | svc -t /etc/service/xpl-xvkbd || : 9 | else 10 | update-service --add /etc/sv/xpl-xvkbd 11 | fi 12 | 13 | test -z "$2" || exit 0 14 | 15 | chown xplperllog:adm /var/log/xpl-perl/xpl-xvkbd 16 | -------------------------------------------------------------------------------- /debian/xpl-xvkbd-perl.postrm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | test "$1" = 'purge' || exit 0 5 | 6 | svc -x /etc/sv/xpl-xvkbd || : 7 | rm -rf /etc/sv/xpl-xvkbd 8 | rm -rf /var/lib/supervise/xpl-xvkbd /var/lib/supervise/xpl-xvkbd.log 9 | for i in '@*' current config lock state; do 10 | rm -f /var/log/xpl-perl/xpl-xvkbd/$i 11 | done 12 | rmdir /var/log/xpl-perl/xpl-xvkbd || : 13 | -------------------------------------------------------------------------------- /debian/xpl-xvkbd-perl.prerm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | test "$1" = 'remove' || test "$1" = 'deconfigure' || 5 | test "$1" = 'failed-upgrade' || exit 0 6 | 7 | update-service --remove /etc/sv/xpl-xvkbd || : 8 | -------------------------------------------------------------------------------- /doc/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2005 by Mark Hindess 2 | 3 | VERSION=$(shell awk '$$1~/^VERSION$$/ { print $$3 ;exit}' ../Makefile) 4 | DOC=xpl-perl-$(VERSION) 5 | DVI=$(DOC).dvi 6 | TEX=$(DOC).tex 7 | HTML=$(DOC).html 8 | TXT=$(DOC).txt 9 | PS=$(DOC).ps 10 | PDF=$(DOC).pdf 11 | TEXFILES=$(wildcard *.tex) 12 | DIAFILES=$(wildcard *.diagram) 13 | EPSFILES=$(DIAFILES:.diagram=.eps) 14 | PNGFILES=$(DIAFILES:.diagram=.png) 15 | JPEGFILES=$(DIAFILES:.diagram=.jpeg) 16 | PMFILES=$(addprefix ../, $(shell grep -e bin/ -e '\.pm' ../MANIFEST | \ 17 | grep -v '^t/') ) 18 | 19 | dvi: $(DVI) 20 | 21 | ps: $(PS) 22 | 23 | pdf: $(PDF) 24 | 25 | html: $(HTML) $(PNGFILES) 26 | 27 | txt: $(TXT) 28 | 29 | jpegs: $(JPEGFILES) 30 | 31 | clean: 32 | -rm -f *.log *.aux $(PS) $(PDF) $(DVI) $(EPSFILES) *.toc 33 | -rm -f $(HTML) $(PNGFILES) $(HTML).bak $(TXT) $(JPEGFILES) 34 | -rm -f tmp.$(TEX) $(TEX) 35 | -rm -f *~ 36 | 37 | %.dvi: %.tex 38 | latex $< 39 | latex $< 40 | 41 | %.ps: %.dvi 42 | dvips -o $@ $< 43 | 44 | %.pdf: %.dvi 45 | dvipdfm $< 46 | 47 | %.eps: %.diagram 48 | dia --nosplash -e $@ $< 49 | 50 | %.png: %.eps 51 | ps2png $< $@ 52 | 53 | %.jpeg: %.png 54 | pngtoppm <$< |cjpeg >$@ 55 | 56 | %.html: %.tex %.dvi # actual depends on .aux but .dvi will do 57 | tth -L$(<:.tex=) <$< >$@ 58 | perl -i.bak -pne \ 59 | 's!Figure!!g;' \ 60 | $@ 61 | 62 | %.txt: %.html 63 | w3m -dump $< >$@ 64 | 65 | $(TEX): $(PMFILES) 66 | pod2latex -sections '!(COPYRIGHT|AUTHOR)' -modify -out tmp.$@ $(PMFILES) 67 | cat header.tex tmp.$@ footer.tex| \ 68 | perl -pne 's/^\\section/\\newpage\n\\section/g' >$@ 69 | 70 | $(DVI): $(TEXFILES) $(EPSFILES) $(TEX) 71 | -------------------------------------------------------------------------------- /doc/footer.tex: -------------------------------------------------------------------------------- 1 | % Copyright (C) 2005 by Mark Hindess 2 | \end{document} 3 | -------------------------------------------------------------------------------- /doc/header.tex: -------------------------------------------------------------------------------- 1 | \documentclass[12pt,a4paper]{article} 2 | \usepackage{fullpage} 3 | \usepackage[dvips]{graphicx} 4 | \usepackage{epsfig} 5 | 6 | \title{xPL Perl Toolkit} 7 | \author{Mark Hindess\\ 8 | \texttt{soft-xpl-perl@temporalanomaly.com}\\ 9 | Copyright (C) 2005, 2011} 10 | 11 | \begin{document} 12 | 13 | % Use the following defn. for drafts 14 | %\newcommand{\comment}[1]{\footnote{#1}} 15 | % otherwise use this... 16 | \newcommand{\comment}[1]{} 17 | \setlength{\parindent}{0pt} 18 | \addtolength{\parskip}{5pt} 19 | 20 | % Macro for http reference inclusion, per hypertex. 21 | \def\href#1#2{\special{html:}{#2}\special{html:}} 22 | \def\url#1{\special{html:}{\tt{#1}}\special{html:}} 23 | \def\msg#1{\texttt{#1}} 24 | \def\method#1{\texttt{#1}} 25 | \def\field#1{\texttt{#1}} 26 | \def\cmd#1{\texttt{#1}} 27 | 28 | \maketitle 29 | \newpage 30 | \tableofcontents 31 | -------------------------------------------------------------------------------- /lib/xPL/Validation/Any.pm: -------------------------------------------------------------------------------- 1 | package xPL::Validation::Any; 2 | 3 | =head1 NAME 4 | 5 | xPL::Validation::Any - Perl extension for xPL Validation any class 6 | 7 | =head1 SYNOPSIS 8 | 9 | # this class is not expected to be used directly 10 | 11 | use xPL::Validation; 12 | 13 | my $validation = xPL::Validation->new(type => 'Any'); 14 | 15 | =head1 DESCRIPTION 16 | 17 | This module creates an xPL validation which is used to validate fields 18 | of xPL messages. 19 | 20 | =head1 METHODS 21 | 22 | =cut 23 | 24 | use 5.006; 25 | use strict; 26 | use warnings; 27 | 28 | use xPL::Validation; 29 | #use AutoLoader qw(AUTOLOAD); 30 | 31 | our @ISA = qw(xPL::Validation); 32 | our %EXPORT_TAGS = ( 'all' => [ qw() ] ); 33 | our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } ); 34 | our @EXPORT = qw(); 35 | our $VERSION = qw/$Revision$/[1]; 36 | 37 | 1; 38 | __END__ 39 | 40 | =head2 EXPORT 41 | 42 | None by default. 43 | 44 | =head1 SEE ALSO 45 | 46 | Project website: http://www.xpl-perl.org.uk/ 47 | 48 | =head1 AUTHOR 49 | 50 | Mark Hindess, Esoft-xpl-perl@temporalanomaly.comE 51 | 52 | =head1 COPYRIGHT 53 | 54 | Copyright (C) 2005, 2008 by Mark Hindess 55 | 56 | This library is free software; you can redistribute it and/or modify 57 | it under the same terms as Perl itself, either Perl version 5.8.7 or, 58 | at your option, any later version of Perl 5 you may have available. 59 | 60 | =cut 61 | -------------------------------------------------------------------------------- /lib/xPL/Validation/Integer.pm: -------------------------------------------------------------------------------- 1 | package xPL::Validation::Integer; 2 | 3 | =head1 NAME 4 | 5 | xPL::Validation::Integer - Perl extension for xPL Validation integer class 6 | 7 | =head1 SYNOPSIS 8 | 9 | # this class is not expected to be used directly 10 | 11 | use xPL::Validation; 12 | 13 | my $validation = xPL::Validation->new(type => 'Integer'); 14 | 15 | =head1 DESCRIPTION 16 | 17 | This module creates an xPL validation which is used to validate fields 18 | of xPL messages. 19 | 20 | =head1 METHODS 21 | 22 | =cut 23 | 24 | use 5.006; 25 | use strict; 26 | use warnings; 27 | 28 | use xPL::Validation; 29 | #use AutoLoader qw(AUTOLOAD); 30 | 31 | our @ISA = qw(xPL::Validation); 32 | our %EXPORT_TAGS = ( 'all' => [ qw() ] ); 33 | our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } ); 34 | our @EXPORT = qw(); 35 | our $VERSION = qw/$Revision$/[1]; 36 | 37 | =head2 C 38 | 39 | This method returns true if the value is valid. 40 | 41 | =cut 42 | 43 | sub valid { 44 | defined $_[1] && $_[1] =~ qr/^-?\d+$/; 45 | } 46 | 47 | =head2 C 48 | 49 | This method returns a suitable error string for the validation. 50 | 51 | =cut 52 | 53 | sub error { 54 | 'It should be an integer.'; 55 | } 56 | 57 | 1; 58 | __END__ 59 | 60 | =head2 EXPORT 61 | 62 | None by default. 63 | 64 | =head1 SEE ALSO 65 | 66 | Project website: http://www.xpl-perl.org.uk/ 67 | 68 | =head1 AUTHOR 69 | 70 | Mark Hindess, Esoft-xpl-perl@temporalanomaly.comE 71 | 72 | =head1 COPYRIGHT 73 | 74 | Copyright (C) 2005, 2008 by Mark Hindess 75 | 76 | This library is free software; you can redistribute it and/or modify 77 | it under the same terms as Perl itself, either Perl version 5.8.7 or, 78 | at your option, any later version of Perl 5 you may have available. 79 | 80 | =cut 81 | -------------------------------------------------------------------------------- /lib/xPL/Validation/PositiveInteger.pm: -------------------------------------------------------------------------------- 1 | package xPL::Validation::PositiveInteger; 2 | 3 | =head1 NAME 4 | 5 | xPL::Validation::PositiveInteger - Perl extension for xPL Validation +ive int 6 | 7 | =head1 SYNOPSIS 8 | 9 | # this class is not expected to be used directly 10 | 11 | use xPL::Validation; 12 | 13 | my $validation = xPL::Validation->new(type => 'PositiveInteger'); 14 | 15 | =head1 DESCRIPTION 16 | 17 | This module creates an xPL validation which validates fields 18 | as positive integers. 19 | 20 | =head1 METHODS 21 | 22 | =cut 23 | 24 | use 5.006; 25 | use strict; 26 | use warnings; 27 | 28 | use xPL::Validation; 29 | #use AutoLoader qw(AUTOLOAD); 30 | 31 | our @ISA = qw(xPL::Validation); 32 | our %EXPORT_TAGS = ( 'all' => [ qw() ] ); 33 | our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } ); 34 | our @EXPORT = qw(); 35 | our $VERSION = qw/$Revision$/[1]; 36 | 37 | =head2 C 38 | 39 | This method returns true if the value is valid. 40 | 41 | =cut 42 | 43 | sub valid { 44 | defined $_[1] && $_[1] && $_[1] =~ qr/^\d+$/; 45 | } 46 | 47 | =head2 C 48 | 49 | This method returns a suitable error string for the validation. 50 | 51 | =cut 52 | 53 | sub error { 54 | 'It should be a positive integer.'; 55 | } 56 | 57 | 1; 58 | __END__ 59 | 60 | =head2 EXPORT 61 | 62 | None by default. 63 | 64 | =head1 SEE ALSO 65 | 66 | Project website: http://www.xpl-perl.org.uk/ 67 | 68 | =head1 AUTHOR 69 | 70 | Mark Hindess, Esoft-xpl-perl@temporalanomaly.comE 71 | 72 | =head1 COPYRIGHT 73 | 74 | Copyright (C) 2005, 2008 by Mark Hindess 75 | 76 | This library is free software; you can redistribute it and/or modify 77 | it under the same terms as Perl itself, either Perl version 5.8.7 or, 78 | at your option, any later version of Perl 5 you may have available. 79 | 80 | =cut 81 | -------------------------------------------------------------------------------- /lib/xPL/config/bnz-jabber.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | items: 3 | - name: newconf 4 | type: option 5 | - name: username 6 | type: reconf 7 | - name: password 8 | type: reconf 9 | - name: resource 10 | type: option 11 | - name: host 12 | type: option 13 | - name: port 14 | type: option 15 | - name: friend 16 | type: option 17 | number: 32 18 | -------------------------------------------------------------------------------- /lib/xPL/schema/ac.basic.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | default_message_type: xpl-cmnd 3 | types: 4 | xpl-cmnd: 5 | fields: 6 | - name: address 7 | die: 1 8 | - name: unit 9 | die: 1 10 | error: 'The unit should be a value from 0 to 15 or the word "group".' 11 | validation: 12 | type: Pattern 13 | pattern: '([0-9]|1[0-5]|group)' 14 | - name: command 15 | die: 1 16 | validation: 17 | type: Set 18 | set: 19 | - on 20 | - off 21 | - preset 22 | - name: level 23 | validation: 24 | type: IntegerRange 25 | min: 0 26 | max: 15 27 | summary: 28 | - name: command 29 | - name: address 30 | prefix: "/" 31 | - name: unit 32 | prefix: " " 33 | xpl-trig: 34 | fields: 35 | - name: address 36 | die: 1 37 | - name: unit 38 | die: 1 39 | error: 'The unit should be a value from 0 to 15 or the word "group".' 40 | validation: 41 | type: Pattern 42 | pattern: '([0-9]|1[0-5]|group)' 43 | - name: command 44 | die: 1 45 | validation: 46 | type: Set 47 | set: 48 | - on 49 | - off 50 | - preset 51 | - name: level 52 | validation: 53 | type: IntegerRange 54 | min: 0 55 | max: 15 56 | summary: 57 | - name: command 58 | - name: address 59 | prefix: "/" 60 | - name: unit 61 | prefix: " " 62 | -------------------------------------------------------------------------------- /lib/xPL/schema/audio.basic.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | doc: http://xplproject.org.uk/wiki/index.php?title=Schema_-_AUDIO.BASIC 3 | default_message_type: xpl-cmnd 4 | types: 5 | xpl-cmnd: 6 | fields: 7 | - name: command 8 | required: 1 9 | validation: 10 | pattern: '(play|stop|volume\s?[-+<>]?\d+|skip|back|random|clear)' 11 | type: Pattern 12 | summary: 13 | - name: command 14 | xpl-trig: 15 | fields: 16 | - name: command 17 | required: 1 18 | validation: 19 | pattern: '(play|stop|volume\s?[-+<>]?\d+|skip|back|random|clear)' 20 | type: Pattern 21 | summary: 22 | - name: command 23 | xpl-stat: 24 | fields: 25 | - name: status 26 | required: 1 27 | validation: 28 | type: Set 29 | set: 30 | - stopped 31 | - playing 32 | - next 33 | - name: type 34 | - name: station 35 | - name: artist 36 | - name: album 37 | - name: track 38 | summary: 39 | - name: status 40 | -------------------------------------------------------------------------------- /lib/xPL/schema/audio.request.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | doc: http://wiki.xplproject.org.uk/index.php/Schema_-_AUDIO.BASIC 3 | types: 4 | xpl-cmnd: 5 | fields: 6 | - name: command 7 | default: status 8 | die: 1 9 | validation: 10 | set: 11 | - status 12 | type: Set 13 | -------------------------------------------------------------------------------- /lib/xPL/schema/cid.basic.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | doc: http://xplproject.org.uk/wiki/index.php?title=Schema_-_CID.BASIC 3 | default_message_type: xpl-trig 4 | types: 5 | xpl-trig: 6 | fields: 7 | - name: calltype 8 | die: 1 9 | required: 1 10 | validation: 11 | type: Set 12 | set: 13 | - inbound 14 | - outbound 15 | - name: phone 16 | required: 1 17 | summary: 18 | - name: calltype 19 | - name: phone 20 | prefix: / 21 | -------------------------------------------------------------------------------- /lib/xPL/schema/clock.update.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | default_message_type: xpl-stat 3 | types: 4 | xpl-stat: 5 | fields: 6 | - name: time 7 | error: "It should be 14 digits of the form 'YYYYMMDDhhmmss'." 8 | die: 1 9 | validation: 10 | type: Pattern 11 | pattern: '\d{14}' 12 | summary: 13 | - name: time 14 | -------------------------------------------------------------------------------- /lib/xPL/schema/config.app.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | doc: http://xplproject.org.uk/wiki/index.php?title=Schema_-_CONFIG 3 | default_message_type: xpl-stat 4 | types: 5 | xpl-stat: 6 | fields: 7 | - name: interval 8 | default: 5 9 | validation: 10 | type: IntegerRange 11 | min: 5 12 | max: 30 13 | - name: port 14 | required: 1 15 | die: 1 16 | validation: 17 | type: IntegerRange 18 | min: 1024 19 | max: 65535 20 | - name: remote_ip 21 | required: 1 22 | die: 1 23 | validation: 24 | type: IP 25 | -------------------------------------------------------------------------------- /lib/xPL/schema/config.basic.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | doc: http://xplproject.org.uk/wiki/index.php?title=Schema_-_CONFIG 3 | default_message_type: xpl-stat 4 | types: 5 | xpl-stat: 6 | fields: 7 | - name: interval 8 | default: 5 9 | validation: 10 | type: IntegerRange 11 | min: 5 12 | max: 30 13 | -------------------------------------------------------------------------------- /lib/xPL/schema/config.current.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | doc: http://xplproject.org.uk/wiki/index.php?title=Schema_-_CONFIG 3 | default_message_type: xpl-cmnd 4 | types: 5 | xpl-cmnd: 6 | fields: 7 | - name: command 8 | required: 1 9 | validation: 10 | type: Set 11 | set: 12 | - request 13 | summary: 14 | - name: command 15 | xpl-stat: 16 | fields: [] 17 | -------------------------------------------------------------------------------- /lib/xPL/schema/config.end.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | doc: http://xplproject.org.uk/wiki/index.php?title=Schema_-_CONFIG 3 | default_message_type: xpl-stat 4 | types: 5 | xpl-stat: 6 | fields: 7 | - name: interval 8 | default: 5 9 | validation: 10 | type: IntegerRange 11 | min: 5 12 | max: 30 13 | - name: port 14 | required: 1 15 | die: 1 16 | validation: 17 | type: IntegerRange 18 | min: 1024 19 | max: 65535 20 | - name: remote_ip 21 | required: 1 22 | die: 1 23 | validation: 24 | type: IP 25 | -------------------------------------------------------------------------------- /lib/xPL/schema/config.list.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | doc: http://xplproject.org.uk/wiki/index.php?title=Schema_-_CONFIG 3 | default_message_type: xpl-cmnd 4 | types: 5 | xpl-cmnd: 6 | fields: 7 | - name: command 8 | required: 1 9 | validation: 10 | type: Set 11 | set: 12 | - request 13 | summary: 14 | - name: command 15 | xpl-stat: 16 | fields: 17 | - name: config 18 | multiple: 1 19 | - name: reconf 20 | multiple: 1 21 | - name: option 22 | multiple: 1 23 | summary: 24 | - name: reconf 25 | -------------------------------------------------------------------------------- /lib/xPL/schema/config.response.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | doc: http://xplproject.org.uk/wiki/index.php?title=Schema_-_CONFIG 3 | default_message_type: xpl-cmnd 4 | types: 5 | xpl-cmnd: 6 | fields: [] 7 | -------------------------------------------------------------------------------- /lib/xPL/schema/control.basic.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | doc: http://xplproject.org.uk/wiki/index.php?title=Schema_-_CONTROL.BASIC 3 | default_message_type: xpl-cmnd 4 | types: 5 | xpl-cmnd: 6 | fields: 7 | - name: device 8 | required: 1 9 | - name: type 10 | required: 1 11 | validation: 12 | type: Set 13 | set: 14 | - balance 15 | - flag 16 | - infrared 17 | - input 18 | - macro 19 | - mute 20 | - output 21 | - variable 22 | - periodic 23 | - scheduled 24 | - slider 25 | - timer 26 | - name: current 27 | required: 1 28 | - name: data1 29 | - name: name 30 | summary: 31 | - name: device 32 | - name: type 33 | prefix: '[' 34 | suffix: ']' 35 | - name: current 36 | prefix: = 37 | -------------------------------------------------------------------------------- /lib/xPL/schema/datetime.basic.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | doc: http://xplproject.org.uk/wiki/index.php?title=Schema_-_DATETIME.BASIC 3 | default_message_type: xpl-trig 4 | types: 5 | xpl-trig: 6 | fields: 7 | - name: datetime 8 | die: 1 9 | required: 1 10 | - name: date 11 | die: 1 12 | required: 1 13 | - name: time 14 | die: 1 15 | required: 1 16 | summary: 17 | - name: date 18 | - name: time 19 | xpl-stat: 20 | fields: 21 | - name: status 22 | die: 1 23 | required: 1 24 | summary: 25 | - name: status 26 | -------------------------------------------------------------------------------- /lib/xPL/schema/datetime.request.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | doc: http://xplproject.org.uk/wiki/index.php?title=Schema_-_DATETIME.BASIC 3 | default_message_type: xpl-cmnd 4 | types: 5 | xpl-cmnd: 6 | fields: 7 | - name: command 8 | default: set 9 | die: 1 10 | validation: 11 | type: Set 12 | set: 13 | - status 14 | summary: 15 | - name: command 16 | -------------------------------------------------------------------------------- /lib/xPL/schema/dawndusk.basic.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | doc: http://xplproject.org.uk/wiki/index.php?title=Schema_-_DAWNDUSK.BASIC 3 | default_message_type: xpl-trig 4 | types: 5 | xpl-trig: 6 | fields: 7 | - name: type 8 | default: dawndusk 9 | die: 1 10 | validation: 11 | type: Set 12 | set: 13 | - dawndusk 14 | - name: status 15 | die: 1 16 | required: 1 17 | validation: 18 | type: Set 19 | set: 20 | - dawn 21 | - dusk 22 | summary: 23 | - name: type 24 | - name: status 25 | prefix: / 26 | xpl-stat: 27 | fields: 28 | - name: type 29 | default: daynight 30 | die: 1 31 | validation: 32 | type: Set 33 | set: 34 | - daynight 35 | - name: status 36 | die: 1 37 | required: 1 38 | validation: 39 | type: Set 40 | set: 41 | - day 42 | - night 43 | summary: 44 | - name: type 45 | - name: status 46 | prefix: / 47 | -------------------------------------------------------------------------------- /lib/xPL/schema/dawndusk.request.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | doc: http://xplproject.org.uk/wiki/index.php?title=Schema_-_DAWNDUSK.BASIC 3 | default_message_type: xpl-cmnd 4 | types: 5 | xpl-cmnd: 6 | fields: 7 | - name: command 8 | default: status 9 | die: 1 10 | validation: 11 | type: Set 12 | set: 13 | - status 14 | - name: query 15 | default: daynight 16 | die: 1 17 | validation: 18 | type: Set 19 | set: 20 | - daynight 21 | summary: 22 | - name: command 23 | - name: query 24 | prefix: / 25 | -------------------------------------------------------------------------------- /lib/xPL/schema/dmx.basic.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | default_message_type: xpl-cmnd 3 | types: 4 | xpl-cmnd: 5 | fields: 6 | - name: base 7 | required: 1 8 | - name: type 9 | required: 1 10 | validation: 11 | type: Set 12 | set: 13 | - set 14 | - name: value 15 | required: 1 16 | summary: 17 | - name: type 18 | - name: base 19 | prefix: ':' 20 | - name: value 21 | prefix: = 22 | -------------------------------------------------------------------------------- /lib/xPL/schema/dmx.confirm.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | default_message_type: xpl-trig 3 | types: 4 | xpl-trig: 5 | fields: 6 | - name: base 7 | required: 1 8 | - name: type 9 | required: 1 10 | validation: 11 | type: Set 12 | set: 13 | - set 14 | - name: value 15 | required: 1 16 | summary: 17 | - name: type 18 | - name: base 19 | prefix: ':' 20 | - name: value 21 | prefix: = 22 | -------------------------------------------------------------------------------- /lib/xPL/schema/hbeat.app.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | doc: http://xplproject.org.uk/wiki/index.php?title=Schema_-_HBEAT 3 | default_message_type: xpl-stat 4 | types: 5 | xpl-stat: 6 | fields: 7 | - name: interval 8 | default: 5 9 | validation: 10 | type: IntegerRange 11 | min: 5 12 | max: 30 13 | - name: port 14 | required: 1 15 | die: 1 16 | validation: 17 | type: IntegerRange 18 | min: 1024 19 | max: 65535 20 | - name: remote_ip 21 | required: 1 22 | die: 1 23 | validation: 24 | type: IP 25 | - name: version 26 | -------------------------------------------------------------------------------- /lib/xPL/schema/hbeat.basic.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | doc: http://xplproject.org.uk/wiki/index.php?title=Schema_-_HBEAT 3 | default_message_type: xpl-stat 4 | types: 5 | xpl-stat: 6 | fields: 7 | - name: interval 8 | default: 5 9 | validation: 10 | type: IntegerRange 11 | min: 5 12 | max: 30 13 | - name: version 14 | -------------------------------------------------------------------------------- /lib/xPL/schema/hbeat.end.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | doc: http://xplproject.org.uk/wiki/index.php?title=Schema_-_HBEAT 3 | default_message_type: xpl-stat 4 | types: 5 | xpl-stat: 6 | fields: 7 | - name: interval 8 | default: 5 9 | validation: 10 | type: IntegerRange 11 | min: 5 12 | max: 30 13 | - name: port 14 | required: 1 15 | die: 1 16 | validation: 17 | type: IntegerRange 18 | min: 1024 19 | max: 65535 20 | - name: remote_ip 21 | required: 1 22 | die: 1 23 | validation: 24 | type: IP 25 | -------------------------------------------------------------------------------- /lib/xPL/schema/hbeat.request.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | doc: http://wiki.xplproject.org.uk/index.php/XPL_Specification_Document 3 | default_message_type: xpl-cmnd 4 | types: 5 | xpl-cmnd: 6 | fields: 7 | - name: command 8 | default: request 9 | validation: 10 | type: Set 11 | set: 12 | - request 13 | -------------------------------------------------------------------------------- /lib/xPL/schema/homeeasy.basic.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | doc: http://xplproject.org.uk/wiki/index.php?title=Schema_-_HOMEEASY.BASIC 3 | default_message_type: xpl-cmnd 4 | types: 5 | xpl-cmnd: 6 | fields: 7 | - name: address 8 | die: 1 9 | - name: unit 10 | die: 1 11 | error: 'The unit should be a value from 0 to 15 or the word "group".' 12 | validation: 13 | type: Pattern 14 | pattern: '([0-9]|1[0-5]|group)' 15 | - name: command 16 | die: 1 17 | validation: 18 | type: Set 19 | set: 20 | - on 21 | - off 22 | - preset 23 | - name: level 24 | validation: 25 | type: IntegerRange 26 | min: 0 27 | max: 15 28 | summary: 29 | - name: command 30 | - name: address 31 | prefix: "/" 32 | - name: unit 33 | prefix: " " 34 | xpl-trig: 35 | fields: 36 | - name: address 37 | die: 1 38 | - name: unit 39 | die: 1 40 | error: 'The unit should be a value from 0 to 15 or the word "group".' 41 | validation: 42 | type: Pattern 43 | pattern: '([0-9]|1[0-5]|group)' 44 | - name: command 45 | die: 1 46 | validation: 47 | type: Set 48 | set: 49 | - on 50 | - off 51 | - preset 52 | - name: level 53 | validation: 54 | type: IntegerRange 55 | min: 0 56 | max: 15 57 | summary: 58 | - name: command 59 | - name: address 60 | prefix: "/" 61 | - name: unit 62 | prefix: " " 63 | -------------------------------------------------------------------------------- /lib/xPL/schema/im.basic.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | default_message_type: xpl-cmnd 3 | types: 4 | xpl-cmnd: 5 | fields: 6 | - name: body 7 | required: 1 8 | - name: to 9 | required: 1 10 | summary: 11 | - name: to 12 | - name: body 13 | prefix: ":" 14 | xpl-trig: 15 | fields: 16 | - name: body 17 | required: 1 18 | - name: from 19 | required: 1 20 | summary: 21 | - name: from 22 | - name: body 23 | prefix: ":" 24 | -------------------------------------------------------------------------------- /lib/xPL/schema/im.confirm.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | default_message_type: xpl-trig 3 | types: 4 | xpl-trig: 5 | fields: 6 | - name: status 7 | required: 1 8 | - name: error 9 | summary: 10 | - name: status 11 | - name: error 12 | prefix: ":" 13 | optional: 1 14 | -------------------------------------------------------------------------------- /lib/xPL/schema/osd.basic.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | doc: http://xplproject.org.uk/wiki/index.php?title=Schema_-_OSD.BASIC 3 | default_message_type: xpl-cmnd 4 | types: 5 | xpl-cmnd: 6 | fields: 7 | - name: command 8 | required: 1 9 | validation: 10 | set: 11 | - clear 12 | - write 13 | - exclusive 14 | - release 15 | type: Set 16 | - name: text 17 | - name: row 18 | - name: column 19 | - name: delay 20 | error: 'It should be a positive number.' 21 | validation: 22 | type: Pattern 23 | pattern: '[\d.]+' 24 | summary: 25 | - name: command 26 | - name: text 27 | optional: 1 28 | prefix: ":" 29 | -------------------------------------------------------------------------------- /lib/xPL/schema/ping.request.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | default_message_type: xpl-cmnd 3 | types: 4 | xpl-cmnd: 5 | -------------------------------------------------------------------------------- /lib/xPL/schema/ping.response.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | default_message_type: xpl-stat 3 | types: 4 | xpl-stat: 5 | fields: 6 | - name: state 7 | - name: delay 8 | - name: checktime 9 | summary: 10 | - name: state 11 | - name: checktime 12 | prefix: " " 13 | - name: delay 14 | prefix: " " 15 | -------------------------------------------------------------------------------- /lib/xPL/schema/ping.status.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | default_message_type: xpl-stat 3 | types: 4 | xpl-stat: 5 | fields: 6 | - name: state 7 | - name: roundtriptime 8 | - name: checktime 9 | summary: 10 | - name: state 11 | - name: roundtriptime 12 | prefix: " " 13 | - name: checktime 14 | prefix: " " 15 | -------------------------------------------------------------------------------- /lib/xPL/schema/remote.basic.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | doc: http://xplproject.org.uk/wiki/index.php?title=Schema_-_REMOTE.BASIC 3 | types: 4 | xpl-trig: 5 | fields: 6 | - name: keys 7 | required: 1 8 | - name: device 9 | - name: zone 10 | summary: 11 | - name: keys 12 | - name: device 13 | prefix: " d=" 14 | - name: zone 15 | prefix: " z=" 16 | xpl-cmnd: 17 | fields: 18 | - name: keys 19 | required: 1 20 | - name: device 21 | - name: zone 22 | - name: delay 23 | validation: 24 | type: Pattern 25 | pattern: '\d+' 26 | summary: 27 | - name: keys 28 | - name: device 29 | prefix: " d=" 30 | - name: zone 31 | prefix: " z=" 32 | -------------------------------------------------------------------------------- /lib/xPL/schema/remote.confirm.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | doc: http://wiki.xplproject.org.uk/index.php/Schema_-_REMOTE.BASIC 3 | types: 4 | xpl-trig: 5 | fields: 6 | - name: keys 7 | required: 1 8 | - name: device 9 | - name: zone 10 | summary: 11 | - name: keys 12 | - name: device 13 | prefix: " d=" 14 | - name: zone 15 | prefix: " z=" 16 | -------------------------------------------------------------------------------- /lib/xPL/schema/security.zone.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | doc: http://xplproject.org.uk/wiki/index.php?title=Schema_-_SECURITY 3 | default_message_type: xpl-trig 4 | types: 5 | xpl-trig: 6 | fields: 7 | - name: event 8 | die: 1 9 | validation: 10 | type: Set 11 | set: 12 | - armed 13 | - arm-failed 14 | - disarmed 15 | - alarm 16 | - alert 17 | - tamper 18 | - isolated 19 | - bypassed 20 | - dark 21 | - low-battery 22 | - name: zone 23 | die: 1 24 | required: 1 25 | - name: state 26 | validation: 27 | type: Set 28 | set: 29 | - true 30 | - false 31 | - name: alarm-type 32 | validation: 33 | type: Set 34 | set: 35 | - burglary 36 | - fire 37 | - flood 38 | - gas 39 | - silent 40 | - duress 41 | - name: user 42 | summary: 43 | - name: event 44 | - name: zone 45 | prefix: "/" 46 | - name: state 47 | prefix: " state=" 48 | - name: alarm-type 49 | prefix: " type=" 50 | - name: user 51 | prefix: " user=" 52 | -------------------------------------------------------------------------------- /lib/xPL/schema/sendmsg.basic.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | doc: http://xplproject.org.uk/wiki/index.php?title=Schema_-_SENDMSG.BASIC 3 | default_message_type: xpl-cmnd 4 | types: 5 | xpl-cmnd: 6 | fields: 7 | - name: body 8 | required: 1 9 | - name: to 10 | required: 1 11 | summary: 12 | - name: to 13 | - name: body 14 | prefix: ":" 15 | -------------------------------------------------------------------------------- /lib/xPL/schema/sendmsg.confirm.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | doc: http://xplproject.org.uk/wiki/index.php?title=Schema_-_SENDMSG.BASIC 3 | default_message_type: xpl-trig 4 | types: 5 | xpl-trig: 6 | fields: 7 | - name: status 8 | required: 1 9 | - name: error 10 | summary: 11 | - name: status 12 | - name: error 13 | prefix: ":" 14 | optional: 1 15 | -------------------------------------------------------------------------------- /lib/xPL/schema/sensor.network.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | types: 3 | xpl-trig: 4 | fields: 5 | - name: device 6 | required: 1 7 | - name: type 8 | required: 1 9 | validation: 10 | type: Set 11 | set: 12 | - packets 13 | - bytes 14 | - bps 15 | - db 16 | - name: current 17 | required: 1 18 | - name: lowest 19 | - name: highest 20 | - name: units 21 | summary: 22 | - name: device 23 | - name: type 24 | prefix: '[' 25 | suffix: ']' 26 | - name: current 27 | prefix: = 28 | xpl-cmnd: 29 | fields: 30 | - name: request 31 | required: 1 32 | - name: device 33 | - name: type 34 | summary: 35 | - name: request 36 | - name: device 37 | prefix: " d=" 38 | - name: type 39 | prefix: " t=" 40 | xpl-stat: 41 | fields: 42 | - name: device 43 | required: 1 44 | - name: type 45 | required: 1 46 | validation: 47 | type: Set 48 | set: 49 | - packets 50 | - bytes 51 | - bps 52 | - db 53 | - name: current 54 | required: 1 55 | - name: lowest 56 | - name: highest 57 | - name: units 58 | summary: 59 | - name: device 60 | - name: type 61 | prefix: '[' 62 | suffix: ']' 63 | - name: current 64 | prefix: = 65 | -------------------------------------------------------------------------------- /lib/xPL/schema/tts.basic.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | doc: http://xplproject.org.uk/wiki/index.php?title=Schema_-_TTS.BASIC 3 | default_message_type: xpl-cmnd 4 | types: 5 | xpl-cmnd: 6 | fields: 7 | - name: speech 8 | required: 1 9 | - name: volume 10 | die: 1 11 | validation: 12 | type: IntegerRange 13 | min: 0 14 | max: 100 15 | - name: speed 16 | die: 1 17 | validation: 18 | type: IntegerRange 19 | min: -10 20 | max: 10 21 | - name: voice 22 | summary: 23 | - name: speech 24 | -------------------------------------------------------------------------------- /lib/xPL/schema/ups.basic.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | doc: http://xplproject.org.uk/wiki/index.php?title=Schema_-_UPS.BASIC 3 | default_message_type: xpl-trig 4 | types: 5 | xpl-trig: 6 | fields: 7 | - name: status 8 | die: 1 9 | required: 1 10 | validation: 11 | type: Set 12 | set: 13 | - mains 14 | - battery 15 | - unknown 16 | - name: event 17 | die: 1 18 | required: 1 19 | validation: 20 | type: Set 21 | set: 22 | - onmains 23 | - onbattery 24 | - battlow 25 | - battfull 26 | - bti 27 | - btp 28 | - btf 29 | - comms_lost 30 | - comms_ok 31 | - input_freq_error 32 | - input_freq_ok 33 | - input_voltage_high 34 | - input_voltage_low 35 | - input_voltage_ok 36 | - output_voltage_high 37 | - output_voltage_low 38 | - output_voltage_ok 39 | - output_overload 40 | - output_ok 41 | - temp_high 42 | - temp_ok 43 | summary: 44 | - name: status 45 | - name: event 46 | prefix: " " 47 | -------------------------------------------------------------------------------- /lib/xPL/schema/wol.basic.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | default_message_type: xpl-cmnd 3 | types: 4 | xpl-cmnd: 5 | fields: 6 | - name: device 7 | required: 1 8 | - name: type 9 | required: 1 10 | validation: 11 | type: Set 12 | set: 13 | - wake 14 | summary: 15 | - name: device 16 | - name: type 17 | prefix: = 18 | -------------------------------------------------------------------------------- /lib/xPL/schema/wol.confirm.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | default_message_type: xpl-trig 3 | types: 4 | xpl-trig: 5 | fields: 6 | - name: device 7 | required: 1 8 | - name: type 9 | required: 1 10 | validation: 11 | type: Set 12 | set: 13 | - awake 14 | summary: 15 | - name: device 16 | - name: type 17 | prefix: = 18 | -------------------------------------------------------------------------------- /lib/xPL/schema/x10.confirm.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | doc: http://xplproject.org.uk/wiki/index.php?title=Schema_-_X10.BASIC 3 | default_message_type: xpl-trig 4 | types: 5 | xpl-trig: 6 | fields: 7 | - name: command 8 | die: 1 9 | validation: 10 | type: Set 11 | set: 12 | - select 13 | - all_units_off 14 | - all_units_on 15 | - all_lights_on 16 | - all_lights_off 17 | - on 18 | - off 19 | - dim 20 | - bright 21 | - extended 22 | - hail_req 23 | - hail_ack 24 | - predim1 25 | - predim2 26 | - status 27 | - status_on 28 | - status_off 29 | - name: device 30 | error: "It should be a comma-separated list of devices - e.g. 'A1,F12,G9'." 31 | validation: 32 | type: Pattern 33 | pattern: '[A-Pa-p]([1-9]|1[0-6])(,\s*[A-Pa-p]([1-9]|1[0-6]))*' 34 | - name: house 35 | error: "It should be a list of house codes - e.g. 'AFG'." 36 | validation: 37 | type: Pattern 38 | pattern: '[A-Pa-p]+' 39 | - name: level 40 | validation: 41 | type: IntegerRange 42 | min: 0 43 | max: 100 44 | - name: data1 45 | validation: 46 | type: IntegerRange 47 | min: 0 48 | max: 255 49 | - name: data2 50 | validation: 51 | type: IntegerRange 52 | min: 0 53 | max: 255 54 | summary: 55 | - name: command 56 | - name: device 57 | prefix: " " 58 | - name: house 59 | prefix: " " 60 | -------------------------------------------------------------------------------- /lib/xPL/schema/x10.security.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | doc: http://xplproject.org.uk/wiki/index.php?title=Schema_-_X10.SECURITY 3 | default_message_type: xpl-trig 4 | types: 5 | xpl-trig: 6 | fields: 7 | - name: command 8 | die: 1 9 | validation: 10 | type: Set 11 | set: 12 | - alert 13 | - normal 14 | - motion 15 | - light 16 | - dark 17 | - arm-home 18 | - arm-away 19 | - disarm 20 | - panic 21 | - lights-on 22 | - lights-off 23 | - name: device 24 | - name: type 25 | - name: tamper 26 | validation: 27 | type: Set 28 | set: 29 | - true 30 | - false 31 | - name: low-battery 32 | validation: 33 | type: Set 34 | set: 35 | - true 36 | - false 37 | - name: delay 38 | validation: 39 | type: Set 40 | set: 41 | - min 42 | - max 43 | summary: 44 | - name: command 45 | - name: device 46 | prefix: " " 47 | - name: type 48 | prefix: " " 49 | - name: tamper 50 | prefix: " tamper=" 51 | - name: low-battery 52 | prefix: " lowbat=" 53 | - name: delay 54 | prefix: " delay=" 55 | -------------------------------------------------------------------------------- /misc/README: -------------------------------------------------------------------------------- 1 | This directory contains test tools that I'm using some of them might 2 | become real scripts but for now they are just for debugging. 3 | -------------------------------------------------------------------------------- /misc/process_variable_length: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl -w 2 | 3 | # perl -Iblib/lib misc/process_variable_length 50aacc134d422470455310 4 | # will dump the full decode for that message 5 | 6 | use strict; 7 | use xPL::RF; 8 | my $rf = xPL::RF->new(source => "bnz-rftest.default", verbose => 0); 9 | foreach (@ARGV) { 10 | print lc $_, "\n\n"; 11 | my $warn; 12 | local $SIG{__WARN__} = sub { $warn .= $_[0]; }; 13 | my $r; 14 | eval { $r = $rf->process_variable_length(pack "H*", $_); }; 15 | die $@ if ($@); 16 | if ($r) { 17 | print $r->{length}," bytes\n\n"; 18 | if ($r->{messages} && @{$r->{messages}}) { 19 | print scalar @{$r->{messages}}, " messages\n\n"; 20 | foreach my $m (@{$r->{messages}}) { 21 | my $msg = xPL::Message->new(head => {source => 'bnz-rftest.default'}, 22 | message_type => 'xpl-trig', %$m); 23 | print $msg->string(); 24 | } 25 | print "\n"; 26 | } else { 27 | print "0 messages\n\nempty\n\n"; 28 | } 29 | } else { 30 | print "undef\n\nundef\n\n"; 31 | } 32 | if ($warn) { 33 | print $warn,"\n"; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /t/00-helpers.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl -w 2 | # 3 | # Copyright (C) 2005, 2009 by Mark Hindess 4 | 5 | use strict; 6 | use Test::More tests => 4; 7 | use t::Helpers qw/:all/; 8 | 9 | is(test_error(sub { die 'argh' }), 10 | 'argh', 11 | 'died horribly'); 12 | 13 | is(test_warn(sub { warn 'danger will robinson' }), 14 | 'danger will robinson', 15 | 'warned nicely'); 16 | 17 | is(test_output(sub { print "stdout"; }, \*STDOUT), 18 | 'stdout', 'catching stdout'); 19 | is(test_output(sub { print STDERR "stderr"; }, \*STDERR), 20 | 'stderr', 'catching stderr'); 21 | 22 | -------------------------------------------------------------------------------- /t/01-pod.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | use strict; 4 | use warnings; 5 | use Test::More; 6 | 7 | eval "use Test::Pod 1.14"; 8 | plan skip_all => 'Test::Pod 1.14 required' if $@; 9 | all_pod_files_ok(); 10 | -------------------------------------------------------------------------------- /t/01-xpl-base.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl -w 2 | # 3 | # Copyright (C) 2005, 2009 by Mark Hindess 4 | 5 | use strict; 6 | use Test::More tests => 13; 7 | use t::Helpers qw/test_warn test_error test_output/; 8 | 9 | use_ok('xPL::Base'); 10 | 11 | { 12 | package xPL::Test; 13 | our @ISA=qw/xPL::Base/; 14 | __PACKAGE__->make_readonly_accessor(qw/test/); 15 | sub new { 16 | my $pkg = shift; 17 | my $self = {}; 18 | bless $self, $pkg; 19 | return $self; 20 | } 21 | } 22 | 23 | my $test = xPL::Test->new(); 24 | ok($test); 25 | 26 | ok($test->module_available('strict'), 'module available test already used'); 27 | ok(!$test->module_available('sloppy'), 'module not available test'); 28 | ok($test->module_available('strict'), 'module available test w/cache'); 29 | ok($test->module_available('POSIX'), 'module available test'); 30 | 31 | is(test_warn(sub { $test->test('argh'); }), 32 | 'xPL::Test->test: called with an argument, but test is readonly', 33 | 'testing writing to readonly method'); 34 | 35 | 36 | is(test_error(sub { xPL::Test->make_readonly_accessor(); }), 37 | 'xPL::Test->make_readonly_accessor: BUG: missing attribute name', 38 | 'error message on making item attribute method without attribute name'); 39 | 40 | my @l = xPL::Base::simple_tokenizer("minutes='[10,20,30]'"); 41 | is(scalar @l, 2, 'simple_tokenizer - array ref'); 42 | is($l[1]->[1], 20, 'simple_tokenizer - array ref element'); 43 | 44 | is(test_output(sub { $test->info("test") }, \*STDOUT), 45 | '', 'info method !verbose'); 46 | $test->verbose(1); 47 | is(test_output(sub { $test->info("test") }, \*STDOUT), 48 | 'test', 'info method verbose'); 49 | 50 | is(test_error(sub { $test->call_callback('foo', 'bar') }), 51 | q{xPL::Test->call_callback: BUG: callback bar of type, foo, doesn't exist}, 52 | 'call_callback bug case'); 53 | -------------------------------------------------------------------------------- /t/01-xpl-utils.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl -w 2 | # 3 | # Copyright (C) 2010 by Mark Hindess 4 | 5 | use strict; 6 | use Test::More tests => 9; 7 | use t::Helpers qw/test_warn test_error/; 8 | 9 | use_ok('xPL::Utils',qw/:all/); 10 | is(lo_nibble(0x16), 6, 'low nibble'); 11 | is(hi_nibble(0x16), 1, 'high nibble'); 12 | 13 | my $bytes = [0x10, 0x20, 0x40, 0x81]; 14 | is(nibble_sum(3, $bytes), 0x7, 'nibble_sum of three bytes'); 15 | is(nibble_sum(3.5, $bytes), 0xf, 'nibble_sum of three and a half bytes'); 16 | is(nibble_sum(4, $bytes), 0x10, 'nibble_sum of four bytes'); 17 | my @nib = map { hex $_ } split //, unpack "H*", pack "C*", @$bytes; 18 | is(new_nibble_sum(6, \@nib), 0x7, 'nibble_sum of three bytes'); 19 | is(new_nibble_sum(7, \@nib), 0xf, 'nibble_sum of three and a half bytes'); 20 | is(new_nibble_sum(8, \@nib), 0x10, 'nibble_sum of four bytes'); 21 | 22 | -------------------------------------------------------------------------------- /t/02-message-v.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl -w 2 | # 3 | # Copyright (C) 2010 by Mark Hindess 4 | 5 | use strict; 6 | $ENV{XPL_MESSAGE_VALIDATE} = 1; 7 | do 't/02-message.t'; 8 | -------------------------------------------------------------------------------- /t/02-schema-yaml.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl -w 2 | # 3 | # Copyright (C) 2009 by Mark Hindess 4 | 5 | use strict; 6 | use English qw/-no_match_vars/; 7 | use Test::More; 8 | my %yaml; 9 | 10 | my $tests = 0; 11 | my $SLASH = q{/}; 12 | my $dir = 'lib/xPL/schema'; 13 | opendir my $dh, $dir or die "Open of $dir directory: $ERRNO\n"; 14 | foreach (sort readdir $dh) { 15 | next if (!/^(.*)\.yaml$/); 16 | my $name = $LAST_PAREN_MATCH; 17 | my $f = $dir.$SLASH.$_; 18 | $yaml{$name} = $f; 19 | $tests += 3; 20 | } 21 | closedir $dh; 22 | eval { require YAML; }; 23 | if ($@) { 24 | plan skip_all => 'YAML not available'; 25 | } 26 | eval { require YAML::Syck; }; 27 | if ($@) { 28 | plan skip_all => 'YAML::Syck not available'; 29 | } 30 | plan tests => $tests; 31 | 32 | foreach my $name (sort keys %yaml) { 33 | my $file = $yaml{$name}; 34 | my $yaml = YAML::LoadFile($file); 35 | ok($yaml, $name.' - YAML'); 36 | my $syck = YAML::Syck::LoadFile($file); 37 | ok($syck, $name.' - YAML::SYCK'); 38 | is_deeply($syck, $yaml, $name.' - YAML::Syck should match YAML'); 39 | } 40 | -------------------------------------------------------------------------------- /t/03-message-errors-v.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl -w 2 | # 3 | # Copyright (C) 2010 by Mark Hindess 4 | 5 | use strict; 6 | $ENV{XPL_MESSAGE_VALIDATE} = 1; 7 | do 't/03-message-errors.t'; 8 | -------------------------------------------------------------------------------- /t/03-message-method-maker.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl -w 2 | # 3 | # Copyright (C) 2005, 2007 by Mark Hindess 4 | 5 | use strict; 6 | use Test::More tests => 3; 7 | BEGIN { 8 | $ENV{XPL_MESSAGE_VALIDATE} = 1; 9 | $ENV{XPL_SCHEMA_PATH} = 't/schema'; 10 | package xPL::ValidatedMessage::test::basic::xpltrig; 11 | sub fieldname { 12 | return "field not overriden"; 13 | } 14 | sub body_fields { 15 | return "body_fields not overriden"; 16 | } 17 | } 18 | use xPL::Message; 19 | use lib 't/lib'; 20 | no warnings qw/deprecated/; 21 | 22 | my $msg = xPL::Message->new(schema => 'test.basic', 23 | head => { source => 'bnz-test.default' }); 24 | ok($msg); 25 | is($msg->fieldname, 'field not overriden', 26 | 'field not overriden by automatic methods'); 27 | is($msg->body_fields, 'body_fields not overriden', 28 | 'body_fields not overriden by automatic methods'); 29 | -------------------------------------------------------------------------------- /t/04-clock.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl -w 2 | # 3 | # Copyright (C) 2005, 2007 by Mark Hindess 4 | 5 | use strict; 6 | use Test::More tests => 3; 7 | use POSIX qw/strftime/; 8 | 9 | use_ok("xPL::Message"); 10 | my $t=strftime("%Y%m%d%H%M%S", localtime(time)); 11 | my $msg = xPL::Message->new(message_type => 'xpl-stat', 12 | schema => "clock.update", 13 | head => { source => "acme-clock.hall", }, 14 | body => [ time => $t ]); 15 | ok($msg, "created clock update message"); 16 | is($msg->field('time'), $t, "clock update time"); 17 | -------------------------------------------------------------------------------- /t/04-osd-errors.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl -w 2 | # 3 | # Copyright (C) 2005, 2007 by Mark Hindess 4 | 5 | use strict; 6 | use Test::More tests => 2; 7 | use t::Helpers qw/test_error/; 8 | 9 | BEGIN { 10 | $ENV{XPL_MESSAGE_VALIDATE} = 1; 11 | } 12 | 13 | use_ok("xPL::Message"); 14 | 15 | my $msg; 16 | is(test_error(sub { 17 | $msg = xPL::Message->new( 18 | message_type => 'xpl-cmnd', 19 | schema => "osd.basic", 20 | head => { source => "vendor-device.instance" }, 21 | ); }), 22 | "xPL::ValidatedMessage::osd::basic::xplcmnd->process_field_record: requires 'command' parameter in body", 23 | "xPL::Message::osd::basic missing command test"); 24 | -------------------------------------------------------------------------------- /t/04-queue.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl -w 2 | # 3 | # Copyright (C) 2008 by Mark Hindess 4 | 5 | use strict; 6 | use Test::More tests => 281; 7 | $|=1; 8 | 9 | use_ok('xPL::Queue'); 10 | 11 | my $q = xPL::Queue->new(); 12 | ok($q, 'test xpl queue object create'); 13 | 14 | ok($q->is_empty, 'is empty initially'); 15 | is($q->length, 0, 'length is 0 initially'); 16 | ok(!defined $q->dequeue, 'dequeue when empty'); 17 | ok(!defined $q->average_queue_time, 'average_queue_time when empty'); 18 | is($q->number_of_queue_time_samples, 0, 'no queue time samples initially'); 19 | 20 | $q->enqueue('test'); 21 | ok(!$q->is_empty, 'is not empty'); 22 | is($q->length, 1, 'length is 1'); 23 | ok(!defined $q->average_queue_time, 'average_queue_time when still queued'); 24 | is($q->number_of_queue_time_samples, 0, 25 | 'no queue time samples when still queued'); 26 | is($q->dequeue, 'test', 'dequeue when not empty'); 27 | is($q->length, 0, 'length is 0 initially'); 28 | ok(!defined $q->dequeue, 'dequeue when empty'); 29 | ok(defined $q->average_queue_time, 'average_queue_time'); 30 | is($q->number_of_queue_time_samples, 1, 'one queue time sample'); 31 | 32 | foreach (1..53) { 33 | $q->enqueue($_); 34 | is($q->length, $_, 'length is '.$_); 35 | is($q->number_of_queue_time_samples, 1, 36 | 'queue time samples when still queued'); 37 | } 38 | foreach (1..53) { 39 | is($q->dequeue, $_, 'dequeue '.$_); 40 | is($q->length, 53-$_, 'length is '.(53-$_)); 41 | my $samples = $_ >= 50 ? 50 : 1+$_; 42 | is($q->number_of_queue_time_samples, $samples, 43 | $samples.' queue time samples'); 44 | } 45 | -------------------------------------------------------------------------------- /t/05-listener-anyevent.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl -w 2 | # 3 | # Copyright (C) 2010 by Mark Hindess 4 | 5 | use strict; 6 | BEGIN { 7 | eval { require AnyEvent; import AnyEvent; }; 8 | if ($@) { 9 | require Test::More; 10 | import Test::More skip_all => 'AnyEvent not available'; 11 | } 12 | } 13 | 14 | do 't/05-listener.t' or die $@; 15 | -------------------------------------------------------------------------------- /t/09-hub-ignore-remote-hbeat.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl -w 2 | # 3 | # Copyright (C) 2005, 2007 by Mark Hindess 4 | 5 | use strict; 6 | use POSIX qw/uname/; 7 | use Socket; 8 | use Test::More tests => 5; 9 | $|=1; 10 | 11 | use_ok("xPL::Hub"); 12 | 13 | my $hub = xPL::Hub->new(interface => 'lo', port => 0, verbose => 1); 14 | is(scalar $hub->clients, 0, "no clients"); 15 | 16 | use_ok("xPL::Client"); 17 | 18 | my $dingus = xPL::Client->new(vendor_id => 'acme', 19 | device_id => 'dingus', 20 | instance_id => 'default', 21 | ip => "127.0.0.1", 22 | broadcast => "127.255.255.255", 23 | ); 24 | # hacking the send socket to send to the hub 25 | $dingus->{_send_sin} = 26 | sockaddr_in($hub->listen_port, inet_aton($hub->broadcast)); 27 | 28 | $dingus->send(message_type => 'xpl-stat', 29 | schema => 'hbeat.app', 30 | body => [ remote_ip => '127.0.0.2', port => 12345 ]); 31 | $hub->main_loop(1); # hub receives it 32 | my @clients = $hub->clients; 33 | is(scalar @clients, 0, "no clients"); 34 | 35 | $dingus->send(message_type => 'xpl-stat', 36 | schema => 'hbeat.end', 37 | body => [ remote_ip => '127.0.0.2', port => 12345 ]); 38 | $hub->main_loop(1); # hub receives it 39 | @clients = $hub->clients; 40 | is(scalar @clients, 0, "no clients"); 41 | -------------------------------------------------------------------------------- /t/10-mainloop.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl -w 2 | # 3 | # Copyright (C) 2005, 2007 by Mark Hindess 4 | 5 | use strict; 6 | use Test::More tests => 7; 7 | $|=1; 8 | 9 | use_ok('xPL::Listener'); 10 | my $xpl = xPL::Listener->new(interface => 'lo'); 11 | ok($xpl, 'created listener'); 12 | 13 | my $count = 0; 14 | $xpl->add_timer(id => 'count', 15 | callback => sub { 16 | $count++; 17 | ok(1, 'timer called - '.$count); 18 | exit if ($count == 5); 19 | return 1; 20 | }, 21 | timeout => 0.01); 22 | $xpl->main_loop(); 23 | -------------------------------------------------------------------------------- /t/14-dock-xvkbd.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl -w 2 | # 3 | # Copyright (C) 2009 by Mark Hindess 4 | 5 | use strict; 6 | use IO::Socket::INET; 7 | use IO::Select; 8 | use Socket; 9 | use Test::More tests => 5; 10 | use Time::HiRes; 11 | use t::Helpers qw/test_warn test_error test_output/; 12 | $|=1; 13 | 14 | use_ok('xPL::Dock','Xvkbd'); 15 | 16 | my @msg; 17 | sub xPL::Dock::send_aux { 18 | my $self = shift; 19 | my $sin = shift; 20 | push @msg, [@_]; 21 | } 22 | 23 | $ENV{XPL_HOSTNAME} = 'mytestid'; 24 | my $xpl; 25 | 26 | { 27 | local $0 = 'dingus'; 28 | local @ARGV = ('-v', 29 | '--interface', 'lo', 30 | '--define', 'hubless=1', 31 | '--xvkbd-verbose'); 32 | $ENV{PATH} = 't/bin:'.$ENV{PATH}; 33 | $xpl = xPL::Dock->new(port => 0); 34 | } 35 | ok($xpl, 'created dock xvkbd client'); 36 | 37 | my $plugin = ($xpl->plugins)[0]; 38 | ok($plugin, 'plugin exists'); 39 | is(ref $plugin, 'xPL::Dock::Xvkbd', 'plugin has correct type'); 40 | 41 | is(test_output(sub { 42 | $xpl->dispatch_xpl_message( 43 | xPL::Message->new(message_type => 'xpl-cmnd', 44 | head => 45 | { 46 | source => 'acme-xvkbd.test', 47 | }, 48 | schema=> 'remote.basic', 49 | body => 50 | [ 51 | 'keys' => 'helloworld', 52 | ])) }, \*STDOUT), 53 | ("Executing 'xvkbd -text helloworld'\n". 54 | "executed: t/bin/xvkbd -text helloworld\n"), 55 | 'testing execution'); 56 | -------------------------------------------------------------------------------- /t/author-critic.t: -------------------------------------------------------------------------------- 1 | #!perl 2 | 3 | BEGIN { 4 | unless ($ENV{AUTHOR_TESTING}) { 5 | require Test::More; 6 | Test::More::plan(skip_all => 'these tests are for testing by the author'); 7 | } 8 | } 9 | 10 | 11 | use strict; 12 | use warnings; 13 | 14 | use Test::More; 15 | use English qw(-no_match_vars); 16 | 17 | eval "use Test::Perl::Critic"; 18 | plan skip_all => 'Test::Perl::Critic required to criticise code' if $@; 19 | Test::Perl::Critic->import( -profile => "perlcritic.rc" ) if -e "perlcritic.rc"; 20 | all_critic_ok(); 21 | -------------------------------------------------------------------------------- /t/bin/heyu: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl -w 2 | use strict; 3 | $|=1; 4 | #print STDERR "Executed: heyu @ARGV\n"; 5 | if ($ARGV[0] && $ARGV[0] eq 'monitor') { 6 | print "01/01 09:00:00 Monitor started\n"; 7 | print "function On : housecode a\n"; 8 | print "address unit 2 : housecode a\n"; 9 | print "function Bright : housecode a by %8\n"; 10 | print "address unit 3 : housecode a\n"; 11 | print "address unit 10 : housecode a\n"; 12 | print "sndc: function On : housecode a\n"; 13 | print "function xPreset : housecode l unit 6 level 63\n"; 14 | print "addr unit 5 : hu A5\n"; 15 | print "addr unit 6 : hu A6\n"; 16 | print "addr unit 4 : hu A4\n"; 17 | print "addr unit 10 : hu A10\n"; 18 | print "func On : hc A\n"; 19 | print "func xPreset : hu L6 level 63\n"; 20 | print "testing unsupported line\n"; 21 | sleep 1; 22 | } elsif ($ARGV[0] && $ARGV[0] eq 'xfunc') { 23 | die "Testing error case\n"; 24 | } else { 25 | exit; 26 | } 27 | -------------------------------------------------------------------------------- /t/bin/sudo: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | case "$1" in 3 | 4 | */smartctl) 5 | echo "Serial Number: sda" 6 | echo "194 Temperature_Celsius 0x0022 100 092 000 Old_age Always - 43" 7 | ;; 8 | *) 9 | echo "executed: $0 $*" 10 | ;; 11 | esac 12 | -------------------------------------------------------------------------------- /t/bin/xvkbd: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | echo "executed: $0 $*" 3 | -------------------------------------------------------------------------------- /t/config/xPL/config/acme-config.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | items: 3 | - name: newconf 4 | type: option 5 | - name: username 6 | type: reconf 7 | - name: password 8 | type: reconf 9 | - name: resource 10 | type: option 11 | - name: host 12 | - name: port 13 | - name: friend 14 | type: option 15 | number: 32 16 | -------------------------------------------------------------------------------- /t/config/xPL/config/invalid.yaml: -------------------------------------------------------------------------------- 1 | --- '~~~~~~~~~~~' ''' 2 | -------------------------------------------------------------------------------- /t/config/xPL/config/test.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | items: 3 | - name: newconf 4 | type: option 5 | - name: username 6 | type: reconf 7 | - name: password 8 | type: reconf 9 | - name: resource 10 | type: option 11 | - name: host 12 | - name: port 13 | - name: friend 14 | type: option 15 | number: 32 16 | -------------------------------------------------------------------------------- /t/config/xPL/config/test2.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | items: 3 | - name: username 4 | type: reconf 5 | - name: password 6 | type: reconf 7 | - name: resource 8 | type: option 9 | - name: host 10 | - name: port 11 | - name: friend 12 | type: option 13 | number: 32 14 | -------------------------------------------------------------------------------- /t/config/xPL/config/test3.yaml: -------------------------------------------------------------------------------- 1 | --- ~ 2 | 3 | -------------------------------------------------------------------------------- /t/config/xPL/config/test4.yaml: -------------------------------------------------------------------------------- 1 | --- [] 2 | 3 | -------------------------------------------------------------------------------- /t/config/xPL/config/test5.yaml: -------------------------------------------------------------------------------- 1 | --- {} 2 | 3 | -------------------------------------------------------------------------------- /t/config/xPL/config/test6.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | items: {} 3 | 4 | -------------------------------------------------------------------------------- /t/interfaces/ifconfig.empty/ifconfig: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Copyright (C) 2007 by Mark Hindess 3 | /bin/cat < mtu 1500 5 | options=1 6 | inet 192.168.3.13 netmask 0xffffff00 broadcast 192.168.3.255 7 | inet6 fe80::201:2ff:fe30:3663%xl0 prefixlen 64 scopeid 0x1 8 | ether 00:01:02:30:36:63 9 | media: Ethernet autoselect (100baseTX ) 10 | status: active 11 | lo0: flags=8049 mtu 16384 12 | inet6 ::1 prefixlen 128 13 | inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2 14 | inet 127.0.0.1 netmask 0xff000000 15 | EOF 16 | -------------------------------------------------------------------------------- /t/interfaces/ifconfig.loopback.only/ifconfig: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Copyright (C) 2005, 2007 by Mark Hindess 3 | /bin/cat < mtu 16384 5 | inet6 ::1 prefixlen 128 6 | inet6 fe80::1 prefixlen 64 scopeid 0x1 7 | inet 127.0.0.1 netmask 0xff000000 8 | gif0: flags=8010 mtu 1280 9 | stf0: flags=0<> mtu 1280 10 | en0: flags=8863 mtu 1500 11 | inet6 fe80::20d:93ff:fe4d:26c0 prefixlen 64 scopeid 0x4 12 | inet 192.168.3.13 netmask 0xffffff00 broadcast 192.168.3.255 13 | ether 00:0d:93:4d:26:c0 14 | media: autoselect (100baseTX ) status: active 15 | supported media: none autoselect 10baseT/UTP 10baseT/UTP 10baseT/UTP 100baseTX 100baseTX 100baseTX 16 | en1: flags=8863 mtu 1500 17 | inet6 fe80::20d:93ff:fe4d:26c0 prefixlen 64 scopeid 0x4 18 | inet 192.168.3.13 netmask 0xffffff00 # no broadcast 19 | ether 00:0d:93:4d:26:c0 20 | media: autoselect (100baseTX ) status: active 21 | supported media: none autoselect 10baseT/UTP 10baseT/UTP 10baseT/UTP 100baseTX 100baseTX 100baseTX 22 | fw0: flags=8822 mtu 2030 23 | lladdr 00:0d:93:ff:fe:4d:26:c0 24 | media: autoselect status: inactive 25 | supported media: autoselect 26 | EOF 27 | -------------------------------------------------------------------------------- /t/interfaces/ip.addr.show.linux/ip: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Copyright (C) 2005, 2007 by Mark Hindess 3 | /bin/cat < mtu 1300 qdisc pfifo_fast qlen 1000 5 | link/ether 00:0d:60:77:63:5b brd ff:ff:ff:ff:ff:ff 6 | inet 192.168.3.13/24 brd 192.168.3.255 scope global eth0 7 | 2: lo: mtu 16436 qdisc noqueue 8 | link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 9 | inet 127.0.0.1/8 scope host lo 10 | 3: vmnet8: mtu 1500 qdisc pfifo_fast qlen 1000 11 | link/ether 00:50:56:c0:00:08 brd ff:ff:ff:ff:ff:ff 12 | inet 192.168.165.1/24 brd 192.168.165.255 scope global vmnet8 13 | EOF 14 | -------------------------------------------------------------------------------- /t/lib/Net/DBus.pm: -------------------------------------------------------------------------------- 1 | package Net::DBus; 2 | sub session { bless { calls => [] }, 'Net::DBus' } 3 | sub calls { splice @{$_[0]->{calls}} } 4 | sub AUTOLOAD { 5 | my $self = shift; 6 | our $AUTOLOAD; 7 | push @{$self->{calls}}, "$AUTOLOAD ".Data::Dumper->Dump([\@_],[qw/args/]); 8 | $self; 9 | } 10 | sub DESTROY {} 11 | sub get_object { 12 | push @{$self->{calls}}, "get_object ".Data::Dumper->Dump([\@_],[qw/args/]); 13 | Net::DBus::RemoteObject->new(); 14 | } 15 | 16 | package Net::DBus::RemoteObject; 17 | use Data::Dumper; 18 | sub new { bless { calls => [] }, 'Net::DBus::RemoteObject' } 19 | sub calls { splice @{$_[0]->{calls}} } 20 | sub AUTOLOAD { 21 | my $self = shift; 22 | our $AUTOLOAD; 23 | push @{$self->{calls}}, "$AUTOLOAD ".Data::Dumper->Dump([\@_],[qw/args/]); 24 | } 25 | sub DESTROY {} 26 | 1; 27 | 28 | -------------------------------------------------------------------------------- /t/lib/X/Osd.pm: -------------------------------------------------------------------------------- 1 | package X::Osd; 2 | sub new { bless { calls => [] }, 'X::Osd' } 3 | sub calls { splice @{$_[0]->{calls}} } 4 | sub AUTOLOAD { 5 | my $self = shift; 6 | our $AUTOLOAD; 7 | push @{$self->{calls}}, "$AUTOLOAD @_"; 8 | } 9 | sub DESTROY {} 10 | 1; 11 | -------------------------------------------------------------------------------- /t/lib/xPL/Dock/Test.pm: -------------------------------------------------------------------------------- 1 | package xPL::Dock::Test; 2 | use base xPL::Dock::Plug; 3 | __PACKAGE__->make_readonly_accessor($_) foreach (qw/scalar array 4 | scalar_not_argv 5 | array_not_argv/); 6 | sub getopts { 7 | my $self = shift; 8 | $self->{_scalar} = undef; 9 | $self->{_array} = []; 10 | $self->{_scalar_not_argv} = undef; 11 | $self->{_array_not_argv} = []; 12 | return ( 13 | 's=s' => \$self->{_scalar}, 14 | 'a=s' => $self->{_array}, 15 | 'sna=s' => \$self->{_scalar_not_argv}, 16 | 'ana=s' => $self->{_array_not_argv}, 17 | ); 18 | } 19 | sub init { 20 | my ($self, $xpl) = @_; 21 | $self->required_field($xpl, 'scalar', 22 | 'The -s parameter is required', 1); 23 | $self->required_field($xpl, 'array', 24 | 'The -a parameter is required', 1); 25 | $self->required_field($xpl, 'scalar_not_argv', 26 | 'The -sna parameter is required', 0); 27 | $self->required_field($xpl, 'array_not_argv', 28 | 'The -ana parameter is required', 0); 29 | return $self->SUPER::init($xpl, @_); 30 | } 31 | sub vendor_id { 32 | 'acme'; 33 | } 34 | sub version { 35 | '0.01'; 36 | } 37 | 38 | 1; 39 | -------------------------------------------------------------------------------- /t/lib/xPL/Dock/Wrap.pm: -------------------------------------------------------------------------------- 1 | package xPL::Dock::Wrap; 2 | use base $ENV{XPL_PLUGIN_TO_WRAP}; 3 | 4 | sub new { 5 | my $pkg = shift; 6 | my $self = $pkg->SUPER::new(@_); 7 | $self->{_read_count} = 0; 8 | $self->{_reset_device} = 0; 9 | $self; 10 | } 11 | 12 | sub read { 13 | my $self = shift; 14 | $self->{_read_count}++; 15 | $self->SUPER::read(@_); 16 | } 17 | 18 | sub reset_device { 19 | my $self = shift; 20 | $self->{_reset_device}++; 21 | $self->SUPER::reset_device(@_); 22 | } 23 | 24 | 1; 25 | -------------------------------------------------------------------------------- /t/linux/1/sys/class/power_supply/AC/online: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /t/linux/1/sys/class/power_supply/BAT0/energy_full: -------------------------------------------------------------------------------- 1 | 77950000 2 | -------------------------------------------------------------------------------- /t/linux/1/sys/class/power_supply/BAT0/energy_now: -------------------------------------------------------------------------------- 1 | 76490000 2 | -------------------------------------------------------------------------------- /t/linux/1/sys/class/power_supply/BAT1/charge_full: -------------------------------------------------------------------------------- 1 | 12345 2 | -------------------------------------------------------------------------------- /t/linux/1/sys/class/power_supply/BAT2/charge_full: -------------------------------------------------------------------------------- 1 | 12345 2 | -------------------------------------------------------------------------------- /t/linux/1/sys/class/power_supply/BAT2/charge_now: -------------------------------------------------------------------------------- 1 | ABC 2 | -------------------------------------------------------------------------------- /t/linux/1/sys/class/power_supply/BAT3/charge_full: -------------------------------------------------------------------------------- 1 | ABCDE 2 | -------------------------------------------------------------------------------- /t/linux/2/sys/class/power_supply/AC/online: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /t/linux/2/sys/class/power_supply/BAT0/charge_full: -------------------------------------------------------------------------------- 1 | 77950000 2 | -------------------------------------------------------------------------------- /t/linux/2/sys/class/power_supply/BAT0/charge_now: -------------------------------------------------------------------------------- 1 | 76490000 2 | -------------------------------------------------------------------------------- /t/linux/3/sys/class/power_supply/AC/online: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /t/linux/3/sys/class/power_supply/BAT0/charge_full: -------------------------------------------------------------------------------- 1 | 77950000 2 | -------------------------------------------------------------------------------- /t/linux/3/sys/class/power_supply/BAT0/charge_now: -------------------------------------------------------------------------------- 1 | 6490000 2 | -------------------------------------------------------------------------------- /t/msg/000.xpl.test.txt: -------------------------------------------------------------------------------- 1 | $args = 2 | { 3 | message_type => "xpl-stat", 4 | head => 5 | { 6 | source => "acme-hammer.shed", 7 | }, 8 | schema => "xpl.test", 9 | body => 10 | [ 11 | extra => "test of extra field", 12 | ], 13 | verbose => 1, 14 | }; 15 | 16 | xpl-stat 17 | { 18 | hop=1 19 | source=acme-hammer.shed 20 | target=* 21 | } 22 | xpl.test 23 | { 24 | extra=test of extra field 25 | } 26 | 27 | message_type=xpl-stat 28 | 29 | source=acme-hammer.shed 30 | 31 | target=* 32 | 33 | schema=xpl.test 34 | 35 | extra=test of extra field 36 | 37 | summary=xpl-stat/xpl.test: acme-hammer.shed -> * test of extra field 38 | -------------------------------------------------------------------------------- /t/msg/001.hbeat.basic.txt: -------------------------------------------------------------------------------- 1 | $args = 2 | { 3 | message_type => "xpl-stat", 4 | head => 5 | { 6 | hop => 2, 7 | source => "acme-lamp.livingroom", 8 | target => "*", 9 | }, 10 | schema => "hbeat.basic", 11 | body => 12 | [ 13 | interval => 10, 14 | extra => "test of extra field", 15 | ], 16 | verbose => 1, 17 | }; 18 | 19 | xpl-stat 20 | { 21 | hop=2 22 | source=acme-lamp.livingroom 23 | target=* 24 | } 25 | hbeat.basic 26 | { 27 | interval=10 28 | extra=test of extra field 29 | } 30 | 31 | message_type=xpl-stat 32 | 33 | hop=2 34 | 35 | source=acme-lamp.livingroom 36 | 37 | target=* 38 | 39 | schema=hbeat.basic 40 | 41 | interval=10 42 | 43 | extra=test of extra field 44 | 45 | verbose=1 46 | -------------------------------------------------------------------------------- /t/msg/002.hbeat.basic.def.txt: -------------------------------------------------------------------------------- 1 | $args = 2 | { 3 | message_type => 'xpl-stat', 4 | head => 5 | { 6 | source => "acme-lamp.livingroom", 7 | }, 8 | schema => "hbeat.basic", 9 | body => [ interval => 5 ], 10 | }; 11 | 12 | xpl-stat 13 | { 14 | hop=1 15 | source=acme-lamp.livingroom 16 | target=* 17 | } 18 | hbeat.basic 19 | { 20 | interval=5 21 | } 22 | 23 | message_type=xpl-stat 24 | 25 | hop=1 26 | 27 | source=acme-lamp.livingroom 28 | 29 | target=* 30 | 31 | schema=hbeat.basic 32 | 33 | interval=5 34 | -------------------------------------------------------------------------------- /t/msg/003.hbeat.app.txt: -------------------------------------------------------------------------------- 1 | $args = 2 | { 3 | message_type => "xpl-stat", 4 | head => 5 | { 6 | hop => 2, 7 | source => "acme-lamp.livingroom", 8 | target => "*", 9 | }, 10 | schema => "hbeat.app", 11 | body => 12 | [ 13 | interval => 10, 14 | port => 12345, 15 | remote_ip => "127.0.0.1", 16 | extra => "test of extra field", 17 | ], 18 | }; 19 | 20 | xpl-stat 21 | { 22 | hop=2 23 | source=acme-lamp.livingroom 24 | target=* 25 | } 26 | hbeat.app 27 | { 28 | interval=10 29 | port=12345 30 | remote-ip=127.0.0.1 31 | extra=test of extra field 32 | } 33 | 34 | message_type=xpl-stat 35 | 36 | hop=2 37 | 38 | source=acme-lamp.livingroom 39 | 40 | target=* 41 | 42 | schema=hbeat.app 43 | 44 | interval=10 45 | 46 | extra=test of extra field 47 | 48 | summary=xpl-stat/hbeat.app: acme-lamp.livingroom -> * 10/12345/127.0.0.1/test of extra field 49 | -------------------------------------------------------------------------------- /t/msg/003.hbeat.end.txt: -------------------------------------------------------------------------------- 1 | $args = 2 | { 3 | message_type => "xpl-stat", 4 | head => 5 | { 6 | hop => 2, 7 | source => "acme-lamp.livingroom", 8 | target => "*", 9 | }, 10 | schema => "hbeat.end", 11 | body => 12 | [ 13 | interval => 10, 14 | port => 12345, 15 | remote_ip => "127.0.0.1", 16 | ], 17 | }; 18 | 19 | xpl-stat 20 | { 21 | hop=2 22 | source=acme-lamp.livingroom 23 | target=* 24 | } 25 | hbeat.end 26 | { 27 | interval=10 28 | port=12345 29 | remote-ip=127.0.0.1 30 | } 31 | 32 | message_type=xpl-stat 33 | 34 | hop=2 35 | 36 | source=acme-lamp.livingroom 37 | 38 | target=* 39 | 40 | schema=hbeat.end 41 | 42 | interval=10 43 | 44 | summary=xpl-stat/hbeat.end: acme-lamp.livingroom -> * 10/12345/127.0.0.1 45 | -------------------------------------------------------------------------------- /t/msg/003.hbeat.request.txt: -------------------------------------------------------------------------------- 1 | $args = 2 | { 3 | message_type => 'xpl-cmnd', 4 | head => 5 | { 6 | hop => 2, 7 | source => "acme-lamp.livingroom", 8 | target => "*", 9 | }, 10 | schema => "hbeat.request", 11 | body => [ command => 'request' ], 12 | }; 13 | 14 | xpl-cmnd 15 | { 16 | hop=2 17 | source=acme-lamp.livingroom 18 | target=* 19 | } 20 | hbeat.request 21 | { 22 | command=request 23 | } 24 | 25 | message_type=xpl-cmnd 26 | 27 | hop=2 28 | 29 | source=acme-lamp.livingroom 30 | 31 | target=* 32 | 33 | schema=hbeat.request 34 | 35 | command=request 36 | 37 | summary=xpl-cmnd/hbeat.request: acme-lamp.livingroom -> * request 38 | -------------------------------------------------------------------------------- /t/msg/004.osd.basic.minimal.txt: -------------------------------------------------------------------------------- 1 | $args = 2 | { 3 | message_type => 'xpl-cmnd', 4 | head => 5 | { 6 | source => "acme-phone.livingroom", 7 | }, 8 | schema => "osd.basic", 9 | body => 10 | [ 11 | command => "clear", 12 | ], 13 | }; 14 | 15 | xpl-cmnd 16 | { 17 | hop=1 18 | source=acme-phone.livingroom 19 | target=* 20 | } 21 | osd.basic 22 | { 23 | command=clear 24 | } 25 | 26 | message_type=xpl-cmnd 27 | 28 | hop=1 29 | 30 | source=acme-phone.livingroom 31 | 32 | target=* 33 | 34 | schema=osd.basic 35 | 36 | command=clear 37 | 38 | text=undef 39 | 40 | row=undef 41 | 42 | column=undef 43 | 44 | delay=undef 45 | 46 | summary=xpl-cmnd/osd.basic: acme-phone.livingroom -> * clear 47 | -------------------------------------------------------------------------------- /t/msg/004.osd.basic.txt: -------------------------------------------------------------------------------- 1 | $args = 2 | { 3 | message_type => "xpl-cmnd", 4 | head => 5 | { 6 | hop => 2, 7 | source => "acme-phone.livingroom", 8 | target => "acme-tv.livingroom", 9 | }, 10 | schema => "osd.basic", 11 | body => 12 | [ 13 | command => "clear", 14 | text => "Ring, Ring", 15 | row => 1, 16 | column => 2, 17 | delay => 5, 18 | ], 19 | }; 20 | 21 | xpl-cmnd 22 | { 23 | hop=2 24 | source=acme-phone.livingroom 25 | target=acme-tv.livingroom 26 | } 27 | osd.basic 28 | { 29 | command=clear 30 | text=Ring, Ring 31 | row=1 32 | column=2 33 | delay=5 34 | } 35 | 36 | message_type=xpl-cmnd 37 | 38 | hop=2 39 | 40 | source=acme-phone.livingroom 41 | 42 | target=acme-tv.livingroom 43 | 44 | schema=osd.basic 45 | 46 | command=clear 47 | 48 | text=Ring, Ring 49 | 50 | row=1 51 | 52 | column=2 53 | 54 | delay=5 55 | 56 | summary=xpl-cmnd/osd.basic: acme-phone.livingroom -> acme-tv.livingroom clear/Ring, Ring/1/2/5 57 | -------------------------------------------------------------------------------- /t/msg/005.clock.update.minimal.txt: -------------------------------------------------------------------------------- 1 | $args = 2 | { 3 | message_type => 'xpl-stat', 4 | head => 5 | { 6 | source => "acme-clock.livingroom", 7 | }, 8 | schema => "clock.update", 9 | body => 10 | [ 11 | time => "20051113182650", 12 | ], 13 | }; 14 | 15 | xpl-stat 16 | { 17 | hop=1 18 | source=acme-clock.livingroom 19 | target=* 20 | } 21 | clock.update 22 | { 23 | time=20051113182650 24 | } 25 | 26 | message_type=xpl-stat 27 | 28 | hop=1 29 | 30 | source=acme-clock.livingroom 31 | 32 | target=* 33 | 34 | schema=clock.update 35 | 36 | time=20051113182650 37 | 38 | summary=xpl-stat/clock.update: acme-clock.livingroom -> * 20051113182650 39 | -------------------------------------------------------------------------------- /t/msg/005.clock.update.txt: -------------------------------------------------------------------------------- 1 | $args = 2 | { 3 | message_type => "xpl-stat", 4 | head => 5 | { 6 | hop => 1, 7 | source => "acme-clock.livingroom", 8 | target => "*", 9 | }, 10 | schema => "clock.update", 11 | body => 12 | [ 13 | time => "20051113182650", 14 | ], 15 | }; 16 | 17 | xpl-stat 18 | { 19 | hop=1 20 | source=acme-clock.livingroom 21 | target=* 22 | } 23 | clock.update 24 | { 25 | time=20051113182650 26 | } 27 | 28 | message_type=xpl-stat 29 | 30 | hop=1 31 | 32 | source=acme-clock.livingroom 33 | 34 | target=* 35 | 36 | schema=clock.update 37 | 38 | time=20051113182650 39 | 40 | summary=xpl-stat/clock.update: acme-clock.livingroom -> * 20051113182650 41 | -------------------------------------------------------------------------------- /t/msg/006.x10.basic.device.txt: -------------------------------------------------------------------------------- 1 | $args = 2 | { 3 | message_type => "xpl-cmnd", 4 | head => 5 | { 6 | hop => 1, 7 | source => "acme-doorbell.porch", 8 | target => "*", 9 | }, 10 | schema => "x10.basic", 11 | body => 12 | [ 13 | command => "on", 14 | device => "a10,a13", 15 | ], 16 | }; 17 | 18 | xpl-cmnd 19 | { 20 | hop=1 21 | source=acme-doorbell.porch 22 | target=* 23 | } 24 | x10.basic 25 | { 26 | command=on 27 | device=a10,a13 28 | } 29 | 30 | message_type=xpl-cmnd 31 | 32 | hop=1 33 | 34 | source=acme-doorbell.porch 35 | 36 | target=* 37 | 38 | schema=x10.basic 39 | 40 | summary=xpl-cmnd/x10.basic: acme-doorbell.porch -> * on/a10,a13 41 | 42 | command=on 43 | 44 | device=a10,a13 45 | -------------------------------------------------------------------------------- /t/msg/006.x10.basic.house.txt: -------------------------------------------------------------------------------- 1 | $args = 2 | { 3 | message_type => "xpl-cmnd", 4 | head => 5 | { 6 | hop => 1, 7 | source => "acme-dawndusk.porch", 8 | target => "*", 9 | }, 10 | schema => "x10.basic", 11 | body => 12 | [ 13 | command => "all_lights_on", 14 | house => "jkl", 15 | ], 16 | }; 17 | 18 | xpl-cmnd 19 | { 20 | hop=1 21 | source=acme-dawndusk.porch 22 | target=* 23 | } 24 | x10.basic 25 | { 26 | command=all_lights_on 27 | house=jkl 28 | } 29 | 30 | message_type=xpl-cmnd 31 | 32 | hop=1 33 | 34 | source=acme-dawndusk.porch 35 | 36 | target=* 37 | 38 | schema=x10.basic 39 | 40 | summary=xpl-cmnd/x10.basic: acme-dawndusk.porch -> * all_lights_on/jkl 41 | 42 | command=all_lights_on 43 | 44 | house=jkl 45 | -------------------------------------------------------------------------------- /t/msg/006.x10.confirm.device.txt: -------------------------------------------------------------------------------- 1 | $args = 2 | { 3 | message_type => 'xpl-trig', 4 | head => 5 | { 6 | hop => 1, 7 | source => "acme-x10heyu.node0", 8 | target => "*", 9 | }, 10 | schema => "x10.confirm", 11 | body => 12 | [ 13 | command => "on", 14 | device => "a2", 15 | ], 16 | }; 17 | 18 | xpl-trig 19 | { 20 | hop=1 21 | source=acme-x10heyu.node0 22 | target=* 23 | } 24 | x10.confirm 25 | { 26 | command=on 27 | device=a2 28 | } 29 | 30 | message_type=xpl-trig 31 | 32 | hop=1 33 | 34 | source=acme-x10heyu.node0 35 | 36 | target=* 37 | 38 | schema=x10.confirm 39 | 40 | summary=xpl-trig/x10.confirm: acme-x10heyu.node0 -> * on/a2 41 | 42 | command=on 43 | 44 | device=a2 45 | -------------------------------------------------------------------------------- /t/msg/006.x10.confirm.house.txt: -------------------------------------------------------------------------------- 1 | $args = 2 | { 3 | message_type => "xpl-trig", 4 | head => 5 | { 6 | hop => 1, 7 | source => "acme-dawndusk.porch", 8 | target => "*", 9 | }, 10 | schema => "x10.confirm", 11 | body => 12 | [ 13 | command => "all_lights_on", 14 | house => "jkl", 15 | ], 16 | }; 17 | 18 | xpl-trig 19 | { 20 | hop=1 21 | source=acme-dawndusk.porch 22 | target=* 23 | } 24 | x10.confirm 25 | { 26 | command=all_lights_on 27 | house=jkl 28 | } 29 | 30 | message_type=xpl-trig 31 | 32 | hop=1 33 | 34 | source=acme-dawndusk.porch 35 | 36 | target=* 37 | 38 | schema=x10.confirm 39 | 40 | summary=xpl-trig/x10.confirm: acme-dawndusk.porch -> * all_lights_on/jkl 41 | 42 | command=all_lights_on 43 | 44 | house=jkl 45 | -------------------------------------------------------------------------------- /t/msg/007.ups.basic.minimal.txt: -------------------------------------------------------------------------------- 1 | $args = 2 | { 3 | message_type => 'xpl-trig', 4 | head => 5 | { 6 | source => 'acme-ups.node0', 7 | }, 8 | schema => 'ups.basic', 9 | body => 10 | [ 11 | status => 'battery', 12 | event => 'onbattery', 13 | ], 14 | }; 15 | 16 | xpl-trig 17 | { 18 | hop=1 19 | source=acme-ups.node0 20 | target=* 21 | } 22 | ups.basic 23 | { 24 | status=battery 25 | event=onbattery 26 | } 27 | 28 | summary=xpl-trig/ups.basic: acme-ups.node0 -> * battery/onbattery 29 | -------------------------------------------------------------------------------- /t/msg/007.ups.basic.txt: -------------------------------------------------------------------------------- 1 | $args = 2 | { 3 | message_type => 'xpl-trig', 4 | head => 5 | { 6 | hop => 1, 7 | source => 'acme-ups.node0', 8 | target => '*', 9 | }, 10 | schema => 'ups.basic', 11 | body => 12 | [ 13 | status => 'battery', 14 | event => 'onbattery', 15 | ], 16 | }; 17 | 18 | xpl-trig 19 | { 20 | hop=1 21 | source=acme-ups.node0 22 | target=* 23 | } 24 | ups.basic 25 | { 26 | status=battery 27 | event=onbattery 28 | } 29 | 30 | message_type=xpl-trig 31 | 32 | hop=1 33 | 34 | source=acme-ups.node0 35 | 36 | target=* 37 | 38 | schema=ups.basic 39 | 40 | summary=xpl-trig/ups.basic: acme-ups.node0 -> * battery/onbattery 41 | 42 | status=battery 43 | 44 | event=onbattery 45 | -------------------------------------------------------------------------------- /t/msg/008.cid.basic.minimal.txt: -------------------------------------------------------------------------------- 1 | $args = 2 | { 3 | message_type => 'xpl-trig', 4 | head => 5 | { 6 | source => 'acme-usr.modem1', 7 | }, 8 | schema => 'cid.basic', 9 | body => 10 | [ 11 | calltype => 'outbound', 12 | phone => '012345678910', 13 | ], 14 | }; 15 | 16 | xpl-trig 17 | { 18 | hop=1 19 | source=acme-usr.modem1 20 | target=* 21 | } 22 | cid.basic 23 | { 24 | calltype=outbound 25 | phone=012345678910 26 | } 27 | 28 | message_type=xpl-trig 29 | 30 | hop=1 31 | 32 | source=acme-usr.modem1 33 | 34 | target=* 35 | 36 | schema=cid.basic 37 | 38 | summary=xpl-trig/cid.basic: acme-usr.modem1 -> * outbound/012345678910 39 | 40 | calltype=outbound 41 | 42 | phone=012345678910 43 | -------------------------------------------------------------------------------- /t/msg/008.cid.basic.txt: -------------------------------------------------------------------------------- 1 | $args = 2 | { 3 | message_type => 'xpl-trig', 4 | head => 5 | { 6 | hop => 1, 7 | source => 'acme-usr.modem1', 8 | target => '*', 9 | }, 10 | schema => 'cid.basic', 11 | body => 12 | [ 13 | calltype => 'inbound', 14 | phone => '012345678910', 15 | ], 16 | }; 17 | 18 | xpl-trig 19 | { 20 | hop=1 21 | source=acme-usr.modem1 22 | target=* 23 | } 24 | cid.basic 25 | { 26 | calltype=inbound 27 | phone=012345678910 28 | } 29 | 30 | message_type=xpl-trig 31 | 32 | hop=1 33 | 34 | source=acme-usr.modem1 35 | 36 | target=* 37 | 38 | schema=cid.basic 39 | 40 | summary=xpl-trig/cid.basic: acme-usr.modem1 -> * inbound/012345678910 41 | 42 | calltype=inbound 43 | 44 | phone=012345678910 45 | -------------------------------------------------------------------------------- /t/msg/009.tts.basic.txt: -------------------------------------------------------------------------------- 1 | $args = 2 | { 3 | message_type => 'xpl-cmnd', 4 | head => 5 | { 6 | hop => 1, 7 | source => 'acme-despotic.orator', 8 | target => '*', 9 | }, 10 | schema => 'tts.basic', 11 | body => 12 | [ 13 | speech => 'Empty the dishwasher!', 14 | volume => '100', 15 | ], 16 | }; 17 | 18 | xpl-cmnd 19 | { 20 | hop=1 21 | source=acme-despotic.orator 22 | target=* 23 | } 24 | tts.basic 25 | { 26 | speech=Empty the dishwasher! 27 | volume=100 28 | } 29 | 30 | message_type=xpl-cmnd 31 | 32 | hop=1 33 | 34 | source=acme-despotic.orator 35 | 36 | target=* 37 | 38 | schema=tts.basic 39 | 40 | summary=xpl-cmnd/tts.basic: acme-despotic.orator -> * Empty the dishwasher!/100 41 | 42 | speech=Empty the dishwasher! 43 | 44 | volume=100 45 | -------------------------------------------------------------------------------- /t/msg/010.dawndusk.basic.stat.txt: -------------------------------------------------------------------------------- 1 | $args = 2 | { 3 | message_type => 'xpl-stat', 4 | head => 5 | { 6 | hop => 1, 7 | source => 'acme-sensor.garden', 8 | target => '*', 9 | }, 10 | schema => 'dawndusk.basic', 11 | body => 12 | [ 13 | type => 'daynight', 14 | status => 'day', 15 | ], 16 | }; 17 | 18 | xpl-stat 19 | { 20 | hop=1 21 | source=acme-sensor.garden 22 | target=* 23 | } 24 | dawndusk.basic 25 | { 26 | type=daynight 27 | status=day 28 | } 29 | 30 | message_type=xpl-stat 31 | 32 | hop=1 33 | 34 | source=acme-sensor.garden 35 | 36 | target=* 37 | 38 | schema=dawndusk.basic 39 | 40 | summary=xpl-stat/dawndusk.basic: acme-sensor.garden -> * daynight/day 41 | 42 | type=daynight 43 | 44 | status=day 45 | -------------------------------------------------------------------------------- /t/msg/010.dawndusk.basic.txt: -------------------------------------------------------------------------------- 1 | $args = 2 | { 3 | message_type => 'xpl-trig', 4 | head => 5 | { 6 | hop => 1, 7 | source => 'acme-sensor.garden', 8 | target => '*', 9 | }, 10 | schema => 'dawndusk.basic', 11 | body => 12 | [ 13 | type => 'dawndusk', 14 | status => 'dawn', 15 | ], 16 | }; 17 | 18 | xpl-trig 19 | { 20 | hop=1 21 | source=acme-sensor.garden 22 | target=* 23 | } 24 | dawndusk.basic 25 | { 26 | type=dawndusk 27 | status=dawn 28 | } 29 | 30 | message_type=xpl-trig 31 | 32 | hop=1 33 | 34 | source=acme-sensor.garden 35 | 36 | target=* 37 | 38 | schema=dawndusk.basic 39 | 40 | summary=xpl-trig/dawndusk.basic: acme-sensor.garden -> * dawndusk/dawn 41 | 42 | type=dawndusk 43 | 44 | status=dawn 45 | -------------------------------------------------------------------------------- /t/msg/010.dawndusk.request.txt: -------------------------------------------------------------------------------- 1 | $args = 2 | { 3 | message_type => 'xpl-cmnd', 4 | head => 5 | { 6 | hop => 1, 7 | source => 'acme-sensor.garden', 8 | target => '*', 9 | }, 10 | schema => 'dawndusk.request', 11 | body => 12 | [ 13 | command => 'status', 14 | query => 'daynight', 15 | ], 16 | }; 17 | 18 | xpl-cmnd 19 | { 20 | hop=1 21 | source=acme-sensor.garden 22 | target=* 23 | } 24 | dawndusk.request 25 | { 26 | command=status 27 | query=daynight 28 | } 29 | 30 | message_type=xpl-cmnd 31 | 32 | hop=1 33 | 34 | source=acme-sensor.garden 35 | 36 | target=* 37 | 38 | schema=dawndusk.request 39 | 40 | summary=xpl-cmnd/dawndusk.request: acme-sensor.garden -> * status/daynight 41 | 42 | command=status 43 | 44 | query=daynight 45 | -------------------------------------------------------------------------------- /t/msg/011.sensor.basic.txt: -------------------------------------------------------------------------------- 1 | $args = 2 | { 3 | message_type => 'xpl-trig', 4 | head => 5 | { 6 | hop => 1, 7 | source => 'acme-1wire.node0', 8 | target => '*', 9 | }, 10 | schema => 'sensor.basic', 11 | body => 12 | [ 13 | device => 'bed1', 14 | type => 'temp', 15 | current => '21.05', 16 | ], 17 | }; 18 | 19 | xpl-trig 20 | { 21 | hop=1 22 | source=acme-1wire.node0 23 | target=* 24 | } 25 | sensor.basic 26 | { 27 | device=bed1 28 | type=temp 29 | current=21.05 30 | } 31 | 32 | message_type=xpl-trig 33 | 34 | hop=1 35 | 36 | source=acme-1wire.node0 37 | 38 | target=* 39 | 40 | schema=sensor.basic 41 | 42 | summary=xpl-trig/sensor.basic: acme-1wire.node0 -> * bed1/temp/21.05 43 | 44 | device=bed1 45 | 46 | type=temp 47 | 48 | current=21.05 49 | -------------------------------------------------------------------------------- /t/msg/012.control.basic.txt: -------------------------------------------------------------------------------- 1 | $args = 2 | { 3 | message_type => 'xpl-cmnd', 4 | head => 5 | { 6 | hop => 1, 7 | source => 'acme-viom.node0', 8 | target => '*', 9 | }, 10 | schema => 'control.basic', 11 | body => 12 | [ 13 | device => '1', 14 | type => 'output', 15 | current => 'pulse', 16 | ], 17 | }; 18 | 19 | xpl-cmnd 20 | { 21 | hop=1 22 | source=acme-viom.node0 23 | target=* 24 | } 25 | control.basic 26 | { 27 | device=1 28 | type=output 29 | current=pulse 30 | } 31 | 32 | message_type=xpl-cmnd 33 | 34 | hop=1 35 | 36 | source=acme-viom.node0 37 | 38 | target=* 39 | 40 | schema=control.basic 41 | 42 | summary=xpl-cmnd/control.basic: acme-viom.node0 -> * 1/output/pulse 43 | 44 | device=1 45 | 46 | type=output 47 | 48 | current=pulse 49 | 50 | data1=undef 51 | 52 | name=undef 53 | -------------------------------------------------------------------------------- /t/msg/014.sensor.network.txt: -------------------------------------------------------------------------------- 1 | $args = 2 | { 3 | message_type => 'xpl-trig', 4 | head => 5 | { 6 | hop => 1, 7 | source => 'acme-1wire.node0', 8 | target => '*', 9 | }, 10 | schema => 'sensor.network', 11 | body => 12 | [ 13 | device => 'router1', 14 | type => 'packets', 15 | current => '1234', 16 | ], 17 | }; 18 | 19 | xpl-trig 20 | { 21 | hop=1 22 | source=acme-1wire.node0 23 | target=* 24 | } 25 | sensor.network 26 | { 27 | device=router1 28 | type=packets 29 | current=1234 30 | } 31 | 32 | message_type=xpl-trig 33 | 34 | hop=1 35 | 36 | source=acme-1wire.node0 37 | 38 | target=* 39 | 40 | schema=sensor.network 41 | 42 | summary=xpl-trig/sensor.network: acme-1wire.node0 -> * router1/packets/1234 43 | 44 | device=router1 45 | 46 | type=packets 47 | 48 | current=1234 49 | -------------------------------------------------------------------------------- /t/msg/015.remote.basic.txt: -------------------------------------------------------------------------------- 1 | $args = 2 | { 3 | message_type => 'xpl-trig', 4 | head => 5 | { 6 | hop => 1, 7 | source => 'acme-ir.shed', 8 | target => '*', 9 | }, 10 | schema => 'remote.basic', 11 | body => 12 | [ 13 | keys => 'snooze', 14 | ], 15 | }; 16 | 17 | xpl-trig 18 | { 19 | hop=1 20 | source=acme-ir.shed 21 | target=* 22 | } 23 | remote.basic 24 | { 25 | keys=snooze 26 | } 27 | 28 | message_type=xpl-trig 29 | 30 | hop=1 31 | 32 | source=acme-ir.shed 33 | 34 | target=* 35 | 36 | schema=remote.basic 37 | 38 | summary=xpl-trig/remote.basic: acme-ir.shed -> * snooze 39 | 40 | keys=snooze 41 | -------------------------------------------------------------------------------- /t/msg/016.dmx.basic.txt: -------------------------------------------------------------------------------- 1 | $args = 2 | { 3 | message_type => 'xpl-cmnd', 4 | head => 5 | { 6 | hop => 1, 7 | source => 'acme-dmx.node0', 8 | target => '*', 9 | }, 10 | schema => 'dmx.basic', 11 | body => 12 | [ 13 | base => '1', 14 | type => 'set', 15 | value => 10, 16 | ], 17 | }; 18 | 19 | xpl-cmnd 20 | { 21 | hop=1 22 | source=acme-dmx.node0 23 | target=* 24 | } 25 | dmx.basic 26 | { 27 | base=1 28 | type=set 29 | value=10 30 | } 31 | 32 | message_type=xpl-cmnd 33 | 34 | hop=1 35 | 36 | source=acme-dmx.node0 37 | 38 | target=* 39 | 40 | schema=dmx.basic 41 | 42 | summary=xpl-cmnd/dmx.basic: acme-dmx.node0 -> * 1/set/10 43 | 44 | base=1 45 | 46 | type=set 47 | 48 | value=10 49 | -------------------------------------------------------------------------------- /t/msg/017.audio.basic.txt: -------------------------------------------------------------------------------- 1 | $args = 2 | { 3 | message_type => 'xpl-cmnd', 4 | head => 5 | { 6 | hop => 1, 7 | source => 'acme-boombox.kitchen', 8 | target => '*', 9 | }, 10 | schema => 'audio.basic', 11 | body => 12 | [ 13 | command => 'play', 14 | ], 15 | }; 16 | 17 | xpl-cmnd 18 | { 19 | hop=1 20 | source=acme-boombox.kitchen 21 | target=* 22 | } 23 | audio.basic 24 | { 25 | command=play 26 | } 27 | 28 | message_type=xpl-cmnd 29 | 30 | hop=1 31 | 32 | source=acme-boombox.kitchen 33 | 34 | target=* 35 | 36 | schema=audio.basic 37 | 38 | command=play 39 | 40 | summary=xpl-cmnd/audio.basic: acme-boombox.kitchen -> * play 41 | -------------------------------------------------------------------------------- /t/msg/018.osd.basic.txt: -------------------------------------------------------------------------------- 1 | $args = 2 | { 3 | message_type => "xpl-cmnd", 4 | head => 5 | { 6 | hop => 2, 7 | source => "acme-phone.livingroom", 8 | target => "acme-tv.livingroom", 9 | }, 10 | schema => "osd.basic", 11 | body => 12 | [ 13 | command => "clear", 14 | text => ["Ring, Ring", "Ring, Ring" ], 15 | row => 1, 16 | column => 2, 17 | delay => 5, 18 | ], 19 | }; 20 | 21 | xpl-cmnd 22 | { 23 | hop=2 24 | source=acme-phone.livingroom 25 | target=acme-tv.livingroom 26 | } 27 | osd.basic 28 | { 29 | command=clear 30 | text=Ring, Ring 31 | text=Ring, Ring 32 | row=1 33 | column=2 34 | delay=5 35 | } 36 | 37 | message_type=xpl-cmnd 38 | 39 | hop=2 40 | 41 | source=acme-phone.livingroom 42 | 43 | target=acme-tv.livingroom 44 | 45 | schema=osd.basic 46 | 47 | command=clear 48 | 49 | text=[Ring, Ring,Ring, Ring] 50 | 51 | row=1 52 | 53 | column=2 54 | 55 | delay=5 56 | 57 | summary=xpl-cmnd/osd.basic: acme-phone.livingroom -> acme-tv.livingroom clear/Ring, Ring/Ring, Ring/1/2/5 58 | -------------------------------------------------------------------------------- /t/ow/1/28.FEFEFE000000/temperature: -------------------------------------------------------------------------------- 1 | 20.1 2 | -------------------------------------------------------------------------------- /t/ow/1/statistics/errors/CRC16_errors: -------------------------------------------------------------------------------- 1 | 0 -------------------------------------------------------------------------------- /t/ow/1/statistics/errors/CRC16_tries: -------------------------------------------------------------------------------- 1 | 0 -------------------------------------------------------------------------------- /t/ow/1/statistics/errors/CRC8_errors: -------------------------------------------------------------------------------- 1 | 13 -------------------------------------------------------------------------------- /t/ow/1/statistics/errors/CRC8_tries: -------------------------------------------------------------------------------- 1 | 146553 -------------------------------------------------------------------------------- /t/ow/1/statistics/read/cachesuccess: -------------------------------------------------------------------------------- 1 | 0 -------------------------------------------------------------------------------- /t/ow/1/statistics/read/calls: -------------------------------------------------------------------------------- 1 | 171521 -------------------------------------------------------------------------------- /t/ow/1/statistics/read/success: -------------------------------------------------------------------------------- 1 | 265505 -------------------------------------------------------------------------------- /t/ow/1/statistics/read/tries.0: -------------------------------------------------------------------------------- 1 | 171511 -------------------------------------------------------------------------------- /t/ow/1/statistics/read/tries.1: -------------------------------------------------------------------------------- 1 | 11 -------------------------------------------------------------------------------- /t/ow/1/statistics/read/tries.2: -------------------------------------------------------------------------------- 1 | 1 -------------------------------------------------------------------------------- /t/ow/1/statistics/write/calls: -------------------------------------------------------------------------------- 1 | 24 -------------------------------------------------------------------------------- /t/ow/1/statistics/write/success: -------------------------------------------------------------------------------- 1 | 24 -------------------------------------------------------------------------------- /t/ow/1/statistics/write/tries.0: -------------------------------------------------------------------------------- 1 | 24 -------------------------------------------------------------------------------- /t/ow/1/statistics/write/tries.1: -------------------------------------------------------------------------------- 1 | 0 -------------------------------------------------------------------------------- /t/ow/1/statistics/write/tries.2: -------------------------------------------------------------------------------- 1 | 0 -------------------------------------------------------------------------------- /t/ow/2/05.CFCFCF000000/type: -------------------------------------------------------------------------------- 1 | DS2405 2 | -------------------------------------------------------------------------------- /t/ow/2/1F.EFEFEF000000/main/26.ABABAB000000/humidity: -------------------------------------------------------------------------------- 1 | 24.6653 2 | -------------------------------------------------------------------------------- /t/ow/2/1F.EFEFEF000000/main/26.ABABAB000000/temperature: -------------------------------------------------------------------------------- 1 | 25.8438 2 | -------------------------------------------------------------------------------- /t/ow/2/statistics/read/calls: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /t/ow/2/statistics/write/calls: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /t/release-eol.t: -------------------------------------------------------------------------------- 1 | 2 | BEGIN { 3 | unless ($ENV{RELEASE_TESTING}) { 4 | require Test::More; 5 | Test::More::plan(skip_all => 'these tests are for release candidate testing'); 6 | } 7 | } 8 | 9 | use strict; 10 | use warnings; 11 | use Test::More; 12 | 13 | eval 'use Test::EOL'; 14 | plan skip_all => 'Test::EOL required' if $@; 15 | 16 | all_perl_files_ok({ trailing_whitespace => 1 }); 17 | -------------------------------------------------------------------------------- /t/release-kwalitee.t: -------------------------------------------------------------------------------- 1 | #!perl 2 | 3 | BEGIN { 4 | unless ($ENV{RELEASE_TESTING}) { 5 | require Test::More; 6 | Test::More::plan(skip_all => 'these tests are for release candidate testing'); 7 | } 8 | } 9 | 10 | 11 | use Test::More; 12 | 13 | eval "use Test::Kwalitee"; 14 | plan skip_all => "Test::Kwalitee required for testing kwalitee" 15 | if $@; 16 | -------------------------------------------------------------------------------- /t/release-no-tabs.t: -------------------------------------------------------------------------------- 1 | 2 | BEGIN { 3 | unless ($ENV{RELEASE_TESTING}) { 4 | require Test::More; 5 | Test::More::plan(skip_all => 'these tests are for release candidate testing'); 6 | } 7 | } 8 | 9 | use strict; 10 | use warnings; 11 | use Test::More; 12 | 13 | eval 'use Test::NoTabs'; 14 | plan skip_all => 'Test::NoTabs required' if $@; 15 | 16 | all_perl_files_ok(); 17 | -------------------------------------------------------------------------------- /t/release-pod-coverage.t: -------------------------------------------------------------------------------- 1 | #!perl 2 | 3 | BEGIN { 4 | unless ($ENV{RELEASE_TESTING}) { 5 | require Test::More; 6 | Test::More::plan(skip_all => 'these tests are for release candidate testing'); 7 | } 8 | } 9 | 10 | 11 | use Test::More; 12 | 13 | eval "use Test::Pod::Coverage 1.08"; 14 | plan skip_all => "Test::Pod::Coverage 1.08 required for testing POD coverage" 15 | if $@; 16 | 17 | eval "use Pod::Coverage::TrustPod"; 18 | plan skip_all => "Pod::Coverage::TrustPod required for testing POD coverage" 19 | if $@; 20 | 21 | all_pod_coverage_ok({ coverage_class => 'Pod::Coverage::TrustPod' }); 22 | -------------------------------------------------------------------------------- /t/release-pod-syntax.t: -------------------------------------------------------------------------------- 1 | #!perl 2 | 3 | BEGIN { 4 | unless ($ENV{RELEASE_TESTING}) { 5 | require Test::More; 6 | Test::More::plan(skip_all => 'these tests are for release candidate testing'); 7 | } 8 | } 9 | 10 | use Test::More; 11 | 12 | eval "use Test::Pod 1.41"; 13 | plan skip_all => "Test::Pod 1.41 required for testing POD" if $@; 14 | 15 | all_pod_files_ok(); 16 | -------------------------------------------------------------------------------- /t/rf/electrisave-01.txt: -------------------------------------------------------------------------------- 1 | 78ea00a642000000169bff5f1dc05408 2 | 3 | 16 bytes 4 | 5 | 4 messages 6 | 7 | xpl-trig 8 | { 9 | hop=1 10 | source=bnz-rftest.default 11 | target=* 12 | } 13 | sensor.basic 14 | { 15 | device=electrisave.a6 16 | type=current 17 | current=6.6 18 | } 19 | xpl-trig 20 | { 21 | hop=1 22 | source=bnz-rftest.default 23 | target=* 24 | } 25 | sensor.basic 26 | { 27 | device=electrisave.a6.1 28 | type=current 29 | current=6.6 30 | } 31 | xpl-trig 32 | { 33 | hop=1 34 | source=bnz-rftest.default 35 | target=* 36 | } 37 | sensor.basic 38 | { 39 | device=electrisave.a6.2 40 | type=current 41 | current=0 42 | } 43 | xpl-trig 44 | { 45 | hop=1 46 | source=bnz-rftest.default 47 | target=* 48 | } 49 | sensor.basic 50 | { 51 | device=electrisave.a6.3 52 | type=current 53 | current=0 54 | } 55 | xpl-trig 56 | { 57 | hop=1 58 | source=bnz-rftest.default 59 | target=* 60 | } 61 | sensor.basic 62 | { 63 | device=electrisave.a6 64 | type=battery 65 | current=90 66 | units=% 67 | } 68 | -------------------------------------------------------------------------------- /t/rf/electrisave-02-invalid-byte1.txt: -------------------------------------------------------------------------------- 1 | 78eb00a642000000169bff5f1dc05408 2 | 3 | 16 bytes 4 | 5 | 0 messages 6 | 7 | empty 8 | 9 | -------------------------------------------------------------------------------- /t/rf/electrisave-03-invalid-byte9.txt: -------------------------------------------------------------------------------- 1 | 78ea00a642000000169bee5f1dc05408 2 | 3 | 16 bytes 4 | 5 | 0 messages 6 | 7 | empty 8 | 9 | -------------------------------------------------------------------------------- /t/rf/electrisave-04-invalid-byte10.txt: -------------------------------------------------------------------------------- 1 | 78ea00a642000000169bfff51dc05408 2 | 3 | 16 bytes 4 | 5 | 0 messages 6 | 7 | empty 8 | 9 | -------------------------------------------------------------------------------- /t/rf/homeeasy-01-off.txt: -------------------------------------------------------------------------------- 1 | 22c7e05dca00 2 | 3 | 6 bytes 4 | 5 | 1 messages 6 | 7 | xpl-trig 8 | { 9 | hop=1 10 | source=bnz-rftest.default 11 | target=* 12 | } 13 | homeeasy.basic 14 | { 15 | address=0x31f8177 16 | unit=10 17 | command=off 18 | } 19 | 20 | -------------------------------------------------------------------------------- /t/rf/homeeasy-02-group-on.txt: -------------------------------------------------------------------------------- 1 | 22020aa1b080 2 | 3 | 6 bytes 4 | 5 | 1 messages 6 | 7 | xpl-trig 8 | { 9 | hop=1 10 | source=bnz-rftest.default 11 | target=* 12 | } 13 | homeeasy.basic 14 | { 15 | address=0x82a86 16 | unit=group 17 | command=on 18 | } 19 | 20 | -------------------------------------------------------------------------------- /t/rf/oregon-bthr918-01-bad-forecast.txt: -------------------------------------------------------------------------------- 1 | 585a5d00c230216044ce0154 2 | 3 | 12 bytes 4 | 5 | 4 messages 6 | 7 | xpl-trig 8 | { 9 | hop=1 10 | source=bnz-rftest.default 11 | target=* 12 | } 13 | sensor.basic 14 | { 15 | device=bthr918.c2 16 | type=temp 17 | current=21.3 18 | } 19 | xpl-trig 20 | { 21 | hop=1 22 | source=bnz-rftest.default 23 | target=* 24 | } 25 | sensor.basic 26 | { 27 | device=bthr918.c2 28 | type=humidity 29 | current=46 30 | string=comfortable 31 | } 32 | xpl-trig 33 | { 34 | hop=1 35 | source=bnz-rftest.default 36 | target=* 37 | } 38 | sensor.basic 39 | { 40 | device=bthr918.c2 41 | type=pressure 42 | current=1001 43 | units=hPa 44 | forecast=unknown 45 | } 46 | xpl-trig 47 | { 48 | hop=1 49 | source=bnz-rftest.default 50 | target=* 51 | } 52 | sensor.basic 53 | { 54 | device=bthr918.c2 55 | type=battery 56 | current=90 57 | units=% 58 | } 59 | 60 | -------------------------------------------------------------------------------- /t/rf/oregon-bthr918-01.txt: -------------------------------------------------------------------------------- 1 | 605a6d00b110236046a3614e5c 2 | 3 | 13 bytes 4 | 5 | 4 messages 6 | 7 | xpl-trig 8 | { 9 | hop=1 10 | source=bnz-rftest.default 11 | target=* 12 | } 13 | sensor.basic 14 | { 15 | device=bthr918n.b1 16 | type=temp 17 | current=23.1 18 | } 19 | xpl-trig 20 | { 21 | hop=1 22 | source=bnz-rftest.default 23 | target=* 24 | } 25 | sensor.basic 26 | { 27 | device=bthr918n.b1 28 | type=humidity 29 | current=66 30 | string=comfortable 31 | } 32 | xpl-trig 33 | { 34 | hop=1 35 | source=bnz-rftest.default 36 | target=* 37 | } 38 | sensor.basic 39 | { 40 | device=bthr918n.b1 41 | type=pressure 42 | current=1019 43 | units=hPa 44 | forecast=partly 45 | } 46 | xpl-trig 47 | { 48 | hop=1 49 | source=bnz-rftest.default 50 | target=* 51 | } 52 | sensor.basic 53 | { 54 | device=bthr918n.b1 55 | type=battery 56 | current=100 57 | units=% 58 | } 59 | 60 | -------------------------------------------------------------------------------- /t/rf/oregon-bwr102-01.txt: -------------------------------------------------------------------------------- 1 | 38dc63d29392d013 2 | 3 | 8 bytes 4 | 5 | 1 messages 6 | 7 | xpl-trig 8 | { 9 | hop=1 10 | source=bnz-rftest.default 11 | target=* 12 | } 13 | sensor.basic 14 | { 15 | device=bwr102.06 16 | type=weight 17 | current=92.9 18 | unknown=3d 19 | } 20 | 21 | -------------------------------------------------------------------------------- /t/rf/oregon-bwr102-02-invalid.txt: -------------------------------------------------------------------------------- 1 | 38dc63d29392e013 2 | 3 | 8 bytes 4 | 5 | 0 messages 6 | 7 | empty 8 | 9 | -------------------------------------------------------------------------------- /t/rf/oregon-bwr102-03-invalid.txt: -------------------------------------------------------------------------------- 1 | 38dc63d29392d012 2 | 3 | 8 bytes 4 | 5 | 0 messages 6 | 7 | empty 8 | 9 | -------------------------------------------------------------------------------- /t/rf/oregon-bwr102-04-invalid.txt: -------------------------------------------------------------------------------- 1 | 38dc63d293d2d013 2 | 3 | 8 bytes 4 | 5 | 0 messages 6 | 7 | empty 8 | 9 | -------------------------------------------------------------------------------- /t/rf/oregon-device-test-01.txt: -------------------------------------------------------------------------------- 1 | 50fefe0000000000000000 2 | 3 | 11 bytes 4 | 5 | 0 messages 6 | 7 | empty 8 | 9 | Possible message from Oregon part "TEST" 10 | -------------------------------------------------------------------------------- /t/rf/oregon-gr101-01.txt: -------------------------------------------------------------------------------- 1 | 40d36c421406388406 2 | 3 | 9 bytes 4 | 5 | 1 messages 6 | 7 | xpl-trig 8 | { 9 | hop=1 10 | source=bnz-rftest.default 11 | target=* 12 | } 13 | sensor.basic 14 | { 15 | device=gr101.6c 16 | type=weight 17 | current=62.1 18 | } 19 | 20 | -------------------------------------------------------------------------------- /t/rf/oregon-gr101-02-invalid.txt: -------------------------------------------------------------------------------- 1 | 40d26c421406388406 2 | 3 | 9 bytes 4 | 5 | 0 messages 6 | 7 | empty 8 | 9 | -------------------------------------------------------------------------------- /t/rf/oregon-pcr800-01.txt: -------------------------------------------------------------------------------- 1 | 5c2a19043f300080220120230a 2 | 3 | 13 bytes 4 | 5 | 3 messages 6 | 7 | xpl-trig 8 | { 9 | hop=1 10 | source=bnz-rftest.default 11 | target=* 12 | } 13 | sensor.basic 14 | { 15 | device=pcr800.3f 16 | type=speed 17 | current=0.76 18 | units=mm/h 19 | } 20 | xpl-trig 21 | { 22 | hop=1 23 | source=bnz-rftest.default 24 | target=* 25 | } 26 | sensor.basic 27 | { 28 | device=pcr800.3f 29 | type=distance 30 | current=31.19 31 | units=mm 32 | } 33 | xpl-trig 34 | { 35 | hop=1 36 | source=bnz-rftest.default 37 | target=* 38 | } 39 | sensor.basic 40 | { 41 | device=pcr800.3f 42 | type=battery 43 | current=90 44 | units=% 45 | } 46 | 47 | -------------------------------------------------------------------------------- /t/rf/oregon-rgr918-01.txt: -------------------------------------------------------------------------------- 1 | 542a1d00863000815540031b 2 | 3 | 12 bytes 4 | 5 | 4 messages 6 | 7 | xpl-trig 8 | { 9 | hop=1 10 | source=bnz-rftest.default 11 | target=* 12 | } 13 | sensor.basic 14 | { 15 | device=rgr918.86 16 | type=speed 17 | current=3 18 | units=mm/h 19 | } 20 | xpl-trig 21 | { 22 | hop=1 23 | source=bnz-rftest.default 24 | target=* 25 | } 26 | sensor.basic 27 | { 28 | device=rgr918.86 29 | type=distance 30 | current=558 31 | units=mm 32 | } 33 | xpl-trig 34 | { 35 | hop=1 36 | source=bnz-rftest.default 37 | target=* 38 | } 39 | sensor.basic 40 | { 41 | device=rgr918.86 42 | type=count 43 | current=1 44 | units=flips 45 | } 46 | xpl-trig 47 | { 48 | hop=1 49 | source=bnz-rftest.default 50 | target=* 51 | } 52 | sensor.basic 53 | { 54 | device=rgr918.86 55 | type=battery 56 | current=90 57 | units=% 58 | } 59 | 60 | -------------------------------------------------------------------------------- /t/rf/oregon-rtgr328n-01-temphydro.txt: -------------------------------------------------------------------------------- 1 | 50dacc134d312220644e32 2 | 3 | 11 bytes 4 | 5 | 3 messages 6 | 7 | xpl-trig 8 | { 9 | hop=1 10 | source=bnz-rftest.default 11 | target=* 12 | } 13 | sensor.basic 14 | { 15 | device=rtgr328n.4d 16 | type=temp 17 | current=22.3 18 | } 19 | xpl-trig 20 | { 21 | hop=1 22 | source=bnz-rftest.default 23 | target=* 24 | } 25 | sensor.basic 26 | { 27 | device=rtgr328n.4d 28 | type=humidity 29 | current=42 30 | string=comfortable 31 | } 32 | xpl-trig 33 | { 34 | hop=1 35 | source=bnz-rftest.default 36 | target=* 37 | } 38 | sensor.basic 39 | { 40 | device=rtgr328n.4d 41 | type=battery 42 | current=90 43 | units=% 44 | } 45 | 46 | -------------------------------------------------------------------------------- /t/rf/oregon-rtgr328n-02-datetime.txt: -------------------------------------------------------------------------------- 1 | 689aec134d033311526072605f43 2 | 3 | 14 bytes 4 | 5 | 1 messages 6 | 7 | xpl-trig 8 | { 9 | hop=1 10 | source=bnz-rftest.default 11 | target=* 12 | } 13 | datetime.basic 14 | { 15 | datetime=20070605211330 16 | date=20070605 17 | time=211330 18 | day=Tuesday 19 | device=rtgr328n.4d 20 | } 21 | 22 | -------------------------------------------------------------------------------- /t/rf/oregon-rtgr328n-03-invalid-checksum.txt: -------------------------------------------------------------------------------- 1 | 50dacc1ffff12220644e32 2 | 3 | 11 bytes 4 | 5 | 0 messages 6 | 7 | empty 8 | 9 | -------------------------------------------------------------------------------- /t/rf/oregon-rtgr328n-04-invalid-checksum-dt.txt: -------------------------------------------------------------------------------- 1 | 689aec134d03ff11526072605f43 2 | 3 | 14 bytes 4 | 5 | 0 messages 6 | 7 | empty 8 | 9 | -------------------------------------------------------------------------------- /t/rf/oregon-rtgr328n-05-negativetemp.txt: -------------------------------------------------------------------------------- 1 | 50dacc134d710128645732 2 | 3 | 11 bytes 4 | 5 | 3 messages 6 | 7 | xpl-trig 8 | { 9 | hop=1 10 | source=bnz-rftest.default 11 | target=* 12 | } 13 | sensor.basic 14 | { 15 | device=rtgr328n.4d 16 | type=temp 17 | current=-1.7 18 | } 19 | xpl-stat 20 | { 21 | hop=1 22 | source=bnz-rftest.default 23 | target=* 24 | } 25 | sensor.basic 26 | { 27 | device=rtgr328n.4d 28 | type=humidity 29 | current=42 30 | string=comfortable 31 | } 32 | xpl-stat 33 | { 34 | hop=1 35 | source=bnz-rftest.default 36 | target=* 37 | } 38 | sensor.basic 39 | { 40 | device=rtgr328n.4d 41 | type=battery 42 | current=90 43 | units=% 44 | } 45 | 46 | -------------------------------------------------------------------------------- /t/rf/oregon-rtgr328n-06-low-battery.txt: -------------------------------------------------------------------------------- 1 | 50dacc134d352220645232 2 | 3 | 11 bytes 4 | 5 | 3 messages 6 | 7 | xpl-trig 8 | { 9 | hop=1 10 | source=bnz-rftest.default 11 | target=* 12 | } 13 | sensor.basic 14 | { 15 | device=rtgr328n.4d 16 | type=temp 17 | current=22.3 18 | } 19 | xpl-stat 20 | { 21 | hop=1 22 | source=bnz-rftest.default 23 | target=* 24 | } 25 | sensor.basic 26 | { 27 | device=rtgr328n.4d 28 | type=humidity 29 | current=42 30 | string=comfortable 31 | } 32 | xpl-trig 33 | { 34 | hop=1 35 | source=bnz-rftest.default 36 | target=* 37 | } 38 | sensor.basic 39 | { 40 | device=rtgr328n.4d 41 | type=battery 42 | current=10 43 | units=% 44 | } 45 | 46 | -------------------------------------------------------------------------------- /t/rf/oregon-thgr228n-01-temphydro.txt: -------------------------------------------------------------------------------- 1 | 501a2d10a42115702536d0 2 | 3 | 11 bytes 4 | 5 | 3 messages 6 | 7 | xpl-trig 8 | { 9 | hop=1 10 | source=bnz-rftest.default 11 | target=* 12 | } 13 | sensor.basic 14 | { 15 | device=thgr228n.a4 16 | type=temp 17 | current=15.2 18 | } 19 | xpl-trig 20 | { 21 | hop=1 22 | source=bnz-rftest.default 23 | target=* 24 | } 25 | sensor.basic 26 | { 27 | device=thgr228n.a4 28 | type=humidity 29 | current=57 30 | string=normal 31 | } 32 | xpl-trig 33 | { 34 | hop=1 35 | source=bnz-rftest.default 36 | target=* 37 | } 38 | sensor.basic 39 | { 40 | device=thgr228n.a4 41 | type=battery 42 | current=90 43 | units=% 44 | } 45 | 46 | -------------------------------------------------------------------------------- /t/rf/oregon-thgr810-01.txt: -------------------------------------------------------------------------------- 1 | 50fa2814e6802450444d09 2 | 3 | 11 bytes 4 | 5 | 3 messages 6 | 7 | xpl-trig 8 | { 9 | hop=1 10 | source=bnz-rftest.default 11 | target=* 12 | } 13 | sensor.basic 14 | { 15 | device=thgr810.e6 16 | type=temp 17 | current=24.8 18 | } 19 | xpl-trig 20 | { 21 | hop=1 22 | source=bnz-rftest.default 23 | target=* 24 | } 25 | sensor.basic 26 | { 27 | device=thgr810.e6 28 | type=humidity 29 | current=45 30 | string=comfortable 31 | } 32 | xpl-trig 33 | { 34 | hop=1 35 | source=bnz-rftest.default 36 | target=* 37 | } 38 | sensor.basic 39 | { 40 | device=thgr810.e6 41 | type=battery 42 | current=90 43 | units=% 44 | } 45 | 46 | -------------------------------------------------------------------------------- /t/rf/oregon-thr128-01-temp.txt: -------------------------------------------------------------------------------- 1 | 500a4d100a902300002a00 2 | 3 | 11 bytes 4 | 5 | 2 messages 6 | 7 | xpl-trig 8 | { 9 | hop=1 10 | source=bnz-rftest.default 11 | target=* 12 | } 13 | sensor.basic 14 | { 15 | device=thr128.0a 16 | type=temp 17 | current=23.9 18 | } 19 | xpl-trig 20 | { 21 | hop=1 22 | source=bnz-rftest.default 23 | target=* 24 | } 25 | sensor.basic 26 | { 27 | device=thr128.0a 28 | type=battery 29 | current=90 30 | units=% 31 | } 32 | 33 | -------------------------------------------------------------------------------- /t/rf/oregon-uv138-01.txt: -------------------------------------------------------------------------------- 1 | 78ea7c10804870ade4fbffafce070188 2 | 3 | 16 bytes 4 | 5 | 2 messages 6 | 7 | xpl-trig 8 | { 9 | hop=1 10 | source=bnz-rftest.default 11 | target=* 12 | } 13 | sensor.basic 14 | { 15 | device=uv138.80 16 | type=uv 17 | current=4 18 | risk=medium 19 | } 20 | xpl-trig 21 | { 22 | hop=1 23 | source=bnz-rftest.default 24 | target=* 25 | } 26 | sensor.basic 27 | { 28 | device=uv138.80 29 | type=battery 30 | current=90 31 | units=% 32 | } 33 | 34 | -------------------------------------------------------------------------------- /t/rf/oregon-uv138-02-invalid-checksum.txt: -------------------------------------------------------------------------------- 1 | 78ea7c10ffff70ade4fbffafce070188 2 | 3 | 16 bytes 4 | 5 | 0 messages 6 | 7 | empty 8 | 9 | -------------------------------------------------------------------------------- /t/rf/oregon-uv138-03-dangerous.txt: -------------------------------------------------------------------------------- 1 | 78ea7c108028719de4fbffafce070188 2 | 3 | 16 bytes 4 | 5 | 2 messages 6 | 7 | xpl-trig 8 | { 9 | hop=1 10 | source=bnz-rftest.default 11 | target=* 12 | } 13 | sensor.basic 14 | { 15 | device=uv138.80 16 | type=uv 17 | current=12 18 | risk=dangerous 19 | } 20 | xpl-stat 21 | { 22 | hop=1 23 | source=bnz-rftest.default 24 | target=* 25 | } 26 | sensor.basic 27 | { 28 | device=uv138.80 29 | type=battery 30 | current=90 31 | units=% 32 | } 33 | 34 | -------------------------------------------------------------------------------- /t/rf/oregon-uvn800-01.txt: -------------------------------------------------------------------------------- 1 | 48da7814560010073480 2 | 3 | 10 bytes 4 | 5 | 2 messages 6 | 7 | xpl-trig 8 | { 9 | hop=1 10 | source=bnz-rftest.default 11 | target=* 12 | } 13 | sensor.basic 14 | { 15 | device=uvn800.56 16 | type=uv 17 | current=0 18 | risk=low 19 | } 20 | xpl-trig 21 | { 22 | hop=1 23 | source=bnz-rftest.default 24 | target=* 25 | } 26 | sensor.basic 27 | { 28 | device=uvn800.56 29 | type=battery 30 | current=100 31 | units=% 32 | } 33 | 34 | -------------------------------------------------------------------------------- /t/rf/oregon-wgr918-01-wind.txt: -------------------------------------------------------------------------------- 1 | 583a0d002d10243420033233 2 | 3 | 12 bytes 4 | 5 | 3 messages 6 | 7 | xpl-trig 8 | { 9 | hop=1 10 | source=bnz-rftest.default 11 | target=* 12 | } 13 | sensor.basic 14 | { 15 | device=wgr918.2d 16 | type=speed 17 | current=3.4 18 | units=mps 19 | average=3.2 20 | } 21 | xpl-trig 22 | { 23 | hop=1 24 | source=bnz-rftest.default 25 | target=* 26 | } 27 | sensor.basic 28 | { 29 | device=wgr918.2d 30 | type=direction 31 | current=241 32 | units=degrees 33 | } 34 | xpl-trig 35 | { 36 | hop=1 37 | source=bnz-rftest.default 38 | target=* 39 | } 40 | sensor.basic 41 | { 42 | device=wgr918.2d 43 | type=battery 44 | current=100 45 | units=% 46 | } 47 | 48 | -------------------------------------------------------------------------------- /t/rf/oregon-wtgr800-01-wind.txt: -------------------------------------------------------------------------------- 1 | 581a99042f10c01200013980 2 | 3 | 12 bytes 4 | 5 | 3 messages 6 | 7 | xpl-trig 8 | { 9 | hop=1 10 | source=bnz-rftest.default 11 | target=* 12 | } 13 | sensor.basic 14 | { 15 | device=wtgr800.2f 16 | type=speed 17 | current=1.2 18 | units=mps 19 | average=1 20 | } 21 | xpl-trig 22 | { 23 | hop=1 24 | source=bnz-rftest.default 25 | target=* 26 | } 27 | sensor.basic 28 | { 29 | device=wtgr800.2f 30 | type=direction 31 | current=22.5 32 | } 33 | xpl-trig 34 | { 35 | hop=1 36 | source=bnz-rftest.default 37 | target=* 38 | } 39 | sensor.basic 40 | { 41 | device=wtgr800.2f 42 | type=battery 43 | current=100 44 | units=% 45 | } 46 | 47 | -------------------------------------------------------------------------------- /t/rf/oregon-wtgr800-02-temphydro.txt: -------------------------------------------------------------------------------- 1 | 50fab8142f722060d85edb 2 | 3 | 11 bytes 4 | 5 | 3 messages 6 | 7 | xpl-trig 8 | { 9 | hop=1 10 | source=bnz-rftest.default 11 | target=* 12 | } 13 | sensor.basic 14 | { 15 | device=wtgr800.2f 16 | type=temp 17 | current=20.7 18 | } 19 | xpl-trig 20 | { 21 | hop=1 22 | source=bnz-rftest.default 23 | target=* 24 | } 25 | sensor.basic 26 | { 27 | device=wtgr800.2f 28 | type=humidity 29 | current=86 30 | string=wet 31 | } 32 | xpl-trig 33 | { 34 | hop=1 35 | source=bnz-rftest.default 36 | target=* 37 | } 38 | sensor.basic 39 | { 40 | device=wtgr800.2f 41 | type=battery 42 | current=80 43 | units=% 44 | } 45 | 46 | -------------------------------------------------------------------------------- /t/rf/oregon-wtgr800-03-low-battery.txt: -------------------------------------------------------------------------------- 1 | 50fab8142f792060d865db 2 | 3 | 11 bytes 4 | 5 | 3 messages 6 | 7 | xpl-stat 8 | { 9 | hop=1 10 | source=bnz-rftest.default 11 | target=* 12 | } 13 | sensor.basic 14 | { 15 | device=wtgr800.2f 16 | type=temp 17 | current=20.7 18 | } 19 | xpl-stat 20 | { 21 | hop=1 22 | source=bnz-rftest.default 23 | target=* 24 | } 25 | sensor.basic 26 | { 27 | device=wtgr800.2f 28 | type=humidity 29 | current=86 30 | string=wet 31 | } 32 | xpl-trig 33 | { 34 | hop=1 35 | source=bnz-rftest.default 36 | target=* 37 | } 38 | sensor.basic 39 | { 40 | device=wtgr800.2f 41 | type=battery 42 | current=10 43 | units=% 44 | } 45 | 46 | -------------------------------------------------------------------------------- /t/rf/rfxmeter-01.txt: -------------------------------------------------------------------------------- 1 | 3000f00006000a 2 | 3 | 7 bytes 4 | 5 | 1 messages 6 | 7 | xpl-trig 8 | { 9 | hop=1 10 | source=bnz-rftest.default 11 | target=* 12 | } 13 | sensor.basic 14 | { 15 | device=rfxmeter.00f0 16 | type=count 17 | current=6 18 | } 19 | 20 | -------------------------------------------------------------------------------- /t/rf/rfxmeter-02-parity-error.txt: -------------------------------------------------------------------------------- 1 | 3000f00006000b 2 | 3 | 7 bytes 4 | 5 | 0 messages 6 | 7 | empty 8 | 9 | RFXMeter parity error 10 != 11 10 | -------------------------------------------------------------------------------- /t/rf/rfxmeter-03-unsupported.txt: -------------------------------------------------------------------------------- 1 | 3000f0000600fb 2 | 3 | 7 bytes 4 | 5 | 0 messages 6 | 7 | empty 8 | 9 | Unsupported rfxmeter message identification packet 10 | Hex: 00f0000600fb 11 | -------------------------------------------------------------------------------- /t/rf/rfxmeter-04-invalid.txt: -------------------------------------------------------------------------------- 1 | 30000000000000 2 | 3 | 7 bytes 4 | 5 | 0 messages 6 | 7 | empty 8 | 9 | -------------------------------------------------------------------------------- /t/rf/rfxsensor-01-humidity.txt: -------------------------------------------------------------------------------- 1 | 2001f11ae5 2 | 3 | 5 bytes 4 | 5 | 1 messages 6 | 7 | xpl-trig 8 | { 9 | hop=1 10 | source=bnz-rftest.default 11 | target=* 12 | } 13 | sensor.basic 14 | { 15 | device=rfxsensor01f1 16 | type=voltage 17 | current=2.15 18 | base_device=00f0 19 | } 20 | 21 | Don't have supply voltage for rfxsensor01f1/00f0 yet 22 | 23 | -------------------------------------------------------------------------------- /t/rf/rfxsensor-02-voltage.txt: -------------------------------------------------------------------------------- 1 | 2002f23ea1 2 | 3 | 5 bytes 4 | 5 | 1 messages 6 | 7 | xpl-trig 8 | { 9 | hop=1 10 | source=bnz-rftest.default 11 | target=* 12 | } 13 | sensor.basic 14 | { 15 | device=rfxsensor02f2 16 | type=voltage 17 | current=5.01 18 | base_device=00f0 19 | } 20 | 21 | -------------------------------------------------------------------------------- /t/rf/rfxsensor-03-humidity.txt: -------------------------------------------------------------------------------- 1 | 2001f11ae5 2 | 3 | 5 bytes 4 | 5 | 2 messages 6 | 7 | xpl-stat 8 | { 9 | hop=1 10 | source=bnz-rftest.default 11 | target=* 12 | } 13 | sensor.basic 14 | { 15 | device=rfxsensor01f1 16 | type=voltage 17 | current=2.15 18 | base_device=00f0 19 | } 20 | xpl-trig 21 | { 22 | hop=1 23 | source=bnz-rftest.default 24 | target=* 25 | } 26 | sensor.basic 27 | { 28 | device=rfxsensor01f1 29 | type=humidity 30 | current=43.41 31 | base_device=00f0 32 | } 33 | 34 | Don't have temperature for rfxsensor01f1/00f0 yet - assuming 25'C 35 | 36 | clear 37 | -------------------------------------------------------------------------------- /t/rf/rfxsensor-04-temp.txt: -------------------------------------------------------------------------------- 1 | 2000f007cd 2 | 3 | 5 bytes 4 | 5 | 1 messages 6 | 7 | xpl-trig 8 | { 9 | hop=1 10 | source=bnz-rftest.default 11 | target=* 12 | } 13 | sensor.basic 14 | { 15 | device=rfxsensor00f0 16 | type=temp 17 | current=7.75 18 | base_device=00f0 19 | } 20 | 21 | -------------------------------------------------------------------------------- /t/rf/rfxsensor-05-humidity.txt: -------------------------------------------------------------------------------- 1 | 2001f11ae5 2 | 3 | 5 bytes 4 | 5 | 2 messages 6 | 7 | xpl-stat 8 | { 9 | hop=1 10 | source=bnz-rftest.default 11 | target=* 12 | } 13 | sensor.basic 14 | { 15 | device=rfxsensor01f1 16 | type=voltage 17 | current=2.15 18 | base_device=00f0 19 | } 20 | xpl-trig 21 | { 22 | hop=1 23 | source=bnz-rftest.default 24 | target=* 25 | } 26 | sensor.basic 27 | { 28 | device=rfxsensor01f1 29 | type=humidity 30 | current=41.83 31 | base_device=00f0 32 | } 33 | 34 | none 35 | 36 | clear 37 | -------------------------------------------------------------------------------- /t/rf/rfxsensor-06-unsupported-type.txt: -------------------------------------------------------------------------------- 1 | 2003f31ae1 2 | 3 | 5 bytes 4 | 5 | 0 messages 6 | 7 | empty 8 | 9 | Unsupported RFXSensor: type=3 10 | 11 | -------------------------------------------------------------------------------- /t/rf/rfxsensor-07-low-battery.txt: -------------------------------------------------------------------------------- 1 | 2003f30217 2 | 3 | 5 bytes 4 | 5 | 0 messages 6 | 7 | empty 8 | 9 | RFXSensor info rfxsensor03f3: battery low detected 10 | 11 | -------------------------------------------------------------------------------- /t/rf/rfxsensor-08-error.txt: -------------------------------------------------------------------------------- 1 | 2003f3831e 2 | 3 | 5 bytes 4 | 5 | 0 messages 6 | 7 | empty 8 | 9 | RFXSensor error rfxsensor03f3: 1-wire device connected is not a DS18B20 or DS2438 10 | 11 | -------------------------------------------------------------------------------- /t/rf/rfxsensor-09-unknown-status.txt: -------------------------------------------------------------------------------- 1 | 2003f39917 2 | 3 | 5 bytes 4 | 5 | 0 messages 6 | 7 | empty 8 | 9 | RFXSensor unknown status messages: 99 10 | 11 | -------------------------------------------------------------------------------- /t/rf/rfxsensor-10-negative-temp.txt: -------------------------------------------------------------------------------- 1 | 2000f0ffc6 2 | 3 | 5 bytes 4 | 5 | 1 messages 6 | 7 | xpl-trig 8 | { 9 | hop=1 10 | source=bnz-rftest.default 11 | target=* 12 | } 13 | sensor.basic 14 | { 15 | device=rfxsensor00f0 16 | type=temp 17 | current=-0.25 18 | base_device=00f0 19 | } 20 | -------------------------------------------------------------------------------- /t/rf/rfxsensor-11-init.txt: -------------------------------------------------------------------------------- 1 | 205246330a 2 | 3 | 5 bytes 4 | 5 | 0 messages 6 | 7 | empty 8 | 9 | RFXSensor Type-3, version 0a, transmit mode fast, initialized 10 | 11 | -------------------------------------------------------------------------------- /t/rf/rfxsensor-12-init-slow.txt: -------------------------------------------------------------------------------- 1 | 2052463289 2 | 3 | 5 bytes 4 | 5 | 0 messages 6 | 7 | empty 8 | 9 | RFXSensor Type-2, version 09, transmit mode slow, initialized 10 | 11 | -------------------------------------------------------------------------------- /t/rf/rfxsensor-13-sensor-info.txt: -------------------------------------------------------------------------------- 1 | 2853454e0026 2 | 3 | 6 bytes 4 | 5 | 0 messages 6 | 7 | empty 8 | 9 | RFXSensor SEN0, type 26 (DS2438) 10 | 11 | -------------------------------------------------------------------------------- /t/rf/rfxsensor-14-sensor-unknown.txt: -------------------------------------------------------------------------------- 1 | 2853454e0010 2 | 3 | 6 bytes 4 | 5 | 0 messages 6 | 7 | empty 8 | 9 | RFXSensor SEN0, type 10 (unknown) 10 | 11 | -------------------------------------------------------------------------------- /t/rf/rfxsensor-15-sensor-bad-len.txt: -------------------------------------------------------------------------------- 1 | 1852465800 2 | 3 | 4 bytes 4 | 5 | 0 messages 6 | 7 | empty 8 | 9 | -------------------------------------------------------------------------------- /t/rf/visonic-01-codesecure.txt: -------------------------------------------------------------------------------- 1 | c23ff39b5c01ba680400 2 | 3 | 10 bytes 4 | 5 | 1 messages 6 | 7 | xpl-trig 8 | { 9 | hop=1 10 | source=bnz-rftest.default 11 | target=* 12 | } 13 | x10.security 14 | { 15 | command=disarm 16 | device=01ba680 17 | type=codesecure 18 | } 19 | xpl-trig 20 | { 21 | hop=1 22 | source=bnz-rftest.default 23 | target=* 24 | } 25 | sensor.basic 26 | { 27 | device=codesecure.01ba680 28 | type=battery 29 | current=90 30 | units=% 31 | } 32 | 33 | -------------------------------------------------------------------------------- /t/rf/visonic-02-powercode.txt: -------------------------------------------------------------------------------- 1 | a4c5ec581430 2 | 3 | 6 bytes 4 | 5 | 2 messages 6 | 7 | xpl-trig 8 | { 9 | hop=1 10 | source=bnz-rftest.default 11 | target=* 12 | } 13 | security.zone 14 | { 15 | event=alert 16 | zone=powercode.c5ec58 17 | state=false 18 | } 19 | xpl-trig 20 | { 21 | hop=1 22 | source=bnz-rftest.default 23 | target=* 24 | } 25 | x10.security 26 | { 27 | command=normal 28 | device=c5ec58 29 | type=powercode 30 | } 31 | xpl-trig 32 | { 33 | hop=1 34 | source=bnz-rftest.default 35 | target=* 36 | } 37 | sensor.basic 38 | { 39 | device=powercode.c5ec58 40 | type=battery 41 | current=90 42 | units=% 43 | } 44 | -------------------------------------------------------------------------------- /t/rf/visonic-03-powercode-secondary.txt: -------------------------------------------------------------------------------- 1 | a4c5ec58e800 2 | 3 | 6 bytes 4 | 5 | 2 messages 6 | 7 | xpl-trig 8 | { 9 | hop=1 10 | source=bnz-rftest.default 11 | target=* 12 | } 13 | security.zone 14 | { 15 | event=alert 16 | zone=powercode.c5ec58s 17 | state=true 18 | restore=true 19 | tamper=true 20 | } 21 | xpl-trig 22 | { 23 | hop=1 24 | source=bnz-rftest.default 25 | target=* 26 | } 27 | x10.security 28 | { 29 | command=alert 30 | device=c5ec58s 31 | type=powercode 32 | tamper=true 33 | event=alive 34 | restore=true 35 | } 36 | xpl-trig 37 | { 38 | hop=1 39 | source=bnz-rftest.default 40 | target=* 41 | } 42 | sensor.basic 43 | { 44 | device=powercode.c5ec58s 45 | type=battery 46 | current=10 47 | units=% 48 | } 49 | -------------------------------------------------------------------------------- /t/rf/visonic-04-powercode-parity-error.txt: -------------------------------------------------------------------------------- 1 | a4c5ec581440 2 | 3 | 6 bytes 4 | 5 | 0 messages 6 | 7 | empty 8 | 9 | Possible Visonic powercode with parity error 3 != 4 10 | 11 | -------------------------------------------------------------------------------- /t/rf/visonic-05-codesecure-invalid.txt: -------------------------------------------------------------------------------- 1 | c29b9fa8ad3d27a68340 2 | 3 | 10 bytes 4 | 5 | 0 messages 6 | 7 | empty 8 | 9 | -------------------------------------------------------------------------------- /t/rf/visonic-06-codesecure-flags.txt: -------------------------------------------------------------------------------- 1 | c23ff39b5c01ba68040d 2 | 3 | 10 bytes 4 | 5 | 1 messages 6 | 7 | xpl-trig 8 | { 9 | hop=1 10 | source=bnz-rftest.default 11 | target=* 12 | } 13 | x10.security 14 | { 15 | command=disarm 16 | device=01ba680 17 | type=codesecure 18 | low-battery=true 19 | repeat=true 20 | } 21 | xpl-trig 22 | { 23 | hop=1 24 | source=bnz-rftest.default 25 | target=* 26 | } 27 | sensor.basic 28 | { 29 | device=codesecure.01ba680 30 | type=battery 31 | current=10 32 | units=% 33 | } 34 | 35 | -------------------------------------------------------------------------------- /t/rf/x10-01-a11-on.txt: -------------------------------------------------------------------------------- 1 | 20649b08f7 2 | 3 | 5 bytes 4 | 5 | 1 messages 6 | 7 | xpl-trig 8 | { 9 | hop=1 10 | source=bnz-rftest.default 11 | target=* 12 | } 13 | x10.basic 14 | { 15 | command=on 16 | device=a11 17 | } 18 | 19 | -------------------------------------------------------------------------------- /t/rf/x10-02-a11-on-dup.txt: -------------------------------------------------------------------------------- 1 | 20649b08f7 2 | 3 | 5 bytes 4 | 5 | 0 messages 6 | 7 | empty 8 | -------------------------------------------------------------------------------- /t/rf/x10-03-a11-on-no-dup.txt: -------------------------------------------------------------------------------- 1 | 20649b08f7 2 | 3 | 5 bytes 4 | 5 | 1 messages 6 | 7 | xpl-trig 8 | { 9 | hop=1 10 | source=bnz-rftest.default 11 | target=* 12 | } 13 | x10.basic 14 | { 15 | command=on 16 | device=a11 17 | } 18 | 19 | none 20 | 21 | pause 22 | -------------------------------------------------------------------------------- /t/rf/x10-04-a11-off.txt: -------------------------------------------------------------------------------- 1 | 20649b28d7 2 | 3 | 5 bytes 4 | 5 | 1 messages 6 | 7 | xpl-trig 8 | { 9 | hop=1 10 | source=bnz-rftest.default 11 | target=* 12 | } 13 | x10.basic 14 | { 15 | command=off 16 | device=a11 17 | } 18 | 19 | -------------------------------------------------------------------------------- /t/rf/x10-05-a11-bright.txt: -------------------------------------------------------------------------------- 1 | 20649b8877 2 | 3 | 5 bytes 4 | 5 | 1 messages 6 | 7 | xpl-trig 8 | { 9 | hop=1 10 | source=bnz-rftest.default 11 | target=* 12 | } 13 | x10.basic 14 | { 15 | command=bright 16 | device=a11 17 | level=10 18 | } 19 | 20 | -------------------------------------------------------------------------------- /t/rf/x10-06-a11-dim.txt: -------------------------------------------------------------------------------- 1 | 20649b9867 2 | 3 | 5 bytes 4 | 5 | 1 messages 6 | 7 | xpl-trig 8 | { 9 | hop=1 10 | source=bnz-rftest.default 11 | target=* 12 | } 13 | x10.basic 14 | { 15 | command=dim 16 | device=a11 17 | level=10 18 | } 19 | 20 | -------------------------------------------------------------------------------- /t/rf/x10-07-a-dim-no-unitcode.txt: -------------------------------------------------------------------------------- 1 | 20649b9867 2 | 3 | 5 bytes 4 | 5 | 0 messages 6 | 7 | empty 8 | 9 | Don't have unit code for: a dim 10 | 11 | clear 12 | -------------------------------------------------------------------------------- /t/rf/x10-08-non-x10.txt: -------------------------------------------------------------------------------- 1 | 2064fb9867 2 | 3 | 5 bytes 4 | 5 | 0 messages 6 | 7 | empty 8 | -------------------------------------------------------------------------------- /t/rf/x10sec-01.txt: -------------------------------------------------------------------------------- 1 | 29fef1807fb700 2 | 3 | 7 bytes 4 | 5 | 2 messages 6 | 7 | xpl-trig 8 | { 9 | hop=1 10 | source=bnz-rftest.default 11 | target=* 12 | } 13 | security.zone 14 | { 15 | event=alert 16 | zone=x10sec7f 17 | state=false 18 | } 19 | xpl-trig 20 | { 21 | hop=1 22 | source=bnz-rftest.default 23 | target=* 24 | } 25 | x10.security 26 | { 27 | command=normal 28 | device=127 29 | } 30 | xpl-trig 31 | { 32 | hop=1 33 | source=bnz-rftest.default 34 | target=* 35 | } 36 | sensor.basic 37 | { 38 | device=x10sec7f 39 | type=battery 40 | current=90 41 | units=% 42 | } 43 | -------------------------------------------------------------------------------- /t/rf/x10sec-02-alert-tamper-min.txt: -------------------------------------------------------------------------------- 1 | 20010e44bb 2 | 3 | 5 bytes 4 | 5 | 2 messages 6 | 7 | xpl-trig 8 | { 9 | hop=1 10 | source=bnz-rftest.default 11 | target=* 12 | } 13 | security.zone 14 | { 15 | event=alert 16 | zone=x10sec80 17 | state=true 18 | delay=min 19 | tamper=true 20 | } 21 | xpl-trig 22 | { 23 | hop=1 24 | source=bnz-rftest.default 25 | target=* 26 | } 27 | x10.security 28 | { 29 | command=alert 30 | device=128 31 | tamper=true 32 | delay=min 33 | } 34 | xpl-trig 35 | { 36 | hop=1 37 | source=bnz-rftest.default 38 | target=* 39 | } 40 | sensor.basic 41 | { 42 | device=x10sec80 43 | type=battery 44 | current=90 45 | units=% 46 | } 47 | -------------------------------------------------------------------------------- /t/rf/x10sec-03-lowbat.txt: -------------------------------------------------------------------------------- 1 | 20010e45ba 2 | 3 | 5 bytes 4 | 5 | 2 messages 6 | 7 | xpl-trig 8 | { 9 | hop=1 10 | source=bnz-rftest.default 11 | target=* 12 | } 13 | security.zone 14 | { 15 | event=alert 16 | zone=x10sec80 17 | state=true 18 | delay=min 19 | low-battery=true 20 | tamper=true 21 | } 22 | xpl-trig 23 | { 24 | hop=1 25 | source=bnz-rftest.default 26 | target=* 27 | } 28 | x10.security 29 | { 30 | command=alert 31 | device=128 32 | tamper=true 33 | low-battery=true 34 | delay=min 35 | } 36 | xpl-trig 37 | { 38 | hop=1 39 | source=bnz-rftest.default 40 | target=* 41 | } 42 | sensor.basic 43 | { 44 | device=x10sec80 45 | type=battery 46 | current=10 47 | units=% 48 | } 49 | -------------------------------------------------------------------------------- /t/rf/x10sec-04-kr21-arm-away.txt: -------------------------------------------------------------------------------- 1 | 29c6c906f9ef80 2 | 3 | 7 bytes 4 | 5 | 2 messages 6 | 7 | xpl-trig 8 | { 9 | hop=1 10 | source=bnz-rftest.default 11 | target=* 12 | } 13 | security.basic 14 | { 15 | command=arm-away 16 | delay=min 17 | user=x10sec63 18 | } 19 | xpl-trig 20 | { 21 | hop=1 22 | source=bnz-rftest.default 23 | target=* 24 | } 25 | x10.security 26 | { 27 | command=arm-away 28 | device=99 29 | delay=min 30 | } 31 | xpl-trig 32 | { 33 | hop=1 34 | source=bnz-rftest.default 35 | target=* 36 | } 37 | sensor.basic 38 | { 39 | device=x10sec63 40 | type=battery 41 | current=90 42 | units=% 43 | } 44 | -------------------------------------------------------------------------------- /t/rf/x10sec-05-kr21-lights-on.txt: -------------------------------------------------------------------------------- 1 | 29c6c98679ef80 2 | 3 | 7 bytes 4 | 5 | 2 messages 6 | 7 | xpl-trig 8 | { 9 | hop=1 10 | source=bnz-rftest.default 11 | target=* 12 | } 13 | security.basic 14 | { 15 | command=disarm 16 | user=x10sec63 17 | } 18 | xpl-trig 19 | { 20 | hop=1 21 | source=bnz-rftest.default 22 | target=* 23 | } 24 | x10.security 25 | { 26 | command=disarm 27 | device=99 28 | } 29 | xpl-stat 30 | { 31 | hop=1 32 | source=bnz-rftest.default 33 | target=* 34 | } 35 | sensor.basic 36 | { 37 | device=x10sec63 38 | type=battery 39 | current=90 40 | units=% 41 | } 42 | -------------------------------------------------------------------------------- /t/rf/x10sec-06-unsupported.txt: -------------------------------------------------------------------------------- 1 | 29c6c902fdef80 2 | 3 | 7 bytes 4 | 5 | 0 messages 6 | 7 | empty 8 | 9 | Not supported: 40 SH624 arm away (max) 10 | 11 | -------------------------------------------------------------------------------- /t/schema/test.basic.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | default_message_type: xpl-trig 3 | types: 4 | xpl-trig: 5 | fields: 6 | - name: fieldname 7 | validation: 8 | type: Set 9 | set: 10 | - a 11 | - b 12 | -------------------------------------------------------------------------------- /t/x10/a10-on.txt: -------------------------------------------------------------------------------- 1 | 649b10ef 2 | 3 | none 4 | 5 | command=on 6 | house=a 7 | unit=10 8 | 9 | none 10 | -------------------------------------------------------------------------------- /t/x10/i5-off.txt: -------------------------------------------------------------------------------- 1 | e01f609f 2 | 3 | none 4 | 5 | command=off 6 | house=i 7 | unit=5 8 | 9 | none 10 | -------------------------------------------------------------------------------- /t/x10/j-dim.txt: -------------------------------------------------------------------------------- 1 | f00f9867 2 | 3 | none 4 | 5 | command=dim 6 | house=j 7 | 8 | none 9 | -------------------------------------------------------------------------------- /t/x10/l-bright.txt: -------------------------------------------------------------------------------- 1 | d02f8877 2 | 3 | none 4 | 5 | command=bright 6 | house=l 7 | 8 | none 9 | -------------------------------------------------------------------------------- /t/x10/m4-off.txt: -------------------------------------------------------------------------------- 1 | 00ff38c7 2 | 3 | none 4 | 5 | command=off 6 | house=m 7 | unit=4 8 | 9 | none 10 | -------------------------------------------------------------------------------- /xpl-perl.spec: -------------------------------------------------------------------------------- 1 | Summary: Modules for writing xPL applications in Perl 2 | Name: xpl-perl 3 | Version: 0.05 4 | Release: 1 5 | Copyright: Perl Licence (C) 2005, 2008 by Mark Hindess 6 | Group: Applications/CPAN 7 | Source0: xPL-Perl-%{version}.tar.gz 8 | Url: http://www.xpl-perl.org.uk/ 9 | BuildRoot: %{_tmppath}/xpl-perl-buildroot/ 10 | BuildRequires: perl 11 | Requires: perl 12 | 13 | %description 14 | These modules are intended to provide a framework for writing xPL 15 | applications (see http://wiki.xplproject.org.uk/) in Perl. A number 16 | of sample applications are also provided including a hub, a logging 17 | client, a bridge and a command line message sender. 18 | 19 | # Provide perl-specific find-{provides,requires}. 20 | #%define __find_provides /usr/lib/rpm/find-provides.perl 21 | #%define __find_requires /usr/lib/rpm/find-requires.perl 22 | 23 | %prep 24 | %setup -q -n xPL-Perl-%{version} 25 | 26 | %build 27 | CFLAGS="$RPM_OPT_FLAGS" 28 | perl Makefile.PL DESTDIR=$RPM_BUILD_ROOT INSTALLDIRS=vendor 29 | make 30 | 31 | %clean 32 | rm -rf $RPM_BUILD_ROOT 33 | 34 | %install 35 | rm -rf $RPM_BUILD_ROOT 36 | make install 37 | rm `find $RPM_BUILD_ROOT/usr -name "perllocal.pod" -print`|| true 38 | rm `find $RPM_BUILD_ROOT/usr -name "\.packlist" -print` || true 39 | 40 | [ -x /usr/lib/rpm/brp-compress ] && /usr/lib/rpm/brp-compress 41 | 42 | find $RPM_BUILD_ROOT -type f -print | 43 | sed "s@^$RPM_BUILD_ROOT@@g" > xpl-perl-%{version}-filelist 44 | if [ "$(cat xpl-perl-%{version}-filelist)X" = "X" ] ; then 45 | echo "ERROR: EMPTY FILE LIST" 46 | exit -1 47 | fi 48 | 49 | %files -f xpl-perl-%{version}-filelist 50 | %defattr(-,root,root) 51 | 52 | %changelog 53 | * Mon Dec 12 2005 Mark Hindess 54 | - Initial spec file 55 | --------------------------------------------------------------------------------