This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| android:jobsite:smartsuiteconfiguration [2014/02/26 01:35] mjallison | android:jobsite:smartsuiteconfiguration [2014/04/09 17:42] (current) mjallison | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | Configuration objects are represented as a JSON object. The Access API allows you to grab the configuration object via a stream. This example shows a fully populated configuration object. The "ui" object and "job" object are optional.  | ||
| - | Mumble Mumble... early thoughts of the configuration file format. | + | The "ui" object will contain all the value, or none. For the "job" object, any one of the values may not be present. | 
| <code> | <code> | ||
| - | <configuration type="SmartTrack"> | + | { | 
| - | <job> | + | "configuration.type": "SmartTrack" | 
| - | <cycleline name="line1">n,m,p n,m,p n,m,p n,m,p n,m,p n,m,p n,m,p</cycleline> | + | "ui": { | 
| - | <haulpath name="path1">n,m,p n,m,p n,m,p n,m,p n,m,p</haulpath>\ | + | "gps.northup": false, | 
| - | <warningarea name="area1">n,m,p n,m,p n,m,p n,m,p n,m,p n,m,p n,m,p n,m,p n,m,p</warningarea> | + | "gps.usecompass": false, | 
| - | </job> | + | "screen.visible": false, | 
| - | <ui> | + | "statistics.visible": false, | 
| - | <settings visible="true"> | + | "login.visible": false, | 
| - | <filelist visible="true"> | + | "settings.visible": false, | 
| - | <gps visible="true"> | + | "preferences.visible": false, | 
| - | <northup value="true"> | + | "screenblanking.on": true, | 
| - | <usecompass value="true"> | + | "units.is.metric": false, | 
| - | </gps> | + | "track.cycles.displayed": false, | 
| - | <preferences visible="true"> | + | "gps.visible": false, | 
| - | <screen visible="true"> | + | "screenblanking.speed": 5, | 
| - | <machine visible="true"> | + | "cut.fill.setting": false, | 
| - | <login visible="true"> | + | "filelist.visible": false, | 
| - | </preferences> | + | "machine.visible": false | 
| - | <screenblanking value="10"> | + | }, | 
| - | <statistics visible="true"> | + | "job": { | 
| - | </ui> | + | "haulpath": "37.69827167784122,-121.81372338848165 37.698729396233624,-121.81368534695918 37.69895363855252,-121.81300747292565 37.69891010564817,-121.81236937168113 37.6986660738121,-121.81176326223982 37.69805798205796,-121.8118203404538 37.697965654517965,-121.81261579744947 37.69790578375631,-121.81332928842612 37.698267156656364,-121.81374629148586", | 
| - | </configuration> | + | "cyclelines": [ | 
| + | "37.69856055410253,-121.81389631635922 37.69853417331307,-121.8129590554174" | ||
| + | ], | ||
| + | "jobfileid": "241", | ||
| + | "jobfile": "\/Projects\/Samples\/Job Files\/City of Livermore.adf" | ||
| + | }, | ||
| + | } | ||
| </code> | </code> | ||
| - | Notes: | ||
| - | * Cycleline, haulpath, and warningarea may have zero or more instances. | ||
| - | * Other values have precisely one entry. | ||
| - | |||
| - | The current thinking is that the server traffics in the XML format, while the client applications have helper objects to deal with it. A model is similar to the Bundle class in Android that lets you do things like: | ||
| - | |||
| - | <code> | ||
| - | boolean gpsIsVisible = config.getBoolean("ui.gps.visible", true); | ||
| - | double blankspeed = config.getDouble("ui.screenblanking.visible", 37.5); | ||
| - | </code> | ||
| - | |||
| - | Helper classes for the config object would be coded for Java and C++. | ||