Documentation ¶
Index ¶
- Constants
- type ASBStatus
- type DrawerKickoutConnectorStatus
- type ErrorStatus
- type OnlineStatus
- type PanelSwitchStatus
- type PaperSensorStatus
- type Protocol
- func (p Protocol) CutPaper(m uint8, n uint8) ([]byte, error)
- func (p Protocol) InitializePrinter() ([]byte, error)
- func (p Protocol) ParseASBStatus(status [4]byte) ASBStatus
- func (p Protocol) ParsePaperSensorStatus(status byte) PaperSensorStatus
- func (p Protocol) PrintGraphicsData() ([]byte, error)
- func (p Protocol) SelectCharacterCodeTable(n uint8) ([]byte, error)
- func (p Protocol) SelectPrintModes(n uint8) ([]byte, error)
- func (p Protocol) SelectPrintSpeed(m uint8) ([]byte, error)
- func (p Protocol) SetAutomaticStatusBack(n uint8) ([]byte, error)
- func (p Protocol) StoreGraphicsData(bx uint8, by uint8, c uint8, x uint16, y uint16, d ...uint8) ([]byte, error)
- func (p Protocol) TransmitStatus(n uint8) ([]byte, error)
Constants ¶
View Source
const ( PrintModeDefault = 0 PrintModeFont2 = 1 << 0 PrintModeEmphasized = 1 << 3 PrintModeDoubleHeight = 1 << 4 PrintModeDoubleWidth = 1 << 5 PrintModeUnderline = 1 << 7 )
View Source
const ( ASBReportNothing = 0 ASBReportKickoutConnector = 1 << 0 ASBReportOnlineStatus = 1 << 1 ASBReportErrors = 1 << 2 ASBReportRollPaperSensorStatus = 1 << 3 ASBReportPanelSwitchStatus = 1 << 6 ASBReportAll = ASBReportKickoutConnector | ASBReportOnlineStatus | ASBReportErrors | ASBReportRollPaperSensorStatus | ASBReportPanelSwitchStatus )
View Source
const ( TransmitPaperSensorStatus = 1 TransmitKickoutConnectorStatus = 2 )
View Source
const ( Color1 = 49 Color2 = 50 )
View Source
const ( FullCut = 0 PartialCut = 1 FeedAndFullCut = 65 FeedAndPartialCut = 66 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ASBStatus ¶
type ASBStatus struct { DrawerKickoutConnector DrawerKickoutConnectorStatus Online OnlineStatus Paper PaperSensorStatus Error ErrorStatus PanelSwitch PanelSwitchStatus }
type DrawerKickoutConnectorStatus ¶
type DrawerKickoutConnectorStatus struct {
IsPin3High bool
}
type ErrorStatus ¶
type OnlineStatus ¶
type PanelSwitchStatus ¶
type PanelSwitchStatus struct {
IsFeedButtonPressed bool
}
type PaperSensorStatus ¶
type Protocol ¶
type Protocol int
func (Protocol) InitializePrinter ¶
InitializePrinter executes ESC @ ("Initialize printer")
func (Protocol) ParseASBStatus ¶
func (Protocol) ParsePaperSensorStatus ¶
func (p Protocol) ParsePaperSensorStatus(status byte) PaperSensorStatus
func (Protocol) PrintGraphicsData ¶
PrintGraphicsData executes GS 8 L p1 p2 p3 p4 m fn <Function 50> ("Print the graphics data in the print buffer.")
func (Protocol) SelectCharacterCodeTable ¶
SelectCharacterCodeTable executes ESC t n ("Select character code table")
func (Protocol) SelectPrintModes ¶
SelectPrintModes executes ESC ! n ("Select print mode(s)")
func (Protocol) SelectPrintSpeed ¶
SetPrintSpeed executes GS ( K <Function 50> ("Select the print speed")
func (Protocol) SetAutomaticStatusBack ¶
func (Protocol) StoreGraphicsData ¶
func (p Protocol) StoreGraphicsData(bx uint8, by uint8, c uint8, x uint16, y uint16, d ...uint8) ([]byte, error)
StoreGraphicsData executes GS 8 L p1 p2 p3 p4 m fn a bx by c xL xH yL yH d1...dk <Function 112> ("Store the graphics data in the print buffer (raster format).")
Click to show internal directories.
Click to hide internal directories.