Skip to content

A Hardware Hacking Tool with Web-Based CLI That Speaks Every Protocol

add modbus to provider

Geoc227554f5fac
diff --git a/src/Providers/DependencyProvider.cpp b/src/Providers/DependencyProvider.cpp
index dfd9b89b..9abf72b8 100644
--- a/src/Providers/DependencyProvider.cpp
+++ b/src/Providers/DependencyProvider.cpp
@@ -33,6 +33,7 @@ DependencyProvider::DependencyProvider(ITerminalView &terminalView, IDeviceView
ethernetService(),
httpService(),
telnetService(),
+ modbusService(),
// Transformers
commandTransformer(),
@@ -57,6 +58,7 @@ DependencyProvider::DependencyProvider(ITerminalView &terminalView, IDeviceView
uartAtShell(terminalView, terminalInput, userInputManager, argTransformer, uartService),
threeWireEepromShell(terminalView, terminalInput, userInputManager, threeWireService, argTransformer),
sysInfoShell(terminalView, terminalInput, userInputManager, argTransformer, systemService, wifiService),
+ modbusShell(terminalView, terminalInput, argTransformer, userInputManager, modbusService),
// Selectors
horizontalSelector(deviceView, deviceInput),
@@ -79,9 +81,9 @@ DependencyProvider::DependencyProvider(ITerminalView &terminalView, IDeviceView
ledController(terminalView, terminalInput, ledService, argTransformer, userInputManager),
bluetoothController(terminalView, terminalInput, deviceInput, bluetoothService, argTransformer, userInputManager),
i2sController(terminalView, terminalInput, i2sService, argTransformer, userInputManager),
- wifiController(terminalView, terminalInput, deviceInput, wifiService, wifiScannerService, ethernetService, sshService, netcatService, nmapService, icmpService, nvsService, httpService, telnetService, argTransformer, jsonTransformer, userInputManager),
+ wifiController(terminalView, terminalInput, deviceInput, wifiService, wifiScannerService, ethernetService, sshService, netcatService, nmapService, icmpService, nvsService, httpService, telnetService, argTransformer, jsonTransformer, userInputManager, modbusShell),
canController(terminalView, terminalInput, userInputManager, canService, argTransformer),
- ethernetController(terminalView, terminalInput, deviceInput, wifiService, wifiScannerService, ethernetService, sshService, netcatService, nmapService, icmpService, nvsService, httpService, telnetService, argTransformer, jsonTransformer, userInputManager)
+ ethernetController(terminalView, terminalInput, deviceInput, wifiService, wifiScannerService, ethernetService, sshService, netcatService, nmapService, icmpService, nvsService, httpService, telnetService, argTransformer, jsonTransformer, userInputManager, modbusShell)
{
}
diff --git a/src/Providers/DependencyProvider.h b/src/Providers/DependencyProvider.h
index eed52b27..ffe16ff9 100644
--- a/src/Providers/DependencyProvider.h
+++ b/src/Providers/DependencyProvider.h
@@ -34,6 +34,7 @@ and injecting shared instances of core components
#include "Services/EthernetService.h"
#include "Services/HttpService.h"
#include "Services/TelnetService.h"
+#include "Services/ModbusService.h"
#include "Controllers/UartController.h"
#include "Controllers/I2cController.h"
#include "Controllers/OneWireController.h"
@@ -69,6 +70,7 @@ and injecting shared instances of core components
#include "Shells/IbuttonShell.h"
#include "Shells/UartAtShell.h"
#include "Shells/SysInfoShell.h"
+#include "Shells/ModbusShell.h"
#include "Config/TerminalTypeConfigurator.h"
class DependencyProvider
@@ -114,6 +116,7 @@ public:
EthernetService &getEthernetService();
HttpService &getHttpService();
TelnetService &getTelnetService();
+ ModbusService &getModbusService();
// Controllers
UartController &getUartController();
@@ -158,6 +161,7 @@ public:
IbuttonShell &getIbuttonShell();
UartAtShell &getUartAtShell();
SysInfoShell &getSysInfoShell();
+ ModbusShell &getModbusShell();
// Selectors
HorizontalSelector &getHorizontalSelector();
@@ -204,6 +208,7 @@ private:
EthernetService ethernetService;
HttpService httpService;
TelnetService telnetService;
+ ModbusService modbusService;
// Controllers
UartController uartController;
@@ -247,7 +252,8 @@ private:
IbuttonShell ibuttonShell;
UartAtShell uartAtShell;
SysInfoShell sysInfoShell;
-
+ ModbusShell modbusShell;
+
// Selectors
HorizontalSelector horizontalSelector;