Array of instances in the server address space

Questions regarding the use of the .NET SDK 2.0 for Server or Client development or integration into customer products ...

Moderator: uasdknet

Post Reply
Jr. Member
Jr. Member
Posts: 2
Joined: 26 Nov 2023, 06:11

Array of instances in the server address space

Post by @rt »

Dear UA team,

I'm trying to expand your SDK sample.
The goal is to set an array of actions for each device that should be executed according to some logic/criteria by the device itself.
For example, I would like send the following array of actions for AirConditioner:
SetTemperature, 27
SetHumidity, 80
SetTemperature, 21
SetHumidity, 30

So, to achieve the above, following your samples and information I found on the forum (please correct me if I'm wrong)
I add a new type like AirConditionerAction to BaseObjectType.
Then I define the new type containing the array - AirConditionerActions with Variable Actions.
What TypeDefinition and DataType should this variable be?

Then, in the properties of this Variable I should specify it as OneDimension array and set its size.
Is array size is mandatory? I mean, is it passible to define arrays of a dynamic size (unknown amount of actions)?

After all, I should create the instance of the AirConditionerActions in the server address space and create the instances for each Action in its Actions array.
Is it correct?
In the case where dynamic arrays are possible, how does it correlate with this instantiation?

Thanks ahead for your help!

Post Reply