Posting Data to the Database

The address to post the data to is www.psgpages.com/trackdata/poster.php The function will return an error message if anything suspicious occurs, and OK for a succesful POST.

The following parameters from the POST string will be processed:-

Mandatory Parameters

action

One of

  • position
  • event
  • sendmessage

company

password

Password is NOT Mandatory at present, but this might change in the future

device

  • These three values will be used to identify the correct device in the Devices table
  • If an of these parameters are missing an error message will be returned
  • If the company/password/device combinatino does not identify an existing entry in the table, then an error will be returned unless the optional adddevice attribute is passed

x

y

  • If any of these parameters are missing an error message will be returned
  • These three values will be used to create an entry in the Events table

time

Optional Parameters

user

z

type

  • I Present, these three attributes are added to the event record

Miscellaneous Parameters

  • Anything else which is attached to the POST string will be treated as a miscellaneous attribute and added to the EventData table

Database Structure

The database consists of 3 tables

FMW_DEVICES

Field Type Comment
UID Integer Primary Key
COMPANY String
PASSWORD String
DEVICE String
ICON String Icon to be used when populating map (not used yet)
EVENTTABLE String Table used for storing Device Events (not used yet)
X Float
Y Float
TIME TIMESTAMP Server time if not passed as parameter

FMW_EVENTS

Field Type Comment
UID Integer Primary Key
DEVICES_UID Integer Defines Parent relationship to DEVICES table
X Float
Y Float
USER String
Z Float
TIME TIMESTAMP Server time if not passed as parameter
TYPE String

FMW_EVENTDATA

Field Type Comment
UID Integer Primary Key
EVENT_UID Integer Defines Parent relationship to EVENTS table
NAME String Data field nmame
VALUE String Data field value

Changes

  • Store a TABLE value in the Device table. If present use this to store the event data.
  • Setup function to return latest timestamp (nothing else). Use to reduce server load
  • Make sure can get regular polling to work.
  • See if YUIgrid will take data from mootools Ajax (Much simpler Ajax kit)
  • Use Event Type to set Tracking Icon

(probably use TRACKING / INCIDENT as different event types - i think there is some confusion on what dean was doing - the incidents table was completly unrelated to the tracking stuff, they where just two data sources displayed on the same map. - but if having them linked makes it easier, iam not to bothered (would it be better if if EVENTTYPE was in the tracking DB))

What did work quite nicley is that only todays incidents where listed.

It would probably work nicley, if a INCIDENT update came in then, that is the aALARM trigger

i still dont reaqlly get what you are doing here, ive just sent a link that updated a JOBname & JOBcnt additional fields - yet i dont see them in the tracking view

  • Build Alert functionality
 
devnews/fastmap_live_data.txt · Last modified: 2009/10/13 07:10 by wynsleeman
Recent changes RSS feed Creative Commons License Driven by DokuWiki