History log of /openbmc/phosphor-modbus/ (Results 1 – 25 of 29)
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
acfdd55f09-Dec-2025 Jagpal Singh Gill <paligill@gmail.com>

test: add test for events with device sensors

Add test cases to test events with device sensors for threshold events
and sensor failures.

Tested:
```
> meson test -t 10 -C builddir/ --print-errorlo

test: add test for events with device sensors

Add test cases to test events with device sensors for threshold events
and sensor failures.

Tested:
```
> meson test -t 10 -C builddir/ --print-errorlogs --wrapper="valgrind --error-exitcode=1" test_device_events
ninja: Entering directory `/host/repos/Modbus/phosphor-modbus/builddir'
[2/2] Linking target tests/test_device_events
1/1 test_device_events OK 12.47s

Ok: 1
Fail: 0
```

Change-Id: Ic4b70f107eba2e96ce3235f6364b03a88a73c5d7
Signed-off-by: Jagpal Singh Gill <paligill@gmail.com>

show more ...

2fa10f4208-Dec-2025 Jagpal Singh Gill <paligill@gmail.com>

test: refactor common code into BaseTest

Refactor test code into a BaseTest class with common code. Also change
the test logic to create a separate thread for modbus test server so it
can run indepe

test: refactor common code into BaseTest

Refactor test code into a BaseTest class with common code. Also change
the test logic to create a separate thread for modbus test server so it
can run independent of client.

Tested -
```
> meson test -t 10 -C builddir/ --print-errorlogs --wrapper="valgrind --error-exitcode=1"
ninja: Entering directory `/host/repos/Modbus/phosphor-modbus/builddir'
ninja: no work to do.
1/7 test_modbus_commands OK 0.73s
2/7 test_firmware OK 3.52s
3/7 test_inventory OK 5.67s
4/7 test_modbus OK 7.91s
5/7 test_events OK 9.55s
6/7 test_port OK 12.06s
7/7 test_sensors OK 16.35s

Ok: 7
Fail: 0
```

Change-Id: I7324494caf641a49f6ad345b09c0942daad0a46f
Signed-off-by: Jagpal Singh Gill <paligill@gmail.com>

show more ...

40fe859724-Nov-2025 Jagpal Singh Gill <paligill@gmail.com>

rtu: inventory: Fix inventory config path check

Update the inventory config path check to compare equality for
objectPath as multiple entities such as HeatExchanger and
HeatExchangerFan can have the

rtu: inventory: Fix inventory config path check

Update the inventory config path check to compare equality for
objectPath as multiple entities such as HeatExchanger and
HeatExchangerFan can have the same prefix HeatExchanger. Also a minor
fix to use the default value of parity as unknown in Modbus lib.

Tested:
Tested and verified on hardware.

Change-Id: I16ec3fee2f9f5436fb2b4674289ac162161e2c9d
Signed-off-by: Jagpal Singh Gill <paligill@gmail.com>

show more ...

1f1d004517-Nov-2025 Jagpal Singh Gill <paligill@gmail.com>

add sensor related interfaces

Add threshold, availability, operational status, association interfaces
for sensor.

Tested:
```
> meson test -C builddir
ninja: Entering directory `/host/repos/Modbus/

add sensor related interfaces

Add threshold, availability, operational status, association interfaces
for sensor.

Tested:
```
> meson test -C builddir
ninja: Entering directory `/host/repos/Modbus/phosphor-modbus/builddir'
ninja: no work to do.
1/7 test_modbus_commands OK 0.02s
2/7 test_firmware OK 2.01s
3/7 test_inventory OK 4.01s
4/7 test_modbus OK 6.02s
5/7 test_events OK 7.03s
6/7 test_port OK 9.02s
7/7 test_sensors OK 12.03s

Ok: 7
Fail: 0
```

Change-Id: Iea6e25e067dca698be70cd7b5b4dece0e65cf70b
Signed-off-by: Jagpal Singh Gill <paligill@gmail.com>

show more ...

cf77ef5402-Sep-2025 Jagpal Singh Gill <paligill@gmail.com>

add firmware inventory support

Add support to display the firmware version using the Firmware version
register from EM configuration. The version will be exposed as
xyz.openbmc_project.Software.Vers

add firmware inventory support

Add support to display the firmware version using the Firmware version
register from EM configuration. The version will be exposed as
xyz.openbmc_project.Software.Version interface on the Dbus.

