/******************************************************************************** | |
* Copyright (c) 2015-2018 Contributors to the Eclipse Foundation | |
* | |
* See the NOTICE file(s) distributed with this work for additional | |
* information regarding copyright ownership. | |
* | |
* This program and the accompanying materials are made available under the | |
* terms of the Eclipse Public License v. 2.0 which is available at | |
* http://www.eclipse.org/legal/epl-2.0. | |
* | |
* SPDX-License-Identifier: EPL-2.0 | |
* | |
********************************************************************************/ | |
import { NumberArray } from './number-array.class'; | |
import { BooleanArray } from './boolean-array.class'; | |
import { DateArray } from './date-array.class'; | |
export class MeasuredValues { | |
name: string; | |
unit: string; | |
length: number; | |
independent: boolean; | |
axisType: string; | |
scalarType: string; | |
// stringArray: StringArray; | |
dateArray: DateArray; | |
booleanArray: BooleanArray; | |
// byteArray: ByteArray; | |
shortArray: NumberArray; | |
integerArray: NumberArray; | |
longArray: NumberArray; | |
floatArray: NumberArray; | |
doubleArray: NumberArray; | |
// byteStreamArray: ByteStreamArray; | |
// floatComplexArrray: FloatComplexArray; | |
// doubleComplexArrray: DoubleComplexArray; | |
flags: boolean[]; | |
getDataArray() { | |
if (this.scalarType === 'INTEGER') { | |
return this.integerArray; | |
} else if (this.scalarType === 'FLOAT') { | |
return this.floatArray; | |
} else if (this.scalarType === 'DOUBLE') { | |
return this.doubleArray; | |
} else if (this.scalarType === 'DATE') { | |
return this.dateArray; | |
} else if (this.scalarType === 'SHORT') { | |
return this.shortArray; | |
} else if (this.scalarType === 'BOOLEAN') { | |
return this.booleanArray; | |
} | |
} | |
} |