UniPRT SDK v1.0.0.0
 
Loading...
Searching...
No Matches
Config Class Reference

A class representing a configuration with various properties and methods to manipulate them. More...

#include <Config.h>

Inheritance diagram for Config:

Instance Methods

(instancetype) - initWithCfgContent:
 cfgContent is data received from printer or data previously saved to file and reloaded.
 
(instancetype) - init
 Initializes a new instance with default values.
 
(NSString *) - description
 The configuration content sent/received from printer.
 
(NSInteger) - getNumber
 Gets the number associated with the configuration.
 
(void) - setNumber:
 Sets the number associated with the configuration.
 
(NSString *) - getModel
 Gets the model associated with the configuration.
 
(void) - setModel:
 Sets the model associated with the configuration.
 
(NSString *) - getName
 Gets the name associated with the configuration.
 
(void) - setName:
 Sets the name associated with the configuration.
 
(NSString *) - getProgramFile
 Gets the program file associated with the configuration.
 
(void) - setProgramFile:
 Sets the program file associated with the configuration.
 
(NSString *) - getData
 Gets the data associated with the configuration.
 
(void) - setData:
 Sets the data associated with the configuration.
 

Detailed Description

A class representing a configuration with various properties and methods to manipulate them.

Method Documentation

◆ description

- (NSString *) description

The configuration content sent/received from printer.

Returns
A string representation of the configuration.

◆ getData

- (NSString *) getData

Gets the data associated with the configuration.

The printer configuration values. These should not be modified.

These values should not be modified and should only be read, stored for backup purposes, and redownloaded to printer.

Returns
The data associated with the configuration.

◆ getModel

- (NSString *) getModel

Gets the model associated with the configuration.

The Model of the printer configuration is valid for.

The configuration can only be downloaded to the printers that match the model.

Returns
The model associated with the configuration.

◆ getName

- (NSString *) getName

Gets the name associated with the configuration.

The configuration name. This property can be left empty if naming is not desired.

The property can be used to give the configuration a more descriptive name. e.g "ShipLabel"

Note that name should be kept short to prevent truncation by printer.

Returns
The name associated with the configuration.

◆ getNumber

- (NSInteger) getNumber

Gets the number associated with the configuration.

Configuration number. 0-8 valid. 0 is factory configuration. 1-8 are user stored configurations.

This number refers to the configuration number stored in the printer memory.

Returns
The number associated with the configuration.

◆ getProgramFile

- (NSString *) getProgramFile

Gets the program file associated with the configuration.

The printer program file that configuration can be downloaded to.

If left empty, printer will not prevent downloading configuration to different Program File.

Leave this with value read from printer if you want to make sure configuration is only applied to printers with matching Program File.

Returns
The program file associated with the configuration.

◆ init

- (instancetype) init

Initializes a new instance with default values.

Returns
An initialized instance of Config, or nil if the object could not be created.

◆ initWithCfgContent:

- (instancetype) initWithCfgContent: (NSString *) cfgContent

cfgContent is data received from printer or data previously saved to file and reloaded.

Parameters
cfgContentThe content of the configuration.
Returns
An initialized instance of Config, or nil if the object could not be created.

◆ setData:

- (void) setData: (NSString *) strData

Sets the data associated with the configuration.

The printer configuration values. These should not be modified.

These values should not be modified and should only be read, stored for backup purposes, and redownloaded to printer.

Parameters
strDataThe data to set.

◆ setModel:

- (void) setModel: (NSString *) strModel

Sets the model associated with the configuration.

The Model of the printer configuration is valid for.

The configuration can only be downloaded to the printers that match the model.

Parameters
strModelThe model to set.

◆ setName:

- (void) setName: (NSString *) strName

Sets the name associated with the configuration.

The configuration name. This property can be left empty if naming is not desired.

The property can be used to give the configuration a more descriptive name. e.g "ShipLabel"

Note that name should be kept short to prevent truncation by printer.

Parameters
strNameThe name to set.

◆ setNumber:

- (void) setNumber: (int) iNumber

Sets the number associated with the configuration.

Configuration number. 0-8 valid. 0 is factory configuration. 1-8 are user stored configurations.

This number refers to the configuration number stored in the printer memory.

Parameters
iNumberThe number to set.

◆ setProgramFile:

- (void) setProgramFile: (NSString *) strProgramFile

Sets the program file associated with the configuration.

The printer program file that configuration can be downloaded to.

If left empty, printer will not prevent downloading configuration to different Program File.

Leave this with value read from printer if you want to make sure configuration is only applied to printers with matching Program File.

Parameters
strProgramFileThe program file to set.

The documentation for this class was generated from the following file: