Driver Programming
Jump to navigation
Jump to search
A Device Class is a main.py file in which a python class-Object is inherited from a parent class called EmptyDeviceClass.
from EmptyDeviceClass import EmptyDevice # Loading the EmptyDevice Class
class Device(EmptyDevice): # Creating a new Device Class by inheriting from EmptyDevice
def __init__(self): # The python class object need to be initialized
EmptyDevice.__init__(self) # Finally, the initialization of EmptyDevice has to be done
This is a minimal working example to create a Device Class.