Add script to Send test label

master
Peter Stuifzand 11 years ago
parent 9ce3293b3b
commit 9c994af78c

@ -0,0 +1,20 @@
#!/usr/bin/env perl
use lib 'lib';
BEGIN {
$ENV{ZMQ_PERL_BACKEND} = 'ZMQ::LibZMQ3';
}
use ZMQ;
use ZMQ::Constants ':all';
use Protocol::Zebra::Label;
my $p = Protocol::Zebra::Label->new();
my $data = $p->format({ name => 'sw2 192.168.1.11', price => '', barcode => '', count => 1 });
my $ctx = ZMQ::Context->new(1);
my $push = $ctx->socket(ZMQ_PUSH);
$push->connect('tcp://192.168.1.82:9999') == 0 or die "Can't connect:$!";
$push->sendmsg($data);
Loading…
Cancel
Save