Base valve class

Before we can do anything with individual valves, we have to create a basic Valve class that the unique valves will inherit from. This base class will have to have as many characteristics as each valve type will need to make the base class as generic as possible. The base valve class will be broken up into multiple code listings:

# valve.py (part 1)1 #!/usr/bin/env python3 2 """ 3 VirtualPLC valve.py 4 5 Purpose: Creates a generic Valve class for PLC-controlled SCADA systems. 6 7 Classes: 8 Valve: Generic superclass 9 Gate: Valve subclass; provides for an open/close valve 10 Globe: Valve subclass; provides for a throttling valve 11 Relief: Valve subclass; provides for a pressure-operated open/close valve 12 13 Author: Cody ...

Get Learn Programming in Python with Cody Jackson now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.