Skip to content

Add Simple Command Sequencer - #178

Open
owhite7128 wants to merge 18 commits into
lasp:mainfrom
owhite7128:Command_Sequencer
Open

Add Simple Command Sequencer#178
owhite7128 wants to merge 18 commits into
lasp:mainfrom
owhite7128:Command_Sequencer

Conversation

@owhite7128

Copy link
Copy Markdown
Collaborator

This component adds functionality to define command sequences in YAML that can be run through this component. It has support for simple time sleeping in sequences, a few useful flags to allow control of flow, and dynamic arguments that can be passed in when the sequence is run instead of at compile time.

@owhite7128
owhite7128 requested a review from dinkelk May 8, 2026 19:01
Comment thread src/components/simple_command_sequencer/gen/__init__.py
@owhite7128
owhite7128 force-pushed the Command_Sequencer branch from 77a7208 to fe41448 Compare May 9, 2026 19:25
Comment thread src/components/simple_command_sequencer/types/run_sequence_arg.record.yaml Outdated
Comment thread src/components/simple_command_sequencer/types/sequence_sleep_arg.record.yaml Outdated
Comment thread src/components/simple_command_sequencer/types/simple_sequencer_types.ads Outdated
Comment thread src/components/simple_command_sequencer/types/run_sequence_arg.record.yaml Outdated
Comment thread src/components/simple_command_sequencer/types/run_sequence_arg.record.yaml Outdated
Comment thread src/components/simple_command_sequencer/gen/templates/command_sequences/name.ads Outdated
@owhite7128
owhite7128 force-pushed the Command_Sequencer branch from aea2185 to 0ef12fa Compare July 1, 2026 15:37
end case;
end record;

type Step_Array is array (Interfaces.Unsigned_32 range <>) of Step;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make this capped at 16-bits Interfaces.Unsigned_16


- name: Invalid_Command_Received
description: A command was received with invalid parameters.
param_type: Invalid_Command_Info.T No newline at end of file

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need data products. Frame running count, frame running HWM, num sequences started, num sequences finished success, num sequences failed, total commands sent, last sequence started ID, last sequence finished success, last sequence finished failure.

Comment thread gen/models/component.py
# The id_bases parameter already holds this value, so
# the parameter-sync that set_id_base() also performs
# is a no-op here.
suite.id_base = int(par.value)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like we need a public method to do this instead of hacking it. Maybe we just extend set_id_base with a second argument called assign_entity_ids which defaults to True, but we set it to false for this call.

Comment thread gen/models/assembly.py
# setup, keeping ids identical for every other component.
for suite in suite_list:
if suite.id_base is not None:
suite._set_ids(suite.id_base)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Calling a _ function seems hacky. Maybe we need a new public interface called something like assign_entity_ids_with_id_base, since the id base is already stored within the suite. Seems weird to grab it from the suite and pass it back into a private function. Open to other ideas too, but calling _ function is a no go.

- command: Component_A.Command_1
- command: Component_A.Command_2
arg: (Seconds => 3, Subseconds => 14)
- sleep: (Value => 3000)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Forcing the (Value => N) here seems unnecessary. Maybe we can just make it an integer in the schema?

- command: Component_A.Command_1
- command: Component_A.Command_2
arg: (Seconds => 3, Subseconds => 14)
- sleep: (Value => 3000)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can the sleep be dynamic (e.g. based on Arg?)

description: Run a command sequence by ID. Per-sequence wrapper commands are the operator-friendly form; this is the underlying backbone they all dispatch through.
arg_type: Run_Sequence_Arg.T

- name: Kill_All_Sequences

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to be able to just kill a specific frame too?

description: Id of a Command Sequence Registered with the Simple Command Sequencer
type: Interfaces.Unsigned_16
format: U16
- name: Response_Behavior

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This feature seems to be causing a lot of complexity. I am wondering if its worth considering removing it or changing it in some way. Let's discuss.


sequence:
- command: Sequencer.Sequence_C
arg: (Response_Behavior => Sequence_Enums.Sequence_Response_Behavior.Send_After_Sequence_Start)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, not sure I love this. Do we really need this. Could it be statically configured for each sequence similar to wait_for_command_completion for each sequence.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants