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

Public Member Functions

 __init__ (self, cfg_content=None)
 cfgContent is data received from printer or data previously saved to file and reloaded.
 
 to_string (self)
 The configuration content sent/received from printer.
 
 get_number (self)
 Gets the number associated with the configuration.
 
 set_number (self, number)
 Sets the number associated with the configuration.
 
 get_model (self)
 Gets the model associated with the configuration.
 
 set_model (self, model)
 Sets the model associated with the configuration.
 
 get_name (self)
 Gets the name associated with the configuration.
 
 set_name (self, name)
 Sets the name associated with the configuration.
 
 get_program_file (self)
 Gets the program file associated with the configuration.
 
 set_program_file (self, program_file)
 Sets the program file associated with the configuration.
 
 get_data (self)
 Gets the data associated with the configuration.
 
 set_data (self, data)
 Sets the data associated with the configuration.
 

Public Attributes

 number
 
 model
 
 name
 
 program_file
 
 data
 

Constructor & Destructor Documentation

◆ __init__()

JsonConfig.Config.__init__ ( self,
cfg_content = None )

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

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

Member Function Documentation

◆ get_data()

JsonConfig.Config.get_data ( self)

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 the printer.

Returns
The data associated with the configuration.

◆ get_model()

JsonConfig.Config.get_model ( self)

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.

◆ get_name()

JsonConfig.Config.get_name ( self)

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 the name should be kept short to prevent truncation by the printer.

Returns
The name associated with the configuration.

◆ get_number()

JsonConfig.Config.get_number ( self)

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.

◆ get_program_file()

JsonConfig.Config.get_program_file ( self)

Gets the program file associated with the configuration.

The printer program file that the configuration can be downloaded to.

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

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

Returns
The program file associated with the configuration.

◆ set_data()

JsonConfig.Config.set_data ( self,
data )

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 the printer.

Parameters
dataThe data to set.

◆ set_model()

JsonConfig.Config.set_model ( self,
model )

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
modelThe model to set.

◆ set_name()

JsonConfig.Config.set_name ( self,
name )

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 the name should be kept short to prevent truncation by the printer.

Parameters
nameThe name to set.

◆ set_number()

JsonConfig.Config.set_number ( self,
number )

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
numberThe number to set.

◆ set_program_file()

JsonConfig.Config.set_program_file ( self,
program_file )

Sets the program file associated with the configuration.

The printer program file that the configuration can be downloaded to.

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

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

Parameters
program_fileThe program file to set.

◆ to_string()

JsonConfig.Config.to_string ( self)

The configuration content sent/received from printer.

Returns
A string representation of the configuration.

Member Data Documentation

◆ data

JsonConfig.Config.data

◆ model

JsonConfig.Config.model

◆ name

JsonConfig.Config.name

◆ number

JsonConfig.Config.number

◆ program_file

JsonConfig.Config.program_file

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