You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use open62541 as opcua client and subscribe data point and event at the same time. When I trigger a event in server side, the routine can not step into the event subscription callback function. But when I just subscribe the event, the routine can step into the event subscription callback successfully after I trigger a event.
Can you give me some hints?
Here is my code of OPCUA part.
Description
I use open62541 as opcua client and subscribe data point and event at the same time. When I trigger a event in server side, the routine can not step into the event subscription callback function. But when I just subscribe the event, the routine can step into the event subscription callback successfully after I trigger a event.
Can you give me some hints?
Here is my code of OPCUA part.
`MS_BOOL OPCUA_create_Client(MS_OPCUA_CLIENT_HANDLE_PTR_TYPE pHandle)
{
UA_ByteString* remoteCertificate = NULL;
/*
UA_STACKARRAY(UA_ByteString, trustList, trustListSize);
for (size_t trustListCount = 0; trustListCount < trustListSize; trustListCount++) {
trustList[trustListCount] = load_OPCUA_Cert_File(argv[trustListCount+3]);
}
*/
if (retVal == MS_TRUE) {
clientConfig.secureChannelLifeTime = 0xFFFFFFFF; // keep alive max time
/*
for(size_t deleteCount = 0; deleteCount < trustListSize; deleteCount++) {
UA_ByteString_clear(&trustList[deleteCount]);
}
*/
if (retVal == MS_TRUE) {
if (pHandle->pClientAttr->logInfo.isAnonymous == MS_TRUE) {
code = UA_Client_connect(pHandle->pClient, pHandle->pClientAttr->pServerUrl);
} else {
code = UA_Client_connect_username(pHandle->pClient, pHandle->pClientAttr->pServerUrl
, pHandle->pClientAttr->logInfo.pUsrName
, pHandle->pClientAttr->logInfo.pPasswd);
}
}
MS_VOID OPCUA_build_Subscription(MS_OPCUA_CLIENT_HANDLE_PTR_TYPE pHandle)
{
LIST_ENTRY_PTR_TYPE pHead = &pHandle->pClientAttr->dataPointHead;
LIST_PTR_TYPE pos = NULL;
}
MS_VOID OPCUA_handle_Subscription(UA_Client *client, UA_UInt32 subId, void *subContext,
UA_UInt32 monId, void *monContext, UA_DataValue *value)
{
MS_OPCUA_DP_NODE_PTR_TYPE pNode = (MS_OPCUA_DP_NODE_PTR_TYPE)monContext;
MS_MCL_DP_PTR_TYPE pDataPoint = NULL;
UA_Variant * pVal = NULL;
UA_DateTimeStruct dts = {0};
}
MS_VOID OPCUA_build_Subscription_Event(MS_OPCUA_CLIENT_HANDLE_PTR_TYPE pHandle)
{
LIST_ENTRY_PTR_TYPE pHead = &pHandle->pClientAttr->eventHead;
LIST_PTR_TYPE pos = NULL;
}
MS_VOID OPCUA_handle_Subscription_Event(UA_Client *client, UA_UInt32 subId, void *subContext,
UA_UInt32 monId, void *monContext, size_t nEventFields, UA_Variant *eventFields)
{
MS_OPCUA_EVENT_NODE_PTR_TYPE pEventNode = (MS_OPCUA_EVENT_NODE_PTR_TYPE)monContext;
MS_OPCUA_EVENT_FILTER_NODE_PTR_TYPE pFilterNode = NULL;
MS_MCL_EVENT_PTR_TYPE pEvent = NULL;
UA_Variant * pVal = NULL;
}
UA_SimpleAttributeOperand * OPCUA_setup_SelectClauses(LIST_ENTRY_PTR_TYPE pFilterHead)
{
LIST_PTR_TYPE pos = NULL;
size_t i = 0;
MS_OPCUA_EVENT_FILTER_NODE_PTR_TYPE pNode = NULL;
}`
Background Information / Reproduction Steps
Checklist
Please provide the following information:
UA_LOGLEVEL
set as low as necessary) attachedThe text was updated successfully, but these errors were encountered: