Modelling method with optional input arguments

Questions regarding the use of UaModeler

Moderator: uamodeler

Post Reply
thowafs
Jr. Member
Jr. Member
Posts: 1
Joined: 09 Nov 2017, 00:30

Modelling method with optional input arguments

Post by thowafs »

Hello,

is it possible to specify if input arguments of methods are mandatory (must not be null) or optional (can be null)?

We have created a method with an input argument of type UInt32. It should be possible to call this method by a client with null as argument, but the code generation for the c++-server-stack is checking for non-null and returns BadOutOfRange.

Sincerely yours.

User avatar
Support Team
Hero Member
Hero Member
Posts: 3064
Joined: 18 Mar 2011, 15:09

Re: Modelling method with optional input arguments

Post by Support Team »

Hello,

In OPC UA all method arguments are mandatory. If you want to use optional method arguments, you have to update the generated code manually.
Best regards
Unified Automation Support Team

Post Reply