fw-update: Implement RequestFirmwareData timeout (UA_T2)
This commit introduces the UA_T2 timeout mechanism for the
RequestFirmwareData command as specified in the Timing Specification
section of the PLDM Firmware Update Specification. The Update Agent(UA),
which orchestrates firmware updates to devices, will now enforce this
timeout to ensure reliable update processes.
The timeout has a default value of 60 seconds is set according to the
PLDM specification's minimum requirement for UA_T2.
Tests:
- Simulating a timeout by turning off the components during a FW update
```
Decoded fw request data at offset '589824' and length '4096' for endpoint ID 26 and Component index 0
Decoded fw request data at offset '663552' and length '4096' for endpoint ID 18 and Component index 0
Request firmware data timed out. No command received from FD within the expected time of 60s from endpoint ID 26, component index 0
Sending cancel update component request for endpoint ID 26
8c 05 1c
Request firmware data timed out. No command received from FD within the expected time of 60s from endpoint ID 18, component index 0
Sending cancel update component request for endpoint ID 18
8c 05 1c
```
Change-Id: I9d34bffa0a4be81d3e8564994a2ea0ef6f2aecd6
Signed-off-by: P Arun Kumar Reddy <arunpapannagari23@gmail.com>
diff --git a/meson.build b/meson.build
index 3c7db76..945886f 100644
--- a/meson.build
+++ b/meson.build
@@ -137,6 +137,7 @@
get_option('default-sensor-update-interval'),
)
conf_data.set('SENSOR_POLLING_TIME', get_option('sensor-polling-time'))
+conf_data.set('UPDATE_TIMEOUT_SECONDS', get_option('update-timeout-seconds'))
configure_file(output: 'config.h', configuration: conf_data)