Explorar o código

Just print the state strings

Zachary Kotlarek %!s(int64=13) %!d(string=hai) anos
pai
achega
b766fd2d5d
Modificáronse 1 ficheiros con 29 adicións e 0 borrados
  1. 29 0
      dmx/debug.pl

+ 29 - 0
dmx/debug.pl

@@ -0,0 +1,29 @@
+#!/usr/bin/perl
+use strict;
+use warnings;
+
+# Always debug
+BEGIN { $ENV{'DEBUG'} = 1; }
+
+# Local modules
+use Cwd qw(abs_path);
+use File::Basename qw(dirname);
+use lib dirname(abs_path($0));
+use DMX;
+
+# User config
+my %DIM = ();
+my $DELAY = 10;
+
+# App config
+my $DATA_DIR     = DMX::dataDir();
+my $STATE_SOCK   = $DATA_DIR . 'DEBUG.socket';
+
+# Sockets
+DMX::stateSocket($STATE_SOCK);
+DMX::stateSubscribe($STATE_SOCK);
+
+# Loop forever
+while (1) {
+	DMX::readState($DELAY, undef(), undef(), undef());
+}