#include <uaserver_config.h>
#include <opcua_statuscodes.h>
#include <uabase_p_atomic.h>
#include <uaserver_read.h>
#include <uaserver_basenode.h>
#include <uaserver_utilities.h>
#include "custom_provider_helper.h"
OPCUA_BEGIN_EXTERN_C
{
OpcUa_Int32 i;
OpcUa_BaseNode *pNode;
OpcUa_InitializeStatus(OpcUa_Module_Server, "CustomProvider_ReadAsync");
OpcUa_ReturnErrorIfArgumentNull(a_pReadCtx);
pReq = a_pReadCtx->pRequest;
pRes = a_pReadCtx->pResponse;
for (i = 0; i < pReq->NoOfNodesToRead; i++)
{
{
if (pNode)
{
UserDataCommon *pUserData = OpcUa_Null;
if ( (a_pReadCtx->pRequest->NodesToRead[i].AttributeId == OpcUa_Attributes_Value &&
OpcUa_BaseNode_GetType(pNode) == eVariable &&
{
continue;
}
if (pUserData != OpcUa_Null &&
a_pReadCtx->pRequest->NodesToRead[i].AttributeId == OpcUa_Attributes_Value)
{
switch (pUserData->Type)
{
case UserDataTemperature:
{
TemperatureSensor *pSensor = (TemperatureSensor*)pUserData;
break;
}
case UserDataMachineSwitch:
{
MachineSwitch *pSwitch = (MachineSwitch*)pUserData;
break;
}
default:
{
break;
}
}
{
{
}
{
}
}
}
else
{
}
}
else
{
}
}
}
OpcUa_ReturnStatusCode;
OpcUa_BeginErrorHandling;
OpcUa_FinishErrorHandling;
}
OPCUA_END_EXTERN_C