Skip to content

Commit

Permalink
Added an adaptation page, updated some of the content on the sequenci…
Browse files Browse the repository at this point in the history
…ng page
  • Loading branch information
cohansen committed Jun 17, 2024
1 parent 8b55e94 commit 875e94c
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 17 deletions.
31 changes: 31 additions & 0 deletions docs/sequencing/adaptation.mdx
Original file line number Diff line number Diff line change
@@ -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);
```
29 changes: 12 additions & 17 deletions docs/sequencing/editor.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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.
1 change: 1 addition & 0 deletions generate-pdfs/aerie-users-guide.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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/
1 change: 1 addition & 0 deletions sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@ const sidebars = {
},
items: [
'sequencing/editor',
'sequencing/adaptation',
{
label: 'Seq JSON Schema',
type: 'link',
Expand Down

0 comments on commit 875e94c

Please sign in to comment.