From 875e94cbb8deca5c48623a3b263c4d413a110c1e Mon Sep 17 00:00:00 2001 From: Cody Hansen Date: Mon, 17 Jun 2024 10:56:45 -1000 Subject: [PATCH] Added an adaptation page, updated some of the content on the sequencing page --- docs/sequencing/adaptation.mdx | 31 +++++++++++++++++++++++++++++ docs/sequencing/editor.mdx | 29 +++++++++++---------------- generate-pdfs/aerie-users-guide.txt | 1 + sidebars.js | 1 + 4 files changed, 45 insertions(+), 17 deletions(-) create mode 100644 docs/sequencing/adaptation.mdx diff --git a/docs/sequencing/adaptation.mdx b/docs/sequencing/adaptation.mdx new file mode 100644 index 0000000..a12a0a7 --- /dev/null +++ b/docs/sequencing/adaptation.mdx @@ -0,0 +1,31 @@ +# Sequence Adaptation + +The sequence editor supports uploading a custom sequence adaptation through the Ditionaries page. This custom adaptation can overwrite various features inside of the editor including linting and autocomplete. + +The adaptation uses `globalThis` overrides and currently supports the following properties: + +```ts + globalThis.CONDITIONAL_KEYWORDS: { ELSE: string; ELSE_IF?: string[]; END_IF: string; IF: string[] } | undefined; + globalThis.LOOP_KEYWORDS: + | { + BREAK: string; + CONTINUE: string; + END_WHILE_LOOP: string; + WHILE_LOOP: string[]; + } + | undefined; + globalThis.GLOBALS = [{ name: string, type: 'int' | 'flt' | 'str' | 'unit' }] | undefined; + globalThis.ARG_DELEGATOR: [stem: string]: { + [arg: string]: + | undefined + | (( + argDef: FswCommandArgument, + paramDictionaries: ParameterDictionary[], + channelDictionary: ChannelDictionary | null, + precedingArgValues: string[], + ) => FswCommandArgument | undefined); + } | undefined; + function TO_SEQ_JSON(seqJson: SeqJson, parameterDictionaries: ParameterDictionary[], channelDictionary: ChannelDictionary | null); + function FROM_SEQ_JSON(seqJson: SeqJson, parameterDictionaries: ParameterDictionary[], channelDictionary: ChannelDictionary | null); + function LINT(commandDictionary: CommandDictionary | null, view: EditorView, node: SyntaxNode); +``` diff --git a/docs/sequencing/editor.mdx b/docs/sequencing/editor.mdx index fad4d52..651e746 100644 --- a/docs/sequencing/editor.mdx +++ b/docs/sequencing/editor.mdx @@ -43,27 +43,22 @@ Aerie editor allows authoring and viewing sequences in a user friendly format wh As explained earlier authoring a sequence simply means concatenating commands in the steps array. Example below illustrates how a simple sequence with a few commands and various time tags looks like. -```ts -export default () => - Sequence.new({ - seqId: '', - metadata: {}, - steps: [ - C.AVS_RESET_PCE, - C.BC_MANAGE_ACTIVE_BUS({ bus_side: 'BUS_A', ping_pong_enable_disable: 'DISABLE' }), - A('2024-123T00:00:00').EP_PPU_HEATER_SET({ cathode_heater_current_setpoint: 120, which_ppu: 'PPU1' }), - R('00:00:10').DP_PRIORITIZE({ dp_name: '/file/path', dp_priority: 23 }), - ], - }); ``` +R001T00:00:01 GROW_BANANA 1 60 +C PICK_BANANA -- Each command step must start with a time tag. Time tags supported in seqJSON are command complete ( `C.` ), absolute ( `A('2020-001T00:00:00')`), relative ( `R('00:00:00')` ), and epoch relative (`E('00:00:00')`). To understand how these time tags get executed on board, refer to your missions Sequencing FDD. -- To view list of commands, type a time tag and a dot. +C AVS_RESET_ECE +C BC_MANAGE_ACTIVE_BUS "BUS_A" "DISABLE" +A2024-123T00:00:00 PACKAGE_BANANA 0 ["lot_0" 1] +R00:00:10 THROW_BANANA 10 +``` + +- Each command step must start with a time tag. Time tags supported in seqJSON are command complete ( `C` ), absolute ( `A2020-001T00:00:00`), relative ( `R00:00:00` ), and epoch relative (`E00:00:00`). To understand how these time tags get executed on board, refer to your missions Sequencing FDD. +- To view list of commands, type a time tag and a space. - To filter commands, start typing the first few letters of the command stem. -- After selecting the command the parameters will be listed upon hovering the stem. -- If command has arguments type opening and closing brackets as follows `({ })` , and then list all args comma separated in the `({ name: value, name:value })` format. +- After selecting the command the parameters will be inside of the right "Selected Command" panel. +- If command has arguments they will be deliniated with a space. - Editor can autocomplete argument names with the `control + Space` shortcut. - For the enumerated args, `control + Space` can be used to select one of the defined enum values. -- All commands must be comma separated. - Errors will be linted with a red squiggly underline. Hovering over the error should provide explanation for the error as shown below. - Generate seqJSON will fail if you have errors in the sequence. diff --git a/generate-pdfs/aerie-users-guide.txt b/generate-pdfs/aerie-users-guide.txt index 77d8f1e..a23e940 100644 --- a/generate-pdfs/aerie-users-guide.txt +++ b/generate-pdfs/aerie-users-guide.txt @@ -24,4 +24,5 @@ https://nasa-ammos.github.io/aerie-docs/command-expansion/sequences/ https://nasa-ammos.github.io/aerie-docs/command-expansion/run-expansion/ https://nasa-ammos.github.io/aerie-docs/category/sequencing/ https://nasa-ammos.github.io/aerie-docs/sequencing/editor/ +https://nasa-ammos.github.io/aerie-docs/sequencing/adaptation/ https://nasa-ammos.github.io/aerie-docs/glossary/ diff --git a/sidebars.js b/sidebars.js index 2f49fc5..9f85cc2 100644 --- a/sidebars.js +++ b/sidebars.js @@ -220,6 +220,7 @@ const sidebars = { }, items: [ 'sequencing/editor', + 'sequencing/adaptation', { label: 'Seq JSON Schema', type: 'link',