S2OPC OPCUA Toolkit
Loading...
Searching...
No Matches
sopc_pub_source_variable.h
Go to the documentation of this file.
1/*
2 * Licensed to Systerel under one or more contributor license
3 * agreements. See the NOTICE file distributed with this work
4 * for additional information regarding copyright ownership.
5 * Systerel licenses this file to you under the Apache
6 * License, Version 2.0 (the "License"); you may not use this
7 * file except in compliance with the License. You may obtain
8 * a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing,
13 * software distributed under the License is distributed on an
14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 * KIND, either express or implied. See the License for the
16 * specific language governing permissions and limitations
17 * under the License.
18 */
19
20#ifndef SOPC_PUB_SOURCE_VARIABLE_H_
21#define SOPC_PUB_SOURCE_VARIABLE_H_
22
23#include "sopc_event_handler.h"
24#include "sopc_mutexes.h"
25#include "sopc_pubsub_conf.h"
26#include "sopc_types.h"
27
28// TODO: this structure is taken from the sample/pubsub_server,
29// where it is used to handle asynchronous OPC UA local read request.
30// Either put it back there or document it properly.
31// Pubscheduler get var request
33{
34 SOPC_DataValue* ldv; // Data values response
35 SOPC_EventHandler* eventHandler; // Event handler where to send result
36 int32_t NoOfNodesToRead; // Size of ldv
37 uintptr_t msgCtxt; // context of request
41
46
51
61typedef SOPC_DataValue* SOPC_GetSourceVariables_Func(const OpcUa_ReadValueId* nodesToRead, const int32_t nbValues);
62
64
66
74 const SOPC_SourceVariableCtx* sourceVariable);
75
84
85/* Delete SourceVariableCtx */
87
88#endif /* SOPC_PUB_SOURCE_VARIABLE_H_ */
struct _SOPC_EventHandler SOPC_EventHandler
Processes messages from a queue.
Definition sopc_event_handler.h:35
void SOPC_PubSourceVariableConfig_Delete(SOPC_PubSourceVariableConfig *sourceConfig)
SOPC_DataValue * SOPC_PubSourceVariable_GetVariables(const SOPC_PubSourceVariableConfig *sourceConfig, const SOPC_SourceVariableCtx *sourceVariable)
SOPC_SourceVariableCtx * SOPC_PubSourceVariable_SourceVariablesCtx_Create(const SOPC_PublishedDataSet *pubDataset)
Create and Initialize Source Variable context for the user to get source variables.
void SOPC_PubSourceVariable_SourceVariableCtx_Delete(SOPC_SourceVariableCtx **pubSourceVariable)
SOPC_PubSourceVariableConfig * SOPC_PubSourceVariableConfig_Create(SOPC_GetSourceVariables_Func *callback)
struct SOPC_PubSourceVariableConfig SOPC_PubSourceVariableConfig
Definition sopc_pub_source_variable.h:45
struct SOPC_SourceVariableCtx SOPC_SourceVariableCtx
Definition sopc_pub_source_variable.h:50
struct SOPC_PubSheduler_GetVariableRequestContext SOPC_PubSheduler_GetVariableRequestContext
SOPC_DataValue * SOPC_GetSourceVariables_Func(const OpcUa_ReadValueId *nodesToRead, const int32_t nbValues)
The publisher calls this callback cyclically to get the values to publish.
Definition sopc_pub_source_variable.h:61
struct SOPC_PublishedDataSet SOPC_PublishedDataSet
Definition sopc_pubsub_conf.h:30
Definition p_sopc_synchronisation.h:57
Each attribute in OPC UA has a DataValue caracterized by the following structure.
Definition sopc_builtintypes.h:385
Definition p_sopc_synchronisation.h:64
Definition sopc_pub_source_variable.h:33
SOPC_Condition cond
Definition sopc_pub_source_variable.h:38
int32_t NoOfNodesToRead
Definition sopc_pub_source_variable.h:36
SOPC_EventHandler * eventHandler
Definition sopc_pub_source_variable.h:35
SOPC_DataValue * ldv
Definition sopc_pub_source_variable.h:34
SOPC_Mutex mut
Definition sopc_pub_source_variable.h:39
uintptr_t msgCtxt
Definition sopc_pub_source_variable.h:37
Definition sopc_types.h:4527