lpcmanager

Parents 921affe44b8e
Children 85eef159a829
MQTT: add feature and LPCManager specific paths for paho.mqtt.c libraries and headers
--- a/LPCExtension.py Tue Mar 19 12:16:31 2024 +0100
+++ b/LPCExtension.py Thu Aug 22 12:19:28 2024 +0200
@@ -45,6 +45,7 @@
('lpchmi', _('Smarteh HMI'), _('Create customized HMI'), 'lpchmi.LPCHMI'),
('bacnet', _('Bacnet support'), _('Map located variables over Bacnet'), 'LPCBACnet.RootClass'),
('modbus', _('Modbus'), _('Map located variables over Modbus'), 'LPCModbus.RootClass'),
+ ('mqtt', _('MQTT client'), _('Map MQTT topics as located variables'), 'mqtt.MQTTClient'),
('LPCBus', _('LPC bus'), _('Support for Smarteh modules'), 'LPCBus.LPCBus'),
('CanOpen', _('CANOpen'), _('Support for CANopen'), 'LPCCanFestival.LPCCanOpen')]
@@ -135,10 +136,14 @@
arch = GetLPCArch()
old_ThirdPartyPath = paths.ThirdPartyPath
-def ThirdPartyPath(name):
- res = old_ThirdPartyPath(name)
+def ThirdPartyPath(name, *args):
if name in ["BACnet", "Modbus", "CanFestival-3"]:
+ res = old_ThirdPartyPath(name)
res = os.path.join(res, arch)
+ elif name == "paho.mqtt.c":
+ res = old_ThirdPartyPath("MQTT")
+ res = os.path.join(res, arch)
+
return res
paths.ThirdPartyPath = ThirdPartyPath