Skip to content

Latest commit

 

History

History
293 lines (199 loc) · 5.86 KB

File metadata and controls

293 lines (199 loc) · 5.86 KB

Command line tools

Sen comes with a command line application (called sen) to help you perform some actions following the approach taken by git.

The best way to familiarize yourself with all the commands and the available options is to do --help, starting with sen --help.

--8<-- "snippets/sen.sh"

You can also get help about the specific sub-commands.

For example:

# open a sen explorer window
sen explorer

# open a sen shell on the current terminal
sen shell

# connect to a remote sen application on localhost:8094
sen rshell localhost:8094

# starts a replay of an archive
sen replay my_archive

# runs a sen kernel from a configuration file
sen run my_config.yaml

Run

--8<-- "snippets/sen_run.sh"

The configuration file uses YAML. Its sections, every key the kernel understands, environment-variable substitution and the include merging rules are documented in The configuration file, which is the reference for the format.

A short example, so this page stands on its own:

load:
  - name: shell
    group: 2
    open: [ local.counters ]

build:
  - name: counterComponent
    group: 3
    freqHz: 2
    imports: [ my_counter ]
    objects:
      - name: myCounter
        class: my_counter.CounterImpl
        bus: local.counters
        step: 5

Code generator

sen generate is a thin command-line front-end over the sen::gen library, which implements the underlying generators.

--8<-- "snippets/sen_generate.sh"

C++

--8<-- "snippets/sen_generate_cpp.sh"

C++ from STL

--8<-- "snippets/sen_generate_cpp_stl.sh"

C++ from HLA FOMs

--8<-- "snippets/sen_generate_cpp_fom.sh"

C++ exports

--8<-- "snippets/sen_generate_cpp_exports.sh"

UML

Works the same way as C++, but with slightly different options.

--8<-- "snippets/sen_generate_uml.sh"

UML from STL

--8<-- "snippets/sen_generate_uml_stl.sh"

UML from HLA FOMs

--8<-- "snippets/sen_generate_uml_fom.sh"

MKDocs markdown

Works the same way as C++, but with slightly different options.

--8<-- "snippets/sen_generate_mkdocs.sh"

MKDocs from STL

--8<-- "snippets/sen_generate_mkdocs_stl.sh"

MKDocs from HLA FOMs

--8<-- "snippets/sen_generate_mkdocs_fom.sh"

HTML reference

Renders the data model as a small web application: a tree, a search, and a page per type. It needs no server and no network, so the output opens straight from a file.

--8<-- "snippets/sen_generate_html.sh"

HTML from STL

--8<-- "snippets/sen_generate_html_stl.sh"

HTML from HLA FOMs

--8<-- "snippets/sen_generate_html_fom.sh"

Typeset reference (PDF)

Renders the data model as a Typst document, in the shape of an interface control document: an overview, a class hierarchy, a table per type and an index. It writes Typst source rather than a PDF, so producing one is a separate step with the Typst compiler.

What the document contains, and what it looks like, is set by the options rather than inferred from the model.

--8<-- "snippets/sen_generate_typst.sh"

Typst from STL

--8<-- "snippets/sen_generate_typst_stl.sh"

Typst from HLA FOMs

--8<-- "snippets/sen_generate_typst_fom.sh"

JSON schemas

Generates json schemas from a Sen data model.

JSON schemas for Sen components from STL

--8<-- "snippets/sen_generate_json_component_stl.sh"

JSON schemas for Sen components from HLA FOMs

--8<-- "snippets/sen_generate_json_component_fom.sh"

JSON schemas for Sen packages from STL

--8<-- "snippets/sen_generate_json_package_stl.sh"

JSON schemas for Sen packages from HLA FOMs

--8<-- "snippets/sen_generate_json_package_fom.sh"

Combine multiple JSON schemas to create a kernel configuration schema

--8<-- "snippets/sen_generate_json_schema.sh"

Python

--8<-- "snippets/sen_generate_py.sh"

Python from STL

--8<-- "snippets/sen_generate_py_stl.sh"

Python from HLA FOMs

--8<-- "snippets/sen_generate_py_fom.sh"

TypeScript

TypeScript generation reads STL only; there is no FOM subcommand today.

--8<-- "snippets/sen_generate_ts.sh"

TypeScript from STL

--8<-- "snippets/sen_generate_ts_stl.sh"

Archiving utility

Helps you interact with archives. "Archive" and "recording" are the same thing here: the recorder writes a recording, and sen archive is the command that inspects one.

--8<-- "snippets/sen_archive.sh"

Basic information

--8<-- "snippets/sen_archive_info.sh"

Indexed objects

--8<-- "snippets/sen_archive_indexed.sh"

Packaging utility

--8<-- "snippets/sen_package.sh"

Package skeleton creation

--8<-- "snippets/sen_package_init.sh"

Component skeleton creation

--8<-- "snippets/sen_package_init-component.sh"

File to array utility

--8<-- "snippets/sen_file_to_array.sh"