Tested:
Unit Test -
```
> meson test -t 10 -C builddir/ --print-errorlogs --wrapper="valgrind --error-exitcode=1" test_firmware
ninja: Entering directory `/host/repos/Modbus/phosphor-modbus/builddir'
ninja: no work to do.
1/1 test_firmware OK 3.37s

Ok: 1
Fail: 0
```

Tested on Qemu -
```
> busctl tree xyz.openbmc_project.ModbusRTU
`- /xyz
`- /xyz/openbmc_project
|- /xyz/openbmc_project/inventory_source
| |- /xyz/openbmc_project/inventory_source/Heat_Exchanger_12_DevTTYUSB0
| |- /xyz/openbmc_project/inventory_source/Heat_Exchanger_12_DevTTYUSB1
| |- /xyz/openbmc_project/inventory_source/Reservoir_Pumping_Unit_12_DevTTYUSB0
| `- /xyz/openbmc_project/inventory_source/Reservoir_Pumping_Unit_12_DevTTYUSB1
|- /xyz/openbmc_project/sensors
| `- /xyz/openbmc_project/sensors/temperature
| |- /xyz/openbmc_project/sensors/temperature/Reservoir_Pumping_Unit_12_DevTTYUSB0_RPU_Coolant_Inlet_Temp_C
| |- /xyz/openbmc_project/sensors/temperature/Reservoir_Pumping_Unit_12_DevTTYUSB0_RPU_Coolant_Outlet_Temp_C
| |- /xyz/openbmc_project/sensors/temperature/Reservoir_Pumping_Unit_12_DevTTYUSB1_RPU_Coolant_Inlet_Temp_C
| `- /xyz/openbmc_project/sensors/temperature/Reservoir_Pumping_Unit_12_DevTTYUSB1_RPU_Coolant_Outlet_Temp_C
`- /xyz/openbmc_project/software
|- /xyz/openbmc_project/software/Reservoir_Pumping_Unit_12_DevTTYUSB0_RPU_PLC_FW_Revision_9071
`- /xyz/openbmc_project/software/Reservoir_Pumping_Unit_12_DevTTYUSB1_RPU_PLC_FW_Revision_8053

> busctl introspect xyz.openbmc_project.ModbusRTU /xyz/openbmc_project/software/Reservoir_Pumping_Unit_12_DevTTYUSB0_RPU_PLC_FW_Revision_9071
NAME TYPE SIGNATURE RESULT/VALUE FLAGS
org.freedesktop.DBus.Introspectable interface - - -
.Introspect method - s -
org.freedesktop.DBus.Peer interface - - -
.GetMachineId method - s -
.Ping method - - -
org.freedesktop.DBus.Properties interface - - -
.Get method ss v -
.GetAll method s a{sv} -
.Set method ssv - -
.PropertiesChanged signal sa{sv}as - -
xyz.openbmc_project.Association.Definitions interface - - -
.Associations property a(sss) 1 "running" "ran_on" "/xyz/openbmc_pr... emits-change writable
xyz.openbmc_project.Software.Activation interface - - -
.Activation property s "xyz.openbmc_project.Software.Activat... emits-change writable
.RequestedActivation property s "xyz.openbmc_project.Software.Activat... emits-change writable
xyz.openbmc_project.Software.Version interface - - -
.Purpose property s "xyz.openbmc_project.Software.Version... emits-change writable
.Version property s "ABABABAB" emits-change writable
```

Change-Id: I985e12ef88547585cca93569b083f347e74a8695
Signed-off-by: Jagpal Singh Gill <paligill@gmail.com>

show more ...

7184805a16-Oct-2025 Jagpal Singh Gill <paligill@gmail.com>

rtu: add read status register and event support

Add support to read the status registers and generate the appropriate
events.

Tested:
Unit Test -
```
> meson test -t 10 -C builddir/ --print-errorlo

rtu: add read status register and event support

Add support to read the status registers and generate the appropriate
events.

Tested:
Unit Test -
```
> meson test -t 10 -C builddir/ --print-errorlogs --wrapper="valgrind --error-exitcode=1" test_events
ninja: Entering directory `/host/repos/Modbus/phosphor-modbus/builddir'
ninja: no work to do.
1/1 test_events OK 9.69s

Ok: 1
Fail: 0
```

Tested on Qemu -
```
Apr 03 15:41:52 ventura phosphor-modbus-rtu[1654]: OPENBMC_MESSAGE_ID={"xyz.openbmc_project.Sensor.SensorFailure":{"SENSOR_NAME":"/xyz/openbmc_project/sensors/RPU_Coolant_Outlet_Thermometer_Status","_SOURCE":{"COLUMN":73,"FILE":"../git/common/ev
ents.cpp","FUNCTION":"sdbusplus::async::task<> phosphor::modbus::events::Events::generateSensorFailureEvent(sdbusplus::message::object_path, bool)","LINE":95,"PID":1654}}}
...
Apr 03 15:41:52 ventura phosphor-modbus-rtu[1654]: OPENBMC_MESSAGE_ID={"xyz.openbmc_project.Sensor.Threshold.ReadingCritical":{"READING_VALUE":1670.6000000000001,"SENSOR_NAME":"/xyz/openbmc_project/sensors/RPU_Coolant_Outlet_Temp_C","UNITS":"xyz
.openbmc_project.Sensor.Value.Unit.DegreesC","_SOURCE":{"COLUMN":67,"FILE":"../git/common/events.cpp","FUNCTION":"sdbusplus::async::task<> phosphor::modbus::events::Events::generateSensorReadingEvent(sdbusplus::message::object_path, phosphor::modbus::events::EventLevel, double, sdbusplus::common::xyz::openbmc_project::sensor::Value::Unit, bool)","LINE":48,"PID":1654}}}
```

Change-Id: Icd78f22cf07798d06916cc077ec3f8bfac9ee8d3
Signed-off-by: Jagpal Singh Gill <paligill@gmail.com>

show more ...

e92aba4516-Oct-2025 Jagpal Singh Gill <paligill@gmail.com>

rtu: implement modbus sensor read

Read the modbus device config from the Entity Manager configuration and
create the sensor interfaces for related sensor register config.

Tested:
Added new Unit tes

rtu: implement modbus sensor read

Read the modbus device config from the Entity Manager configuration and
create the sensor interfaces for related sensor register config.

Tested:
Added new Unit test named test_sensors -
```
> meson test -t 10 -C builddir/ --print-errorlogs --wrapper="valgrind --error-exitcode=1" test_sensors
ninja: Entering directory `/host/repos/Modbus/phosphor-modbus/builddir'
[2/2] Linking target tests/test_sensors
1/1 test_sensors OK 13.98s

Ok: 1
Fail: 0
```

Tested on Qemu using Mock Modbus Device -
```
root@ventura:~# busctl tree xyz.openbmc_project.ModbusRTU
└─ /xyz
└─ /xyz/openbmc_project
├─ /xyz/openbmc_project/inventory_source
│ ├─ /xyz/openbmc_project/inventory_source/Heat_Exchanger_12_DevTTYUSB0
│ ├─ /xyz/openbmc_project/inventory_source/Heat_Exchanger_12_DevTTYUSB1
│ ├─ /xyz/openbmc_project/inventory_source/Reservoir_Pumping_Unit_12_DevTTYUSB0
│ └─ /xyz/openbmc_project/inventory_source/Reservoir_Pumping_Unit_12_DevTTYUSB1
└─ /xyz/openbmc_project/sensors
└─ /xyz/openbmc_project/sensors/temperature
├─ /xyz/openbmc_project/sensors/temperature/Reservoir_Pumping_Unit_12_DevTTYUSB0_RPU_Coolant_Inlet_Temp_C
├─ /xyz/openbmc_project/sensors/temperature/Reservoir_Pumping_Unit_12_DevTTYUSB0_RPU_Coolant_Outlet_Temp_C
├─ /xyz/openbmc_project/sensors/temperature/Reservoir_Pumping_Unit_12_DevTTYUSB1_RPU_Coolant_Inlet_Temp_C
└─ /xyz/openbmc_project/sensors/temperature/Reservoir_Pumping_Unit_12_DevTTYUSB1_RPU_Coolant_Outlet_Temp_C

