RiverWare 6.1: Unit Schemes
Unit Schemes: 7-25-2011 Status Report
Edit: 7-25-2011, Phil Weinstein, CADSWES

Note: To run the Unit Scheme Editor (including Unit Scheme management) in RiverWare 6.1 Development:

Work on Unit Schemes completed since last software meeting

... from Tuesday 7-19-2011 to Monday 7-25-2011:

RECENTLY COMPLETED FUNCTIONALITY:

  1. Unit Scheme "EFFECTS" are working -- needs more review and testing. (This is implemented only in Phil's builds; not checked in). The fundamental changes were to the representations of display attribute configuration values within the SeriesSlot, TableSlot and ScalarSlot classes from discrete fields to NumDisplayAttribs instances, and having general references to those entities use the new Unit Scheme switching mechanism implemented in the base Slot class -- except for references having to do with configuration of those entities (which applies specifically to the "local" NumDisplayAttribs instances).
  2. De-"effectizing": SlotConfigQtDlg (the main Slot config dialog) -- but needs more testing. Certain slot display attribute "clients" need to specifically use "local" display attributes instead of the unit scheme "switched" attributes. (Much of the remaining development work is of this type).
  3. XML serialization of Unit Schemes using QtXml DOM classes.
  4. Export and Import of Unit Schemes to individual XML-encoded files. Import allows either adding rules to current scheme, OR replacing the current scheme rules. The implementation includes substantially comprensive error reporting.
  5. Persistence of mutable Unit Schemes in the RiverWare model file.

RECENTLY COMPLETED SOFTWARE ARCHITECTURE IMPLEMENTATIONS:

  1. Moved MappedUnitScheme data classes to UnitScheme inner classes.
  2. Moved computed prioritized rules from UnitSchemeMgr to UnitScheme, for direct use of UnitScheme to provide NumDisplayAttribs values, in preparation for initialization algorithms and replacement of other clients of the current riverwareDB resource database.
  3. Layered reimplementation of internal UnitScheme initialization ... and "production" implementation of predefined schemes.
  4. Changed Slot Unit Scheme Attribute Cache from QList to QVector.
  5. Initial support for single-character Display Format codes, to support gradual migration from the two-character QString encoding. (The NumDisplayAttribs class uses single-character format codes, though it has methods to also support the two-character codes).

Major areas of remaining work:

(1) Unit Scheme De-"effectizing"

The "clients" of Slot display attributes which should not use the Unit Scheme "switched" variant of those entities need to be recoded to make explicit use of the "local" attributes residing on Slots (effectively, the "legacy" configurations). This applies to:

  1. Configuration dialogs. The main Slot Configuration Dialog (for Series and Table Slots: SlotConfigQtDlg) is basically done -- needs more testing. Similar configuration dialogs needing this treatment are:
    1. Periodic Slot Config Dialog (PeriodicSlotCfg),
    2. Scalar Slot Config Dialog (ScalarSlotCfgDlg)
    3. Multiple-Slot Configuration Dialog (aka "Configure Existing Slots" dialog, ConfigSlotsDlg),
    4. Accounting System Configuration Dialog (AccountingSysConfigDlg)
  2. Certain default cases in DMI, including old-style DMIs where the control files don't specify units, and Excel database DMIs.
  3. Open Slot Dialog's "Local Slot Units Override" Display Mode (forcing the Local Scheme just in the dialog). This requirement involves not only accessing local display attributes, but also rewriting the "display string" preparation methods to conditionally use those attributes.

(2) Removal of the Resource Database ("riverwareDB" file); Use of the "Initialization Unit Scheme" for Slot initialization and default display attributes.

The "Initialization Unit Scheme" instance (of the UnitScheme class) is ready for replacement of display attribute-related references to the Resource Database. Resource Database entities not supported by Unit Schemes (i.e. min/max values: None; convergence type and limit) will supported by hard-coded defaults; users will have to configure those in the Multiple Slot Configuration and Accounting System Configuration dialogs.

However, if we decide to implement a migration capability from the Resource Database to the Initialization Unit Scheme, instead of removing the Resource Database code, will will have to retain much of it, but just limit the use of its API. This should, at least, be a first step in moving the Resource Database clients to the Initialization Unit Scheme.

Other TO DO:

(3) Numeric Dimension Display Attribute Support

This was overlooked in the original design. In addition to the array of NumDisplayAttribs which TableSlots maintain for each of their columns, a single NumDisplayAttribs instance needs to be supported for the Numeric Dimension. This will be parallel to the existing support in the Slot and TableSlot classes. Until this is implemented, Numeric Dimensions (Numeric Column Headers) will effectively be "stuck" on the "Local Scheme".

(4) Remaining GUI Development

(5) Architectural Tasks

Action Items

(1) Development Priorities (Next Steps)

(2) Review of Slot Class Hierarchy changes to support Unit Scheme "Effects"

Unit Scheme "Effects" seem to be working (i.e. in my own development area). Some testing and debugging has already been done.

In the modified Slot classes (in my development areas), the legacy display attribute data members have been REMOVED, and the new NumDisplayAttrib data members represent the actual "local" values. These changes have been coded and seem to be working for all three relevant Slot subclasses where display attributes live: SeriesSlot, TableSlot, and ScalarSlot. (See also the first item in the "Recently Completed" section at the top of this document).

The type of issue I'm concerned about is particular uses of display attributes explicitly using local attributes when, and only when necessary. I'd expect problems to show up only when a Unit Scheme other than the "Local" Unit Scheme is active.

See the changes in this Solaris development area (SIM library). Most architectural changes are in the SeriesSlot, TableSlot and ScalarSlot classes.

The implementation should be reviewed and tested AFTER the basic operation of the Configuration Dialogs has been finished (the next development step). It would be good to get this checked in (at least into a CVS branch, if necessary) before attempting architectural deviations, such as the implementation of a "Local Slot Units Override" mode.

(3) Minor Action Items:

--- (end) ---