You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
650 B

#!/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);
my $addr = 'tcp://192.168.1.82:9999';
my $printer = Kassa::Net::Kassabon->new($zmq_context, $addr);
print "Sending test barcode to $addr\n";
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 => '879465002795', barcode_type => 'UPC-A', count => 1 });
$printer->send($data);
sleep 1;