busctl introspect xyz.openbmc_project.ModbusRTU /xyz/openbmc_project/sensors/temperature/Reservoir_Pumping_Unit_12_DevTTYUSB1_RPU_Coolant_Outlet_Temp_C
NAME TYPE SIGNATURE RESULT/VALUE FLAGS
org.freedesktop.DBus.Introspectable interface - - -
.Introspect method - s -
org.freedesktop.DBus.Peer interface - - -
.GetMachineId method - s -
.Ping method - - -
org.freedesktop.DBus.Properties interface - - -
.Get method ss v -
.GetAll method s a{sv} -
.Set method ssv - -
.PropertiesChanged signal sa{sv}as - -
xyz.openbmc_project.Sensor.Value interface - - -
.MaxValue property d nan emits-change writable
.MinValue property d nan emits-change writable
.Unit property s "xyz.openbmc_project.Sensor.Value.Unit.… emits-change writable
.Value property d 1670.6 emits-change writable
```

Change-Id: I1368e8df5999b5cee9ac19d185ee110a9ecc3021
Signed-off-by: Jagpal Singh Gill <paligill@gmail.com>

show more ...

978c780929-Oct-2025 Jagpal Singh Gill <paligill@gmail.com>

common: use std::flat_map for entity_manager

Use std::flat_map instead of boost flat_map to avoid extra dependency on
boost as std::flat_map is available.

Tested:
Verified the EntityManager interfa

common: use std::flat_map for entity_manager

Use std::flat_map instead of boost flat_map to avoid extra dependency on
boost as std::flat_map is available.

Tested:
Verified the EntityManager interface works as expected after change as
configuration interfaces gets processed by Modbus RTU service.
```
root@ventura:~# busctl tree xyz.openbmc_project.ModbusRTU
`- /xyz
`- /xyz/openbmc_project
`- /xyz/openbmc_project/inventory_source
|- /xyz/openbmc_project/inventory_source/Heat_Exchanger_12_DevTTYUSB0
|- /xyz/openbmc_project/inventory_source/Heat_Exchanger_12_DevTTYUSB1
|- /xyz/openbmc_project/inventory_source/Reservoir_Pumping_Unit_12_DevTTYUSB0
`- /xyz/openbmc_project/inventory_source/Reservoir_Pumping_Unit_12_DevTTYUSB1
root@ventura:~# busctl tree xyz.openbmc_project.EntityManager
`- /xyz
`- /xyz/openbmc_project
|- /xyz/openbmc_project/EntityManager
`- /xyz/openbmc_project/inventory
`- /xyz/openbmc_project/inventory/system
|- /xyz/openbmc_project/inventory/system/board
| `- /xyz/openbmc_project/inventory/system/board/Ventura_Modbus
| |- /xyz/openbmc_project/inventory/system/board/Ventura_Modbus/DevTTYUSB0
| |- /xyz/openbmc_project/inventory/system/board/Ventura_Modbus/DevTTYUSB1
| |- /xyz/openbmc_project/inventory/system/board/Ventura_Modbus/Heat_Exchanger
| `- /xyz/openbmc_project/inventory/system/board/Ventura_Modbus/Reservoir_Pumping_Unit
`- /xyz/openbmc_project/inventory/system/chassis
|- /xyz/openbmc_project/inventory/system/chassis/Heat_Exchanger_12_DevTTYUSB0
|- /xyz/openbmc_project/inventory/system/chassis/Heat_Exchanger_12_DevTTYUSB1
|- /xyz/openbmc_project/inventory/system/chassis/Reservoir_Pumping_Unit_12_DevTTYUSB0
| `- /xyz/openbmc_project/inventory/system/chassis/Reservoir_Pumping_Unit_12_DevTTYUSB0/Reservoir_Pumping_Unit_12_DevTTYUSB0
`- /xyz/openbmc_project/inventory/system/chassis/Reservoir_Pumping_Unit_12_DevTTYUSB1
`- /xyz/openbmc_project/inventory/system/chassis/Reservoir_Pumping_Unit_12_DevTTYUSB1/Reservoir_Pumping_Unit_12_DevTTYUSB1
```

Change-Id: Iecb61359a0f9259bfec0f0678f13217928be67d6
Signed-off-by: Jagpal Singh Gill <paligill@gmail.com>

show more ...

cad9ecf622-Oct-2025 Jagpal Singh Gill <paligill@gmail.com>

rtu: implement modbus rtu inventory source service

Implement phosphor-modbus-rtu inventory source service based on [1].

[1]: https://gerrit.openbmc.org/c/openbmc/docs/+/77318

Tested: Unit test pas

rtu: implement modbus rtu inventory source service

Implement phosphor-modbus-rtu inventory source service based on [1].

[1]: https://gerrit.openbmc.org/c/openbmc/docs/+/77318

Tested: Unit test passes and tested on qemu with simulated modbus
server.
```
root@bmc:~# busctl tree xyz.openbmc_project.ModbusRTU
└─ /xyz
└─ /xyz/openbmc_project
└─ /xyz/openbmc_project/inventory_source
└─ /xyz/openbmc_project/inventory_source/modbus
├─ /xyz/openbmc_project/inventory_source/modbus/Heat_Exchanger_12_DevTTYUSB0
├─ /xyz/openbmc_project/inventory_source/modbus/Heat_Exchanger_12_DevTTYUSB1
├─ /xyz/openbmc_project/inventory_source/modbus/Reservoir_Pumping_Unit_12_DevTTYUSB0
└─ /xyz/openbmc_project/inventory_source/modbus/Reservoir_Pumping_Unit_12_DevTTYUSB1
root@bmc:~# busctl tree xyz.openbmc_project.EntityManager
└─ /xyz
└─ /xyz/openbmc_project
├─ /xyz/openbmc_project/EntityManager
└─ /xyz/openbmc_project/inventory
└─ /xyz/openbmc_project/inventory/system
├─ /xyz/openbmc_project/inventory/system/board
│ └─ /xyz/openbmc_project/inventory/system/board/Ventura_Modbus
│ ├─ /xyz/openbmc_project/inventory/system/board/Ventura_Modbus/DevTTYUSB0
│ ├─ /xyz/openbmc_project/inventory/system/board/Ventura_Modbus/DevTTYUSB1
│ ├─ /xyz/openbmc_project/inventory/system/board/Ventura_Modbus/Heat_Exchanger
│ └─ /xyz/openbmc_project/inventory/system/board/Ventura_Modbus/Reservoir_Pumping_Unit
└─ /xyz/openbmc_project/inventory/system/chassis
├─ /xyz/openbmc_project/inventory/system/chassis/Heat_Exchanger_12_DevTTYUSB0
├─ /xyz/openbmc_project/inventory/system/chassis/Heat_Exchanger_12_DevTTYUSB1
├─ /xyz/openbmc_project/inventory/system/chassis/Reservoir_Pumping_Unit_12_DevTTYUSB0
└─ /xyz/openbmc_project/inventory/system/chassis/Reservoir_Pumping_Unit_12_DevTTYUSB1

