Skip to content

Commit

Permalink
BICAS: Abolish CLI arg. --swdescriptor
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikPGJ committed Jul 24, 2024
1 parent 3484a86 commit 899aef1
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 22 deletions.
3 changes: 1 addition & 2 deletions mission/solar_orbiter/bicas/readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -443,15 +443,14 @@ ZVS
#############################
NOTE: The official CLI parameter syntax is defined in RCS ICD, Iss02 Rev02, Section 3.2.

SYNTAX 1: ( --version | --identification | --swdescriptor | --help ) <General parameters>
SYNTAX 1: ( --version | --identification | --help ) <General parameters>
SYNTAX 2: <S/W mode> <General parameters, Output parameter, Specific inputs parameters>

NOTE: In syntax 2, the position of the first arguments is important. The order
of all other (groups of) arguments is arbitrary.

--version Print the software version.
--identification Print the S/W descriptor release segment.
--swdescriptor Print the S/W descriptor (not RCS ICD requirement).
--help Print "help-ish" text


Expand Down
1 change: 1 addition & 0 deletions mission/solar_orbiter/bicas/release_notes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -196,3 +196,4 @@ Version x.x.x
* Rename setting
INPUT_CDF.GA_PROVIDER_MISMATCH_POLICY
-->INPUT_CDF.GA_PARENTS_MISMATCH_POLICY
* Abolish unofficial --swdescriptor argument and mode.
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
% Author: Erik P G Johansson, IRF, Uppsala, Sweden
%
function generate_official_SWD_file(filePath)
% PROPOSAL: Abolish the --swdescriptor argument.
% CON: No longer needed.

% Normalize filePath
if nargin == 0
Expand Down
7 changes: 4 additions & 3 deletions mission/solar_orbiter/bicas/src/+bicas/interpret_CLI_args.m
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
COPC_ARRAY = [...
bicas.utils.cli.OptionConfig('VERSION_OPTION_ID', '--version', '0-1', 0, 0); ...
bicas.utils.cli.OptionConfig('IDENTIFICATION_OPTION_ID', '--identification', '0-1', 0, 0); ...
bicas.utils.cli.OptionConfig('SWD_OPTION_ID', '--swdescriptor', '0-1', 0, 0); ...
%bicas.utils.cli.OptionConfig('SWD_OPTION_ID', '--swdescriptor', '0-1', 0, 0); ...
bicas.utils.cli.OptionConfig('HELP_OPTION_ID', '--help', '0-1', 0, 0); ...
bicas.utils.cli.OptionConfig('SWM_OPTION_ID', SWM_CLI_OPTION_REGEX, '0-1', 0, 0); ...
...
Expand Down Expand Up @@ -126,7 +126,7 @@
LogicalBfmidTable = {
~isempty(CovcMap('VERSION_OPTION_ID')), 'VERSION_BFM'; ...
~isempty(CovcMap('IDENTIFICATION_OPTION_ID')), 'IDENTIFICATION_BFM'; ...
~isempty(CovcMap('SWD_OPTION_ID')), 'SWD_BFM'; ...
%~isempty(CovcMap('SWD_OPTION_ID')), 'SWD_BFM'; ...
~isempty(CovcMap('HELP_OPTION_ID')), 'HELP_BFM'; ...
~isempty(CovcMap('SWM_OPTION_ID')), 'SWM_BFM'};
assert(...
Expand All @@ -139,7 +139,8 @@

switch CliData.bfmid

case {'VERSION_BFM', 'IDENTIFICATION_BFM', 'SWD_BFM', 'HELP_BFM'}
%case {'VERSION_BFM', 'IDENTIFICATION_BFM', 'SWD_BFM', 'HELP_BFM'}
case {'VERSION_BFM', 'IDENTIFICATION_BFM', 'HELP_BFM'}

CliData.swmArg = [];
CliData.SipMap = irf.ds.create_containers_Map('char', 'char', {}, {});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ function test0(testCase)
{'--identification'}, ...
'IDENTIFICATION_BFM', [], [], [], [], {{}, {}}, {{}, {}});

bicas.interpret_CLI_args___UTEST.test(testCase, ...
{'--swdescriptor'}, ...
'SWD_BFM', [], [], [], [], {{}, {}}, {{}, {}});
% bicas.interpret_CLI_args___UTEST.test(testCase, ...
% {'--swdescriptor'}, ...
% 'SWD_BFM', [], [], [], [], {{}, {}}, {{}, {}});



Expand Down
22 changes: 11 additions & 11 deletions mission/solar_orbiter/bicas/src/+bicas/main.m
Original file line number Diff line number Diff line change
Expand Up @@ -466,8 +466,8 @@ function main_without_error_handling(cliArgumentsCa, L)
case 'IDENTIFICATION_BFM'
print_identification(Swml, Bso)

case 'SWD_BFM'
print_SWD(Swml, Bso)
% case 'SWD_BFM'
% print_SWD(Swml, Bso)

case 'HELP_BFM'
print_help(Bso)
Expand Down Expand Up @@ -637,21 +637,21 @@ function print_identification(Swml, Bso)



% Print the JSON S/W descriptor.
% Print the JSON SWD.
%
% NOTE: Argument is *not* an instance of bicas.swm.SoftwareModeList.
%
% Author: Erik P G Johansson, IRF, Uppsala, Sweden
% First created 2016-06-07/2019-09-24
%
function print_SWD(Swml, Bso)

JsonSwd = bicas.get_SWD(Swml.List);
strSwd = bicas.utils.JSON_object_str(JsonSwd, ...
Bso.get_fv('JSON_OBJECT_STR.INDENT_SIZE'));
bicas.stdout_print(strSwd);

end
% function print_SWD(Swml, Bso)
%
% JsonSwd = bicas.get_SWD(Swml.List);
% strSwd = bicas.utils.JSON_object_str(JsonSwd, ...
% Bso.get_fv('JSON_OBJECT_STR.INDENT_SIZE'));
% bicas.stdout_print(strSwd);
%
% end



Expand Down
2 changes: 1 addition & 1 deletion mission/solar_orbiter/bicas/src/+bicas/main___UTEST.m
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ function test(varargin)
test('--help')
test('--version')
test('--identification')
test('--swdescriptor')
%test('--swdescriptor')
%
test('--help', '--set', 'SWM.L1-L2_ENABLED', '0')
test('--help', '--set', 'SWM.L1-L2_ENABLED', '1')
Expand Down

0 comments on commit 899aef1

Please sign in to comment.