4.1. StarIoExt
Provides human-readable command generation and peripheral device operation.
Constant
Name
Contents
Emulation type constants
Character Code constants
Barcode Reader Model constants
Customer Display Model constants
Melody Speaker Model constants
Method
Name
Contents
Creates the command builder object
Creates the customer display command builder object
Creates the melody speaker command builder object
Creates a barcode reader connection status command response analysis object
Creates a customer display connection status command response analysis object
Creates a melody speaker connection status command response analysis object
4.1.1. StarIoExtEmulation
Emulation type constants
Declaration
typedef NS_ENUM(NSInteger, StarIoExtEmulation) { StarIoExtEmulationNone = 0, StarIoExtEmulationStarPRNT, StarIoExtEmulationStarLine, StarIoExtEmulationStarGraphic, StarIoExtEmulationEscPos, StarIoExtEmulationEscPosMobile, StarIoExtEmulationStarDotImpact, StarIoExtEmulationStarPRNTL };
Constants
Name
Contents
StarIoExtEmulationStarPRNT
StarPRNT emulation
StarIoExtEmulationStarPRNTL
StarPRNTL emulation
StarIoExtEmulationStarLine
STAR Line Mode emulation
StarIoExtEmulationStarGraphic
STAR Graphic Mode emulation
StarIoExtEmulationEscPos
ESC/POS emulation
StarIoExtEmulationEscPosMobile
ESC/POS Mobile emulation
StarIoExtEmulationStarDotImpact
STAR Dot Impact emulation
StarPRNTL emulation
StarPRNTL emulation reduces the command size with the appendBitmap type method that generates a raster image printing command.The time it takes to send the raster image command is reduced.
StarPRNTL emulation can only be selected on some supported models.For usable models, refer to the supported printers.
Constant of “Emulation” for each model.
Model |
Emulation |
Constants |
---|---|---|
mC-Print2 | StarPRNT | StarIoExtEmulationStarPRNT |
mC-Print3 | StarPRNT | StarIoExtEmulationStarPRNT |
mC-Label3 | StarPRNT | StarIoExtEmulationStarPRNT |
mPOP | StarPRNT | StarIoExtEmulationStarPRNT |
FVP10 | StarLine | StarIoExtEmulationStarLine |
TSP100IV | StarPRNT | StarIoExtEmulationStarPRNT |
TSP100IV SK | StarPRNT | StarIoExtEmulationStarPRNT |
TSP100IIIW | StarGraphic | StarIoExtEmulationStarGraphic |
TSP100IIILAN | StarGraphic | StarIoExtEmulationStarGraphic |
TSP100IIIBI | StarGraphic | StarIoExtEmulationStarGraphic |
TSP100IIIU | StarGraphic | StarIoExtEmulationStarGraphic |
TSP100IIU+ | StarGraphic | StarIoExtEmulationStarGraphic |
TSP100ECO | StarGraphic | StarIoExtEmulationStarGraphic |
TSP100U | StarGraphic | StarIoExtEmulationStarGraphic |
TSP100GT | StarGraphic | StarIoExtEmulationStarGraphic |
TSP100LAN | StarGraphic | StarIoExtEmulationStarGraphic |
TSP650II | StarLine | StarIoExtEmulationStarLine |
TSP650IISK | StarLine | StarIoExtEmulationStarLine |
TSP700II | StarLine | StarIoExtEmulationStarLine |
TSP800II | StarLine | StarIoExtEmulationStarLine |
BSC10 | StarLine | StarIoExtEmulationEscPos |
SM-S210i | StarPRNT | StarIoExtEmulationStarPRNT |
EscPosMobile | StarIoExtEmulationEscPosMobile |
|
SM-S220i | StarPRNT | StarIoExtEmulationStarPRNT |
EscPosMobile | StarIoExtEmulationEscPosMobile |
|
SM-S230i | StarPRNT | StarIoExtEmulationStarPRNT |
EscPosMobile | StarIoExtEmulationEscPosMobile |
|
SM-T300i/T300 | StarPRNT | StarIoExtEmulationStarPRNT |
EscPosMobile | StarIoExtEmulationEscPosMobile |
|
SM-T400i | StarPRNT | StarIoExtEmulationStarPRNT |
EscPosMobile | StarIoExtEmulationEscPosMobile |
|
SM-L200 | StarPRNT | StarIoExtEmulationStarPRNT |
StarIoExtEmulationStarPRNTL |
||
SM-L300 | StarPRNT | StarIoExtEmulationStarPRNT |
StarIoExtEmulationStarPRNTL |
||
SP700 | StarDotImpact | StarIoExtEmulationStarDotImpact |
4.1.2. StarIoExtCharacterCode
Character code type constants.
Declaration
typedef NS_ENUM(NSInteger, StarIoExtCharacterCode) { StarIoExtCharacterCodeNone = 0, StarIoExtCharacterCodeStandard, StarIoExtCharacterCodeJapanese, StarIoExtCharacterCodeSimplifiedChinese, StarIoExtCharacterCodeTraditionalChinese };
Constants
Name
Contents
StarIoExtCharacterCodeStandard
Standard character code
StarIoExtCharacterCodeJapanese
Japanese character code
StarIoExtCharacterCodeSimplifiedChinese
Simplified chinese character code
StarIoExtCharacterCodeTraditionalChinese
Traditional chinese character code
4.1.3. StarIoExtBcrModel
Barcode Reader Model constants
Declaration
typedef NS_ENUM(NSInteger, StarIoExtBcrModel) { StarIoExtBcrModelNone = 0, StarIoExtBcrModelPOP1, StarIoExtBcrModelDS9208 };
Constants
Name
Contents
Library version
StarIoExtBcrModelPOP1
Barcode reader : BCR-POP1
USB HID Class (Keyboard mode)
1.3.0+ StarIoExtBcrModelDS9208
Barcode reader : DS9208
1.12.0+
4.1.4. StarIoExtDisplayModel
added in version 1.7.0
Customer Display Model constants.
Declaration
typedef NS_ENUM(NSInteger, StarIoExtDisplayModel) { StarIoExtDisplayModelNone = 0, StarIoExtDisplayModelSCD222 };
Constants
Name
Contents
StarIoExtDisplayModelSCD222
Customer display: SCD222U
4.1.5. StarIoExtMelodySpeakerModel
added in version 1.12.0
Melody Speaker Model constants.
Declaration
typedef NS_ENUM(NSUInteger, StarIoExtMelodySpeakerModel) { StarIoExtMelodySpeakerModelMCS10, StarIoExtMelodySpeakerModelFVP10 };
Constants
Name
Contents
StarIoExtMelodySpeakerModelMCS10
Melody speaker: MCS10
StarIoExtMelodySpeakerModelFVP10
FVP10 internal speaker
4.1.6. createCommandBuilder
Creates the command builder object
Declaration
+ (ISCBBuilder *)createCommandBuilder:(StarIoExtEmulation)emulation;
Parameter
Name
Contents
Type
emulation
Emulation type
Constant of Emulation for each model, refer to StarIoExtEmulation .
Return value
Contents
Type
ISCBBuilder object
Examples
+ (NSData *)createCommandsImage:(StarIoExtEmulation)emulation image:(UIImage *)image { ISCBBuilder *builder = [StarIoExt createCommandBuilder:emulation]; [builder beginDocument]; [builder appendBitmap:image diffusion:NO]; [builder appendCutPaper:SCBCutPaperActionPartialCutWithFeed]; [builder endDocument]; return [builder.commands copy]; }
Refer to PrinterFunctions.m
4.1.7. createDisplayCommandBuilder
added in version 1.7.0
Creates the customer display command builder object
Declaration
+ (ISDCBBuilder *)createDisplayCommandBuilder:(StarIoExtDisplayModel)model;
Parameter
Name
Contents
Type
model
Customer Display Model constants
Return value
Contents
Type
ISDCBBuilder object
Examples
- (void)alertView:(UIAlertView *)alertView didDismissWithButtonIndex:(NSInteger)buttonIndex { if (buttonIndex != alertView.cancelButtonIndex) { ISDCBBuilder *builder = [StarIoExt createDisplayCommandBuilder:StarIoExtDisplayModelSCD222]; ... } }
Refer to DisplayViewController.m / DisplayExtViewController.m.
4.1.8. createMelodySpeakerCommandBuilder
added in version 1.12.0
Creates the melody speaker command builder object
Declaration
+ (ISMCBBuilder *)createMelodySpeakerCommandBuilder:(StarIoExtMelodySpeakerModel)model;
Parameter
Name
Contents
Type
model
Melody Speaker Model constants
Return value
Contents
Type
ISMCBBuilder object
Examples
+ (NSData *)createPlayingRegisteredSound:(StarIoExtMelodySpeakerModel)model specifySound:(BOOL)specifySound soundStorageArea:(SMCBSoundStorageArea)soundStorageArea soundNumber:(NSInteger)soundNumber specifyVolume:(BOOL)specifyVolume volume:(NSInteger)volume error:(NSError * _Nullable * _Nullable) error { ISMCBBuilder *builder = [StarIoExt createMelodySpeakerCommandBuilder:model]; SMSoundSetting *setting = [SMSoundSetting new]; if (specifySound == YES) { [setting setSoundStorageArea:soundStorageArea]; [setting setSoundNumber:soundNumber]; } if (specifyVolume == YES) { [setting setVolume:volume]; } [builder appendSoundWithSetting:setting error:error]; if (*error != nil) { return nil; } return [builder.commands copy]; }
Refer to MelodySpeakerFunctions.m
4.1.9. createBcrConnectParser
Creates a barcode reader connection status command response analysis object
Declaration
+ (ISCPConnectParser *)createBcrConnectParser:(StarIoExtBcrModel)model;
Parameter
Name
Contents
Type
model
Barcode Reader Model constants
Return value
Contents
Type
ISCPConnectParser object
4.1.10. createDisplayConnectParser
added in version 1.7.0
Creates a customer display connection status command response analysis object
Declaration
+ (ISCPConnectParser *)createDisplayConnectParser:(StarIoExtDisplayModel)model;
Parameter
Name
Contents
Type
model
Customer Display Model constants
Return value
Contents
Type
ISCPConnectParser object
Examples
ISCPConnectParser *parser = [StarIoExt createDisplayConnectParser:StarIoExtDisplayModelSCD222]; [Communication parseDoNotCheckCondition:parser port:port completionHandler:^(CommunicationResult *communicationResult) { if (communicationResult.result == CommResultSuccess) { if (parser.connect == YES) { [self showSimpleAlertWithTitle:@"Check Status" message:@"Display Connect." buttonTitle:@"OK" buttonStyle:UIAlertActionStyleCancel completion:nil]; } else { [self showSimpleAlertWithTitle:@"Check Status" message:@"Display Disconnect." buttonTitle:@"OK" buttonStyle:UIAlertActionStyleCancel completion:nil]; } } else { [self showSimpleAlertWithTitle:@"Communication Result" message:[Communication getCommunicationResultMessage:communicationResult] buttonTitle:@"OK" buttonStyle:UIAlertActionStyleCancel completion:nil]; } [self releasePort:port]; }];
Refer to DisplayViewController.m / DisplayExtViewController.m.
4.1.11. createMelodySpeakerConnectParser
added in version 1.12.0
Creates a melody speaker connection status command response analysis object
Declaration
+ (ISCPConnectParser *)createMelodySpeakerConnectParser:(StarIoExtMelodySpeakerModel)model error:(NSError **)error;
Parameter
Name
Contents
Type
model
Melody Speaker Model constants
error
Error information when object generation failed
NSError *
Return value
Contents
Type
ISCPConnectParser object
Error code
Value
Contents
StarIoExtErrorInvalidOperation
StarIoExtMelodySpeakerModelFVP10 is specified
Examples
if (_melodySpeakerModel == StarIoExtMelodySpeakerModelMCS10) { NSError *parserError = nil; ISCPConnectParser *parser = [StarIoExt createMelodySpeakerConnectParser:_melodySpeakerModel error:&parserError]; [Communication parseDoNotCheckCondition:parser port:port completionHandler:^(CommunicationResult *communicationResult) { if (communicationResult.result == CommResultSuccess) { if (parser.connect == YES) { ... } ... } ... }]; }
Refer to MelodySpeakerViewController.m