MFD> Service State Diagram and FSM tables

From: McDonald, Ira (imcdonald@sharplabs.com)
Date: Fri Aug 10 2007 - 16:17:50 EDT

  • Next message: Petrie, Glen: "MFD> some comments on the MFD req doc"

    Hi,

    Please see below:

    (a) Notes
    (b) Service State Diagram (any Imaging Service)
    (c) Service Operations FSM table
    (d) Service Events FSM table

    Purposely NOT addressed are the large number Job Operations
    (except to send the E.startJob and E.endJob events into the
    Service FSM).

    Apologies for the text state diagram - my UML and other
    drawing tools all defeated me.

    Comments?

    Cheers,
    - Ira

    Ira McDonald (Musician / Software Architect)
    Chair - Linux Foundation Open Printing WG
    Blue Roof Music / High North Inc
    PO Box 221 Grand Marais, MI 49839
    phone: +1-906-494-2434
    email: imcdonald@sharplabs.com

    -----------------------------------------------------------------------

           MFD Service State Diagram and FSM Proposal - 10 August 2007
           ===========================================================

    Notes:

    (0) Notation
        ~ = logical NOT (e.g., ~C.paused means "not paused")
        C = prefix of a condition (i.e., state reason in IPP)
        E = prefix of an event (e.g., E.endJob means "job completed")
        titlecase = state (e.g., Idle), operation (e.g., Startup), or phase
        lowercase = action function (in FSM)

    (1) Service State Diagram is divided into three phases:
        - <Init> - Unknown state - immediately after service creation
        - <Offline> - Down and Testing states - no user jobs are processed
        - <Online> - Idle, Processing, and Stopped states - just like IPP

    (2) Startup and Restart replace IPP Activate
        (Activate is NOT defined in DPA, ISO 10175 - it's IPP convenience)
        - Startup (Unknown/Init) sends E.startup and goes to (Down/Offline)
        - Startup (Down/Offline) is a synonym for Restart
        - Restart (Down/Offline) initializes and goes to (Idle/Online)

    (3) Shutdown replaces IPP Deactivate (but does NOT delete Service)
        (Deactivate is NOT defined in DPA, ISO 10175 - it's IPP convenience)
        - Shutdown (Testing|Idle|Stopped) goes to (Down/Offline)
        - Shutdown (Processing) sends E.shutdown and stays in (Processing)

    (4) Testing
        (Testing is an extension of Control in DPA, ISO 10175 - not in IPP)
        - Testing (Down|Stopped) goes to (Testing/Offline)
        - Testing (Idle|Processing) is an error

    (5) "Other" state should be deleted from MFD spec (and XML schema)

    (6) Two FSM tables below for Operations and Events

                            SERVICE STATE DIAGRAM

                            +-------------------------------+
                            | |
        <Online> V V
                    +---> Idle <------> Processing <---> Stopped
     ~~~~~~~~~~~~~~ | ^ v v v
         <Init> | | | | |
    Unknown ------->+ | +--------------+--------------+ |
                    | | | |
     ~~~~~~~~~~~~~~ | v v v
        <Offline> +---> Down <-----------------------> Testing

                            SERVICE STATE MACHINE
                                (Operations)

    -----------|-----------|-----------|-----------|-----------|-----------|
    Input | State |
               |-----------|-----------|-----------|-----------|-----------|
               | Down | Testing | Idle |Processing | Stopped |
    -----------|-----------|-----------|-----------|-----------|-----------|
    Operation |action |action |action |action |action |
    (Condition)|(new state)|(new state)|(new state)|(new state)|(new state)|
    -----------|-----------|-----------|-----------|-----------|-----------|
    Disable |disable |disable |disable |disable |disable |
               | | |(Stopped) | | |
               | | | | | |
    Enable |enable |enable |enable |enable |enable |
    C.paused | | | | | |
               | | | | | |
    Enable |enable |enable |enable |enable |enable |
    ~C.paused | | | | |(Idle) |
               | | | | | |
    Pause |pause |pause |pause |pause |pause |
               | | |(Stopped) |(Stopped) | |
               | | | | | |
    Restart |restart |restart |restart |restart |restart |
    (Note 2) |(Idle) |(Idle) | |(Idle) |(Idle) |
               | | | | | |
    Resume |resume |resume |resume |resume |resume |
    C.disabled | | | | | |
               | | | | | |
    Resume |resume |resume |resume |resume |resume |
    ~C.disabled| | | | |(Idle) |
    ~C.critical| | | | | |
               | | | | | |
    Shutdown |ignore |shutdown |shutdown |shutdown |shutdown |
    (Note 3) | |(Down) |(Down) | |(Down) |
               | | | | | |
    Startup |restart |error |error |error |error |
    (Note 2) |(Idle) | | | | |
               | | | | | |
    Test |test |error |error |error |test |
    (Note 4) |(Testing) | | | |(Testing) |
    -----------|-----------|-----------|-----------|-----------|-----------|

                            SERVICE STATE MACHINE
                                  (Events)

    -----------|-----------|-----------|-----------|-----------|-----------|
    Input | State |
               |-----------|-----------|-----------|-----------|-----------|
               | Down | Testing | Idle |Processing | Stopped |
    -----------|-----------|-----------|-----------|-----------|-----------|
    Event |action |action |action |action |action |
    (Condition)|(new state)|(new state)|(new state)|(new state)|(new state)|
    -----------|-----------|-----------|-----------|-----------|-----------|
               | | | | | |
    E.critical |critical |critical |critical |critical |critical |
               | | |(Stopped) |(Stopped) | |
               | | | | | |
    E.endCrit |endCritical|endCritical|error |error |endCritical|
    ~C.paused | | | | |(Idle) |
               | | | | | |
    E.endJob |error |error |error |shutdown |error |
    C.shutdown | | | |(Down) | |
               | | | | | |
    E.endJob |error |error |error |pause |error |
    C.paused | | | |(Stopped) | |
               | | | | | |
    E.endJob |error |error |error |schedule |error |
    ~C.paused | | | |(Idle|Proc)| |
               | | | | | |
    E.endTest |error |testReport |error |error |error |
               | |(Down) | | | |
               | | | | | |
    E.endWarn |endWarning |endWarning |endWarning |endWarning |endWarning |
               | | | | | |
               | | | | | |
    E.startup |restart |error |error |error |error |
    (Note 2) |(Idle) | | | | |
               | | | | | |
    E.startJob |error |error |error |ignore |ignore |
    C.paused | | | | | |
               | | | | | |
    E.startJob |error |error |error |ignore |ignore |
    C.disabled | | | | | |
               | | | | | |
    E.startJob |error |error |schedule |schedule |ignore |
    ~C.disabled| | |(Processing| | |
               | | | | | |
    E.warning |warning |warning |warning |warning |warning |
               | | | | | |
    -----------|-----------|-----------|-----------|-----------|-----------|

    No virus found in this outgoing message.
    Checked by AVG Free Edition.
    Version: 7.5.476 / Virus Database: 269.11.11/944 - Release Date: 8/9/2007 2:44 PM
     



    This archive was generated by hypermail 2.1.4 : Fri Aug 10 2007 - 16:20:27 EDT