root@bmc:~# busctl introspect xyz.openbmc_project.EntityManager /xyz/openbmc_project/inventory/system/chassis/Heat_Exchanger_12_DevTTYUSB0
NAME TYPE SIGNATURE RESULT/VALUE FLAGS
org.freedesktop.DBus.Introspectable interface - - -
.Introspect method - s -
org.freedesktop.DBus.Peer interface - - -
.GetMachineId method - s -
.Ping method - - -
org.freedesktop.DBus.Properties interface - - -
.Get method ss v -
.GetAll method s a{sv} -
.Set method ssv - -
.PropertiesChanged signal sa{sv}as - -
xyz.openbmc_project.AddObject interface - - -
.AddObject method a{sv} - -
xyz.openbmc_project.Inventory.Decorator.Asset interface - - -
.BuildDate property s "Unknown" emits-change
.Manufacturer property s "Unknown" emits-change
.Model property s "Unknown" emits-change
.PartNumber property s "Unknown" emits-change
.SerialNumber property s "Unknown" emits-change
.SparePartNumber property s "ABABABAB" emits-change
xyz.openbmc_project.Inventory.Item.Chassis interface - - -
.Name property s "Heat Exchanger 12 DevTTYUSB0" emits-change
.Probe property s "xyz.openbmc_project.Inventory.Source.M… emits-change
.Type property s "Chassis" emits-change
root@bmc:~# busctl introspect xyz.openbmc_project.EntityManager /xyz/openbmc_project/inventory/system/chassis/Heat_Exchanger_12_DevTTYUSB1
NAME TYPE SIGNATURE RESULT/VALUE FLAGS
org.freedesktop.DBus.Introspectable interface - - -
.Introspect method - s -
org.freedesktop.DBus.Peer interface - - -
.GetMachineId method - s -
.Ping method - - -
org.freedesktop.DBus.Properties interface - - -
.Get method ss v -
.GetAll method s a{sv} -
.Set method ssv - -
.PropertiesChanged signal sa{sv}as - -
xyz.openbmc_project.AddObject interface - - -
.AddObject method a{sv} - -
xyz.openbmc_project.Inventory.Decorator.Asset interface - - -
.BuildDate property s "Unknown" emits-change
.Manufacturer property s "Unknown" emits-change
.Model property s "Unknown" emits-change
.PartNumber property s "Unknown" emits-change
.SerialNumber property s "Unknown" emits-change
.SparePartNumber property s "ABABABAB" emits-change
xyz.openbmc_project.Inventory.Item.Chassis interface - - -
.Name property s "Heat Exchanger 12 DevTTYUSB1" emits-change
.Probe property s "xyz.openbmc_project.Inventory.Source.M… emits-change
.Type property s "Chassis" emits-change

