squishy.applets.SquishyApplet
¶
Todo
Flesh this out
- class squishy.applets.SquishyApplet¶
Squishy applet base class.
This is the abstract base class that is used to implement any possible applet for squishy.
It represents a combination of client-side python, and gateware that will run the the hardware platform.
Users can then invoke the build and execution of implemented applets by name.
- Variables:
preview (bool) – If the applet is a preview/pre-release applet.
pretty_name (str) – A pretty string name of the applet.
short_help (str) – A short section of help for the applet.
help (str) – A longer more detailed help string.
description (str) – A brief description about the applet.
hardware_rev (str, tuple) – A single string, or a tuple of strings for supported hardware revisions
- abstract init_applet(args: Namespace) AppletElaboratable ¶
Applet Initialization
Called to initialize the applet prior to the applet being built and ran
- Parameters:
args (argsparse.Namespace) – Any command line arguments passed.
- Returns:
The applet logic/elaboratable
- Return type:
AppletElaboratable
- Raises:
NotImplementedError – The abstract method must be implemented by the applet
- abstract register_args(parser: ArgumentParser) None ¶
Applet argument registration
Called to register any applet specific arguments.
- Parameters:
parser (argparse.ArgumentParser) – The root argparse parser.
- Raises:
NotImplementedError – The abstract method must be implemented by the applet
- abstract run(device: SquishyHardwareDevice, args: Namespace) int ¶
Applet run step
Called to run any specialized machinery for the applet.
- Parameters:
device (squishy.core.device.SquishyHardwareDevice) – The target squishy device.
args (argsparse.Namespace) – Any command line arguments passed.
- Returns:
0 if run was successful, otherwise an error code.
- Return type:
- Raises:
NotImplementedError – The abstract method must be implemented by the applet