Definitions

Message & Record Definitions

LBS Message

Define a Message with ID 1000

{
  "destination": "KEYWORD",
  "latitude": "Double",
  "longitude": "Double"
}
def fields = [:]

fields["destination"] = "KEYWORD";
fields["latitude"] = "DOUBLE";
fields["longitude"] = "DOUBLE";

domain.defineMessage("Location Message", 1000, fields);

Driver Location Record

Define a Record with ID 1000

{
  "destination": "KEYWORD",
  "latitude": "Double",
  "longitude": "Double",
  "distance": "INTEGER",
  "eta": "TIMESTAMP",
  "member": "TEXT",
  "stamp": "TIMESTAMP"
}
def fields = [:]

fields["destination"] = "KEYWORD";
fields["latitude"] = "DOUBLE";
fields["longitude"] = "DOUBLE";
fields["distance"] = "INTEGER";
fields["eta"] = "TIMESTAMP";
fields["member"] = "TEXT";
fields["stamp"] = "TIMESTAMP";

domain.defineRecord("Location Record", 1000, fields);