From c951b06cb1604b3605417503bf32fe2fbd10f751 Mon Sep 17 00:00:00 2001 From: Jacob Seman <90524106+Jbsco@users.noreply.github.com> Date: Wed, 14 Aug 2024 09:26:48 -0600 Subject: [PATCH] Add events for starting/finished table validation --- .../parameters/parameters.events.yaml | 6 ++++++ ...onent-parameters-implementation-tester.adb | 19 +++++++++++++++++++ ...onent-parameters-implementation-tester.ads | 8 ++++++++ 3 files changed, 33 insertions(+) diff --git a/src/components/parameters/parameters.events.yaml b/src/components/parameters/parameters.events.yaml index 82493827..0658948c 100644 --- a/src/components/parameters/parameters.events.yaml +++ b/src/components/parameters/parameters.events.yaml @@ -40,6 +40,12 @@ events: - name: Finished_Parameter_Table_Update description: Done updating the parameters from a received memory region with following status. param_type: Parameters_Memory_Region_Release.T + - name: Starting_Parameter_Table_Validate + description: Starting validation of the parameters from a received memory region. + param_type: Memory_Region.T + - name: Finished_Parameter_Table_Validate + description: Done validating the parameters from a received memory region with following status. + param_type: Parameters_Memory_Region_Release.T - name: Starting_Parameter_Table_Fetch description: Starting updating of the parameters from a received memory region. param_type: Memory_Region.T diff --git a/src/components/parameters/test/component-parameters-implementation-tester.adb b/src/components/parameters/test/component-parameters-implementation-tester.adb index b698f209..d5e7a331 100644 --- a/src/components/parameters/test/component-parameters-implementation-tester.adb +++ b/src/components/parameters/test/component-parameters-implementation-tester.adb @@ -37,6 +37,8 @@ package body Component.Parameters.Implementation.Tester is Self.Finished_Dumping_Parameters_History.Init (Depth => 20); Self.Starting_Parameter_Table_Update_History.Init (Depth => 20); Self.Finished_Parameter_Table_Update_History.Init (Depth => 20); + Self.Starting_Parameter_Table_Validate_History.Init (Depth => 20); + Self.Finished_Parameter_Table_Validate_History.Init (Depth => 20); Self.Starting_Parameter_Table_Fetch_History.Init (Depth => 20); Self.Finished_Parameter_Table_Fetch_History.Init (Depth => 20); Self.Invalid_Command_Received_History.Init (Depth => 20); @@ -76,6 +78,8 @@ package body Component.Parameters.Implementation.Tester is Self.Finished_Dumping_Parameters_History.Destroy; Self.Starting_Parameter_Table_Update_History.Destroy; Self.Finished_Parameter_Table_Update_History.Destroy; + Self.Starting_Parameter_Table_Validate_History.Destroy; + Self.Finished_Parameter_Table_Validate_History.Destroy; Self.Starting_Parameter_Table_Fetch_History.Destroy; Self.Finished_Parameter_Table_Fetch_History.Destroy; Self.Invalid_Command_Received_History.Destroy; @@ -292,6 +296,21 @@ package body Component.Parameters.Implementation.Tester is Self.Finished_Parameter_Table_Update_History.Push (Arg); end Finished_Parameter_Table_Update; + -- Starting validation of the parameters from a received memory region. + overriding procedure Starting_Parameter_Table_Validate (Self : in out Instance; Arg : in Memory_Region.T) is + begin + -- Push the argument onto the test history for looking at later: + Self.Starting_Parameter_Table_Validate_History.Push (Arg); + end Starting_Parameter_Table_Validate; + + -- Done validating the parameters from a received memory region with following + -- status. + overriding procedure Finished_Parameter_Table_Validate (Self : in out Instance; Arg : in Parameters_Memory_Region_Release.T) is + begin + -- Push the argument onto the test history for looking at later: + Self.Finished_Parameter_Table_Validate_History.Push (Arg); + end Finished_Parameter_Table_Validate; + -- Starting updating of the parameters from a received memory region. overriding procedure Starting_Parameter_Table_Fetch (Self : in out Instance; Arg : in Memory_Region.T) is begin diff --git a/src/components/parameters/test/component-parameters-implementation-tester.ads b/src/components/parameters/test/component-parameters-implementation-tester.ads index 77b1f87b..ba2a8981 100644 --- a/src/components/parameters/test/component-parameters-implementation-tester.ads +++ b/src/components/parameters/test/component-parameters-implementation-tester.ads @@ -51,6 +51,8 @@ package Component.Parameters.Implementation.Tester is package Finished_Dumping_Parameters_History_Package is new Printable_History (Natural, Natural'Image); package Starting_Parameter_Table_Update_History_Package is new Printable_History (Memory_Region.T, Memory_Region.Representation.Image); package Finished_Parameter_Table_Update_History_Package is new Printable_History (Parameters_Memory_Region_Release.T, Parameters_Memory_Region_Release.Representation.Image); + package Starting_Parameter_Table_Validate_History_Package is new Printable_History (Memory_Region.T, Memory_Region.Representation.Image); + package Finished_Parameter_Table_Validate_History_Package is new Printable_History (Parameters_Memory_Region_Release.T, Parameters_Memory_Region_Release.Representation.Image); package Starting_Parameter_Table_Fetch_History_Package is new Printable_History (Memory_Region.T, Memory_Region.Representation.Image); package Finished_Parameter_Table_Fetch_History_Package is new Printable_History (Parameters_Memory_Region_Release.T, Parameters_Memory_Region_Release.Representation.Image); package Invalid_Command_Received_History_Package is new Printable_History (Invalid_Command_Info.T, Invalid_Command_Info.Representation.Image); @@ -86,6 +88,8 @@ package Component.Parameters.Implementation.Tester is Finished_Dumping_Parameters_History : Finished_Dumping_Parameters_History_Package.Instance; Starting_Parameter_Table_Update_History : Starting_Parameter_Table_Update_History_Package.Instance; Finished_Parameter_Table_Update_History : Finished_Parameter_Table_Update_History_Package.Instance; + Starting_Parameter_Table_Validate_History : Starting_Parameter_Table_Validate_History_Package.Instance; + Finished_Parameter_Table_Validate_History : Finished_Parameter_Table_Validate_History_Package.Instance; Starting_Parameter_Table_Fetch_History : Starting_Parameter_Table_Fetch_History_Package.Instance; Finished_Parameter_Table_Fetch_History : Finished_Parameter_Table_Fetch_History_Package.Instance; Invalid_Command_Received_History : Invalid_Command_Received_History_Package.Instance; @@ -177,6 +181,10 @@ package Component.Parameters.Implementation.Tester is overriding procedure Starting_Parameter_Table_Update (Self : in out Instance; Arg : in Memory_Region.T); -- Done updating the parameters from a received memory region with following status. overriding procedure Finished_Parameter_Table_Update (Self : in out Instance; Arg : in Parameters_Memory_Region_Release.T); + -- Starting validation of the parameters from a received memory region. + overriding procedure Starting_Parameter_Table_Validate (Self : in out Instance; Arg : in Memory_Region.T); + -- Done validating the parameters from a received memory region with following status. + overriding procedure Finished_Parameter_Table_Validate (Self : in out Instance; Arg : in Parameters_Memory_Region_Release.T); -- Starting updating of the parameters from a received memory region. overriding procedure Starting_Parameter_Table_Fetch (Self : in out Instance; Arg : in Memory_Region.T); -- Done updating the parameters from a received memory region with following status.