Select your printer model

Parameters are refined by the selected printer.

sendMessage


Sends a message to the communication box.

The return value of this API is the result of sending data to the devices.

The processing result of the devices using this API is returned to the callback method.

Syntax

 
- (int)sendMessage:(NSString *)message targetId:(NSString *)targetId delegate:(id<Epos2CommBoxSendMessageDelegate>)delegate;

Parameter

message

Specifies data to send to the communication box.

targetId

Specifies the member ID of the receiver.

When nil or "" (blank character) is specified, data is sent to all the members other than the transmitter.

delegate

Specifies an object conforming to the Epos2CommBoxSendMessageDelegate protocol.

Return value

Error status

Description

EPOS2_SUCCESS

The function was executed successfully.

EPOS2_ERR_PARAM

An invalid parameter was passed.

EPOS2_ERR_MEMORY

Memory necessary for processing could not be allocated.

EPOS2_ERR_FAILURE

An unknown error occurred.

EPOS2_ERR_PROCESSING

Could not run the process.

EPOS2_ERR_ILLEGAL

This API was called while no communication had been started.

Protocol declaration

 
@protocol Epos2CommBoxSendMessageDelegate <NSObject>
@required
- (void) onCommBoxSendMessage:(Epos2CommBox *)commBoxObj code:(int)code count:(long)count;
@end

Parameter

commBoxObject

The callback source object is stored.

code

Error status

Description

EPOS2_CODE_SUCCESS

Processed successfully.

EPOS2_CODE_ERR_NOT_FOUND

Specified member ID cannot be found.

EPOS2_CODE_ERR_FAILURE

An unknown error occurred.

count

Number of clients which tried to send the message is stored.

 

Quick Access

  • [Name]
  • [Format]
  • [Range]
  • [Description]
  • [Notes]

Epson ePOS SDK includes patented or patent pending functions. The contents must not be disclosed to third parties.


Epson ePOS SDK for iOS

Jump to the top