First, we will define a base Pump class, much like we did for valves, as shown in the following code:
# pump.py (part 1)1 #!/usr/bin/env python3
2 """
3 VirtualPLC pump.py
4
5 Purpose: Creates a generic Pump class for PLC-controlled SCADA systems.
6
7 Classes:
8 Pump: Generic superclass
9 CentrifPump: Pump subclass; provides for a variable displacement pump
10 PositiveDisplacement: Pump subclass; provides for a positive displacement pump
11
12 Author: Cody Jackson
13
14 Date: 4/12/18
15 #################################
16 Version 0.2
17 Added path extension to alleviate errors
18 Version 0.1
19 Initial build
20 """
Lines 1-20 are similar to what we've seen before, with the basic program information:
# pump.py (part 2)1 import ...