public String toString() { StringBuilder b = new StringBuilder(); b.append(time.toMMDDYY()); b.append(" "); int nelem = Array.getLength(value); if (nelem == 1) { b.append(Array.get(value, 0).toString()); if (severity != 0) { b.append(" "); b.append(Severity.forValue(severity).getName()); } } else { if (severity != 0) { b.append(Severity.forValue(severity).getName()); b.append(" "); } b.append("["); for (int i = 0; i < nelem; i++) { b.append(Array.get(value, i)); if (i != nelem - 1) b.append(", "); } b.append("]"); } return b.toString(); }
static PValue makeDisconnect(Object src, PValue prev) { TimeStamp dtime = new TimeStamp(); // now if (prev.time.GE(dtime)) { // prevent non-monotonic disconnect time, which archivers might ignore... dtime = TimeStamp.add(prev.time, 1e-9); } return new PValue(src, prev.value, 3, dtime); }
public long[] getTimeInt() { return new long[] {time.secPastEpoch() + 631152000, time.nsec()}; }
public double getTime() { return time.asDouble(); }