-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
think about interface direct initialization inside devices
- Loading branch information
Rodriguez
committed
Oct 19, 2023
1 parent
7fd7a07
commit 73d86c3
Showing
9 changed files
with
114 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
File renamed without changes.
61 changes: 61 additions & 0 deletions
61
platform/panduza_platform/devices/panduza/fake_bps/fake_bps.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
from core.platform_device import PlatformDevice | ||
|
||
|
||
|
||
class DevicePanduzaFakeBps(PlatformDevice): | ||
|
||
# --- | ||
|
||
def _PZA_DEV_config(self): | ||
""" | ||
""" | ||
return { | ||
"family": "BPS", | ||
"model": "FakeBps", | ||
"manufacturer": "Panduza" | ||
} | ||
|
||
# --- | ||
|
||
def _PZA_DEV_mount_interfaces(self): | ||
""" | ||
""" | ||
pass | ||
|
||
# --- | ||
|
||
def _PZA_DEV_interfaces_generator(self): | ||
""" | ||
""" | ||
return {} | ||
|
||
# number_of_channel = int( self.get_settings().get("number_of_channel", 1) ) | ||
|
||
# interfaces = [] | ||
# for chan in range(0, number_of_channel): | ||
# interfaces.append( | ||
# { | ||
# "name": f":channel_{chan}:_ctrl", | ||
# "driver": "panduza.fake.bpc" | ||
# } | ||
# ) | ||
# interfaces.append( | ||
# { | ||
# "name": f":channel_{chan}:_am", | ||
# "driver": "panduza.fake.ammeter", | ||
# "settings": { | ||
# "work_with_fake_bpc": f"!//:channel_{chan}:" | ||
# } | ||
# } | ||
# ) | ||
# interfaces.append( | ||
# { | ||
# "name": f":channel_{chan}:_vm", | ||
# "driver": "panduza.fake.voltmeter", | ||
# } | ||
# ) | ||
|
||
# return interfaces | ||
|
||
|
||
|
47 changes: 0 additions & 47 deletions
47
platform/panduza_platform/devices/panduza/fake_bps_controller.py
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,8 @@ | ||
from .drv_hanmatek_hm310t_bpc import DrvHanmatekHm310tBpc | ||
from .drv_panduza_fake_bpc import DrvPanduzaFakeBpc | ||
from .drv_tenma_722710_bpc import DrvTenma722710Bpc | ||
|
||
PZA_DRIVERS_LIST= [ | ||
DrvHanmatekHm310tBpc, | ||
DrvPanduzaFakeBpc, | ||
DrvTenma722710Bpc | ||
] | ||
|