Closed jisotalo closed 1 day ago
Done! The following works with TC 3.1.4026 and ads-client 2.0.0-beta.5
TYPE E_ExtendedEnum :
(
Disabled := 0, //Machine is disabled
Starting := 50, //Machine is starting
Running := 100, //Machine is running
Stopping := 200, //Machine is stopping
{attribute 'ads-client-enum-attribute' := 'example-enum-value-ääö'}
Unknown := -99 //Machine is ääöööÄÄÖö
);
END_TYPE
const res = await client.getDataType('E_ExtendedEnum');
console.log(inspect(res.enumInfos));
/*
[
{
name: 'Disabled',
value: 0,
comment: 'Machine is disabled',
attributes: [
{
name: 'ads-client-enum-attribute',
value: 'example-enum-value-ääö'
}
]
},
{
name: 'Starting',
value: 50,
comment: 'Machine is starting',
attributes: []
},
{
name: 'Running',
value: 100,
comment: 'Machine is running',
attributes: []
},
{
name: 'Stopping',
value: 200,
comment: 'Machine is stopping',
attributes: []
},
{
name: 'Unknown',
value: -99,
comment: 'Machine is ääöööÄÄÖö',
attributes: []
}
]
*/
When running tests against TwinCAT 3.1.4026, a warning is shown:
Adding support for it.