5.2. SMCSAllReceipts¶
Provides the function of AllReceipts service
Method
Name
Contents
Uploads bitmap to the Star Micronics Service.
Uploads data to the Star Micronics Service.
Updates the device status information on the Star Micronics Cloud.
Generates the print data for the AllReceiptsTMuse.
Supported Method for each models.
Model/Emulation |
mC-Print2 | mC-Print3 | mPOP | FVP10 | TSP100IIIW | TSP100IIIBI | TSP100IIIU | TSP100ECO | TSP100U | TSP100GT | TSP100LAN | TSP650II | TSP650IISK | TSP700II | TSP800II | SM-S210i | SM-S220i | SM-S230i | SM-T300i/T300 | SM-T400i | BSC10 | SM-L200 | SM-L300 | SP700 | |||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
StarPRNT | StarPRNT | StarPRNT | StarLine | StarGraphic | StarGraphic | StarGraphic | StarGraphic | StarGraphic | StarGraphic | StarGraphic | StarLine | StarLine | StarLine | StarLine | StarPRNT | EscPosMobile | StarPRNT | EscPosMobile | StarPRNT | EscPosMobile | StarPRNT | EscPosMobile | StarPRNT | EscPosMobile | EscPos | StarPRNT | StarPRNT | StarDotImpact | |
uploadBitmap |
✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | - | ✔ | - | ✔ | - | ✔ | - | ✔ | - | ✔ | ✔ | ✔ | - |
uploadData |
✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | - | ✔ | - | ✔ | - | ✔ | - | ✔ | - | ✔ | ✔ | ✔ | - |
updateStatus |
✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | - | ✔ | - | ✔ | - | ✔ | - | ✔ | - | ✔ | ✔ | ✔ | - |
generateAllReceipts |
✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | - | ✔ | - | ✔ | - | ✔ | - | ✔ | - | ✔ | ✔ | ✔ | - |
5.2.1. uploadBitmap¶
Uploads bitmap to the Star Micronics Service.
Declaration
open class func uploadBitmap(_ image: Any!, completion: ((Int, Error?) -> Void)!) -> String!
Parameter
Name Contents Type image Bitmap to upload UIImage completion When the upload is completed, check upload result as following status- statusCode - … HTTP status code- error - … Error information when fails to upload data(Int, Error?) -> Void Return value
Contents Type Uploaded URL String
5.2.2. uploadData¶
Uploads data to the Star Micronics Service.
Declaration
open class func uploadData(_ data: Data!, emulation: Any!, characterCode: Any!, width: Int, completion: ((Int, Error?) -> Void)!) -> String!
Parameter
Name Contents Type data Data to upload Data emulation Emulation type StarIoExtEmulation characterCode Character code type constants StarIoExtCharacterCode width Printable width (Units : Dots) Int completion When the upload is completed, check upload result as following status- statusCode - … HTTP status code- error - … Error information when fails to upload data(Int, Error?) -> Void Constant of Emulation for each model, refer to StarIoExtEmulation Constants.
Return value
Contents Type Uploaded URL String
5.2.3. updateStatus¶
Updates the device status information on the Star Micronics Cloud.
Declaration
open class func updateStatus(_ status: String!, completion: ((Int, Error?) -> Void)!)
Parameter
Name Contents Type status Updated statusHexdecimal digit sequence of 3rd to 6th bytes in Automatic Status. (ex. “28000000”)Please refer to STAR Line Mode and StarPRNT command manual for details of Automatic Status.String completion When the update is completed, check update result as following parameter.- statusCode - … HTTP status code- error - … If the request fails, the error parameter contains information about the failure.(Int, Error?) -> Void Return value
None
5.2.4. generateAllReceipts¶
Generates the print data for the AllReceiptsTMuse.
Declaration
open class func generate(_ urlString: String!, emulation: Any!, info: Bool, qrCode: Bool) -> Data! open class func generate(_ urlString: String!, emulation: Any!, info: Bool, qrCode: Bool, width: Int) -> Data!
Parameter
Name Contents Type urlString Uploaded URL String emulation Emulation type StarIoExtEmulation info Generates information logotrue … Validfalse … InvlidBool qrCode Generates QR code.true … Validfalse … InvlidBool width Printable width (Units : Dots) Int Constant of Emulation for each model, refer to StarIoExtEmulation Constants.
Return value
Contents Type Generated print data Data