package com.safemobile.lib; public class Alarm { public int idx; public String unitName; public int type; public String typestr; public String description; public long timeGMT; public int ack; public long sc_id; public Alarm() { } public Alarm(int idx, int type, String description, int timeGMT, int ack, int sc_id) { this.idx = idx; this.sc_id = sc_id; this.type = type; this.description = description; this.timeGMT = timeGMT; this.ack = ack; switch (this.type) { case 0: typestr = "emergency"; break; case 1: typestr = "landmark"; break; case 2: typestr = "zone"; break; case 3: typestr = "speed"; break; case 4: typestr = "telemetry"; break; default: typestr = "emergency"; } this.unitName = "Empty"; } public String toString() { return "idx: " + idx + " | sc_id: " + sc_id + " | type: " + type + " | description: " + description + " | timeGMT: " + timeGMT + " | ack:" + ack + " | typestr:" + typestr+" | unitName:" + unitName; } }