iot-logic/src/utils/platform.py

21 lines
679 B
Python

from .config import PLATFORM
print("Loading platform driver:", PLATFORM)
if PLATFORM == 'raspberry':
from birbnetes_iot_platform_raspberry import BirbnetesIoTPlatformStatusDriver, BirbnetesIoTPlatformRecordDriver, \
BirbnetesIoTPlatformPlaybackDriver
elif PLATFORM == 'emulator':
from birbnetes_iot_platform_emulator import BirbnetesIoTPlatformStatusDriver, BirbnetesIoTPlatformRecordDriver, \
BirbnetesIoTPlatformPlaybackDriver
else:
raise ModuleNotFoundError(f"Could not load platform driver for {PLATFORM}")
__all__ = [
'BirbnetesIoTPlatformStatusDriver',
'BirbnetesIoTPlatformRecordDriver',
'BirbnetesIoTPlatformPlaybackDriver'
]