root@bmc:~# busctl introspect xyz.openbmc_project.EntityManager /xyz/openbmc_project/inventory/system/chassis/Reservoir_Pumping_Unit_12_DevTTYUSB0
NAME TYPE SIGNATURE RESULT/VALUE FLAGS
org.freedesktop.DBus.Introspectable interface - - -
.Introspect method - s -
org.freedesktop.DBus.Peer interface - - -
.GetMachineId method - s -
.Ping method - - -
org.freedesktop.DBus.Properties interface - - -
.Get method ss v -
.GetAll method s a{sv} -
.Set method ssv - -
.PropertiesChanged signal sa{sv}as - -
xyz.openbmc_project.AddObject interface - - -
.AddObject method a{sv} - -
xyz.openbmc_project.Inventory.Decorator.Asset interface - - -
.BuildDate property s "ABABABAB" emits-change
.Manufacturer property s "Unknown" emits-change
.Model property s "ABABABABABABABAB" emits-change
.PartNumber property s "Unknown" emits-change
.SerialNumber property s "ABABABABABABABAB" emits-change
.SparePartNumber property s "ABABABAB" emits-change
xyz.openbmc_project.Inventory.Item.Chassis interface - - -
.Name property s "Reservoir Pumping Unit 12 DevTTYUSB0" emits-change
.Probe property s "xyz.openbmc_project.Inventory.Source.M… emits-change
.Type property s "Chassis" emits-change
root@bmc:~# busctl introspect xyz.openbmc_project.EntityManager /xyz/openbmc_project/inventory/system/chassis/Reservoir_Pumping_Unit_12_DevTTYUSB1
NAME TYPE SIGNATURE RESULT/VALUE FLAGS
org.freedesktop.DBus.Introspectable interface - - -
.Introspect method - s -
org.freedesktop.DBus.Peer interface - - -
.GetMachineId method - s -
.Ping method - - -
org.freedesktop.DBus.Properties interface - - -
.Get method ss v -
.GetAll method s a{sv} -
.Set method ssv - -
.PropertiesChanged signal sa{sv}as - -
xyz.openbmc_project.AddObject interface - - -
.AddObject method a{sv} - -
xyz.openbmc_project.Inventory.Decorator.Asset interface - - -
.BuildDate property s "ABABABAB" emits-change
.Manufacturer property s "Unknown" emits-change
.Model property s "ABABABABABABABAB" emits-change
.PartNumber property s "Unknown" emits-change
.SerialNumber property s "ABABABABABABABAB" emits-change
.SparePartNumber property s "ABABABAB" emits-change
xyz.openbmc_project.Inventory.Item.Chassis interface - - -
.Name property s "Reservoir Pumping Unit 12 DevTTYUSB1" emits-change
.Probe property s "xyz.openbmc_project.Inventory.Source.M… emits-change
.Type property s "Chassis" emits-change
```

Change-Id: Ic0ea739de3833044c95da8164be1e2f3f8e6a063
Signed-off-by: Jagpal Singh Gill <paligill@gmail.com>

show more ...

2168bbd022-Oct-2025 Jagpal Singh Gill <paligill@gmail.com>

rtu: add mock modbus test device

Add the mocked modbus test device/server. The purpose of this mocked
device is to help facilitate testing on Qemu VM. More details are
captured in Readme.md file.

C

rtu: add mock modbus test device

Add the mocked modbus test device/server. The purpose of this mocked
device is to help facilitate testing on Qemu VM. More details are
captured in Readme.md file.

Change-Id: I3b09f4057ea5cc03db101b81f435ae772d51d601
Signed-off-by: Jagpal Singh Gill <paligill@gmail.com>

show more ...

b62e3dfe22-Oct-2025 Jagpal Singh Gill <paligill@gmail.com>

rtu: getConfig shall return unique_ptr

Update the getConfig in PortFactory and related classes to return a
unique_ptr instead of a variable on stack to preserve polymorphic
behavior of the return po

rtu: getConfig shall return unique_ptr

Update the getConfig in PortFactory and related classes to return a
unique_ptr instead of a variable on stack to preserve polymorphic
behavior of the return port config. Without this change the values from
USBPort are dropped when casting from USBPort to PortFactoryConfig.

Change-Id: Ia250771a7fd7aedb133598446aab1e120aaf36b5
Signed-off-by: Jagpal Singh Gill <paligill@gmail.com>

show more ...

7f9d41dd16-Oct-2025 Jagpal Singh Gill <paligill@gmail.com>

rtu: add serial port interface

Add the interface classes for serial port with Port Factory classes to
make the code extensible for future in case a new hardware port type is
introduced. This also ma

rtu: add serial port interface

Add the interface classes for serial port with Port Factory classes to
make the code extensible for future in case a new hardware port type is
introduced. This also makes the unit testing easy by creating a Mock
Port using socat.

Tested:
```
meson test -C builddir test_port
ninja: Entering directory `/host/repos/Modbus/phosphor-modbus/builddir'
ninja: no work to do.
1/1 test_port OK 5.02s

Ok: 1
Fail: 0
```

