5.1. SMNetworkManager

Class to set printer’s network settings.

  • Constructor

    Name

    Contents

    init

    Creates the instance.

  • Method

    Name

    Contents

    loadWithError

    Gets the value specified from the printer.

    applyNetworkSetting

    Set the specified value to the printer

Supported Method for each models.

Model/Emulation

mC-Print2 mC-Print3 mC-Label3
StarPRNT StarPRNT StarPRNT

loadWithError

applyNetworkSetting

5.1.1. init

Creates the instance.

  • Declaration

    -(id) initWithPortName:(NSString *)portName ;
    
  • Parameter

    Parameter

    Contents

    Type

    portName

    It is the same as the portName of the getPort method.

    NSString *

  • Return value

    Contents

    Type

    SMNetworkManager object
    It returns nil when failed.

    init

5.1.2. loadWithError

Gets the value specified from the printer.

  • Declaration

    + (SMNetworkSetting *)loadWithError:(NSError **)error;
    
  • Parameter

    None

  • Return value

    Contents

    Type

    Network Settings

    SMNetworkSetting

  • Exception

    Contents

    Type

    When port open fails
    When an incorrect portName is passed
    when a communication failure occurs

    StarIODeviceSettingException

5.1.3. applyNetworkSetting

Set the specified value to the printer

Important

The printer is reset after this method was executed.

  • Declaration

    + (BOOL)applyNetworkSetting:(SMNetworkSetting *)networkSetting error:(NSError **)error;
    
  • Parameter

    Name

    Contents

    Type

    setting

    Network Setting Information

    SMNetworkSetting

  • Return value

    None

  • Exception

    Contents

    Type

    When port open fails
    When an incorrect portName is passed
    when a communication failure occurs

    StarIODeviceSettingException