Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
dataValue.sourcePicoseconds = (dataValue.sourceTimestamp as DateWithPicoseconds).picoseconds;
tracer.trace("member", "sourceTimestamp", dataValue.sourceTimestamp, cur, stream.length, "DateTime");
}
// read sourcePicoseconds
cur = stream.length;
dataValue.sourcePicoseconds = 0;
if (encodingMask & DataValueEncodingByte.SourcePicoseconds) {
const tenPico = decodeUInt16(stream);
dataValue.sourcePicoseconds += tenPico * 10;
tracer.trace("member", "sourcePicoseconds", dataValue.sourcePicoseconds, cur, stream.length, "UInt16");
}
// read serverTimestamp
cur = stream.length;
dataValue.serverPicoseconds = 0;
if (encodingMask & DataValueEncodingByte.ServerTimestamp) {
dataValue.serverTimestamp = decodeHighAccuracyDateTime(stream);
dataValue.serverPicoseconds = (dataValue.serverTimestamp as DateWithPicoseconds).picoseconds | 0;
tracer.trace("member", "serverTimestamp", dataValue.serverTimestamp, cur, stream.length, "DateTime");
}
// read serverPicoseconds
cur = stream.length;
if (encodingMask & DataValueEncodingByte.ServerPicoseconds) {
const tenPico = decodeUInt16(stream);
dataValue.serverPicoseconds += tenPico * 10;
tracer.trace("member", "serverPicoseconds", dataValue.serverPicoseconds, cur, stream.length, "UInt16");
}
}
}
dataValue.sourcePicoseconds = 0;
// read sourceTimestamp
if (check_flag(encoding_mask,DataValueEncodingByte.SourceTimestamp)) {
dataValue.sourceTimestamp = ec.decodeHighAccuracyDateTime(stream);
dataValue.sourcePicoseconds += dataValue.sourceTimestamp.picoseconds;
}
// read sourcePicoseconds
if (check_flag(encoding_mask,DataValueEncodingByte.SourcePicoseconds)) {
dataValue.sourcePicoseconds += ec.decodeUInt16(stream) * 10 ;
}
// read serverTimestamp
dataValue.serverPicoseconds = 0;
if (check_flag(encoding_mask,DataValueEncodingByte.ServerTimestamp)) {
dataValue.serverTimestamp = ec.decodeHighAccuracyDateTime(stream);
dataValue.serverPicoseconds += dataValue.serverTimestamp.picoseconds;
}
// read serverPicoseconds
if (check_flag(encoding_mask,DataValueEncodingByte.ServerPicoseconds)) {
dataValue.serverPicoseconds += ec.decodeUInt16(stream) * 10;
}
},
}
dataValue.sourcePicoseconds = 0;
// read sourceTimestamp
if (encodingMask & DataValueEncodingByte.SourceTimestamp) {
dataValue.sourceTimestamp = decodeHighAccuracyDateTime(stream);
dataValue.sourcePicoseconds += (dataValue.sourceTimestamp as DateWithPicoseconds).picoseconds | 0;
}
// read sourcePicoseconds
if (encodingMask & DataValueEncodingByte.SourcePicoseconds) {
dataValue.sourcePicoseconds += decodeUInt16(stream) * 10;
}
// read serverTimestamp
dataValue.serverPicoseconds = 0;
if (encodingMask & DataValueEncodingByte.ServerTimestamp) {
dataValue.serverTimestamp = decodeHighAccuracyDateTime(stream);
dataValue.serverPicoseconds += (dataValue.serverTimestamp as DateWithPicoseconds).picoseconds | 0;
}
// read serverPicoseconds
if (encodingMask & DataValueEncodingByte.ServerPicoseconds) {
dataValue.serverPicoseconds += decodeUInt16(stream) * 10;
}
}
const encodingMask = decodeUInt8(stream);
if (encodingMask & DataValueEncodingByte.Value) {
dataValue.value = new Variant();
dataValue.value.decode(stream);
}
// read statusCode
if (encodingMask & DataValueEncodingByte.StatusCode) {
dataValue.statusCode = decodeStatusCode(stream);
} else {
dataValue.statusCode = StatusCodes.Good;
}
dataValue.sourcePicoseconds = 0;
// read sourceTimestamp
if (encodingMask & DataValueEncodingByte.SourceTimestamp) {
dataValue.sourceTimestamp = decodeHighAccuracyDateTime(stream);
dataValue.sourcePicoseconds += (dataValue.sourceTimestamp as DateWithPicoseconds).picoseconds | 0;
}
// read sourcePicoseconds
if (encodingMask & DataValueEncodingByte.SourcePicoseconds) {
dataValue.sourcePicoseconds += decodeUInt16(stream) * 10;
}
// read serverTimestamp
dataValue.serverPicoseconds = 0;
if (encodingMask & DataValueEncodingByte.ServerTimestamp) {
dataValue.serverTimestamp = decodeHighAccuracyDateTime(stream);
dataValue.serverPicoseconds += (dataValue.serverTimestamp as DateWithPicoseconds).picoseconds | 0;
}
// read serverPicoseconds
if (encodingMask & DataValueEncodingByte.ServerPicoseconds) {
dataValue.serverPicoseconds += decodeUInt16(stream) * 10;
}
if( check_flag(encoding_mask,DataValueEncodingByte.Value)) {
//xx var Variant = require("./variant").Variant;
dataValue.value = new Variant();
dataValue.value.decode_debug(stream,options);
//xx if (tracer) { tracer.trace("member","statusCode", dataValue.value,cur,stream.length,"Variant"); }
}
// read statusCode
cur = stream.length;
if (check_flag(encoding_mask,DataValueEncodingByte.StatusCode)) {
dataValue.statusCode = ec.decodeStatusCode(stream);
tracer.trace("member","statusCode", dataValue.statusCode,cur,stream.length,"StatusCode");
}
// read sourceTimestamp
cur = stream.length;
if (check_flag(encoding_mask,DataValueEncodingByte.SourceTimestamp)) {
dataValue.sourceTimestamp = ec.decodeHighAccuracyDateTime(stream);
dataValue.sourcePicoseconds= dataValue.sourceTimestamp.picoseconds;
tracer.trace("member","sourceTimestamp", dataValue.sourceTimestamp,cur,stream.length,"DateTime");
}
// read sourcePicoseconds
cur = stream.length;
dataValue.sourcePicoseconds = 0;
if (check_flag(encoding_mask,DataValueEncodingByte.SourcePicoseconds)) {
const tenPico = ec.decodeUInt16(stream);
dataValue.sourcePicoseconds += tenPico * 10;
tracer.trace("member","sourcePicoseconds", dataValue.sourcePicoseconds,cur,stream.length,"UInt16");
}
// read serverTimestamp
cur = stream.length;
dataValue.serverPicoseconds = 0;
if (check_flag(encoding_mask,DataValueEncodingByte.ServerTimestamp)) {
dataValue.serverTimestamp = ec.decodeDateTime(stream);
//xx var Variant =
// re("./variant").Variant;
dataValue.value = new Variant(null);
dataValue.value.decode(stream,options);
}
// read statusCode
if (check_flag(encoding_mask,DataValueEncodingByte.StatusCode)) {
dataValue.statusCode = ec.decodeStatusCode(stream);
} else {
dataValue.statusCode = StatusCodes.Good;
}
dataValue.sourcePicoseconds = 0;
// read sourceTimestamp
if (check_flag(encoding_mask,DataValueEncodingByte.SourceTimestamp)) {
dataValue.sourceTimestamp = ec.decodeHighAccuracyDateTime(stream);
dataValue.sourcePicoseconds += dataValue.sourceTimestamp.picoseconds;
}
// read sourcePicoseconds
if (check_flag(encoding_mask,DataValueEncodingByte.SourcePicoseconds)) {
dataValue.sourcePicoseconds += ec.decodeUInt16(stream) * 10 ;
}
// read serverTimestamp
dataValue.serverPicoseconds = 0;
if (check_flag(encoding_mask,DataValueEncodingByte.ServerTimestamp)) {
dataValue.serverTimestamp = ec.decodeHighAccuracyDateTime(stream);
dataValue.serverPicoseconds += dataValue.serverTimestamp.picoseconds;
}
// read serverPicoseconds
if (check_flag(encoding_mask,DataValueEncodingByte.ServerPicoseconds)) {
dataValue.serverPicoseconds += ec.decodeUInt16(stream) * 10;
}
tracer.encoding_byte(encodingMask, DataValueEncodingByte, cur, stream.length);
if (encodingMask & DataValueEncodingByte.Value) {
dataValue.value = new Variant();
dataValue.value.decodeDebug(stream, options);
}
// read statusCode
cur = stream.length;
if (encodingMask & DataValueEncodingByte.StatusCode) {
dataValue.statusCode = decodeStatusCode(stream);
tracer.trace("member", "statusCode", dataValue.statusCode, cur, stream.length, "StatusCode");
}
// read sourceTimestamp
cur = stream.length;
if (encodingMask & DataValueEncodingByte.SourceTimestamp) {
dataValue.sourceTimestamp = decodeHighAccuracyDateTime(stream);
dataValue.sourcePicoseconds = (dataValue.sourceTimestamp as DateWithPicoseconds).picoseconds;
tracer.trace("member", "sourceTimestamp", dataValue.sourceTimestamp, cur, stream.length, "DateTime");
}
// read sourcePicoseconds
cur = stream.length;
dataValue.sourcePicoseconds = 0;
if (encodingMask & DataValueEncodingByte.SourcePicoseconds) {
const tenPico = decodeUInt16(stream);
dataValue.sourcePicoseconds += tenPico * 10;
tracer.trace("member", "sourcePicoseconds", dataValue.sourcePicoseconds, cur, stream.length, "UInt16");
}
// read serverTimestamp
cur = stream.length;
dataValue.serverPicoseconds = 0;
if (encodingMask & DataValueEncodingByte.ServerTimestamp) {
dataValue.serverTimestamp = decodeHighAccuracyDateTime(stream);