2013-04-04 12:58:38 +00:00
|
|
|
#!/usr/bin/env perl
|
|
|
|
use lib '/srv/kassa-alpha/app/lib';
|
|
|
|
use Protocol::Zebra::Label;
|
|
|
|
use Kassa::Net::Kassabon;
|
|
|
|
BEGIN {
|
|
|
|
$ENV{ZMQ_PERL_BACKEND} = 'ZMQ::LibZMQ3';
|
|
|
|
}
|
|
|
|
use ZMQ;
|
|
|
|
use ZMQ::Constants ':all';
|
|
|
|
|
|
|
|
my $zmq_context = ZMQ::Context->new(1);
|
|
|
|
|
2013-08-07 13:44:25 +00:00
|
|
|
my $printer = Kassa::Net::Kassabon->new($zmq_context, 'tcp://192.168.1.97:9999');
|
2013-04-04 12:58:38 +00:00
|
|
|
|
|
|
|
my $p = Protocol::Zebra::Label->new;
|
|
|
|
my $data = $p->format({ name => "Test label met een langere tekst adf df efe efei hemelsblauw", price => 'EUR 1,10', barcode => '812345678901', count => 1 });
|
|
|
|
|
|
|
|
$printer->send($data);
|
|
|
|
|
|
|
|
sleep 1;
|