Documentation
¶
Index ¶
- func ProcessJSON(buf []byte) ([]byte, error)
- type Cas
- func (c Cas) Disconnect() error
- func (c Cas) DownloadPLU(scaleID uint32, data PLUData) error
- func (c Cas) ErasePLU(scaleID uint32, departmentNumber uint16, PLUNumber uint32) error
- func (c Cas) GetStatus(scaleID uint32) (Status, error)
- func (c Cas) UploadPLU(scaleID uint32, number uint32) (PLUData, error)
- type PLUData
- type PLUName1String
- type PLUName2String
- type PLUName3String
- type Status
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ProcessJSON ¶
ProcessJSON starts execution of the steps described in JSON
Types ¶
type Cas ¶
type Cas struct {
// contains filtered or unexported fields
}
Cas lib context
func (Cas) DownloadPLU ¶
DownloadPLU send PLUData to scale
type PLUData ¶
type PLUData struct { DepartmentNumber uint16 // 0 PLUNumber uint32 // 2 PLUType uint8 // 6 PLUName1 PLUName1String // 7 PLUName2 [40]byte // 47 PLUName3 [5]byte // 87 GroupNumber uint16 // 92 LabelNumber uint16 // 94 AuxLabelNumber uint16 // 96 OriginNumber uint16 // 98 UnitWeightNumber uint8 // 100 FixedWeight uint32 // 101 ItemCode uint32 // 105 PCSQuntity uint16 // 109 !!! keyboard key index !!! PCSQuntitySymbolNumber uint8 // 111 UseFixPriceType uint8 // 112 UnitPrice uint32 // 113 SpecialPrice uint32 // 117 TareWeight uint32 // 121 TareNumber uint8 // 125 BarcodeNumber uint16 // 126 AuxBarcodeNumber uint16 // 128 ProducedDate uint16 // 130 PackedDate uint16 // 132 PackedTime uint8 // 134 SellByDate uint32 // 135 SellByTime uint8 // 139 MessageNumber uint16 // 140 Reserved0 uint16 // 142 Reserved1 uint16 // 144 SaleMessageNumber uint8 // 146 }
PLUData contains all product info
type PLUName1String ¶
type PLUName1String [40]byte
PLUName1String is a special type of Name1
func (PLUName1String) MarshalJSON ¶
func (s PLUName1String) MarshalJSON() ([]byte, error)
MarshalJSON decode Name3 from windows1251 to utf-8
func (*PLUName1String) UnmarshalJSON ¶
func (s *PLUName1String) UnmarshalJSON(data []byte) error
UnmarshalJSON encode Name1 from utf-8 to windows1251
type PLUName2String ¶
type PLUName2String [40]byte
PLUName2String is a special type of Name2
func (PLUName2String) MarshalJSON ¶
func (s PLUName2String) MarshalJSON() ([]byte, error)
MarshalJSON decode Name3 from windows1251 to utf-8
func (*PLUName2String) UnmarshalJSON ¶
func (s *PLUName2String) UnmarshalJSON(data []byte) error
UnmarshalJSON encode Name2 from utf-8 to windows1251
type PLUName3String ¶
type PLUName3String [5]byte
PLUName3String is a special type of Name3
func (PLUName3String) MarshalJSON ¶
func (s PLUName3String) MarshalJSON() ([]byte, error)
MarshalJSON decode Name3 from windows1251 to utf-8
func (*PLUName3String) UnmarshalJSON ¶
func (s *PLUName3String) UnmarshalJSON(data []byte) error
UnmarshalJSON encode Name3 from utf-8 to windows1251
type Status ¶
type Status struct { LoadFlag uint8 // 0: Zero 1: Non zero 2: Overload StableFlag uint8 // 0: Unstable 1: Stable TareFlag uint8 DualRage uint8 WeightUnit uint8 WeightDecimalPoint uint8 PriceDecimalPoint uint8 Reserved uint8 Tare uint32 Weight int32 UnitPrice uint32 TotalPrice uint32 PLUNumber uint32 DepartmentNumber uint16 }
Status Protocol Structure
Click to show internal directories.
Click to hide internal directories.