Change-Id: Ic6bd982abf1ae993f76c39e3503d3a0402a692fe
Signed-off-by: Jagpal Singh Gill <paligill@gmail.com>

show more ...

f69546b316-Oct-2025 Jagpal Singh Gill <paligill@gmail.com>

common: add entity manager interface

Define an EntityManager interface to fetch the serial port related
config or any device config from Entity Manager.

Change-Id: Ieeff4422903e3b4bcc3ce28cd493eeca

common: add entity manager interface

Define an EntityManager interface to fetch the serial port related
config or any device config from Entity Manager.

Change-Id: Ieeff4422903e3b4bcc3ce28cd493eecab5618f13
Signed-off-by: Jagpal Singh Gill <paligill@gmail.com>

show more ...

a32d241b01-Oct-2025 Jagpal Singh Gill <paligill@gmail.com>

modbus_rtu_lib: implement library APIs

Implement modbus-rtu library APIs which will be used by
phosphor-modbus-rtu service based on [1].

[1]: https://gerrit.openbmc.org/c/openbmc/docs/+/77318

Test

modbus_rtu_lib: implement library APIs

Implement modbus-rtu library APIs which will be used by
phosphor-modbus-rtu service based on [1].

[1]: https://gerrit.openbmc.org/c/openbmc/docs/+/77318

Tested:
Added a Mock Modbus RTU server using socat which intercepts and replies
to modbus messages for testing.
```
> meson test -C builddir
ninja: Entering directory `/host/repos/Modbus/phosphor-modbus/builddir'
ninja: no work to do.
1/2 test_modbus_commands OK 0.01s
2/2 test_modbus OK 6.02s

Ok: 2
Fail: 0
```

Change-Id: I66cdc8fd930dd6f7ad6888116d1419ad8f8b8ed8
Signed-off-by: Jagpal Singh Gill <paligill@gmail.com>

show more ...

9695bd2801-Oct-2025 Jagpal Singh Gill <paligill@gmail.com>

modbus_rtu_lib: define read holding register

Add the modbus rtu library commands with initial support for read
holding register. Define a base Message classes which all subsequent and
specific reque

modbus_rtu_lib: define read holding register

Add the modbus rtu library commands with initial support for read
holding register. Define a base Message classes which all subsequent and
specific request & response messages can inherit from. Also add the
relevant unit testing for the added command set.

Tested:
```
> meson test -C builddir
ninja: Entering directory `/host/repos/Modbus/phosphor-modbus/builddir'
ninja: no work to do.
1/1 test_modbus_commands OK 0.01s

Ok: 1
Fail: 0

```

Change-Id: I331b0dee66a0829e9352ae0eac8ac82a9150904c
Signed-off-by: Jagpal Singh Gill <paligill@gmail.com>

show more ...

0fffb59b21-May-2025 Jagpal Singh Gill <paligill@gmail.com>

tests: add dir and meson option

Add tests dir and meson option to enable tests.

Tested: meson build passed.

Change-Id: I8fce7227664e3ae9d41d25a8d22196baad59ed20
Signed-off-by: Jagpal Singh Gill <p

tests: add dir and meson option

Add tests dir and meson option to enable tests.

Tested: meson build passed.

Change-Id: I8fce7227664e3ae9d41d25a8d22196baad59ed20
Signed-off-by: Jagpal Singh Gill <paligill@gmail.com>

