View on
MetaCPAN
Hasiotis Nikos > EAFDSS > EAFDSS::Base

Download:
EAFDSS-0.80.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Module Version: 0.80   Source  

NAME ^

EAFDSS::Base - EAFDSS Base Class Driver for all other drivers

DESCRIPTION ^

Read EAFDSS on how to use the module. This manual page is only of use if you want to find out what it needs to develop a driver for a new EAFDSS device. This Base class is to be inherited by any new driver.

Methods ^

init

This the constructor, were we make sure we get the correct parameters to handle the initialization of device object. Things like the signatures directory, the serial number of the device. Also parameters special to the type of the device, like ip address, or serial port, or baud rate, etc.

Sign

The main job of an EAFDSS device is to produce signatures. Signatures of text files (invoices) or text streams. So in that function we make sure to read the text from the caller of the function in whatever format. Then we feed the text to the device which in return he gives us the signature of that text. The function at tha level handles the saving of the text in the "A file" and of the signature in the "B file", according to the rules set by the law for the filenames of the files.

Status

What this function return is a single line containing the values of the following: serial number, the index of the last Z, the total signatures, the daily signatures, the last signature's data size, remaining signatures until the device will force a Z.

GetTime

GetTime will return the time in "DD/MM/YY HH:MM:SS" format.

SetTime

Use this method to set the date/time on the device. Provide the date/time in the "DD/MM/YY HH:MM:SS" format.

Info

This method will return information about the name of the device and version of it's firmware.

Query

This method should Query to find available devicess [NOT IMPLEMENTED]

GetHeaders

This method will return the printing headers of the device. The returned array contains 6 couples of values. One for the type of the printing line, and one for the actual printing message.

SetHeaders

This method will set the printing headers on the device. The headers are to be provided in the following format

  Style1/Line1/Style2/Line2/Style3/Line3/Style4/Line4/Style5/Line5/Style6/Line6

Report

The second most used function is Z report issuing function. At the end of the day ask for the device to close the fiscal day by issuing the Z report. It will return the signature of the day. The function will also take care to save the signature in the "C file"

debug

This is our handy debuging function

VERSION ^

This is version 0.80.

AUTHOR ^

Hasiotis Nikos, <hasiotis@gmail.com>

COPYRIGHT AND LICENSE ^

Copyright (C) 2008 by Hasiotis Nikos

This library is free software; you can redistribute it and/or modify it under the terms of the LGPL or the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.

syntax highlighting: