Skip to content

Commit

Permalink
Add Validate enum & case in Parameter Store & Parameters components
Browse files Browse the repository at this point in the history
  • Loading branch information
Jbsco committed Aug 5, 2024
1 parent 819fa42 commit 5211d7b
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,14 @@ package body Component.Parameter_Store.Implementation is
Byte_Array_Pointer.Copy_To (Ptr, Self.Bytes.all);
-- Send info event:
Self.Event_T_Send_If_Connected (Self.Events.Parameter_Table_Fetched (Self.Sys_Time_T_Get, Arg.Region));
when Validate =>
-- TODO Validate the parameter table:
-- TODO Check for length error, CRC, Validate_Parameters_Action:
-- TODO Send events/data product:
-- TODO Return status:
-- To_Return := (Region => Arg.Region, Status => Validation_Error);
To_Return := (Region => Arg.Region, Status => Success);

end case;
end;
end if;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,14 @@ package body Component.Parameters.Implementation is
-- The memory region needs to be filled by the current values of all our active parameters:
when Get =>
To_Return := Self.Copy_Parameter_Table_To_Region (Arg.Region);
when Validate =>
-- TODO Validate the parameter table:
-- TODO Check for length error, CRC, Validate_Parameters_Action:
-- TODO Send events/data product:
-- TODO Return status:
-- To_Return := (Region => Arg.Region, Status => Validation_Error);
To_Return := (Region => Arg.Region, Status => Success);

end case;
end if;

Expand Down
5 changes: 4 additions & 1 deletion src/types/parameter/parameter_enums.enums.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ enums:
- name: Set
value: 1
description: Set the current values of the parameters.
- name: Validate
value: 2
description: Validate the current values of the parameters.
- name: Parameter_Table_Update_Status
description: This status enumeration provides information on the success/failure of a parameter table update.
literals:
Expand All @@ -54,7 +57,7 @@ enums:
description: The computed CRC of the table does not match the stored CRC.
- name: Parameter_Error
value: 3
description: Failed to fetch or update an individual parameter within a component.
description: An individual parameter was found invalid due to a constraint error within a component, or failing component-specific validation.
- name: Dropped
value: 4
description: The operation could not be performed because it was dropped from a full queue.
Expand Down

0 comments on commit 5211d7b

Please sign in to comment.