Documentation
¶
Index ¶
- Constants
- func MediaWidthToMaxPixel(media_width byte, dpi uint16) uint16
- type ModelInformation
- type Plabel
- func (self *Plabel) Close()
- func (self *Plabel) DisplayRasterGraphics(raster_data []byte)
- func (self *Plabel) DisplayStatus()
- func (self *Plabel) DisplayStatusVerbose()
- func (self *Plabel) Initialize()
- func (self *Plabel) Invalidate()
- func (self *Plabel) Open(device_path string) bool
- func (self *Plabel) Print()
- func (self *Plabel) PrintAndFeed()
- func (self *Plabel) ProcessStatus()
- func (self *Plabel) RequestStatus()
- func (self *Plabel) ResetStatus()
- func (self *Plabel) SendCommand(command []byte)
- func (self *Plabel) SendRasterGraphics(raster_data []byte)
- func (self *Plabel) SendRasterGraphicsCompressed(raster_data []byte)
- func (self *Plabel) SendRasterGraphicsUncompressed(raster_data []byte)
- func (self *Plabel) SendZeroRasterGraphics()
- func (self *Plabel) SetAdvancedModeSettings(no_chain_printing bool, special_tape bool, no_buffer_clearing bool)
- func (self *Plabel) SetCompression()
- func (self *Plabel) SetCutMirror(cut bool, mirror bool)
- func (self *Plabel) SetFeedMargins(margin_dots uint16)
- func (self *Plabel) SetPrintInformation(media_type byte, media_width byte, is_starting_page bool, raster_number uint32)
- func (self *Plabel) ShowInfo()
- func (self *Plabel) SwitchDynamicCommandMode(mode byte)
- func (self *Plabel) SwitchEscpMode()
- func (self *Plabel) SwitchRasterMode()
- func (self *Plabel) TimeMilliseconds() int64
- func (self *Plabel) WaitForPrinterStatus(timeout uint16) bool
- func (self *Plabel) WaitForPrintingCompleted(timeout uint16) bool
- type PrinterStatus
- func (self *PrinterStatus) ErrorDescription() (ed string)
- func (self *PrinterStatus) IsValid() bool
- func (self *PrinterStatus) MediaTypeDescription() (ed string)
- func (self *PrinterStatus) NotificationDescription() (ed string)
- func (self *PrinterStatus) PhaseDescription() (ed string)
- func (self *PrinterStatus) PhaseTypeDescription() (ed string)
- func (self *PrinterStatus) StatusDescription() (ed string)
- func (self *PrinterStatus) TapeColorDescription() (ed string)
- func (self *PrinterStatus) TextColorDescription() (ed string)
Constants ¶
View Source
const ( PRINTER_P1230PC = 0x59 PRINTER_H500 = 0x64 PRINTER_E500 = 0x65 PRINTER_P700 = 0x67 )
View Source
const ( VERBOSE_TRACE = 4 VERBOSE_DEBUG = 3 VERBOSE_INFO = 2 VERBOSE_WARN = 1 LOOP_DELAY = 100 //ms COMMAND_MODE_ESCP = 0x00 //ESC/P mode (default) COMMAND_MODE_RASTER = 0x01 //Raster mode COMMAND_MODE_TEMPLATE = 0x03 //P-touch Template mode PI_KIND = 0x02 // Media type PI_WIDTH = 0x04 // Media width PI_LENGTH = 0x08 // Media length PI_QUALITY = 0x40 // Priority given to print quality(Not used) PI_RECOVER = 0x80 // Printer recovery always on MEDIA_TYPE_NO_TAPE = 0x00 MEDIA_TYPE_LAMINATED = 0x01 MEDIA_TYPE_NON_LAMINATED = 0x03 MEDIA_TYPE_HEAT_SHRINK = 0x11 MEDIA_TYPE_INCOMPATIBLE = 0xff DATA_LINE_PIXEL_WIDTH = 128 DATA_LINE_BUFFER_LENGTH = 16 )
View Source
const ( STATUS_PRINTING_COMPLETED = 0x01 STATUS_ERROR = 0x02 STATUS_PHASE_CHANGE = 0x06 PHASE_EDITING = 0x00 PHASE_PRINTING = 0x01 )
Variables ¶
This section is empty.
Functions ¶
func MediaWidthToMaxPixel ¶
Types ¶
type ModelInformation ¶
type ModelInformation struct { ModelCode byte IsValid bool ModelName string PixelWidth uint16 Resolution uint16 UseCompression bool MinTapeWidth byte MaxTapeWidth byte }
func GetModelInformation ¶
func GetModelInformation(model_code byte) *ModelInformation
func (*ModelInformation) GetModelInformation ¶
func (self *ModelInformation) GetModelInformation(model_code byte) *ModelInformation
type Plabel ¶
type Plabel struct { Verbose byte Simulate bool PrinterStatus PrinterStatus ModelInformation ModelInformation StatusCode byte InitalSettings bool MaxPrintingWidth uint16 // contains filtered or unexported fields }
func (*Plabel) DisplayRasterGraphics ¶
func (*Plabel) DisplayStatus ¶
func (self *Plabel) DisplayStatus()
func (*Plabel) DisplayStatusVerbose ¶
func (self *Plabel) DisplayStatusVerbose()
func (*Plabel) Initialize ¶
func (self *Plabel) Initialize()
func (*Plabel) Invalidate ¶
func (self *Plabel) Invalidate()
func (*Plabel) PrintAndFeed ¶
func (self *Plabel) PrintAndFeed()
func (*Plabel) ProcessStatus ¶
func (self *Plabel) ProcessStatus()
func (*Plabel) RequestStatus ¶
func (self *Plabel) RequestStatus()
func (*Plabel) ResetStatus ¶
func (self *Plabel) ResetStatus()
func (*Plabel) SendCommand ¶
func (*Plabel) SendRasterGraphics ¶
func (*Plabel) SendRasterGraphicsCompressed ¶
func (*Plabel) SendRasterGraphicsUncompressed ¶
func (*Plabel) SendZeroRasterGraphics ¶
func (self *Plabel) SendZeroRasterGraphics()
func (*Plabel) SetAdvancedModeSettings ¶
func (*Plabel) SetCompression ¶
func (self *Plabel) SetCompression()
func (*Plabel) SetCutMirror ¶
func (*Plabel) SetFeedMargins ¶
func (*Plabel) SetPrintInformation ¶
func (*Plabel) SwitchDynamicCommandMode ¶
func (*Plabel) SwitchEscpMode ¶
func (self *Plabel) SwitchEscpMode()
func (*Plabel) SwitchRasterMode ¶
func (self *Plabel) SwitchRasterMode()
func (*Plabel) TimeMilliseconds ¶
func (*Plabel) WaitForPrinterStatus ¶
func (*Plabel) WaitForPrintingCompleted ¶
type PrinterStatus ¶
type PrinterStatus struct { PrintHeadMark byte Size byte ManufacturerCode byte SeriesCode byte ModelCode byte CountryCode byte Reserved1 uint16 ErrorCode uint16 MediaWidth byte MediaType byte Ncol byte Fonts byte JpFonts byte Mode byte Density byte MediaLength byte StatusCode byte PhaseType byte PhaseNumber uint16 NotificationCode byte ExpansionArea byte TapeColor byte TextColor byte HwSetting uint32 Reserved2 uint16 }
func (*PrinterStatus) ErrorDescription ¶
func (self *PrinterStatus) ErrorDescription() (ed string)
func (*PrinterStatus) IsValid ¶
func (self *PrinterStatus) IsValid() bool
func (*PrinterStatus) MediaTypeDescription ¶
func (self *PrinterStatus) MediaTypeDescription() (ed string)
func (*PrinterStatus) NotificationDescription ¶
func (self *PrinterStatus) NotificationDescription() (ed string)
func (*PrinterStatus) PhaseDescription ¶
func (self *PrinterStatus) PhaseDescription() (ed string)
func (*PrinterStatus) PhaseTypeDescription ¶
func (self *PrinterStatus) PhaseTypeDescription() (ed string)
func (*PrinterStatus) StatusDescription ¶
func (self *PrinterStatus) StatusDescription() (ed string)
func (*PrinterStatus) TapeColorDescription ¶
func (self *PrinterStatus) TapeColorDescription() (ed string)
func (*PrinterStatus) TextColorDescription ¶
func (self *PrinterStatus) TextColorDescription() (ed string)
Click to show internal directories.
Click to hide internal directories.