/** * Constructor. * * @param text Complete status/response text */ public TerminalStatus(String text) { super("lms", "TerminalStatus"); this.responseText = text; java.sql.Timestamp ts = new java.sql.Timestamp(System.currentTimeMillis()); Cell[] defaultCells = { new Cell(F_REFID, new StringDomain()), new Cell(F_REPORTID, new IDDomain()), new Cell(F_TERMINALID, new IDDomain()), new Cell(F_TERMINALNAME, new StringDomain()), new Cell(F_BUILDINGID, new IDDomain()), new Cell(F_BUILDINGNAME, new StringDomain()), new Cell(F_SERVERTIME, new TimestampDomain(ts)), new Cell(F_TERMINALTIME, new StringDomain()), new Cell(F_STATUSTEXT, new StringDomain()), new Cell(F_REFDATE, new DateDomain()), new Cell(F_TOTALUPTIME, new StringDomain()), new Cell(F_TIMETOSWRST, new StringDomain()), new Cell(F_NUMSOFTWARERST, new IntegerDomain()), new Cell(F_NUMPOWERUP, new IntegerDomain()), new Cell(F_SWVERSION, new StringDomain()), new Cell(F_ETMTYPE, new StringDomain()), new Cell(F_HWVERSION, new StringDomain()), new Cell(F_SUPPLYVOLTAGE, new StringDomain()), new Cell(F_SIGNALREAL, new IntegerDomain()), new Cell(F_SIGNALMAX, new IntegerDomain()), new Cell(F_SIGNALMIN, new IntegerDomain()), new Cell(F_CHANNEL, new IntegerDomain()), new Cell(F_RTC, new StringDomain()), new Cell(F_RS, new IntegerDomain()), new Cell(F_DBM, new IntegerDomain()), new Cell(F_CELL, new IntegerDomain()) }; for (int i = 0; i < defaultCells.length; i++) addCell(defaultCells[i]); }
/** Constructor. */ public TerminalStatus( String id, String tdate, String dt, String fwv, String swv, int hwrc, int swrc, int signal, int min, int max, int dBm, int gsmch, long cell, long lac) { super("lms", "TerminalStatus"); this.responseText = "" + dt + "," + fwv + "," + swv + "," + hwrc + "," + signal; Cell[] defaultCells = { new Cell(F_REFID, new StringDomain(id)), new Cell(F_REPORTID, new IDDomain()), new Cell(F_TERMINALID, new IDDomain()), new Cell(F_TERMINALNAME, new StringDomain()), new Cell(F_BUILDINGID, new IDDomain()), new Cell(F_BUILDINGNAME, new StringDomain()), new Cell(F_SERVERTIME, new TimestampDomain(System.currentTimeMillis())), new Cell(F_TERMINALTIME, new StringDomain()), new Cell(F_STATUSTEXT, new StringDomain()), new Cell(F_REFDATE, new DateDomain()), new Cell(F_TOTALUPTIME, new StringDomain(dt)), new Cell(F_TIMETOSWRST, new StringDomain()), new Cell(F_NUMSOFTWARERST, new IntegerDomain(swrc)), new Cell(F_NUMPOWERUP, new IntegerDomain(hwrc)), new Cell(F_SWVERSION, new StringDomain(swv)), new Cell(F_ETMTYPE, new StringDomain()), new Cell(F_HWVERSION, new StringDomain(fwv)), new Cell(F_SUPPLYVOLTAGE, new StringDomain()), new Cell(F_SIGNALREAL, new IntegerDomain(signal)), new Cell(F_SIGNALMAX, new IntegerDomain(max)), new Cell(F_SIGNALMIN, new IntegerDomain(min)), new Cell(F_CHANNEL, new IntegerDomain(gsmch)), new Cell(F_RTC, new StringDomain(tdate)), new Cell(F_RS, new LongDomain(lac)), new Cell(F_DBM, new LongDomain(dBm)), new Cell(F_CELL, new LongDomain(cell)) }; for (int i = 0; i < defaultCells.length; i++) addCell(defaultCells[i]); }