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

Public Member Functions

 __init__ (self, connection=None, mgmt_comm=None, comm_descriptor=None)
 Must pass an opened TcpComm connection that can remain opened if listening for unsolicited msgs from printer.
 
 get_all_config (self)
 Gets all configurations.
 
 get_config_with_number (self, cfg_number)
 Gets the configuration with the specified number.
 
 set_config (self, "Config" cfg)
 Sets the specified configuration.
 

Public Attributes

 cfg_index_factory
 
 cmd_read
 
 cmd_write
 

Constructor & Destructor Documentation

◆ __init__()

JsonConfig.JsonConfig.__init__ ( self,
connection = None,
mgmt_comm = None,
comm_descriptor = None )

Must pass an opened TcpComm connection that can remain opened if listening for unsolicited msgs from printer.

More...

Parameters
connectionThe TCP communication object.
mgmt_commThe JSON communication object.
comm_descriptorDescriptor for the communication used to connect with printer, TCP descriptor format: "ip" or "ip:port" e.g. "127.0.0.1" or "127.0.0.1:3007". If port is not provided, the default value is used.
Returns
An initialized instance of JsonConfig, or nil if the object could not be created.

Member Function Documentation

◆ get_all_config()

JsonConfig.JsonConfig.get_all_config ( self)

Gets all configurations.

Returns
An array of Config objects representing all configurations.

◆ get_config_with_number()

JsonConfig.JsonConfig.get_config_with_number ( self,
cfg_number )

Gets the configuration with the specified number.

Parameters
cfg_numberThe number of the configuration to retrieve.

◆ set_config()

JsonConfig.JsonConfig.set_config ( self,
"Config" cfg )

Sets the specified configuration.

Parameters
cfgThe Config object representing the configuration to set.
Returns
True if the configuration was successfully set, False otherwise.

Member Data Documentation

◆ cfg_index_factory

JsonConfig.JsonConfig.cfg_index_factory

◆ cmd_read

JsonConfig.JsonConfig.cmd_read

◆ cmd_write

JsonConfig.JsonConfig.cmd_write

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