Add Description to ControllerObject

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

Moderator: uasdkcpp

Post Reply
Syles
Jr. Member
Jr. Member
Posts: 4
Joined: 07 Nov 2018, 09:41

Add Description to ControllerObject

Post by Syles »

Dear SupportTeam,

i want to add a description to the ControllerObject Instance.
I'm using the C++ SDK 1.5.3 and went through lesson 6: http://documentation.unified-automation ... son06.html.
This worked so far and now i want to add a value to the description attribute of the ControllerObject Instance.

e.g. line 86 from nmbuildingautomation.cpp, lesson 6:

Code: Select all

pFurnace = new FurnaceControllerObject(
                sControllerName,
                UaNodeId(sControllerName, getNameSpaceIndex()),
                m_defaultLocaleId,
                this,
                controllerAddress,
                m_pCommIf);
            ret = addNodeAndReference(pFolder, pFurnace, OpcUaId_Organizes);
            UA_ASSERT(ret.isGood());
I tried setting the description with setAttributeValue

Code: Select all

pFurnace->setAttributeValue(...)
using an internal session like demonstrated in lesson 7.
However, i'm always receiving UaStatus 2149515264, which means "User does not have permission to perform the requested operation.".
I also tried setting a SessionUserContext to the session, with permission NodeAccessInfo::UA_PERMISSIONS_ALL but that doesn't worked either. I think thats due to the fact, that the session is activated but not authenticated in the correct way, am i right?

How can i set the description attribute propelry?

Post Reply