Driver Programming: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 2: | Line 2: | ||
EmptyDeviceClass has to be loaded at the beginning like any other python module by using the line: | EmptyDeviceClass has to be loaded at the beginning like any other python module by using the line: | ||
{{syntaxhighlight|lang=python|code= | |||
from EmptyDeviceClass import EmptyDevice | from EmptyDeviceClass import EmptyDevice | ||
class Device(EmptyDevice): | |||
def __init__(self): | |||
EmptyDevice.__init__(self) | |||
}} | |||
This EmptyDevice object has all basic function included which do |
Revision as of 08:34, 9 November 2017
A Device Class is a main.py file in which a python class-Object is inherited from a parent class called EmptyDeviceClass. EmptyDeviceClass has to be loaded at the beginning like any other python module by using the line:
from EmptyDeviceClass import EmptyDevice
class Device(EmptyDevice):
def __init__(self):
EmptyDevice.__init__(self)
This EmptyDevice object has all basic function included which do