17 Commits

Author SHA1 Message Date
lai8928 ef22f1d20b [update]button link 2023-01-06 13:05:52 +08:00
lai8928 0786113589 Merge remote-tracking branch 'origin/dev/file_modal' into 10-test 2023-01-04 10:19:33 +08:00
lai8928 7499f34dc7 change controller id 2023-01-04 10:17:52 +08:00
peterlu14 a65fea33a9 [update] change control panel to script setup & fix style error 2023-01-04 10:15:11 +08:00
peterlu14 90ba4b448a Merge remote-tracking branch 'origin/10-test' into dev/file_modal 2023-01-03 17:33:42 +08:00
lai8928 dfb3a96f84 [update] merge file modal 2023-01-03 16:50:40 +08:00
lai8928 58eecd80ae Merge remote-tracking branch 'origin/dev/file_modal' into 10-test 2022-12-30 15:58:27 +08:00
peterlu14 ec29b2fbc7 [update] show info 2022-12-30 15:20:11 +08:00
peterlu14 b8a7b39b62 [update] pass fileview-select & channel by create pinia store 2022-12-30 15:17:43 +08:00
peterlu14 4e041645a8 [update] channel X & Y select and emit 2022-12-30 09:53:35 +08:00
peterlu14 5fe5a64140 [update] import config table 2022-12-30 09:51:23 +08:00
peterlu14 746f4d98ec [update] restruct Device type & add getMetaFile 2022-12-30 09:48:47 +08:00
lai8928 4e8254e2d7 add csv download test 2022-12-29 14:09:05 +08:00
peterlu14 7043581335 [update] change-note 2022-12-29 11:42:35 +08:00
peterlu14 a0d8020787 [update] reformat file.ts & fileModal 2022-12-29 11:41:28 +08:00
lai8928 a9c59953f4 [fix] package.json lint command error 2022-12-09 11:12:30 +08:00
lai8928 93badd5ecf add mode input form 2022-12-09 11:09:13 +08:00
40 changed files with 5110 additions and 141 deletions
+2
View File
@@ -1,7 +1,9 @@
### 2022.12.30
- file system
### 2022.12.06
- e-chart
- mqtt
- new page data-analysis
+1 -1
View File
@@ -8,7 +8,7 @@
"build": "npm run lint && vue-tsc --noEmit && vite build",
"build:ci": "vite build",
"prelint": "npm run format",
"lint": "eslint --fix './src/**/*.{ts,js,vue}'",
"lint": "eslint --fix \"./src/**/*.{ts,js,vue}\"",
"format": "prettier --write .",
"preview": "vite preview"
},
@@ -1,62 +0,0 @@
<template>
<div>
<va-card class="h-full">
<va-card-content class="h-full w-full">
<EChart ref="chart_ref" :option="option" :autoresize="true" />
</va-card-content>
</va-card>
</div>
</template>
<script lang="ts">
import { ref, onMounted } from 'vue'
export default {
setup() {
const option = ref({
title: {
text: 'Traffic Sources',
left: 'center',
},
tooltip: {
trigger: 'item',
formatter: '{a} <br/>{b} : {c} ({d}%)',
},
legend: {
orient: 'vertical',
left: 'left',
data: ['Direct', 'Email', 'Ad Networks', 'Video Ads', 'Search Engines'],
},
series: [
{
name: 'Traffic Sources',
type: 'pie',
radius: '55%',
center: ['50%', '60%'],
data: [
{ value: 335, name: 'Direct' },
{ value: 310, name: 'Email' },
{ value: 234, name: 'Ad Networks' },
{ value: 135, name: 'Video Ads' },
{ value: 1548, name: 'Search Engines' },
],
emphasis: {
itemStyle: {
shadowBlur: 10,
shadowOffsetX: 0,
shadowColor: 'rgba(0, 0, 0, 0.5)',
},
},
},
],
})
const chart_ref = ref<HTMLElement | null>(null)
onMounted(() => {
console.log(chart_ref.value)
})
return { option, chart_ref }
},
}
</script>
<style lang=""></style>
+72 -26
View File
@@ -4,13 +4,28 @@
<va-card-content>
<va-select
v-model="simpleSelectModel"
:label="'Filter'"
:label="'Filter Mode'"
text-by="description"
track-by="id"
:options="simpleOptions"
/>
<va-card-content>
<div v-if="simpleSelectModel.id === 1">
<va-slider v-model="VTModeModel" label="percentage(%)" track-label-visible :min="0" :max="50" />
</div>
<div v-else-if="simpleSelectModel.id === 2">
<va-slider v-model="slopModeModel" label="1D window" track-label-visible :min="1" :max="50" />
</div>
<div v-else></div>
<div>
<p>{{ channel.xAxis }}</p>
<p>{{ channel.yAxis }}</p>
<p>{{ fileView.filesSelected }}</p>
</div>
</va-card-content>
<va-button class="mt-2" @click="filterData">Start</va-button>
<!-- <div v-if="simpleSelectModel.id === 1">
<!-- <div v-if="simpleSelectModel.id === 1">
<va-button>test</va-button>
<va-input></va-input>
</div> -->
@@ -18,33 +33,64 @@
</va-card>
</div>
</template>
<script lang="ts">
import { ref } from 'vue'
<script setup lang="ts">
import { useChannelStore } from '@/stores/data-analysis/channel'
import { useFileViewStore } from '@/stores/data-analysis/file-view'
import { Ref, ref, defineEmits, defineExpose } from 'vue'
export default {
emits: ['filter-data'],
setup(props, { emit }) {
const simpleSelectModel = ref({})
const simpleOptions = ref([
{
id: 1,
description: 'First option',
},
{
id: 2,
description: 'Second option',
},
{
id: 3,
description: 'Third option',
},
])
const filterData = function () {
emit('filter-data')
}
// define emit
// const emit = defineEmits({
// 'filter-data': ({ mode, data_id, data_channel, data }) => {
// return { mode, data_id, data_channel, data }
// },
// })
const emit = defineEmits(['filter-data'])
return { props, simpleSelectModel, simpleOptions, filterData }
const channel = useChannelStore()
const fileView = useFileViewStore()
const VTModeModel = ref(10)
const slopModeModel = ref(20)
const simpleSelectModel: Ref<{ id: number; description: string } | Record<string, never>> = ref({})
const simpleOptions = ref([
{
id: 1,
description: 'V-T Mode',
},
{
id: 2,
description: '1st Order Differential',
},
{
id: 3,
description: 'Third option',
},
])
const filterData = function () {
console.log(VTModeModel.value)
const a = 0
console.log(a)
// switch(simpleSelectModel.value.id) {
// case 1:
// const return_data = { mode: 1, data_id: 166, data: { persentage: 0 } };
// case 2:
// const return_data = { mode: 2, data_id: 166, data: { persentage: 0 } };
// default:
// }
// console.log(return_data)
emit('filter-data', {
mode: simpleSelectModel.value.id,
data_id: fileView.filesSelected,
data_channel: [channel.xAxis.id, channel.yAxis.id],
data: { persentage: VTModeModel.value, window: slopModeModel.value },
})
}
defineExpose({
simpleSelectModel,
simpleOptions,
VTModeModel,
slopModeModel,
filterData,
})
</script>
<style lang=""></style>
@@ -2,6 +2,9 @@
<va-card class="">
<div class="h-200px">
<va-button @click="showModal">FILE</va-button>
<p>Meta: {{ fileView.filesSelected }}</p>
<p>X: {{ channel.xAxis }}</p>
<p>Y: {{ channel.yAxis }}</p>
<Suspense>
<FileModal ref="file_modal_ref"></FileModal>
</Suspense>
@@ -11,9 +14,14 @@
<script setup lang="ts">
import { ref } from 'vue'
import { useChannelStore } from '@/stores/data-analysis/channel'
import { useFileViewStore } from '@/stores/data-analysis/file-view'
import FileModal from '@/components/data-analysis/FileModal.vue'
// file modal control
const channel = useChannelStore()
const fileView = useFileViewStore()
/* File Modal Handling */
let file_modal_ref = ref<InstanceType<typeof FileModal> | null>(null)
const showModal = function () {
file_modal_ref.value?.showModal()
+134 -30
View File
@@ -1,12 +1,12 @@
<template>
<div>
<va-modal v-model="show" :fixed-layout="true" size="large">
<va-modal v-model="show" :fixed-layout="true" size="large" @before-open="initLoad">
<!-- File Container-->
<div class="h-[75vh] w-[50vw]">
<!-- Control Bar -->
<div class="d-flex align-center">
<va-input v-model="filter" placeholder="Filter..." class="mr-3" style="flex: 0 200px" clearable />
<!-- <va-checkbox v-model="isFilterCaseSensitive" label="Case sensitive" /> -->
<va-checkbox v-model="isFilterCaseSensitive" class="mr-3" label="Case sensitive" />
<va-button-group class="mr-3">
<va-button @click="changeFileView('time')">Time</va-button>
<va-button @click="changeFileView('folder')">Folder</va-button>
@@ -24,7 +24,7 @@
<va-tree-view
v-model:checked="selectedNodes"
v-model:expanded="expanedNodes"
:nodes="nodes"
:nodes="treeNodes"
class="customizable-content"
:filter="filter"
:filter-method="customFilterMethod"
@@ -34,29 +34,54 @@
>
<template #content="node">
<div class="align-center">
<va-icon v-if="node.type === 'Folder' && node.expanded === false" class="fas fa-folder" />
<va-icon v-if="node.type === 'Folder' && node.expanded === true" class="fas fa-folder-open" />
<va-icon v-if="node.type === 'MetaFile'" class="fas fa-file" />
{{ node.name }}
<va-icon v-if="node.type === 'Folder' && node.expanded === false" class="fas fa-folder mr-2" />
<va-icon v-if="node.type === 'Folder' && node.expanded === true" class="fas fa-folder-open mr-2" />
<va-icon v-if="node.type === 'MetaFile'" class="fas fa-file mr-2" />
<template v-if="node.type !== 'MetaFile'">{{ node.name }}</template>
<template v-if="node.type === 'MetaFile'">
{{ node.name }}
</template>
</div>
</template>
</va-tree-view>
<!-- <p class="mt-4">Expanded nodes: {{ expanedNodes.join(',') || 'none' }}</p> -->
<p class="mt-4">Selected nodes: {{ selectedNodes.join(',') || 'none' }}</p>
</div>
<!-- Channel & Group setting-->
<div class="h-full col-span-1">XY</div>
<div class="h-full col-span-1">
<div>
X-Axis
<va-select v-model="channel.xAxis" :text-by="'name'" :options="options"></va-select>
</div>
<div>
Y-Axis
<va-select v-model="channel.yAxis" :text-by="'name'" :options="options"></va-select>
</div>
</div>
</div>
</div>
</va-modal>
</div>
</template>
<script setup lang="ts">
import { Ref, ref, computed } from 'vue'
import { Ref, ref, computed, watch } from 'vue'
import { FileView, Project, MetaFile, Folder, Time } from '@/utils/file'
import configTable from '@/data/config-table/index'
import { useChannelStore } from '@/stores/data-analysis/channel'
import { useFileViewStore } from '@/stores/data-analysis/file-view'
// emit
const emit = defineEmits({
filesSelected: ({ metas, channel }) => {
return { metas, channel }
},
})
function emitFilesSelected(meta: string[], channel: { x: object; y: object }) {
emit('filesSelected', { meta, channel })
}
// filter function
const customFilterMethod = computed(() => {
return (node: Project | MetaFile, filterText: string, key: string) => {
return (node: Project | MetaFile, filterText: string) => {
// console.log('customFilterMethod', node, filterText, key, node.name.includes(filterText))
return node.name.includes(filterText)
}
@@ -68,41 +93,120 @@
show.value = !show.value
}
// handling init file
// handling fileView
const fileViewStore = useFileViewStore()
const fileView = new FileView()
await fileView.appendChildren(1)
let fileViewChildrenForNodes = fileView.getChildren()
// handling tree-view
const filter = ref('')
const isFilterCaseSensitive = ref(false)
const selectedNodes: Ref<(never | string)[]> = ref([])
const expanedNodes: Ref<(never | string)[]> = ref([])
const treeNodes: Ref<(never | Project | Folder | Time | MetaFile)[]> = ref([])
const initLoad = async function () {
if (treeNodes.value.length === 0) {
await initLoadFileView()
initLoadNodes()
}
}
const initLoadFileView = async function () {
await fileView.appendChildren(1)
}
const initLoadNodes = function () {
const files = fileView.getChildren()
if (files.length > 0) {
treeNodes.value.push(...files)
expanedNodes.value.push(treeNodes.value[0].idType)
}
}
const reset = function () {
resetFileView()
resetNodes()
}
const resetFileView = function () {
fileView.reset()
}
const resetNodes = function () {
selectedNodes.value.length = 0
expanedNodes.value.length = 0
treeNodes.value.length = 0
}
// handling modal header
const changeFileView = async function (view: string) {
// reset fileView
fileView.changeView(view)
await fileView.appendChildren(1)
fileViewChildrenForNodes = fileView.getChildren()
nodes.value.length = 0
nodes.value.push(...fileViewChildrenForNodes)
// reset treeNodes & expandedNodes & selectedNodes
treeNodes.value.length = 0
treeNodes.value.push(...fileView.getChildren())
expanedNodes.value.length = 0
expanedNodes.value.push(nodes.value[0].idType)
expanedNodes.value.push(treeNodes.value[0].idType)
// selectedNodes.value.length = 0
}
const expandAll = function (expandOrNot: boolean) {
expanedNodes.value.length = 0
if (!expandOrNot) return
for (const node of nodes.value) {
for (const node of treeNodes.value) {
expanedNodes.value.push(node.idType)
}
}
// handling tree view
const filter = ref('')
const isFilterCaseSensitive = ref(false)
const selectedNodes = ref([])
const expanedNodes: Ref<(never | string)[]> = ref([])
const nodes: Ref<(never | Project | Folder | Time | MetaFile)[]> = ref([])
// handling channel options
const channel = useChannelStore()
let options: any[] = []
nodes.value.push(...fileViewChildrenForNodes)
expanedNodes.value.push(nodes.value[0].idType)
console.log('nodes', nodes)
// watch selectedNodes to decide axis options
watch(selectedNodes, (newSelectedNodes, oldSelectedNodes) => {
// update fileViewStore.filesSelected
fileViewStore.filesSelected.length = 0
fileViewStore.filesSelected.push(...newSelectedNodes.filter((x) => x.includes('MetaFile')))
// 新的要filter掉舊的沒有的
const newNodes = newSelectedNodes.filter((x) => x.includes('MetaFile') && !oldSelectedNodes.includes(x))
const MetFileList = []
for (const node of newNodes) {
const meta = fileView.getMetaFile(node)
MetFileList.push(meta)
}
defineExpose({ show, showModal, nodes, expanedNodes, selectedNodes })
console.log('MetFileList', MetFileList)
if (MetFileList[0]) {
// console.log(MetFileList[0].device.library_name, MetFileList[0].parameter.MODE)
// console.log(configTable.getConfig(MetFileList[0].device.library_name))
const config = configTable.getModeConfig(MetFileList[0].device.library_name, MetFileList[0].parameter.MODE)
const channel = Object.values(config.channels)
const channelOptions = channel.map((v: any, idx) => {
v.id = idx
return v
})
console.log('channelOptions', channelOptions)
options.length = 0
options.push(...channelOptions)
}
})
defineExpose({
emitFilesSelected,
show,
showModal,
changeFileView,
expandAll,
reset,
initLoad,
treeNodes,
expanedNodes,
selectedNodes,
})
</script>
<style lang="scss"></style>
+20
View File
@@ -0,0 +1,20 @@
export default {
name: 'Idle',
parameter: [], // 這個mode用到的參數
showParameter: [], // 有要秀給user看的參數
headerParameter: () => [], // export header的參數
valScales: {
linear: {
func: (val) => {
return val
},
},
log: {
func: (val) => {
return Math.log10(Math.abs(val))
},
},
},
channels: {},
charts: {},
}
+94
View File
@@ -0,0 +1,94 @@
export default {
name: 'Cali Mode - test',
parameter: ['ADC_DAC_CHANNEL_15', 'ADC_LEVEL_I_15', 'ADC_LEVEL_V_IN_15', 'DAC_LEVEL_V_OUT_15', 'DAC_VOLT_BUTTON'], // 這個mode用到的參數
showParameter: ['ADC_DAC_CHANNEL_15', 'ADC_LEVEL_I_15', 'ADC_LEVEL_V_IN_15', 'DAC_LEVEL_V_OUT_15', 'DAC_VOLT_BUTTON'], // 有要秀給user看的參數
headerParameter: () => [
'ADC_DAC_CHANNEL_15',
'ADC_LEVEL_I_15',
'ADC_LEVEL_V_IN_15',
'DAC_LEVEL_V_OUT_15',
'DAC_VOLT_BUTTON',
], // export header的參數
valScales: {
linear: {
func: (val) => {
return val
},
},
log: {
func: (val) => {
return Math.log10(Math.abs(val))
},
},
},
channels: {
time: {
name: 'Time',
unit: {
us: 1,
ms: 1e3,
s: 1e6,
m: 60 * 1e6,
h: 60 * 60 * 1e6,
auto: 1,
},
defaultUnit: 'us',
},
0: {
name: 'I_in',
unit: {
nA: 1,
},
defaultUnit: 'nA',
},
1: {
name: 'V_in/V_out',
unit: {
uV: 1,
},
defaultUnit: 'uV',
},
2: {
name: 'Gain',
unit: {
default: 1,
},
defaultUnit: 'default',
},
},
charts: {
default: [
{
name: 'Cali Mode - test',
description: '',
subplot: [
{
x1: {
type: 'time',
valScale: 'linear',
min: 'dataMin',
max: 'dataMax',
},
y1: {
type: 'value',
valScale: 'linear',
min: 'dataMin',
max: 'dataMax',
},
data: [
{
legend: 'ADC',
x1: {
channel: 'time',
},
y1: {
channel: 0,
},
},
],
},
],
},
],
},
}
+87
View File
@@ -0,0 +1,87 @@
export default {
name: 'Cali DAC - test',
parameter: ['CTRL_HIGH_Z_15', 'DAC_VOLT'], // 這個mode用到的參數
showParameter: ['CTRL_HIGH_Z_15', 'DAC_VOLT'], // 有要秀給user看的參數
valScales: {
linear: {
func: (val) => {
return val
},
},
log: {
func: (val) => {
return Math.log10(Math.abs(val))
},
},
},
channels: {
time: {
name: 'Time',
unit: {
us: 1,
ms: 1e3,
s: 1e6,
m: 60 * 1e6,
h: 60 * 60 * 1e6,
auto: 1,
},
defaultUnit: 'us',
},
0: {
name: 'I_in',
unit: {
nA: 1,
},
defaultUnit: 'nA',
},
1: {
name: 'V_in/V_out',
unit: {
uV: 1,
},
defaultUnit: 'uV',
},
2: {
name: 'Gain',
unit: {
default: 1,
},
defaultUnit: 'default',
},
},
charts: {
default: [
{
name: 'Cali DAC - test',
description: '',
subplot: [
{
x1: {
type: 'time',
valScale: 'linear',
min: 'dataMin',
max: 'dataMax',
},
y1: {
type: 'value',
valScale: 'linear',
min: 'dataMin',
max: 'dataMax',
},
data: [
{
legend: 'DAC',
x1: {
channel: 'time',
},
y1: {
channel: 0,
},
},
],
},
],
},
],
},
}
@@ -0,0 +1,97 @@
export default {
name: 'Chronoamperometry',
parameter: ['CA_VOLT', 'SAMPLE_RATE', 'ADC_LEVEL_I_15', 'ADC_LEVEL_V_IN_15', 'CTRL_HIGH_Z_15', 'TIME_DURATION'], // 這個mode用到的參數
showParameter: ['ADC_LEVEL_I_15', 'ADC_LEVEL_V_IN_15', 'CTRL_HIGH_Z_15', 'CA_VOLT', 'SAMPLE_RATE', 'TIME_DURATION'], // 有要秀給user看的參數
headerParameter: () => ['CA_VOLT', 'SAMPLE_RATE', 'ADC_LEVEL_I_15', 'ADC_LEVEL_V_IN_15', 'TIME_DURATION'], // 有要秀給user看的參數
valScales: {
linear: {
func: (val) => {
return val
},
},
log: {
func: (val) => {
return Math.log10(Math.abs(val))
},
},
},
channels: {
time: {
name: 'Time',
unit: {
us: 1,
ms: 1e3,
s: 1e6,
minute: 60 * 1e6,
hour: 60 * 60 * 1e6,
},
defaultUnit: 'ms',
downloadUnit: 'ms',
},
0: {
name: 'I_in',
unit: {
nA: 1,
uA: 1e3,
mA: 1e6,
},
defaultUnit: 'mA',
downloadUnit: 'mA',
},
1: {
name: 'Potential',
unit: {
uV: 1,
mV: 1e3,
V: 1e6,
},
defaultUnit: 'mV',
downloadUnit: 'mV',
},
2: {
name: 'V_out',
unit: {
uV: 1,
mV: 1e3,
V: 1e6,
},
defaultUnit: 'mV',
downloadUnit: 'mV',
},
},
charts: {
default: [
{
name: 'Chronoamperometric',
description: '',
subplot: [
{
x1: {
type: 'time',
valScale: 'linear',
min: 'dataMin',
max: 'dataMax',
},
y1: {
type: 'value',
valScale: 'linear',
min: 'dataMin',
max: 'dataMax',
},
data: [
{
legend: 'chrono',
x1: {
channel: 'time',
},
y1: {
channel: 0,
},
},
],
},
],
},
],
},
}
@@ -0,0 +1,167 @@
export default {
name: 'Chronopotentiometry',
parameter: [
'Charge',
'Const_Current_value',
'SAMPLE_RATE',
'VOLTSTOP_MAX',
'VOLTSTOP_MIN',
'CC_CP_SPEED',
'ADC_LEVEL_I_15',
'ADC_LEVEL_V_IN_15',
'TIME_DURATION',
], // 這個mode用到的參數
showParameter: [
'ADC_LEVEL_I_15',
'ADC_LEVEL_V_IN_15',
'CTRL_HIGH_Z_15',
'SAMPLE_RATE',
'Charge',
'Const_Current_value',
'VOLTSTOP_MAX',
'VOLTSTOP_MIN',
'TIME_DURATION',
], // 有要秀給user看的參數
headerParameter: () => [
'Charge',
'Const_Current_value',
'SAMPLE_RATE',
'VOLTSTOP_MAX',
'VOLTSTOP_MIN',
'CC_CP_SPEED',
'ADC_LEVEL_I_15',
'ADC_LEVEL_V_IN_15',
'TIME_DURATION',
], // 有要秀給user看的參數
valScales: {
linear: {
func: (val) => {
return val
},
},
log: {
func: (val) => {
return Math.log10(Math.abs(val))
},
},
},
channels: {
time: {
name: 'Time',
unit: {
us: 1,
ms: 1e3,
s: 1e6,
minute: 60 * 1e6,
hour: 60 * 60 * 1e6,
},
defaultUnit: 'ms',
downloadUnit: 'ms',
},
0: {
name: 'I_in',
unit: {
nA: 1,
uA: 1e3,
mA: 1e6,
},
defaultUnit: 'mA',
downloadUnit: 'mA',
},
1: {
name: 'Potential',
unit: {
uV: 1,
mV: 1e3,
V: 1e6,
},
defaultUnit: 'mV',
downloadUnit: 'mV',
},
2: {
name: 'V_out',
unit: {
uV: 1,
mV: 1e3,
V: 1e6,
},
defaultUnit: 'mV',
downloadUnit: 'mV',
},
3: {
name: 'sum_cnt',
unit: {
uV: 1,
mV: 1e3,
V: 1e6,
},
defaultUnit: 'mV',
downloadUnit: 'uV',
},
4: {
name: 'sum_adc_delta_Iin',
unit: {
uV: 1,
mV: 1e3,
V: 1e6,
},
defaultUnit: 'mV',
downloadUnit: 'uV',
},
5: {
name: 'sum_adc_delta_Voutin',
unit: {
uV: 1,
mV: 1e3,
V: 1e6,
},
defaultUnit: 'mV',
downloadUnit: 'uV',
},
6: {
name: 'resis',
unit: {
uV: 1,
mV: 1e3,
V: 1e6,
},
defaultUnit: 'mV',
downloadUnit: 'uV',
},
},
charts: {
default: [
{
name: 'Chronopotentiometry',
description: '',
subplot: [
{
x1: {
type: 'time',
valScale: 'linear',
min: 'dataMin',
max: 'dataMax',
},
y1: {
type: 'value',
valScale: 'linear',
min: 'dataMin',
max: 'dataMax',
},
data: [
{
legend: 'CP',
x1: {
channel: 'time',
},
y1: {
channel: 1,
},
},
],
},
],
},
],
},
}
@@ -0,0 +1,127 @@
export default {
name: 'Constant Current',
parameter: [
'Charge',
'Const_Current_value',
'SAMPLE_RATE',
'VOLTSTOP_MAX',
'VOLTSTOP_MIN',
'CC_CP_SPEED',
'ADC_LEVEL_I_15',
'ADC_LEVEL_V_IN_15',
'TIME_DURATION',
], // 這個mode用到的參數
showParameter: [
'ADC_LEVEL_I_15',
'ADC_LEVEL_V_IN_15',
'CTRL_HIGH_Z_15',
'SAMPLE_RATE',
'Charge',
'Const_Current_value',
'VOLTSTOP_MAX',
'VOLTSTOP_MIN',
'TIME_DURATION',
], // 有要秀給user看的參數
headerParameter: () => [
'Charge',
'Const_Current_value',
'SAMPLE_RATE',
'VOLTSTOP_MAX',
'VOLTSTOP_MIN',
'CC_CP_SPEED',
'ADC_LEVEL_I_15',
'ADC_LEVEL_V_IN_15',
'TIME_DURATION',
], // 有要秀給user看的參數
valScales: {
linear: {
func: (val) => {
return val
},
},
log: {
func: (val) => {
return Math.log10(Math.abs(val))
},
},
},
channels: {
time: {
name: 'Time',
unit: {
us: 1,
ms: 1e3,
s: 1e6,
minute: 60 * 1e6,
hour: 60 * 60 * 1e6,
},
defaultUnit: 'ms',
downloadUnit: 'ms',
},
0: {
name: 'I_in',
unit: {
nA: 1,
uA: 1e3,
mA: 1e6,
},
defaultUnit: 'mA',
downloadUnit: 'mA',
},
1: {
name: 'V_in',
unit: {
uV: 1,
mV: 1e3,
V: 1e6,
},
defaultUnit: 'mV',
downloadUnit: 'mV',
},
2: {
name: 'V_out',
unit: {
uV: 1,
mV: 1e3,
V: 1e6,
},
defaultUnit: 'mV',
downloadUnit: 'mV',
},
},
charts: {
default: [
{
name: 'Constant Current',
description: '',
subplot: [
{
x1: {
type: 'time',
valScale: 'linear',
min: 'dataMin',
max: 'dataMax',
},
y1: {
type: 'value',
valScale: 'linear',
min: 'dataMin',
max: 'dataMax',
},
data: [
{
legend: 'CC',
x1: {
channel: 'time',
},
y1: {
channel: 1,
},
},
],
},
],
},
],
},
}
+134
View File
@@ -0,0 +1,134 @@
export default {
name: 'Cycle I-V',
parameter: [
'VOLT_ORIGIN',
'VOLT_FINAL',
'VOLT_STEP',
'STEP_TIME',
'SAMPLE_RATE',
'CYCLE_NUMBER',
'ADC_LEVEL_I_15',
'ADC_LEVEL_V_IN_15',
'CTRL_HIGH_Z_15',
], // 這個mode用到的參數
showParameter: [
'ADC_LEVEL_I_15',
'ADC_LEVEL_V_IN_15',
'CTRL_HIGH_Z_15',
'VOLT_ORIGIN',
'VOLT_FINAL',
'VOLT_STEP',
'STEP_TIME',
'SAMPLE_RATE',
'CYCLE_NUMBER',
], // 有要秀給user看的參數
headerParameter: () => [
'VOLT_ORIGIN',
'VOLT_FINAL',
'VOLT_STEP',
'STEP_TIME',
'SAMPLE_RATE',
'CYCLE_NUMBER',
'ADC_LEVEL_I_15',
'ADC_LEVEL_V_IN_15',
], // export header的參數
valScales: {
linear: {
func: (val) => {
return val
},
},
log: {
func: (val) => {
return Math.log10(Math.abs(val))
},
},
},
channels: {
time: {
name: 'Time',
unit: {
us: 1,
ms: 1e3,
s: 1e6,
minute: 60 * 1e6,
hour: 60 * 60 * 1e6,
},
defaultUnit: 'ms',
downloadUnit: 'ms',
},
0: {
name: 'I_in',
unit: {
nA: 1,
uA: 1e3,
mA: 1e6,
},
defaultUnit: 'mA',
downloadUnit: 'mA',
},
1: {
name: 'V_out',
unit: {
uV: 1,
mV: 1e3,
V: 1e6,
},
defaultUnit: 'mV',
downloadUnit: 'mV',
},
2: {
name: 'V_in',
unit: {
uV: 1,
mV: 1e3,
V: 1e6,
},
defaultUnit: 'mV',
downloadUnit: 'mV',
},
3: {
name: 'Cycle number',
unit: {
cycle: 1,
},
defaultUnit: 'cycle',
downloadUnit: null,
},
},
charts: {
default: [
{
name: 'Cycle I-V',
description: '',
subplot: [
{
x1: {
type: 'value',
valScale: 'linear',
min: 'dataMin',
max: 'dataMax',
},
y1: {
type: 'value',
valScale: 'linear',
min: 'dataMin',
max: 'dataMax',
},
data: [
{
legend: 'CycleIV',
x1: {
channel: 1,
},
y1: {
channel: 0,
},
},
],
},
],
},
],
},
}
@@ -0,0 +1,134 @@
export default {
name: 'Cyclic Voltammetry',
parameter: [
'VOLT_INITIAL',
'VOLT_MAX',
'VOLT_MIN',
'Scan_Rate',
'SAMPLE_RATE',
'CYCLE_NUMBER',
'ADC_LEVEL_I_15',
'ADC_LEVEL_V_IN_15',
'CTRL_HIGH_Z_15',
], // 這個mode用到的參數
showParameter: [
'ADC_LEVEL_I_15',
'ADC_LEVEL_V_IN_15',
'CTRL_HIGH_Z_15',
'VOLT_INITIAL',
'VOLT_MAX',
'VOLT_MIN',
'Scan_Rate',
'SAMPLE_RATE',
'CYCLE_NUMBER',
], // 有要秀給user看的參數
headerParameter: () => [
'VOLT_INITIAL',
'VOLT_MAX',
'VOLT_MIN',
'Scan_Rate',
'SAMPLE_RATE',
'CYCLE_NUMBER',
'ADC_LEVEL_I_15',
'ADC_LEVEL_V_IN_15',
], // 有要秀給user看的參數
valScales: {
linear: {
func: (val) => {
return val
},
},
log: {
func: (val) => {
return Math.log10(Math.abs(val))
},
},
},
channels: {
time: {
name: 'Time',
unit: {
us: 1,
ms: 1e3,
s: 1e6,
m: 60 * 1e6,
h: 60 * 60 * 1e6,
},
defaultUnit: 'ms',
downloadUnit: 'ms',
},
0: {
name: 'I_in',
unit: {
nA: 1,
uA: 1e3,
mA: 1e6,
},
defaultUnit: 'mA',
downloadUnit: 'mA',
},
1: {
name: 'Potential',
unit: {
uV: 1,
mV: 1e3,
V: 1e6,
},
defaultUnit: 'mV',
downloadUnit: 'mV',
},
2: {
name: 'V_out',
unit: {
uV: 1,
mV: 1e3,
V: 1e6,
},
defaultUnit: 'mV',
downloadUnit: 'mV',
},
3: {
name: 'Cycle number',
unit: {
cycle: 1,
},
defaultUnit: 'cycle',
downloadUnit: null,
},
},
charts: {
default: [
{
name: 'Cyclic Voltammetry',
description: '',
subplot: [
{
x1: {
type: 'value',
valScale: 'linear',
min: 'dataMin',
max: 'dataMax',
},
y1: {
type: 'value',
valScale: 'linear',
min: 'dataMin',
max: 'dataMax',
},
data: [
{
legend: 'CV',
x1: {
channel: 1,
},
y1: {
channel: 0,
},
},
],
},
],
},
],
},
}
+135
View File
@@ -0,0 +1,135 @@
export default {
name: 'Differential Pulse Voltammetry',
parameter: ['DPV_e_init', 'DPV_e_final', 'DPV_increment', 'DPV_amp', 'DPV_pul_width', 'DPV_step_time'], // 這個mode用到的參數
parameterInMode: {
0: ['DPV_e_init', 'DPV_e_final', 'DPV_increment', 'DPV_amp', 'DPV_pul_width', 'DPV_step_time'],
1: [
'DPV_e_init',
'DPV_e_1',
'DPV_e_2',
'DPV_e_final',
'DPV_increment',
'DPV_amp',
'DPV_pul_width',
'DPV_step_time',
'CYCLE_NUMBER',
'DPV_pulse_option',
'DPV_curr_rec',
],
2: [
'DPV_e_init',
'DPV_e_final',
'DPV_increment',
'DPV_amp',
'DPV_pul_width',
'DPV_step_time',
'CYCLE_NUMBER',
'DPV_notify_rate',
'DPV_engineering_enable',
'DPV_e_1',
'DPV_e_2',
'DPV_pulse_option',
],
}, // 這個mode用到的參數
showParameter: [], // 有要秀給user看的參數
headerParameter: () => [], // export header的參數
valScales: {
linear: {
func: (val) => {
return val
},
},
log: {
func: (val) => {
return Math.log10(Math.abs(val))
},
},
},
channels: {
time: {
name: 'Time',
unit: {
us: 1,
ms: 1e3,
s: 1e6,
minute: 60 * 1e6,
hour: 60 * 60 * 1e6,
},
defaultUnit: 'ms',
downloadUnit: 'ms',
},
0: {
name: 'I_in',
unit: {
nA: 1,
uA: 1e3,
mA: 1e6,
},
defaultUnit: 'mA',
downloadUnit: 'mA',
},
1: {
name: 'Potential',
unit: {
uV: 1,
mV: 1e3,
V: 1e6,
},
defaultUnit: 'mV',
downloadUnit: 'mV',
},
2: {
name: 'V_out',
unit: {
uV: 1,
mV: 1e3,
V: 1e6,
},
defaultUnit: 'mV',
downloadUnit: 'mV',
},
3: {
name: 'Cycle number',
unit: {
cycle: 1,
},
defaultUnit: 'cycle',
downloadUnit: null,
},
},
charts: {
default: [
{
name: 'Open Circuit Potential',
description: '',
subplot: [
{
x1: {
type: 'time',
valScale: 'linear',
min: 'dataMin',
max: 'dataMax',
},
y1: {
type: 'value',
valScale: 'linear',
min: 'dataMin',
max: 'dataMax',
},
data: [
{
legend: 'OCP',
x1: {
channel: 'time',
},
y1: {
channel: 1,
},
},
],
},
],
},
],
},
}
+93
View File
@@ -0,0 +1,93 @@
export default {
name: 'Dev Mode',
parameter: ['ADC_VALUE_I'],
valScales: {
linear: {
func: (val) => {
return val
},
},
log: {
func: (val) => {
return Math.log10(Math.abs(val))
},
},
},
channels: {
time: {
name: 'Time',
unit: {
us: 1,
ms: 1e3,
s: 1e6,
m: 60 * 1e6,
h: 60 * 60 * 1e6,
auto: 1,
},
defaultUnit: 'auto',
},
0: {
name: '0',
unit: {
default: 1,
},
defaultUnit: 'default',
},
1: {
name: '1',
unit: {
default: 1,
},
defaultUnit: 'default',
},
2: {
name: '2',
unit: {
default: 1,
},
defaultUnit: 'default',
},
3: {
name: '3',
unit: {
default: 1,
},
defaultUnit: 'default',
},
},
charts: {
default: [
{
name: 'Dev Mode',
description: '',
subplot: [
{
x1: {
type: 'time',
valScale: 'linear',
min: 'dataMin',
max: 'dataMax',
},
y1: {
type: 'value',
valScale: 'linear',
min: 'dataMin',
max: 'dataMax',
},
data: [
{
legend: 'dev',
x1: {
channel: 'time',
},
y1: {
channel: 1,
},
},
],
},
],
},
],
},
}
@@ -0,0 +1,97 @@
export default {
name: 'Function Generator',
parameter: ['DAC_VOLT', 'SAMPLE_RATE', 'ADC_LEVEL_I_15', 'ADC_LEVEL_V_IN_15', 'CTRL_HIGH_Z_15', 'TIME_DURATION'], // 這個mode用到的參數
showParameter: ['ADC_LEVEL_I_15', 'ADC_LEVEL_V_IN_15', 'CTRL_HIGH_Z_15', 'DAC_VOLT', 'SAMPLE_RATE', 'TIME_DURATION'], // 有要秀給user看的參數
headerParameter: () => ['DAC_VOLT', 'SAMPLE_RATE', 'ADC_LEVEL_I_15', 'ADC_LEVEL_V_IN_15', 'TIME_DURATION'], // export header的參數
valScales: {
linear: {
func: (val) => {
return val
},
},
log: {
func: (val) => {
return Math.log10(Math.abs(val))
},
},
},
channels: {
time: {
name: 'Time',
unit: {
us: 1,
ms: 1e3,
s: 1e6,
minute: 60 * 1e6,
hour: 60 * 60 * 1e6,
},
defaultUnit: 'ms',
downloadUnit: 'ms',
},
0: {
name: 'I_in',
unit: {
nA: 1,
uA: 1e3,
mA: 1e6,
},
defaultUnit: 'mA',
downloadUnit: 'mA',
},
1: {
name: 'V_out',
unit: {
uV: 1,
mV: 1e3,
V: 1e6,
},
defaultUnit: 'mV',
downloadUnit: 'mV',
},
2: {
name: 'V_in',
unit: {
uV: 1,
mV: 1e3,
V: 1e6,
},
defaultUnit: 'mV',
downloadUnit: 'mV',
},
},
charts: {
default: [
{
name: 'Function Generator',
description: '',
subplot: [
{
x1: {
type: 'time',
valScale: 'linear',
min: 'dataMin',
max: 'dataMax',
},
y1: {
type: 'value',
valScale: 'linear',
min: 'dataMin',
max: 'dataMax',
},
data: [
{
legend: 'FuncGen',
x1: {
channel: 'time',
},
y1: {
channel: 1,
},
},
],
},
],
},
],
},
}
+97
View File
@@ -0,0 +1,97 @@
export default {
name: 'I-T Graph',
parameter: ['DAC_VOLT', 'SAMPLE_RATE', 'ADC_LEVEL_I_15', 'ADC_LEVEL_V_IN_15', 'CTRL_HIGH_Z_15', 'TIME_DURATION'], // 這個mode用到的參數
showParameter: ['ADC_LEVEL_I_15', 'ADC_LEVEL_V_IN_15', 'CTRL_HIGH_Z_15', 'DAC_VOLT', 'SAMPLE_RATE', 'TIME_DURATION'], // 有要秀給user看的參數
headerParameter: () => ['DAC_VOLT', 'SAMPLE_RATE', 'ADC_LEVEL_I_15', 'ADC_LEVEL_V_IN_15', 'TIME_DURATION'], // export header的參數
valScales: {
linear: {
func: (val) => {
return val
},
},
log: {
func: (val) => {
return Math.log10(Math.abs(val))
},
},
},
channels: {
time: {
name: 'Time',
unit: {
us: 1,
ms: 1e3,
s: 1e6,
minute: 60 * 1e6,
hour: 60 * 60 * 1e6,
},
defaultUnit: 'ms',
downloadUnit: 'ms',
},
0: {
name: 'I_in',
unit: {
nA: 1,
uA: 1e3,
mA: 1e6,
},
defaultUnit: 'mA',
downloadUnit: 'mA',
},
1: {
name: 'V_in',
unit: {
uV: 1,
mV: 1e3,
V: 1e6,
},
defaultUnit: 'mV',
downloadUnit: 'mV',
},
2: {
name: 'V_out',
unit: {
uV: 1,
mV: 1e3,
V: 1e6,
},
defaultUnit: 'mV',
downloadUnit: 'mV',
},
},
charts: {
default: [
{
name: 'I-T Graph',
description: '',
subplot: [
{
x1: {
type: 'time',
valScale: 'linear',
min: 'dataMin',
max: 'dataMax',
},
y1: {
type: 'value',
valScale: 'linear',
min: 'dataMin',
max: 'dataMax',
},
data: [
{
legend: 'IT',
x1: {
channel: 'time',
},
y1: {
channel: 0,
},
},
],
},
],
},
],
},
}
+123
View File
@@ -0,0 +1,123 @@
export default {
name: 'I-V Curve',
parameter: [
'VOLT_ORIGIN',
'VOLT_FINAL',
'VOLT_STEP',
'STEP_TIME',
'SAMPLE_RATE',
'ADC_LEVEL_I_15',
'ADC_LEVEL_V_IN_15',
'CTRL_HIGH_Z_15',
], // 這個mode用到的參數
showParameter: [
'ADC_LEVEL_I_15',
'ADC_LEVEL_V_IN_15',
'CTRL_HIGH_Z_15',
'VOLT_ORIGIN',
'VOLT_FINAL',
'VOLT_STEP',
'STEP_TIME',
'SAMPLE_RATE',
], // 有要秀給user看的參數
headerParameter: () => [
'VOLT_ORIGIN',
'VOLT_FINAL',
'VOLT_STEP',
'STEP_TIME',
'SAMPLE_RATE',
'ADC_LEVEL_I_15',
'ADC_LEVEL_V_IN_15',
], // export header的參數
valScales: {
linear: {
func: (val) => {
return val
},
},
log: {
func: (val) => {
return Math.log10(Math.abs(val))
},
},
},
channels: {
time: {
name: 'Time',
unit: {
us: 1,
ms: 1e3,
s: 1e6,
minute: 60 * 1e6,
hour: 60 * 60 * 1e6,
},
defaultUnit: 'ms',
downloadUnit: 'ms',
},
0: {
name: 'I_in',
unit: {
nA: 1,
uA: 1e3,
mA: 1e6,
},
defaultUnit: 'mA',
downloadUnit: 'mA',
},
1: {
name: 'V_out',
unit: {
uV: 1,
mV: 1e3,
V: 1e6,
},
defaultUnit: 'mV',
downloadUnit: 'mV',
},
2: {
name: 'V_in',
unit: {
uV: 1,
mV: 1e3,
V: 1e6,
},
defaultUnit: 'mV',
downloadUnit: 'mV',
},
},
charts: {
default: [
{
name: 'I-V Curve',
description: '',
subplot: [
{
x1: {
type: 'value',
valScale: 'linear',
min: 'dataMin',
max: 'dataMax',
},
y1: {
type: 'value',
valScale: 'linear',
min: 'dataMin',
max: 'dataMax',
},
data: [
{
legend: 'IV',
x1: {
channel: 1,
},
y1: {
channel: 0,
},
},
],
},
],
},
],
},
}
@@ -0,0 +1,120 @@
export default {
name: 'Linear Sweep Voltammetry',
parameter: [
'VOLT_INITIAL',
'VOLT_EFINAL',
'Scan_Rate',
'SAMPLE_RATE',
'ADC_LEVEL_I_15',
'ADC_LEVEL_V_IN_15',
'CTRL_HIGH_Z_15',
], // 這個mode用到的參數
showParameter: [
'ADC_LEVEL_I_15',
'ADC_LEVEL_V_IN_15',
'CTRL_HIGH_Z_15',
'VOLT_INITIAL',
'VOLT_EFINAL',
'Scan_Rate',
'SAMPLE_RATE',
], // 有要秀給user看的參數
headerParameter: () => [
'VOLT_INITIAL',
'VOLT_EFINAL',
'Scan_Rate',
'SAMPLE_RATE',
'ADC_LEVEL_I_15',
'ADC_LEVEL_V_IN_15',
], // 有要秀給user看的參數
valScales: {
linear: {
func: (val) => {
return val
},
},
log: {
func: (val) => {
return Math.log10(Math.abs(val))
},
},
},
channels: {
time: {
name: 'Time',
unit: {
us: 1,
ms: 1e3,
s: 1e6,
minute: 60 * 1e6,
hour: 60 * 60 * 1e6,
},
defaultUnit: 'ms',
downloadUnit: 'ms',
},
0: {
name: 'I_in',
unit: {
nA: 1,
uA: 1e3,
mA: 1e6,
},
defaultUnit: 'mA',
downloadUnit: 'mA',
},
1: {
name: 'Potential',
unit: {
uV: 1,
mV: 1e3,
V: 1e6,
},
defaultUnit: 'mV',
downloadUnit: 'mV',
},
2: {
name: 'V_out',
unit: {
uV: 1,
mV: 1e3,
V: 1e6,
},
defaultUnit: 'mV',
downloadUnit: 'mV',
},
},
charts: {
default: [
{
name: 'Linear Sweep Voltammetry',
description: '',
subplot: [
{
x1: {
type: 'value',
valScale: 'linear',
min: 'dataMin',
max: 'dataMax',
},
y1: {
type: 'value',
valScale: 'linear',
min: 'dataMin',
max: 'dataMax',
},
data: [
{
legend: 'LSV',
x1: {
channel: 1,
},
y1: {
channel: 0,
},
},
],
},
],
},
],
},
}
+97
View File
@@ -0,0 +1,97 @@
export default {
name: 'Open Circuit Potential',
parameter: ['SAMPLE_RATE', 'ADC_LEVEL_I_15', 'ADC_LEVEL_V_IN_15', 'TIME_DURATION'], // 這個mode用到的參數
showParameter: ['ADC_LEVEL_I_15', 'ADC_LEVEL_V_IN_15', 'SAMPLE_RATE', 'TIME_DURATION'], // 有要秀給user看的參數
headerParameter: () => ['SAMPLE_RATE', 'ADC_LEVEL_I_15', 'ADC_LEVEL_V_IN_15', 'TIME_DURATION'], // export header的參數
valScales: {
linear: {
func: (val) => {
return val
},
},
log: {
func: (val) => {
return Math.log10(Math.abs(val))
},
},
},
channels: {
time: {
name: 'Time',
unit: {
us: 1,
ms: 1e3,
s: 1e6,
minute: 60 * 1e6,
hour: 60 * 60 * 1e6,
},
defaultUnit: 'ms',
downloadUnit: 'ms',
},
0: {
name: 'I_in',
unit: {
nA: 1,
uA: 1e3,
mA: 1e6,
},
defaultUnit: 'mA',
downloadUnit: 'mA',
},
1: {
name: 'Potential',
unit: {
uV: 1,
mV: 1e3,
V: 1e6,
},
defaultUnit: 'mV',
downloadUnit: 'mV',
},
2: {
name: 'V_in',
unit: {
uV: 1,
mV: 1e3,
V: 1e6,
},
defaultUnit: 'mV',
downloadUnit: 'mV',
},
},
charts: {
default: [
{
name: 'Open Circuit Potential',
description: '',
subplot: [
{
x1: {
type: 'time',
valScale: 'linear',
min: 'dataMin',
max: 'dataMax',
},
y1: {
type: 'value',
valScale: 'linear',
min: 'dataMin',
max: 'dataMax',
},
data: [
{
legend: 'OCP',
x1: {
channel: 'time',
},
y1: {
channel: 1,
},
},
],
},
],
},
],
},
}
@@ -0,0 +1,103 @@
export default {
name: 'Pulse Sensing',
parameter: ['V_initial', 't_pulse', 'CURR_REC'],
// parameter: ['V_initial', 't_pulse', 'CURR_REC_START', 'CURR_REC_END', 'segment_ui_order', 'segment_order', 'DATA_OUTPUT', 'CYCLE_NUMBER'], // 這個mode用到的參數
showParameter: ['V_initial', 't_pulse', 'CURR_REC'], // 有要秀給user看的參數
headerParameter: (parameterSet) => {
// [
// 'V_initial_0', 't_pulse_0', 'CURR_REC_START_0', 'CURR_REC_END_0',
// 'V_initial_1', 't_pulse_1', 'CURR_REC_START_1', 'CURR_REC_END_1',
// 'V_initial_2', 't_pulse_2', 'CURR_REC_START_2', 'CURR_REC_END_2',
// 'V_initial_3', 't_pulse_3', 'CURR_REC_START_3', 'CURR_REC_END_3',
// ]
const defaultParameter = ['V_initial', 't_pulse', 'CURR_REC']
const ret = []
for (let index = 0; index < 4; index++) {
if (parameterSet.segment_order[index] !== -1) {
ret.push(...defaultParameter.map((ele) => [ele, index]))
}
}
return ret
}, // export header的參數
valScales: {
linear: {
func: (val) => {
return val
},
},
log: {
func: (val) => {
return Math.log10(Math.abs(val))
},
},
},
channels: {
time: {
name: 'Time',
unit: {
us: 1,
ms: 1e3,
s: 1e6,
minute: 60 * 1e6,
hour: 60 * 60 * 1e6,
},
defaultUnit: 'ms',
downloadUnit: 'ms',
},
0: {
name: 'I_in_pul1',
unit: {
nA: 1,
uA: 1e3,
mA: 1e6,
},
defaultUnit: 'mA',
downloadUnit: 'mA',
},
1: {
name: 'I_in_pul2',
unit: {
nA: 1,
uA: 1e3,
mA: 1e6,
},
defaultUnit: 'mA',
downloadUnit: 'mA',
},
},
charts: {
default: [
{
name: 'Pulse Sensing',
description: '',
subplot: [
{
x1: {
type: 'time',
valScale: 'linear',
min: 'dataMin',
max: 'dataMax',
},
y1: {
type: 'value',
valScale: 'linear',
min: 'dataMin',
max: 'dataMax',
},
data: [
{
legend: 'PulseSensing',
x1: {
channel: 'time',
},
y1: {
channel: 1,
},
},
],
},
],
},
],
},
}
+102
View File
@@ -0,0 +1,102 @@
export default {
name: 'R-T Graph',
parameter: ['DAC_VOLT', 'SAMPLE_RATE', 'CTRL_HIGH_Z_15', 'TIME_DURATION'], // 這個mode用到的參數
showParameter: ['CTRL_HIGH_Z_15', 'DAC_VOLT', 'SAMPLE_RATE', 'TIME_DURATION'], // 有要秀給user看的參數
headerParameter: () => ['DAC_VOLT', 'SAMPLE_RATE', 'ADC_LEVEL_I_15', 'ADC_LEVEL_V_IN_15', 'TIME_DURATION'], // export header的參數
valScales: {
linear: {
func: (val) => {
return val
},
},
log: {
func: (val) => {
return Math.log10(Math.abs(val))
},
},
},
channels: {
time: {
name: 'Time',
unit: {
us: 1,
ms: 1e3,
s: 1e6,
minute: 60 * 1e6,
hour: 60 * 60 * 1e6,
},
defaultUnit: 'ms',
downloadUnit: 'ms',
},
0: {
name: 'I_in',
unit: {
nA: 1,
uA: 1e3,
mA: 1e6,
},
defaultUnit: 'mA',
downloadUnit: 'mA',
},
1: {
name: 'V_out',
unit: {
uV: 1,
mV: 1e3,
V: 1e6,
},
defaultUnit: 'mV',
downloadUnit: 'mV',
},
2: {
name: 'Resistor',
unit: {
: 1,
mohm: 1,
Ω: 1e3,
ohm: 1e3,
: 1e6,
kohm: 1e6,
: 1e9,
Mohm: 1e9,
},
defaultUnit: 'Ω',
downloadUnit: 'ohm',
},
},
charts: {
default: [
{
name: 'R-T Graph',
description: '',
subplot: [
{
x1: {
type: 'time',
valScale: 'linear',
min: 'dataMin',
max: 'dataMax',
},
y1: {
type: 'value',
valScale: 'linear',
min: 'dataMin',
max: 'dataMax',
},
data: [
{
legend: 'RT',
x1: {
channel: 'time',
},
y1: {
channel: 2,
},
},
],
},
],
},
],
},
}
+87
View File
@@ -0,0 +1,87 @@
export default {
name: 'V-T Graph',
parameter: ['SAMPLE_RATE', 'ADC_LEVEL_I_15', 'ADC_LEVEL_V_IN_15', 'CTRL_HIGH_Z_15', 'TIME_DURATION'], // 這個mode用到的參數
showParameter: ['ADC_LEVEL_I_15', 'ADC_LEVEL_V_IN_15', 'CTRL_HIGH_Z_15', 'SAMPLE_RATE', 'TIME_DURATION'], // 有要秀給user看的參數
headerParameter: () => ['SAMPLE_RATE', 'ADC_LEVEL_I_15', 'ADC_LEVEL_V_IN_15', 'TIME_DURATION'], // export header的參數
valScales: {
linear: {
func: (val) => {
return val
},
},
log: {
func: (val) => {
return Math.log10(Math.abs(val))
},
},
},
channels: {
time: {
name: 'Time',
unit: {
us: 1,
ms: 1e3,
s: 1e6,
minute: 60 * 1e6,
hour: 60 * 60 * 1e6,
},
defaultUnit: 'ms',
downloadUnit: 'ms',
},
0: {
name: 'I_in',
unit: {
nA: 1,
uA: 1e3,
mA: 1e6,
},
defaultUnit: 'mA',
downloadUnit: 'mA',
},
1: {
name: 'V_in',
unit: {
uV: 1,
mV: 1e3,
V: 1e6,
},
defaultUnit: 'mV',
downloadUnit: 'mV',
},
},
charts: {
default: [
{
name: 'V-T Graph',
description: '',
subplot: [
{
x1: {
type: 'time',
valScale: 'linear',
min: 'dataMin',
max: 'dataMax',
},
y1: {
type: 'value',
valScale: 'linear',
min: 'dataMin',
max: 'dataMax',
},
data: [
{
legend: 'VT',
x1: {
channel: 'time',
},
y1: {
channel: 1,
},
},
],
},
],
},
],
},
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,97 @@
export default {
name: 'Chronoamperometry',
parameter: ['CA_VOLT', 'SAMPLE_RATE', 'GENERAL_LP_RTIA', 'CTRL_HIGH_Z_15', 'TIME_DURATION'], // 這個mode用到的參數
showParameter: ['GENERAL_LP_RTIA', 'CTRL_HIGH_Z_15', 'CA_VOLT', 'SAMPLE_RATE', 'TIME_DURATION'], // 有要秀給user看的參數
headerParameter: () => ['CA_VOLT', 'SAMPLE_RATE', 'GENERAL_LP_RTIA', 'TIME_DURATION'], // 有要秀給user看的參數
valScales: {
linear: {
func: (val) => {
return val
},
},
log: {
func: (val) => {
return Math.log10(Math.abs(val))
},
},
},
channels: {
time: {
name: 'Time',
unit: {
us: 1,
ms: 1e3,
s: 1e6,
minute: 60 * 1e6,
hour: 60 * 60 * 1e6,
},
defaultUnit: 'ms',
downloadUnit: 'ms',
},
0: {
name: 'I_in',
unit: {
nA: 1,
uA: 1e3,
mA: 1e6,
},
defaultUnit: 'mA',
downloadUnit: 'mA',
},
1: {
name: 'Potential',
unit: {
uV: 1,
mV: 1e3,
V: 1e6,
},
defaultUnit: 'mV',
downloadUnit: 'mV',
},
2: {
name: 'V_out',
unit: {
uV: 1,
mV: 1e3,
V: 1e6,
},
defaultUnit: 'mV',
downloadUnit: 'mV',
},
},
charts: {
default: [
{
name: 'Chronoamperometric',
description: '',
subplot: [
{
x1: {
type: 'time',
valScale: 'linear',
min: 'dataMin',
max: 'dataMax',
},
y1: {
type: 'value',
valScale: 'linear',
min: 'dataMin',
max: 'dataMax',
},
data: [
{
legend: 'chrono',
x1: {
channel: 'time',
},
y1: {
channel: 0,
},
},
],
},
],
},
],
},
}
@@ -0,0 +1,273 @@
export default {
name: 'Constant Frequency',
parameter: [
'CF_DC_BIAS',
'CF_AC_AMP',
'CF_FREQ',
'CF_PPD',
'CF_SCALE',
'CF_DELAY',
'CF_AVERAGE_NUM',
'GENERAL_HS_RTIA',
], // 這個mode用到的參數
showParameter: [
'CF_DC_BIAS',
'CF_AC_AMP',
'CF_FREQ',
'CF_PPD',
'CF_SCALE',
'CF_DELAY',
'CF_AVERAGE_NUM',
'GENERAL_HS_RTIA',
], // 有要秀給user看的參數
headerParameter: () => [
'CF_DC_BIAS',
'CF_AC_AMP',
'CF_FREQ',
'CF_PPD',
'CF_SCALE',
'CF_DELAY',
'CF_AVERAGE_NUM',
'GENERAL_HS_RTIA',
], // 有要秀給user看的參數
valScales: {
linear: {
func: (val) => {
return val
},
},
log: {
func: (val) => {
return Math.log10(Math.abs(val))
},
},
},
channels: {
time: {
name: 'Time',
unit: {
us: 1,
ms: 1e3,
s: 1e6,
m: 60 * 1e6,
h: 60 * 60 * 1e6,
auto: 1,
},
defaultUnit: 'auto',
downloadUnit: 'ms',
},
0: {
name: 'Z_Imag_Raw',
unit: {
ohm: 1,
},
downloadUnit: 'ohm',
defaultUnit: 'ohm',
},
1: {
name: 'Z_Real_Raw',
unit: {
default: 1,
},
downloadUnit: 'ohm',
defaultUnit: 'ohm',
},
2: {
name: 'Frequency',
unit: {
mHz: 1,
Hz: 1e3,
kHz: 1e6,
},
downloadUnit: 'mHz',
defaultUnit: 'mHz',
},
// 3: {
// name: 'Cycle',
// unit: {
// cycle: 1,
// },
// defaultUnit: 'cycle',
// downloadUnit: null,
// },
4: {
name: 'Z_Imag',
unit: {
mohm: 1e-3,
: 1e-3,
ohm: 1,
Ω: 1,
kohm: 1e3,
: 1e3,
Mohm: 1e6,
: 1e6,
},
downloadUnit: 'ohm',
defaultUnit: 'Ω',
},
5: {
name: 'Z_Real',
unit: {
mohm: 1e-3,
: 1e-3,
ohm: 1,
Ω: 1,
kohm: 1e3,
: 1e3,
Mohm: 1e6,
: 1e6,
},
downloadUnit: 'ohm',
defaultUnit: 'Ω',
},
6: {
name: 'Impedance',
unit: {
mohm: 1e-3,
: 1e-3,
ohm: 1,
Ω: 1,
kohm: 1e3,
: 1e3,
Mohm: 1e6,
: 1e6,
},
downloadUnit: 'ohm',
defaultUnit: 'Ω',
},
7: {
name: 'Phase',
unit: {
millidegree: 1,
'°': 1e3,
},
downloadUnit: 'millidegree',
defaultUnit: '°',
},
8: {
name: 'Current',
unit: {
nA: 1,
uA: 1e3,
mA: 1e6,
},
downloadUnit: 'nA',
defaultUnit: 'nA',
},
9: {
name: 'Level gain',
unit: {
default: 1,
},
downloadUnit: null,
defaultUnit: 'default',
},
10: {
name: 'notify_one',
unit: {
default: 1,
},
downloadUnit: null,
defaultUnit: 'default',
},
11: {
name: 'notify_two',
unit: {
default: 1,
},
downloadUnit: null,
defaultUnit: 'default',
},
12: {
name: 'notify_three',
unit: {
default: 1,
},
downloadUnit: null,
defaultUnit: 'default',
},
13: {
name: 'debug_amp[mV]',
unit: {
default: 1,
},
downloadUnit: null,
defaultUnit: 'default',
},
},
charts: {
default: [
{
name: 'Nyquist',
description: '',
subplot: [
{
x1: {
type: 'value',
valScale: 'linear',
min: 'dataMin',
max: 'dataMax',
},
y1: {
type: 'value',
valScale: 'linear',
min: 'dataMin',
max: 'dataMax',
},
data: [
{
legend: 'Nyquist',
x1: {
channel: 5,
},
y1: {
channel: 4,
},
},
],
},
],
},
{
name: 'Bode',
description: '',
subplot: [
{
x1: {
type: 'value',
valScale: 'log',
min: 'dataMin',
max: 'dataMax',
},
y1: {
type: 'value',
valScale: 'linear',
min: 'dataMin',
max: 'dataMax',
},
y2: {
type: 'value',
valScale: 'linear',
min: 'dataMin',
max: 'dataMax',
},
data: [
{
legend: 'Bode',
x1: {
channel: 2,
},
y1: {
channel: 6,
},
y2: {
channel: 7,
},
},
],
},
],
},
],
},
}
@@ -0,0 +1,123 @@
export default {
name: 'Cyclic Voltammetry',
parameter: ['CV_E_INITIAL', 'CV_E1', 'CV_E2', 'CV_SCAN_RATE', 'SAMPLE_RATE', 'CYCLE_NUMBER', 'GENERAL_LP_RTIA'], // 這個mode用到的參數
showParameter: [
'GENERAL_LP_RTIA',
'CTRL_HIGH_Z_15',
'CV_E_INITIAL',
'CV_E1',
'CV_E2',
'CV_SCAN_RATE',
'SAMPLE_RATE',
'CYCLE_NUMBER',
], // 有要秀給user看的參數
headerParameter: () => [
'CV_E_INITIAL',
'CV_E1',
'CV_E2',
'CV_SCAN_RATE',
'SAMPLE_RATE',
'CYCLE_NUMBER',
'GENERAL_LP_RTIA',
], // 有要秀給user看的參數
valScales: {
linear: {
func: (val) => {
return val
},
},
log: {
func: (val) => {
return Math.log10(Math.abs(val))
},
},
},
channels: {
time: {
name: 'Time',
unit: {
us: 1,
ms: 1e3,
s: 1e6,
m: 60 * 1e6,
h: 60 * 60 * 1e6,
auto: 1,
},
defaultUnit: 'auto',
downloadUnit: 'ms',
},
0: {
name: 'I_in',
unit: {
nA: 1,
uA: 1e3,
mA: 1e6,
},
defaultUnit: 'uA',
downloadUnit: 'mA',
},
1: {
name: 'V_out-V_in',
unit: {
uV: 1,
mV: 1e3,
V: 1e6,
},
defaultUnit: 'mV',
downloadUnit: 'mV',
},
2: {
name: 'V_out',
unit: {
uV: 1,
mV: 1e3,
V: 1e6,
},
defaultUnit: 'mV',
downloadUnit: 'mV',
},
3: {
name: 'Cycle',
unit: {
cycle: 1,
},
defaultUnit: 'cycle',
downloadUnit: null,
},
},
charts: {
default: [
{
name: 'Cyclic Voltammetry',
description: '',
subplot: [
{
x1: {
type: 'value',
valScale: 'linear',
min: 'dataMin',
max: 'dataMax',
},
y1: {
type: 'value',
valScale: 'linear',
min: 'dataMin',
max: 'dataMax',
},
data: [
{
legend: 'CV',
x1: {
channel: 1,
},
y1: {
channel: 0,
},
},
],
},
],
},
],
},
}
+93
View File
@@ -0,0 +1,93 @@
export default {
name: 'Dev Mode',
parameter: ['ADC_VALUE_I'],
valScales: {
linear: {
func: (val) => {
return val
},
},
log: {
func: (val) => {
return Math.log10(Math.abs(val))
},
},
},
channels: {
time: {
name: 'Time',
unit: {
us: 1,
ms: 1e3,
s: 1e6,
m: 60 * 1e6,
h: 60 * 60 * 1e6,
auto: 1,
},
defaultUnit: 'us',
},
0: {
name: '0',
unit: {
default: 1,
},
defaultUnit: 'default',
},
1: {
name: '1',
unit: {
default: 1,
},
defaultUnit: 'default',
},
2: {
name: '2',
unit: {
default: 1,
},
defaultUnit: 'default',
},
3: {
name: '3',
unit: {
default: 1,
},
defaultUnit: 'default',
},
},
charts: {
default: [
{
name: 'Dev Mode',
description: '',
subplot: [
{
x1: {
type: 'time',
valScale: 'linear',
min: 'dataMin',
max: 'dataMax',
},
y1: {
type: 'value',
valScale: 'linear',
min: 'dataMin',
max: 'dataMax',
},
data: [
{
legend: 'dev',
x1: {
channel: 'time',
},
y1: {
channel: 1,
},
},
],
},
],
},
],
},
}
@@ -0,0 +1,275 @@
export default {
name: 'EIS',
parameter: [
'EIS_DC_BIAS',
'EIS_AC_AMP',
'EIS_FREQ',
'EIS_PPD',
'EIS_SCALE',
'EIS_DELAY',
'EIS_AVERAGE_NUM',
'GENERAL_HS_RTIA',
], // 這個mode用到的參數
showParameter: [
'EIS_DC_BIAS',
'EIS_AC_AMP',
'EIS_FREQ',
'EIS_PPD',
'EIS_SCALE',
'EIS_DELAY',
'EIS_AVERAGE_NUM',
'GENERAL_HS_RTIA',
], // 有要秀給user看的參數
headerParameter: () => [
'EIS_DC_BIAS',
'EIS_AC_AMP',
'EIS_FREQ',
'EIS_PPD',
'EIS_SCALE',
'EIS_DELAY',
'EIS_AVERAGE_NUM',
'GENERAL_HS_RTIA',
], // 有要秀給user看的參數
valScales: {
linear: {
func: (val) => {
return val
},
},
log: {
func: (val) => {
return Math.log10(Math.abs(val))
},
},
},
channels: {
time: {
name: 'Time',
unit: {
us: 1,
ms: 1e3,
s: 1e6,
m: 60 * 1e6,
h: 60 * 60 * 1e6,
auto: 1,
},
defaultUnit: 'auto',
downloadUnit: 'ms',
},
0: {
name: 'Z_Imag_Raw',
unit: {
ohm: 1,
},
downloadUnit: 'ohm',
defaultUnit: 'ohm',
},
1: {
name: 'Z_Real_Raw',
unit: {
default: 1,
},
downloadUnit: 'ohm',
defaultUnit: 'ohm',
},
2: {
name: 'Frequency',
unit: {
mHz: 1,
Hz: 1e3,
kHz: 1e6,
},
downloadUnit: 'mHz',
defaultUnit: 'mHz',
},
// 3: {
// name: 'Cycle',
// unit: {
// cycle: 1,
// },
// defaultUnit: 'cycle',
// downloadUnit: null,
// },
4: {
name: 'Z_Imag',
unit: {
mohm: 1e-3,
: 1e-3,
ohm: 1,
Ω: 1,
kohm: 1e3,
: 1e3,
Mohm: 1e6,
: 1e6,
},
downloadUnit: 'ohm',
defaultUnit: 'Ω',
},
5: {
name: 'Z_Real',
unit: {
mohm: 1e-3,
: 1e-3,
ohm: 1,
Ω: 1,
kohm: 1e3,
: 1e3,
Mohm: 1e6,
: 1e6,
},
downloadUnit: 'ohm',
defaultUnit: 'Ω',
},
6: {
name: 'Impedance',
unit: {
mohm: 1e-3,
: 1e-3,
ohm: 1,
Ω: 1,
kohm: 1e3,
: 1e3,
Mohm: 1e6,
: 1e6,
},
downloadUnit: 'ohm',
defaultUnit: 'Ω',
},
7: {
name: 'Phase',
unit: {
millidegree: 1,
'°': 1e3,
},
downloadUnit: 'millidegree',
defaultUnit: '°',
},
8: {
name: 'Current',
unit: {
nA: 1,
uA: 1e3,
mA: 1e6,
},
downloadUnit: 'nA',
defaultUnit: 'nA',
},
9: {
name: 'Level gain',
unit: {
default: 1,
},
downloadUnit: null,
defaultUnit: 'default',
},
10: {
name: 'notify_one',
unit: {
default: 1,
},
downloadUnit: null,
defaultUnit: 'default',
},
11: {
name: 'notify_two',
unit: {
default: 1,
},
downloadUnit: null,
defaultUnit: 'default',
},
12: {
name: 'notify_three',
unit: {
default: 1,
},
downloadUnit: null,
defaultUnit: 'default',
},
13: {
name: 'debug_amp[mV]',
unit: {
uV: 1,
mV: 1e3,
V: 1e6,
},
defaultUnit: 'mV',
downloadUnit: 'mV',
},
},
charts: {
default: [
{
name: 'Nyquist',
description: '',
subplot: [
{
x1: {
type: 'value',
valScale: 'linear',
min: 'dataMin',
max: 'dataMax',
},
y1: {
type: 'value',
valScale: 'linear',
min: 'dataMin',
max: 'dataMax',
},
data: [
{
legend: 'Nyquist',
x1: {
channel: 5,
},
y1: {
channel: 4,
},
},
],
},
],
},
{
name: 'Bode',
description: '',
subplot: [
{
x1: {
type: 'value',
valScale: 'log',
min: 'dataMin',
max: 'dataMax',
},
y1: {
type: 'value',
valScale: 'linear',
min: 'dataMin',
max: 'dataMax',
},
y2: {
type: 'value',
valScale: 'linear',
min: 'dataMin',
max: 'dataMax',
},
data: [
{
legend: 'Bode',
x1: {
channel: 2,
},
y1: {
channel: 6,
},
y2: {
channel: 7,
},
},
],
},
],
},
],
},
}
+102
View File
@@ -0,0 +1,102 @@
export default {
name: 'R-T Graph',
parameter: ['RT_VOLT_SET', 'SAMPLE_RATE', 'CTRL_HIGH_Z_15', 'TIME_DURATION'], // 這個mode用到的參數
showParameter: ['RT_VOLT_SET', 'SAMPLE_RATE', 'CTRL_HIGH_Z_15', 'TIME_DURATION'], // 有要秀給user看的參數
headerParameter: () => ['RT_VOLT_SET', 'SAMPLE_RATE', 'GENERAL_LP_RTIA', 'TIME_DURATION'], // export header的參數
valScales: {
linear: {
func: (val) => {
return val
},
},
log: {
func: (val) => {
return Math.log10(Math.abs(val))
},
},
},
channels: {
time: {
name: 'Time',
unit: {
us: 1,
ms: 1e3,
s: 1e6,
minute: 60 * 1e6,
hour: 60 * 60 * 1e6,
},
defaultUnit: 'ms',
downloadUnit: 'ms',
},
0: {
name: 'I_in',
unit: {
nA: 1,
uA: 1e3,
mA: 1e6,
},
defaultUnit: 'mA',
downloadUnit: 'mA',
},
1: {
name: 'V_out',
unit: {
uV: 1,
mV: 1e3,
V: 1e6,
},
defaultUnit: 'mV',
downloadUnit: 'mV',
},
2: {
name: 'Resistor',
unit: {
: 1,
mohm: 1,
Ω: 1e3,
ohm: 1e3,
: 1e6,
kohm: 1e6,
: 1e9,
Mohm: 1e9,
},
defaultUnit: 'Ω',
downloadUnit: 'ohm',
},
},
charts: {
default: [
{
name: 'R-T Graph',
description: '',
subplot: [
{
x1: {
type: 'time',
valScale: 'linear',
min: 'dataMin',
max: 'dataMax',
},
y1: {
type: 'value',
valScale: 'linear',
min: 'dataMin',
max: 'dataMax',
},
data: [
{
legend: 'RT',
x1: {
channel: 'time',
},
y1: {
channel: 2,
},
},
],
},
],
},
],
},
}
+87
View File
@@ -0,0 +1,87 @@
export default {
name: 'V-T Graph',
parameter: ['SAMPLE_RATE', 'VT_MEASURE_VIN_RANGE', 'GENERAL_LP_RTIA', 'CTRL_HIGH_Z_15', 'TIME_DURATION'], // 這個mode用到的參數
showParameter: ['SAMPLE_RATE', 'VT_MEASURE_VIN_RANGE', 'GENERAL_LP_RTIA', 'CTRL_HIGH_Z_15', 'TIME_DURATION'], // 有要秀給user看的參數
headerParameter: () => ['SAMPLE_RATE', 'VT_MEASURE_VIN_RANGE', 'GENERAL_LP_RTIA', 'TIME_DURATION'], // export header的參數
valScales: {
linear: {
func: (val) => {
return val
},
},
log: {
func: (val) => {
return Math.log10(Math.abs(val))
},
},
},
channels: {
time: {
name: 'Time',
unit: {
us: 1,
ms: 1e3,
s: 1e6,
minute: 60 * 1e6,
hour: 60 * 60 * 1e6,
},
defaultUnit: 'ms',
downloadUnit: 'ms',
},
0: {
name: 'I_in',
unit: {
nA: 1,
uA: 1e3,
mA: 1e6,
},
defaultUnit: 'mA',
downloadUnit: 'mA',
},
1: {
name: 'V_in',
unit: {
uV: 1,
mV: 1e3,
V: 1e6,
},
defaultUnit: 'mV',
downloadUnit: 'mV',
},
},
charts: {
default: [
{
name: 'V-T Graph',
description: '',
subplot: [
{
x1: {
type: 'time',
valScale: 'linear',
min: 'dataMin',
max: 'dataMax',
},
y1: {
type: 'value',
valScale: 'linear',
min: 'dataMin',
max: 'dataMax',
},
data: [
{
legend: 'VT',
x1: {
channel: 'time',
},
y1: {
channel: 1,
},
},
],
},
],
},
],
},
}
+579
View File
@@ -0,0 +1,579 @@
import PotentiostaticEIS from './PotentiostaticEIS'
import CyclicVoltammetry from './CyclicVoltammetry'
import DevMode from './DevMode'
import Chronoamperometry from './Chronoamperometry'
import VT from './VT'
import RT from './RT'
import ConstantFrequency from './ConstantFrequency'
import Idle from '../Common/Idle'
const EliteEIS = {
TIME_DURATION: {
type: 'number',
showName: 'Time duration',
componentType: 'input-range',
range: Object.freeze({ min: 0, max: 86400 }), // UI上能輸入的最大最小值
defaultValue: 0,
defaultUnit: 's',
downloadUnit: 's',
unit: {
ms: 1e-3,
s: 1,
m: 60,
h: 3600,
},
outputRawData: (val) => {
return parseInt(parseFloat(val))
},
outputReadabilityData: (val) => {
return parseInt(parseFloat(val))
},
},
CTRL_HIGH_Z_15: {
type: 'array',
showName: 'HighZ',
componentType: 'input-button-toggle',
options: [
{ value: 0, label: 'On' },
{ value: 1, label: 'Off' },
],
range: ['On', 'Off'],
defaultValue: 1,
outputRawData: (val) => {
const highzArr = ['On', 'Off']
return highzArr.indexOf(val.toString())
},
outputReadabilityData: (idx) => {
const highzArr = ['On', 'Off']
return highzArr[parseInt(idx)]
},
},
CYCLE_NUMBER: {
type: 'number',
showName: 'Cycle',
componentType: 'input-range',
range: Object.freeze({ min: 1, max: 50000 }),
outputRawData: (val) => {
return parseInt(val)
},
outputReadabilityData: (val) => {
return parseInt(val)
},
defaultValue: 1,
defaultUnit: 'cycle',
downloadUnit: null,
unit: {
cycle: 1,
},
},
SAMPLE_RATE: {
type: 'number',
showName: 'Sample rate',
componentType: 'input-range',
range: Object.freeze({ min: 1, max: 1000 }),
outputRawData: (val, scale = 1) => {
return parseInt(parseFloat(val) * 10)
},
outputReadabilityData: (val, scale = 1) => {
return parseFloat(val) / 10
},
defaultValue: 1000,
defaultUnit: 'sps',
downloadUnit: 'sps',
unit: {
sps: 1,
},
},
GENERAL_HS_RTIA: {
type: 'array',
showName: 'Current range',
componentType: 'input-button-toggle',
options: [
{ value: 0, label: '1' },
{ value: 1, label: '2' },
{ value: 2, label: '3' },
{ value: 3, label: '4' },
{ value: 4, label: 'Auto' },
],
range: ['1', '2', '3', '4', 'Auto'],
defaultValue: 4,
outputRawData: (val) => {
const numArr = ['1', '2', '3', '4', 'Auto']
return numArr.indexOf(val.toString())
},
outputReadabilityData: (idx) => {
const numArr = ['1', '2', '3', '4', 'Auto']
return numArr[parseInt(idx)]
},
},
GENERAL_LP_RTIA: {
type: 'array',
showName: 'Current Range',
componentType: 'input-button-toggle',
options: [
{ value: 0, label: '<1.5 uA' },
{ value: 1, label: '1-60 uA' },
{ value: 2, label: '40-175 uA' },
{ value: 3, label: '>120 uA' },
{ value: 4, label: 'Auto' },
],
range: ['<1.5 uA', '1-60 uA', '40-175 uA', '>120 uA', 'Auto'],
defaultValue: 4,
outputRawData: (val) => {
const currentRangeArr = ['<1.5 uA', '1-60 uA', '40-175 uA', '>120 uA', 'Auto']
return currentRangeArr.indexOf(val.toString())
},
outputReadabilityData: (idx) => {
const currentRangeArr = ['<1.5 uA', '1-60 uA', '40-175 uA', '>120 uA', 'Auto']
return currentRangeArr[parseInt(idx)]
},
},
EIS_DC_BIAS: {
type: 'number',
showName: 'DC Volt',
componentType: 'input-field',
range: Object.freeze({ min: 2500, max: 50000 }), // UI上能輸入的最大最小值
outputRawData: (val, scale = 1) => {
return Math.round(parseInt(val) * 12.5 * scale + 25000)
},
outputReadabilityData: (val, scale = 1) => {
return Math.round(parseInt(val - 25000) / 12.5) / scale
},
defaultValue: 25000,
defaultUnit: 'mV',
downloadUnit: 'mV',
unit: {
mV: 1,
V: 1e3,
},
},
EIS_AC_AMP: {
type: 'number',
showName: 'AC Amp',
componentType: 'input-field',
range: Object.freeze({ min: 0, max: 2047 }),
outputRawData: (val, scale = 1) => {
return Math.round((parseInt(val * scale) / 800) * 2047)
},
outputReadabilityData: (val, scale = 1) => {
return Math.round((parseInt(val) / 2047) * 800) / scale
},
defaultValue: 25,
defaultUnit: 'mV',
downloadUnit: 'mV',
unit: {
mV: 1,
},
},
EIS_FREQ: {
type: 'array',
showName: 'Frequency',
componentType: 'multi-input-field',
range: Object.freeze({ min: 1, max: 13333333 }),
outputRawData: (val) => {
return parseFloat(val) < 0.1 ? Math.round(0.1 / 0.015) : Math.round(parseFloat(val) / 0.015)
},
outputReadabilityData: (val) => {
return (parseFloat(val) * 0.015).toFixed(1)
},
defaultValue: [13333333, 7],
defaultUnit: 'Hz',
downloadUnit: 'Hz',
unit: {
Hz: 1,
},
},
EIS_PPD: {
type: 'number',
showName: 'Points per decades',
componentType: 'input-field',
range: Object.freeze({ min: 1, max: 10 }),
outputRawData: (val) => {
return parseInt(val)
},
outputReadabilityData: (val) => {
return parseInt(val)
},
defaultValue: 10,
defaultUnit: 'points',
downloadUnit: null,
unit: {
points: 1,
},
},
EIS_SCALE: {
type: 'array',
showName: 'Point spacing',
componentType: 'input-button-toggle',
options: [
{ value: 0, label: 'Logarithm' },
{ value: 1, label: 'Linear' },
],
range: ['Logarithm', 'Linear'],
defaultValue: 0,
outputRawData: (val) => {
const scaleArr = ['Logarithm', 'Linear']
return scaleArr.indexOf(val.toString())
},
outputReadabilityData: (idx) => {
const scaleArr = ['Logarithm', 'Linear']
return scaleArr[parseInt(idx)]
},
},
EIS_DELAY: {
type: 'number',
showName: 'DELAY',
componentType: 'input-field',
range: Object.freeze({ min: 0, max: 100 }),
outputRawData: (val) => {
return parseInt(parseFloat(val) * 10)
},
outputReadabilityData: (val) => {
return parseFloat(val / 10).toFixed(1)
},
defaultValue: 0,
defaultUnit: 'points',
downloadUnit: null,
unit: {
points: 1,
},
},
EIS_AVERAGE_NUM: {
type: 'array',
showName: 'Average',
componentType: 'input-button-toggle',
options: [
{ value: 0, label: '2' },
{ value: 1, label: '4' },
{ value: 2, label: '6' },
{ value: 3, label: '8' },
],
range: ['2', '4', '6', '8'],
defaultValue: 0,
outputRawData: (val) => {
const numArr = ['2', '4', '6', '8']
return numArr.indexOf(val.toString())
},
outputReadabilityData: (idx) => {
const numArr = ['2', '4', '6', '8']
return numArr[parseInt(idx)]
},
},
CF_DC_BIAS: {
type: 'number',
showName: 'DC Volt',
componentType: 'input-field',
range: Object.freeze({ min: 2500, max: 50000 }), // UI上能輸入的最大最小值
outputRawData: (val, scale = 1) => {
return Math.round(parseInt(val) * 12.5 * scale + 25000)
},
outputReadabilityData: (val, scale = 1) => {
return Math.round(parseInt(val - 25000) / 12.5) / scale
},
defaultValue: 25000,
defaultUnit: 'mV',
downloadUnit: 'mV',
unit: {
mV: 1,
V: 1e3,
},
},
CF_AC_AMP: {
type: 'number',
showName: 'AC Amp',
componentType: 'input-field',
range: Object.freeze({ min: 0, max: 2047 }),
outputRawData: (val, scale = 1) => {
return Math.round((parseInt(val * scale) / 800) * 2047)
},
outputReadabilityData: (val, scale = 1) => {
return Math.round((parseInt(val) / 2047) * 800) / scale
},
defaultValue: 25,
defaultUnit: 'mV',
downloadUnit: 'mV',
unit: {
mV: 1,
},
},
CF_FREQ: {
type: 'number',
showName: 'Frequency',
componentType: 'input-field',
range: Object.freeze({ min: 1, max: 13333333 }),
outputRawData: (val) => {
return parseFloat(val) < 0.1 ? Math.round(0.1 / 0.015) : Math.round(parseFloat(val) / 0.015)
},
outputReadabilityData: (val) => {
return (parseFloat(val) * 0.015).toFixed(1)
},
defaultValue: 13333333,
defaultUnit: 'Hz',
downloadUnit: 'Hz',
unit: {
Hz: 1,
},
},
CF_PPD: {
type: 'number',
showName: 'Points per decades',
componentType: 'input-field',
range: Object.freeze({ min: 1, max: 10 }),
outputRawData: (val) => {
return parseInt(val)
},
outputReadabilityData: (val) => {
return parseInt(val)
},
defaultValue: 10,
defaultUnit: 'points',
downloadUnit: null,
unit: {
points: 1,
},
},
CF_SCALE: {
type: 'array',
showName: 'Point spacing',
componentType: 'input-button-toggle',
options: [
{ value: 0, label: 'Logarithm' },
{ value: 1, label: 'Linear' },
],
range: ['Logarithm', 'Linear'],
defaultValue: 0,
outputRawData: (val) => {
const scaleArr = ['Logarithm', 'Linear']
return scaleArr.indexOf(val.toString())
},
outputReadabilityData: (idx) => {
const scaleArr = ['Logarithm', 'Linear']
return scaleArr[parseInt(idx)]
},
},
CF_DELAY: {
type: 'number',
showName: 'DELAY',
componentType: 'input-field',
range: Object.freeze({ min: 0, max: 100 }),
outputRawData: (val) => {
return parseInt(parseFloat(val) * 10)
},
outputReadabilityData: (val) => {
return parseFloat(val / 10).toFixed(1)
},
defaultValue: 0,
defaultUnit: 'points',
downloadUnit: null,
unit: {
points: 1,
},
},
CF_AVERAGE_NUM: {
type: 'array',
showName: 'Average',
componentType: 'input-button-toggle',
options: [
{ value: 0, label: '2' },
{ value: 1, label: '4' },
{ value: 2, label: '6' },
{ value: 3, label: '8' },
],
range: ['2', '4', '6', '8'],
defaultValue: 3,
outputRawData: (val) => {
const numArr = ['2', '4', '6', '8']
return numArr.indexOf(val.toString())
},
outputReadabilityData: (idx) => {
const numArr = ['2', '4', '6', '8']
return numArr[parseInt(idx)]
},
},
CV_E_INITIAL: {
type: 'number',
showName: 'E-Initial',
componentType: 'input-range',
range: Object.freeze({ min: 2500, max: 50000 }),
outputRawData: (val, scale = 1) => {
return parseInt(parseFloat(val) * scale * 12.5 + 25000)
},
outputReadabilityData: (val, scale = 1) => {
return parseInt((parseFloat(val) - 25000) / 12.5) / scale
},
defaultValue: 25000,
defaultUnit: 'V',
downloadUnit: 'mV',
unit: {
mV: 1,
V: 1e3,
},
},
CV_E1: {
type: 'number',
showName: 'E1',
componentType: 'input-range',
range: Object.freeze({ min: 2500, max: 50000 }),
outputRawData: (val, scale = 1) => {
return parseInt(parseFloat(val) * scale * 12.5 + 25000)
},
outputReadabilityData: (val, scale = 1) => {
return parseInt((parseFloat(val) - 25000) / 12.5) / scale
},
defaultValue: 25000,
defaultUnit: 'V',
downloadUnit: 'mV',
unit: {
mV: 1,
V: 1e3,
},
},
CV_E2: {
type: 'number',
showName: 'E2',
componentType: 'input-range',
range: Object.freeze({ min: 2500, max: 50000 }),
outputRawData: (val, scale = 1) => {
return parseInt(parseFloat(val) * scale * 12.5 + 25000)
},
outputReadabilityData: (val, scale = 1) => {
return parseInt((parseFloat(val) - 25000) / 12.5) / scale
},
defaultValue: 25000,
defaultUnit: 'V',
downloadUnit: 'mV',
unit: {
mV: 1,
V: 1e3,
},
},
CV_SCAN_RATE: {
type: 'number',
showName: 'ScanRate',
componentType: 'input-range',
range: Object.freeze({ min: 1, max: 100000 }),
outputRawData: (val) => {
return parseInt(parseFloat(val) * 100)
},
outputReadabilityData: (val) => {
return parseFloat(val) / 100
},
defaultValue: 10000,
defaultUnit: 'mV/s',
downloadUnit: 'mV/s',
unit: {
'mV/s': 1,
},
},
CA_VOLT: {
type: 'number',
showName: 'Volt (v.s. ref)',
componentType: 'input-range',
range: Object.freeze({ min: 2500, max: 50000 }),
outputRawData: (val, scale = 1) => {
return parseInt(parseFloat(val) * scale * 12.5 + 25000)
},
outputReadabilityData: (val, scale = 1) => {
return parseInt((parseFloat(val) - 25000) / 12.5) / scale
},
defaultValue: 25000,
defaultUnit: 'V',
downloadUnit: 'mV',
unit: {
mV: 1,
V: 1e3,
},
},
VT_MEASURE_VIN_RANGE: {
type: 'array',
showName: 'Vin Range',
componentType: 'input-button-toggle',
options: [
{ value: 0, label: '0~2V' },
{ value: 1, label: '-1~1V' },
{ value: 2, label: '-2~0V' },
{ value: 3, label: 'Auto' },
],
range: ['1', '2', '3', 'Auto'],
defaultValue: 0,
outputRawData: (val) => {
const voltageInRangeArr = ['1', '2', '3', 'Auto']
return voltageInRangeArr.indexOf(val.toString())
},
outputReadabilityData: (idx) => {
const voltageInRangeArr = ['1', '2', '3', 'Auto']
return voltageInRangeArr[parseInt(idx)]
},
},
RT_VOLT_SET: {
type: 'number',
showName: 'Volt out',
componentType: 'input-range',
range: Object.freeze({ min: 2500, max: 50000 }),
defaultValue: 37500,
defaultUnit: 'V',
downloadUnit: 'mV',
unit: {
mV: 1,
V: 1e3,
},
outputRawData: (val, scale = 1) => {
return parseInt(parseFloat(val) * scale * 12.5 + 25000)
},
outputReadabilityData: (val, scale = 1) => {
return parseInt((parseFloat(val) - 25000) / 12.5) / scale
},
},
ADC_VALUE_I: {
type: 'none',
showName: 'Instruction',
componentType: 'dev-mode',
},
MODE_OPTIONS: [
{
id: 7,
description: 'Idle',
},
{
id: 0,
description: 'Potentiostatic Electrochemical Impedance Spectroscopy',
},
{
id: 1,
description: 'CV',
},
{
id: 2,
description: 'Chronoamperometry',
},
{
id: 3,
description: 'VT',
},
{
id: 4,
description: 'RT',
},
{
id: 5,
description: 'Constant Frequency',
},
{
id: 6,
description: 'Dev Tools',
},
],
MODE: {
0: PotentiostaticEIS,
1: CyclicVoltammetry,
2: Chronoamperometry,
3: VT,
4: RT,
5: ConstantFrequency,
6: DevMode,
7: Idle,
},
}
export default EliteEIS
+148
View File
@@ -0,0 +1,148 @@
import EliteEDC from './EliteEDC/index'
import EliteEIS from './EliteEIS/index'
// object saving library name mapping table
const libraryNameMappingTable = {
EDC: EliteEDC,
EliteZM15: EliteEDC,
'Elite_EDC_1.4': null,
'Elite_EDC_1.5': EliteEDC,
'Elite_EDC_1.5re': EliteEDC,
'Elite_EDC_1.5r2': EliteEDC,
'Elite_BAT_1.0': EliteEDC,
EIS: EliteEIS,
'Elite_EIS_1.0': EliteEIS,
'Elite_EIS_1.1': EliteEIS,
'Elite_EIS_MINI_1.0': EliteEIS,
'Elite_TRIG_0.1': null,
'Elite_MEGAFLY_0.1': null,
}
// object saving serial number mapping table
const serialNumberMappingTable = {
0: {
2: {
1: {
5: null, // EDC1.4
6: EliteEDC, // EDC1.5
7: EliteEDC, // EDC1.5re
8: EliteEDC, // EDC1.5r2
},
},
3: {
1: {
0: EliteEDC, // BAT1.0
},
},
4: {
1: {
0: EliteEIS, // EIS1.0
1: EliteEIS, // EIS1.1
2: EliteEIS, // EIS1.1mini
},
},
5: {
1: {
0: null, // TRIG0.1
},
},
6: {
1: {
0: null, // MEAGFLY0.1
},
},
},
}
/**
* return config table by library or serial number (type)
* @param {String | Object} type
* @returns {Object} : config
*/
function getConfig(type) {
if (type === undefined || type === null) return
// if (typeof type === 'number') {
// const deviceList = store.getters.getField('taskContent').deviceListNew
// if (deviceList === undefined) return
// const device = deviceList.find((ele) => ele.memory_board === type)
// if (device === undefined) return
// return libraryNameMappingTable[device.library_name]
// }
// library name
if (typeof type === 'string') {
return libraryNameMappingTable[type]
}
// serial number
if (typeof type === 'object') {
return serialNumberMappingTable[type[0]][type[1]][type[2]][type[3]]
}
}
/**
* return mode config table by type and mode
* @param {String | Object} type
* @param {Number} mode
* @returns {Object} : mode-config
*/
function getModeConfig(type, mode) {
return getConfig(type).MODE[mode]
}
/**
* return parameter config table by type and parameter name
* @param {String | Object} type
* @param {String} parameterName
* @returns {Object} : parameter-config
*/
function getParameterConfig(deviceType, parameterName) {
return getConfig(deviceType)[parameterName]
}
/**
* return channel config table by type and mode
* @param {String | Object} type
* @param {String} mode
* @param {String | Number} channel
* @returns {Object} : channel-config
*/
function getChannelConfig(type, mode, channel) {
if (channel === undefined) {
return getModeConfig(type, mode).channels
}
return getModeConfig(type, mode).channels[channel]
}
/**
* return chart config table by type and mode and chartType
* @param {String | Object} type
* @param {String} mode
* @param {String} chartType
* @returns {Object} : chart-config
*/
function getChartConfig(type, mode, chartType = 'default') {
return getModeConfig(type, mode).charts[chartType]
}
/**
* return mode's parameter list
* @param {String | Object} type
* @param {String} mode
* @returns {Object} : parameter list
*/
function getModeParameter(type, mode) {
return getModeConfig(type, mode).parameter
}
const configTable = {
getConfig,
getModeConfig,
getChannelConfig,
getParameterConfig,
getChartConfig,
getModeParameter,
EliteEDC,
EliteEIS,
}
export default configTable
+22 -6
View File
@@ -17,17 +17,25 @@
import FileContainer from '@/components/data-analysis/FileContainer.vue'
import ControlPanel from '@/components/data-analysis/ControlPanel.vue'
import LineChartContainer from '@/components/data-analysis/LineChartContainer.vue'
import { ref } from 'vue'
import { onMounted, ref } from 'vue'
// mqtt init
const { startMqtt, publish } = useMqtt()
const controllerID = 'b8:27:eb:18:f8:cc'
const controllerID = 'dc:a6:32:0f:56:9d'
// define subscribe and callback
startMqtt(`${controllerID}/data_analysis/#`, (topic: string, message: ArrayBuffer) => {
// [data, data, ceiling, ground]
const msg = JSON.parse(message.toString())
const name = 'test'
const url = `http://192.168.2.1:3000/api/analysis/get/csv?name=${name}`
const a = document.createElement('a')
a.href = url
document.body.appendChild(a)
a.click()
document.body.removeChild(a)
// try draw line
// msg.push(1500000, -1500000)
@@ -43,13 +51,19 @@
// stop loading
linechart_ref.value?.stopLoading()
// draw line
// draw line
if (msg.length < 3) return true
let yAxis_list = msg[2].map((x) => ({ yAxis: x }))
let coord_list = [{ coord: [msg[3][0][0], msg[3][0][1]] }, { coord: [msg[3][1][0], msg[3][1][1]] }]
// yAxis_list.append([{ coord:[ msg[3][0][0],msg[3][0][1]]},{ coord:[ msg[3][1][0], msg[3][1][1]]}])
yAxis_list.push(coord_list)
console.log('yAxis_list', yAxis_list)
linechart_ref.value.setOption({
series: [
{
markLine: {
data: [{ yAxis: msg[2] }, { yAxis: msg[3] }],
data: yAxis_list,
},
},
],
@@ -59,10 +73,12 @@
// reference
const linechart_ref = ref()
// methods
const filterData = function () {
// ControlPanel handling
const filterData = function (e: any) {
linechart_ref.value?.startLoading()
publish(`${controllerID}_data_analysis/get_analysis_data`, JSON.stringify({}))
console.log(linechart_ref)
console.log(e)
publish(`${controllerID}_data_analysis/get_analysis_data`, JSON.stringify({ e }))
}
defineExpose({ linechart_ref, filterData })
+14
View File
@@ -0,0 +1,14 @@
import { defineStore } from 'pinia'
export const useCounterStore = defineStore('counter', {
state: () => {
return { count: 0 }
},
// could also be defined as
// state: () => ({ count: 0 })
actions: {
increment() {
this.count++
},
},
})
+23
View File
@@ -0,0 +1,23 @@
import { defineStore } from 'pinia'
interface AxisType {
id: number
name: string
unit: object
defaultUnit: string
downloadUnit: string
}
interface ChannelState {
xAxis: AxisType | Record<string, never>
yAxis: AxisType | Record<string, never>
}
export const useChannelStore = defineStore('data-analysis-channel', {
state: (): ChannelState => ({
xAxis: {},
yAxis: {},
}),
getters: {},
actions: {},
})
View File
+22
View File
@@ -0,0 +1,22 @@
import { defineStore } from 'pinia'
import { FileView } from '@/utils/file'
interface FileViewState {
fileView: FileView
filesSelected: (string | never)[]
}
export const useFileViewStore = defineStore('data-analysis-file-view', {
state: (): FileViewState => ({
fileView: new FileView(),
filesSelected: [],
}),
// could also be defined as
// state: () => ({ count: 0 })
getters: {},
actions: {
setFilesSelect(fileSelect: string[]) {
this.filesSelected.push(...fileSelect)
},
},
})
+53 -15
View File
@@ -24,9 +24,15 @@ class FileView {
this.limit = 20
}
reset() {
this.children.length = 0
this.offset = 0
this.limit = 20
}
changeView(viewBy: string) {
this.reset()
this.viewBy = viewBy
this.init()
}
async appendChildren(id: number) {
@@ -80,6 +86,15 @@ class FileView {
getChildren() {
return this.children
}
getMetaFile(idType: string) {
for (const child of this.children) {
if (!(child instanceof MetaFile)) {
const result = child.getMetaFile(idType)
if (result) return result
}
}
}
}
class Time {
@@ -117,9 +132,9 @@ class Time {
_metaFile.uuid,
_metaFile.name,
channels,
_metaFile.parent,
_metaFile.device,
_metaFile.parameter_set,
_metaFile.parent,
_metaFile.raw_data,
_metaFile.mini_data,
_metaFile.size,
@@ -127,13 +142,21 @@ class Time {
_metaFile.created_at,
)
this.children.push(meta)
console.log('time', meta)
// console.log('time', meta)
}
}
getChildren() {
return this.children
}
getMetaFile(idType: string) {
for (const child of this.children) {
if (child instanceof MetaFile) {
if (child.idType === idType) return child
}
}
}
}
class Project {
@@ -175,9 +198,9 @@ class Project {
_metaFile.uuid,
_metaFile.name,
channels,
_metaFile.parent,
_metaFile.device,
_metaFile.parameter_set,
_metaFile.parent,
_metaFile.raw_data,
_metaFile.mini_data,
_metaFile.size,
@@ -192,6 +215,13 @@ class Project {
getChildren() {
return this.children
}
getMetaFile(idType: string) {
for (const child of this.children) {
if (child instanceof MetaFile) {
if (child.idType === idType) return child
}
}
}
}
class Folder {
@@ -256,9 +286,9 @@ class Folder {
_metaFile.uuid,
_metaFile.name,
channels,
_metaFile.parent,
_metaFile.device,
_metaFile.parameter_set,
_metaFile.parent,
_metaFile.raw_data,
_metaFile.mini_data,
_metaFile.size,
@@ -275,6 +305,13 @@ class Folder {
getChildren() {
return this.children
}
getMetaFile(idType: string) {
for (const child of this.children) {
if (child instanceof MetaFile) {
if (child.idType === idType) return child
}
}
}
}
class MetaFile {
@@ -283,14 +320,14 @@ class MetaFile {
uuid: string
name: string
channels: Array<number>
parent: object
device: Device
parameter: any
parent: object
rawData: Array<Array<number>>
miniData: Array<Array<number>>
size: string
time: string
created: Date
created_at: Date
type: string
constructor(
@@ -305,7 +342,7 @@ class MetaFile {
miniData: Array<Array<number>>,
size: string,
time: string,
created: Date,
created_at: Date,
) {
this.id = id
this.type = 'MetaFile'
@@ -320,7 +357,7 @@ class MetaFile {
this.miniData = miniData
this.size = size
this.time = time
this.created = created
this.created_at = created_at
}
getMetaInfo() {
@@ -336,7 +373,7 @@ class MetaFile {
miniData: this.miniData,
size: this.size,
time: this.time,
created: this.created,
created: this.created_at,
}
}
}
@@ -345,11 +382,12 @@ interface Device {
id: number
name: string
version: string
macAddress: string
memoryBoard: number
serialNumber: Array<number>
libraryName: string
libraryVersion: string
mac_address: string
memory_board: number
serial_number: Array<number>
library_name: string
library_version: string
status: number
}
export { FileView, Project, MetaFile, Folder, Time }