public static long getTimeStampFromNonDP ( final long base_time , byte [ ] quantifier ) { long ret = base_time ; if ( quantifier . length == 3 ) { ret += quantifier [ 1 ] << 8 | ( quantifier [ 2 ] & 0xFF ) ; ret *= 1000 ; } else if ( quantifier . length == 5 ) { ret *= 1000 ; ret += ( quantifier [ 1 ] & 0xFF ) << 24 | ( quantifier [ 2 ] & 0xFF ) << 16 | ( quantifier [ 3 ] & 0xFF ) << 8 | quantifier [ 4 ] & 0xFF ; } else { throw new IllegalArgumentException ( "Quantifier is not valid: " + Bytes . pretty ( quantifier ) ) ; } return ret ; }
Get timestamp from base time and quantifier for non datapoints . The returned time will always be in ms .