I will be gradually implementing this in private, however I'm sharing this design specification such that others can excel in their applications with overlapping functionality in future. In particular, I'm not planning to make my version a CLI app, though it wouldn't be difficult to do if required, so I expect this calibre of work in a CLI capable app at some point.
General Principals
So far, only one, convention over configuration! IE, defaults in code, app only saves what you change such that config is small and tidy, config saved or chosen at runtime (and immediately written out to the config file) overrides code config.
Overall Module Or Application
Global Display Items
- Connect/Disconnect button - state change based on connection
- Reset on disconnect check box - enabled by default
- Reset & Reconnect button - greyed when not connected
- Abort Operation button - greyed when nothing is in progress
- Show/Hide Console Window button - always active, changes state when pushed or the window is closed.
- Device information - green LED when connected and detailed information, red LED when disconnected and blank info
- User goals tab set
- Progress bar for overall progress per goal - part of interface to goals
- Each user goal tab has two tabs - config and detailed progress
- Button at the bottom of the configuration "Start <Goal>" - greyed when all prerequisites aren't met
- Starting a goal switches to the detailed progress tab and locks out other actions until done
- Detailed progress is greyed and unreachable before starting action
- Detailed progress displays stages with progress bar for each stage
- Connection device
- Console logging on/off
- File logging overwrite/rotate
- Use broken erase-all function workaround - on by default, two options, decide which for default later
- Serial data format - 8N1 by default
- Device page and address ranges - FreeEMS values by default
- Number of low level tries to connect before fail
General Behaviours
File Selection & Loading Semantics
- Text field with file name
- Text field with file path
- Choose file button
- Select or type in file name/path
- Verify button - invokes actions:
- For input files check ability to read, check checksum, check contents
- For output files check ability to write, create empty file
- Text area with file stats: results from verify button actions
- Connect/Disconnect - connect uses config, disconnect just closes device, if resetting it sends bytes, pauses, then closes device, and shouldn't care about the response, only that it waited long enough.
- Erase device - to be thought through
- Rip device to file - initial tries, then pop up asking to try more or fail with some stats on how far it got.
- Load file to device - similar to rip semantics, independent config, uses rip and erase semantics where enabled
- Verify against file - uses rip semantics + fail on IO errors
- Compare two s19 files: just output messages or pop up for IO errors on chosen files and fail.
Foundation Functionality
Lower SM API layer provides raw calls that these use to do their individual tasks. Implementation below that API can change around without affecting the calls and results. Lower level implementation depends upon an abstract serial device implementation that can change in any way without affecting the calls and results.
SM Connection
- Requires serial device selection, similar display to file choice
- Requires attached SM capable device
- Requires user to activate
- Sends opening sequence and listens for either "fresh from reset" or "was already running", fails if one not found, succeeds otherwise.
- Requires "SM Connection"
- Requires "SM Connection"
- Erase only specific ranges - off by default - can be activated by callers, including user
- Standard mass erase
- Custom mass erase
- Page by page
- Requires "SM Connection"
- Rip only specific ranges - off by default - can be activated by callers, including user
- Requires "SM Connection"
- Load only specific ranges - off by default - can be activated by callers, including user
- Need to choose file - remember last dir and last file, possibly remember history
- Check file MD5 sum OR sha1 sum, file structure including line sums md5/sha1 are optional and automatic if matching file present.
- Display information about the parsed file, lead string, record type stats, total binary data to load, address ranges, checksum stats/statuses
User Goals
These have a GUI tab each, options and sequencing, the gui contains config each goal, plus the config inherited from each option with dependencies, on a selected basis.
- Erase device
- Rip device to file
- Load file to device
- Verify against file
- Compare two s19 files
Sequence: Configure >> Start Button >> Optional Rip To File >> Optional Erase >> Load Data >> Optional Full Post Verify >> Finish
(Note, configuring involves loading and verifying the data files in advance, this should be near instant)
- Requires "Selecting a file" - to load from
- Requires "Load data"
- Requires "Selecting a file" - to rip to, if rip first enabled make this transitive!
- Requires "Erase device" first - on by default - rarely turned off
- Requires "Rip device" first - on by default - turned off by devs
- Load only specific ranges - off by default - slow to configure or requires some sort of config drive
- Load only different parts - off by default - slow due to pre-rip
- Transitive: Requires "SM Connection"
- Records memory extents of last load for next time such that quick rip of last loaded file can be done.
Sequence: Configure >> Start Button >> Rip Relevant Data >> Optionally Save To File >> Compare Relevant Data >> Finish
- Requires "Selecting a file" - to compare to
- Requires "Rip device"
- Check only specific ranges - off by default - slow to configure or requires some sort of config drive
- Full rip first - off by default - slow and not required.
- Transitive: Requires "SM Connection"
Sequence: Configure >> Start Button >> Rip Relevant Data >> Save To File >> Finish
- Requires "Rip device"
- Requires "Selecting a file" - to rip to, if rip first enabled make this transitive!
- Rip only specific ranges - off by default - slow to configure or requires some sort of config drive
- Transitive: Requires "SM Connection"
- Option to rip only what was last loaded
Sequence: Configure >> Start Button >> Optionally Rip Relevant Data To File >> Erase Relevant Data >> Finish
- Requires "Erase device"
- Requires "SM Connection"
- Requires "Rip device" first - on by default - turned off by devs
- Erase only specific ranges - off by default - can be activated by callers, including user
Sequence: Configure >> Start Button >> Compare Data >> Optionally Write Report To File >> Finish
(Note, configuring involves loading and verifying the data files in advance, this should be near instant)
- Requires "Selecting a file" - file one
- Requires "Selecting a file" - file two
- Match patterns and sections and align lines based on start/end points such that visual diff apps work and git repos store well
- Leverage S19 tools package code?
- Launch external diff application?
- Provide this functionality LAST
If you can't make a fucking awesome loader from this description, something is wrong. Possibly with the description :-)
Fred.