Plot Something - ME 405 Term Project
hpgl_agena_chiu.hpglDriver Class Reference

This class implements a hpgl driver to open and read from a hpgl file. More...

Public Member Functions

def __init__ (self)
 Creates a hpgl driver and initializes a few important variables that will be used throughouth the class.
 
def read (self, filename)
 A generator that reads from the hpgl file and does the initial processing of the data. More...
 
def process (self, i)
 A generator that processes the data read from the hpgl file into data more readable by the plotter itself. More...
 
def run (self, i)
 A generator that scales the data from the previous step in processing to make it applicable to the physical system. More...
 
def report_x (self)
 A function that returns the setpoint of the first motor. More...
 
def report_y (self)
 A function that returns the setpoint of the second motor. More...
 
def length (self)
 A function that returns the length of the operation list. More...
 

Public Attributes

 operation
 A pre-allocated list used for storing the data read from the hpgl file.
 
 x
 A variable that represents the setpoint of the first motor. More...
 
 y
 A variable that represents the setpoint of the second motor.
 

Detailed Description

This class implements a hpgl driver to open and read from a hpgl file.

Member Function Documentation

◆ length()

def hpgl_agena_chiu.hpglDriver.length (   self)

A function that returns the length of the operation list.

Returns
length The length of the operation list.

◆ process()

def hpgl_agena_chiu.hpglDriver.process (   self,
  i 
)

A generator that processes the data read from the hpgl file into data more readable by the plotter itself.

Parameters
iA counter that determines the amount of times that the generator ran.
Returns
x Both motor setpoints after this stage of the processing.

◆ read()

def hpgl_agena_chiu.hpglDriver.read (   self,
  filename 
)

A generator that reads from the hpgl file and does the initial processing of the data.

Parameters
filenameThe name of the hpgl file.
Returns
operation The list holding the data post process.

◆ report_x()

def hpgl_agena_chiu.hpglDriver.report_x (   self)

A function that returns the setpoint of the first motor.

Returns
x The setpoint of motor 1.

◆ report_y()

def hpgl_agena_chiu.hpglDriver.report_y (   self)

A function that returns the setpoint of the second motor.

Returns
y The setpoint of motor 2.

◆ run()

def hpgl_agena_chiu.hpglDriver.run (   self,
  i 
)

A generator that scales the data from the previous step in processing to make it applicable to the physical system.

Parameters
iA counter that determines the amount of times that the generator ran.
Returns
x Both motor setpoints after this stage of the processing.

Member Data Documentation

◆ x

hpgl_agena_chiu.hpglDriver.x

A variable that represents the setpoint of the first motor.

The scaled x coordinate that converts the hpgl units to inches.

A string variable that is appended to as new characters are read.

A variable that holds the data from the operation list directly from the hpgl file.

The scaled y coordinate that converts the hpgl units to inches.

The radius value used for polar coordinates, derived from the scaled variables.

The setpoint of the first motor.

The setpoint of the second motor.


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