mirror of
https://github.com/tiqi-group/pydase.git
synced 2025-04-20 00:10:03 +02:00
frontend: removes unused code from stateUtils
This commit is contained in:
parent
69328d6f68
commit
123edb9e86
@ -106,43 +106,3 @@ function parseListAttrAndIndex(attrString: string): [string, number | null] {
|
|||||||
|
|
||||||
return [attrName, index];
|
return [attrName, index];
|
||||||
}
|
}
|
||||||
|
|
||||||
const serializationDict = {
|
|
||||||
attr_list: {
|
|
||||||
type: 'list',
|
|
||||||
value: [
|
|
||||||
{ type: 'int', value: 1, readonly: false, doc: null },
|
|
||||||
{ type: 'int', value: 2, readonly: false, doc: null },
|
|
||||||
{
|
|
||||||
type: 'Quantity',
|
|
||||||
value: { magnitude: 1.0, unit: 'ms' },
|
|
||||||
readonly: false,
|
|
||||||
doc: null
|
|
||||||
}
|
|
||||||
],
|
|
||||||
readonly: false,
|
|
||||||
doc: null
|
|
||||||
},
|
|
||||||
read_sensor_data: {
|
|
||||||
type: 'method',
|
|
||||||
value: null,
|
|
||||||
readonly: true,
|
|
||||||
doc: null,
|
|
||||||
async: true,
|
|
||||||
parameters: {}
|
|
||||||
},
|
|
||||||
readout_wait_time: {
|
|
||||||
type: 'Quantity',
|
|
||||||
value: { magnitude: 1.0, unit: 'ms' },
|
|
||||||
readonly: false,
|
|
||||||
doc: null
|
|
||||||
}
|
|
||||||
};
|
|
||||||
const attrName: string = 'attr_list[2]'; // example attribute name
|
|
||||||
|
|
||||||
try {
|
|
||||||
const result = getNextLevelDictByKey(serializationDict, attrName);
|
|
||||||
console.log(result);
|
|
||||||
} catch (error) {
|
|
||||||
console.error(error);
|
|
||||||
}
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user