show more ...

fa4a787620-May-2025 Jagpal Singh Gill <paligill@gmail.com>

add rtu and common dirs

Add rtu (remote terminal unit) and common dirs and enable this in top
level meson.build file. Add meson option for modbus-rtu and
conditionally include rtu based on this opti

add rtu and common dirs

Add rtu (remote terminal unit) and common dirs and enable this in top
level meson.build file. Add meson option for modbus-rtu and
conditionally include rtu based on this option.

Tested: meson build passed.

Change-Id: I9b3b061cf31ebb5195854f89ce399bc765c64a85
Signed-off-by: Jagpal Singh Gill <paligill@gmail.com>

show more ...

bb82b5d830-May-2025 Patrick Williams <patrick@stwcx.xyz>

clang-tidy: format with config-clang-tidy

Reformat the .clang-tidy file for consistency using the
config-clang-tidy tool from openbmc-build-scripts.

Change-Id: I90e028e21d3bae120e22b42560222592f82f

clang-tidy: format with config-clang-tidy

Reformat the .clang-tidy file for consistency using the
config-clang-tidy tool from openbmc-build-scripts.

Change-Id: I90e028e21d3bae120e22b42560222592f82fa012
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...

0fa12d2c20-May-2025 Jagpal Singh Gill <paligill@gmail.com>

clang-tidy: add the spec file

Tested: clang-tidy passed.

Change-Id: Ib8f86c01da61c93ecd6a149e1314bf3d3945d323
Signed-off-by: Jagpal Singh Gill <paligill@gmail.com>

3ce3b88a20-May-2025 Jagpal Singh Gill <paligill@gmail.com>

clang-format: add the spec file

Add the latest clang-format spec file from style/cpp/.clang-format.

Change-Id: I522250b6ad9078ea848658f78fdd1550dd995e0b
Signed-off-by: Jagpal Singh Gill <paligill@g

clang-format: add the spec file

Add the latest clang-format spec file from style/cpp/.clang-format.

Change-Id: I522250b6ad9078ea848658f78fdd1550dd995e0b
Signed-off-by: Jagpal Singh Gill <paligill@gmail.com>

show more ...

6151566b20-May-2025 Jagpal Singh Gill <paligill@gmail.com>

add meson.build

Add meson.build file with project description and default dependency
list.

Tested: meson build passed.

Change-Id: I495b665b9f64b7f000a63c085c07f6babc06327f
Signed-off-by: Jagpal Si

add meson.build

Add meson.build file with project description and default dependency
list.

Tested: meson build passed.

Change-Id: I495b665b9f64b7f000a63c085c07f6babc06327f
Signed-off-by: Jagpal Singh Gill <paligill@gmail.com>

show more ...

37651b8020-May-2025 Jagpal Singh Gill <paligill@gmail.com>

add .gitignore file

Add .gitignore to specify list of temporary files to be ignored by git.

Change-Id: Icdd23874dc22ba69c67bb5cef611d51ccf3b665e
Signed-off-by: Jagpal Singh Gill <paligill@gmail.com>

d91ef99020-May-2025 Jagpal Singh Gill <paligill@gmail.com>

subprojects: add sdbusplus

Add wrap file for sdbusplus to subprojects.

Change-Id: I3218f6335d4dfd2f07576d602ed39809cb01706c
Signed-off-by: Jagpal Singh Gill <paligill@gmail.com>

932fb38820-May-2025 Jagpal Singh Gill <paligill@gmail.com>

subprojects: add phosphor-logging

Add wrap file for phosphor-logging to subprojects.

Change-Id: I57738bb307b66f6f899b359f6b36d2e0d74d7363
Signed-off-by: Jagpal Singh Gill <paligill@gmail.com>

567c83a820-May-2025 Jagpal Singh Gill <paligill@gmail.com>

subprojects: add phosphor-dbus-interfaces

Add wrap file for phosphor-dbus-interfaces to subprojects.

Change-Id: Idfe431d718f83cd892cc3d8f28fbee5bf602a458
Signed-off-by: Jagpal Singh Gill <paligill@

subprojects: add phosphor-dbus-interfaces

Add wrap file for phosphor-dbus-interfaces to subprojects.

Change-Id: Idfe431d718f83cd892cc3d8f28fbee5bf602a458
Signed-off-by: Jagpal Singh Gill <paligill@gmail.com>

show more ...

12