Differences between revisions 1 and 2
Deletions are marked like this. Additions are marked like this.
Line 36: Line 36:
 * Data in JSON format is download from the server  * Data in JSON format is download from the server, from the following tables:
Line 39: Line 39:
   * '''photos''' - Inspection Photos (''not implemented yet'')
Line 40: Line 41:
 * Semantics: === Download Algorithm ===

For a single downloaded record:

 * Select record with matching ''id'' in local database:

 * No existing record:
   * Insert the downloaded record
     * Set ''local_is_dirty'' = 0
     * Set ''local_is_conflict'' =0
     * Local DB server sets ''local_id''

 * Found existing record:
   * Is ''update_count'' in existing record >=



Line 45: Line 63:
  

V2 Inspector2 Specification

V2Master | V2HighLevelDesign

Introduction

Main Menu

  • Home -

  • Inspection Records - Displays a list of Inspection Records

  • Inspection Items - Displays a list of Inspection Items

  • Synchronize - Displays counts of Inspection Records and Inspection Items. Buttons for Upload and Download data.

  • Preferences -

  • About Inspector - Displays Inspector version number and release date

  • Contact Us

Screens

  • to be completed

Data Synchronization

Key data fields for synchronization:

  • local_id - Primary key in the device (local) database

  • local_is_dirty - If set to on-zero, then the record has been changed on the device

  • local_is_conflict - If set, then the record has been change on the device and the server, and cannot be uploaded

  • id - The server's primary key

  • update_count - The server's update count. The device should never change this field

Download

  • Data in JSON format is download from the server, from the following tables:
    • tags - Inspection Items

    • scans - Inspection Records

    • photos - Inspection Photos (not implemented yet)

Download Algorithm

For a single downloaded record:

  • Select record with matching id in local database:

  • No existing record:
    • Insert the downloaded record
      • Set local_is_dirty = 0

      • Set local_is_conflict =0

      • Local DB server sets local_id

  • Found existing record:
    • Is update_count in existing record >=

Data Upload

V2Inspector2Specification (last edited 2016-04-06 08:09:11 by 172)

Copyright 2008-2014, SoftXS GmbH, Switzerland