ME 305 Group 6 Documentation
Public Member Functions | Public Attributes | List of all members
printqueue.PrintJob Class Reference

A print job containing a string of text to print and an optional timeout parameter. More...

Public Member Functions

def __init__ (self, str data, int timeout=0)
 Creates a new PrintJob object. More...
 

Public Attributes

 data
 Container for print jobs.
 
 time_scheduled
 Time when the job was scheduled. More...
 
 timeout
 Schedule time for print jobs. More...
 

Detailed Description

A print job containing a string of text to print and an optional timeout parameter.

A print job should be a short string to avoid taking too long to execute. For longer print strings, break the string into multiple jobs and queue them in order to have faster task execution.

Constructor & Destructor Documentation

◆ __init__()

def printqueue.PrintJob.__init__ (   self,
str  data,
int   timeout = 0 
)

Creates a new PrintJob object.

Creates a new PrintJob object to hold a string of text to be printed by the PrintQueue

Parameters
dataA short string that the job is containing
timeoutThe number of microseconds before the print job should timeout (ie should no longer be printed)

Member Data Documentation

◆ time_scheduled

printqueue.PrintJob.time_scheduled

Time when the job was scheduled.

This starts the timer on a job's lifetime.

◆ timeout

printqueue.PrintJob.timeout

Schedule time for print jobs.

If jobs don't print before their scheduled time, they may be dropped.


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