Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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);
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;
public decode(stream: BinaryStream): void {
// call base class implementation first
super.decode(stream);
this.namespaceIndex = decodeUInt16(stream);
this.name = decodeUAString(stream);
}
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");
}
}
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);
dataValue.serverPicoseconds = dataValue.serverTimestamp.picoseconds;
tracer.trace("member","serverTimestamp", dataValue.serverTimestamp,cur,stream.length,"DateTime");
}
// read serverPicoseconds
cur = stream.length;
if (check_flag(encoding_mask,DataValueEncodingByte.ServerPicoseconds)) {
const tenPico = ec.decodeUInt16(stream);
dataValue.serverPicoseconds += tenPico*10;
tracer.trace("member","serverPicoseconds", dataValue.serverPicoseconds,cur,stream.length,"UInt16");
}
},
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;
}
}
// 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;
}
}
// 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;
}
},