* add include files and static library due to problems with AMALGAM'ED
distri and nodeset feature * add UaModeler project including XML export * add nodeset using test server
This commit is contained in:
parent
5b272aa5d7
commit
da498bb161
17
Makefile
17
Makefile
@ -1,17 +1,20 @@
|
||||
CC = gcc
|
||||
CFLAGS = -std=c99 -I ./ # put pre-processor settings (-I, -D, etc) here
|
||||
CFLAGS = -std=c99 -I ./ -I ./include -DUA_NO_AMALGAMATION # put pre-processor settings (-I, -D, etc) here
|
||||
LDFLAGS = # put linker settings here
|
||||
|
||||
.PHONY: all
|
||||
all: myServer server_method server_folders
|
||||
|
||||
myServer: myServer.o open62541.o
|
||||
all: myServer server_method server_folders myTestModelServer
|
||||
|
||||
myServer: myServer.o ./lib/libopen62541-static.a
|
||||
$(CC) -o $@ $(CFLAGS) $(LDFLAGS) $^
|
||||
|
||||
server_method: server_method.o open62541.o
|
||||
server_method: server_method.o ./lib/libopen62541-static.a
|
||||
$(CC) -o $@ $(CFLAGS) $(LDFLAGS) $^
|
||||
|
||||
server_folders: server_folders.o open62541.o
|
||||
server_folders: server_folders.o ./lib/libopen62541-static.a
|
||||
$(CC) -o $@ $(CFLAGS) $(LDFLAGS) $^
|
||||
|
||||
myTestModelServer: myTestModelServer.o TestModel.o ./lib/libopen62541-static.a
|
||||
$(CC) -o $@ $(CFLAGS) $(LDFLAGS) $^
|
||||
|
||||
.c.o:
|
||||
@ -19,5 +22,5 @@ server_folders: server_folders.o open62541.o
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
-rm -f *.o myServer server_method server_folders
|
||||
-rm -f *.o myServer server_method server_folders myTestModelServer
|
||||
|
||||
|
31457
TestModel.c
31457
TestModel.c
File diff suppressed because it is too large
Load Diff
22
include/logger_stdout.h
Normal file
22
include/logger_stdout.h
Normal file
@ -0,0 +1,22 @@
|
||||
/*
|
||||
* This work is licensed under a Creative Commons CCZero 1.0 Universal License.
|
||||
* See http://creativecommons.org/publicdomain/zero/1.0/ for more information.
|
||||
*/
|
||||
|
||||
#ifndef LOGGER_STDOUT_H_
|
||||
#define LOGGER_STDOUT_H_
|
||||
|
||||
#include "ua_types.h"
|
||||
#include "ua_log.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
UA_EXPORT void Logger_Stdout(UA_LogLevel level, UA_LogCategory category, const char *msg, ...);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* LOGGER_STDOUT_H_ */
|
26
include/networklayer_tcp.h
Normal file
26
include/networklayer_tcp.h
Normal file
@ -0,0 +1,26 @@
|
||||
/*
|
||||
* This work is licensed under a Creative Commons CCZero 1.0 Universal License.
|
||||
* See http://creativecommons.org/publicdomain/zero/1.0/ for more information.
|
||||
*/
|
||||
|
||||
#ifndef NETWORKLAYERTCP_H_
|
||||
#define NETWORKLAYERTCP_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "ua_server.h"
|
||||
#include "ua_client.h"
|
||||
|
||||
UA_ServerNetworkLayer UA_EXPORT
|
||||
UA_ServerNetworkLayerTCP(UA_ConnectionConfig conf, UA_UInt16 port);
|
||||
|
||||
UA_Connection UA_EXPORT
|
||||
UA_ClientConnectionTCP(UA_ConnectionConfig conf, const char *endpointUrl, UA_Logger logger);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif /* NETWORKLAYERTCP_H_ */
|
26
include/networklayer_udp.h
Normal file
26
include/networklayer_udp.h
Normal file
@ -0,0 +1,26 @@
|
||||
/*
|
||||
* This work is licensed under a Creative Commons CCZero 1.0 Universal License.
|
||||
* See http://creativecommons.org/publicdomain/zero/1.0/ for more information.
|
||||
*/
|
||||
|
||||
#ifndef NETWORKLAYERUDP_H_
|
||||
#define NETWORKLAYERUDP_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "ua_server.h"
|
||||
#include "ua_client.h"
|
||||
|
||||
/** @brief Create the UDP networklayer and listen to the specified port */
|
||||
UA_ServerNetworkLayer UA_EXPORT * ServerNetworkLayerUDP_new(UA_ConnectionConfig conf, UA_UInt32 port);
|
||||
|
||||
UA_Connection UA_EXPORT
|
||||
ClientNetworkLayerUDP_connect(UA_ConnectionConfig conf, char endpointUrl[], UA_Logger logger);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif /* NETWORKLAYERUDP_H_ */
|
648
include/queue.h
Normal file
648
include/queue.h
Normal file
@ -0,0 +1,648 @@
|
||||
/* $OpenBSD: queue.h,v 1.38 2013/07/03 15:05:21 fgsch Exp $ */
|
||||
/* $NetBSD: queue.h,v 1.11 1996/05/16 05:17:14 mycroft Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1991, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)queue.h 8.5 (Berkeley) 8/20/94
|
||||
*/
|
||||
|
||||
#ifndef _SYS_QUEUE_H_
|
||||
#define _SYS_QUEUE_H_
|
||||
|
||||
/*
|
||||
* This file defines five types of data structures: singly-linked lists,
|
||||
* lists, simple queues, tail queues, and circular queues.
|
||||
*
|
||||
*
|
||||
* A singly-linked list is headed by a single forward pointer. The elements
|
||||
* are singly linked for minimum space and pointer manipulation overhead at
|
||||
* the expense of O(n) removal for arbitrary elements. New elements can be
|
||||
* added to the list after an existing element or at the head of the list.
|
||||
* Elements being removed from the head of the list should use the explicit
|
||||
* macro for this purpose for optimum efficiency. A singly-linked list may
|
||||
* only be traversed in the forward direction. Singly-linked lists are ideal
|
||||
* for applications with large datasets and few or no removals or for
|
||||
* implementing a LIFO queue.
|
||||
*
|
||||
* A list is headed by a single forward pointer (or an array of forward
|
||||
* pointers for a hash table header). The elements are doubly linked
|
||||
* so that an arbitrary element can be removed without a need to
|
||||
* traverse the list. New elements can be added to the list before
|
||||
* or after an existing element or at the head of the list. A list
|
||||
* may only be traversed in the forward direction.
|
||||
*
|
||||
* A simple queue is headed by a pair of pointers, one the head of the
|
||||
* list and the other to the tail of the list. The elements are singly
|
||||
* linked to save space, so elements can only be removed from the
|
||||
* head of the list. New elements can be added to the list before or after
|
||||
* an existing element, at the head of the list, or at the end of the
|
||||
* list. A simple queue may only be traversed in the forward direction.
|
||||
*
|
||||
* A tail queue is headed by a pair of pointers, one to the head of the
|
||||
* list and the other to the tail of the list. The elements are doubly
|
||||
* linked so that an arbitrary element can be removed without a need to
|
||||
* traverse the list. New elements can be added to the list before or
|
||||
* after an existing element, at the head of the list, or at the end of
|
||||
* the list. A tail queue may be traversed in either direction.
|
||||
*
|
||||
* A circle queue is headed by a pair of pointers, one to the head of the
|
||||
* list and the other to the tail of the list. The elements are doubly
|
||||
* linked so that an arbitrary element can be removed without a need to
|
||||
* traverse the list. New elements can be added to the list before or after
|
||||
* an existing element, at the head of the list, or at the end of the list.
|
||||
* A circle queue may be traversed in either direction, but has a more
|
||||
* complex end of list detection.
|
||||
*
|
||||
* For details on the use of these macros, see the queue(3) manual page.
|
||||
*/
|
||||
|
||||
#if defined(QUEUE_MACRO_DEBUG) || (defined(_KERNEL) && defined(DIAGNOSTIC))
|
||||
#define _Q_INVALIDATE(a) (a) = ((void *)-1)
|
||||
#else
|
||||
#define _Q_INVALIDATE(a)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Singly-linked List definitions.
|
||||
*/
|
||||
#define SLIST_HEAD(name, type) \
|
||||
struct name { \
|
||||
struct type *slh_first; /* first element */ \
|
||||
}
|
||||
|
||||
#define SLIST_HEAD_INITIALIZER(head) \
|
||||
{ NULL }
|
||||
|
||||
#define SLIST_ENTRY(type) \
|
||||
struct { \
|
||||
struct type *sle_next; /* next element */ \
|
||||
}
|
||||
|
||||
/*
|
||||
* Singly-linked List access methods.
|
||||
*/
|
||||
#define SLIST_FIRST(head) ((head)->slh_first)
|
||||
#define SLIST_END(head) NULL
|
||||
#define SLIST_EMPTY(head) (SLIST_FIRST(head) == SLIST_END(head))
|
||||
#define SLIST_NEXT(elm, field) ((elm)->field.sle_next)
|
||||
|
||||
#define SLIST_FOREACH(var, head, field) \
|
||||
for((var) = SLIST_FIRST(head); \
|
||||
(var) != SLIST_END(head); \
|
||||
(var) = SLIST_NEXT(var, field))
|
||||
|
||||
#define SLIST_FOREACH_SAFE(var, head, field, tvar) \
|
||||
for ((var) = SLIST_FIRST(head); \
|
||||
(var) && ((tvar) = SLIST_NEXT(var, field), 1); \
|
||||
(var) = (tvar))
|
||||
|
||||
/*
|
||||
* Singly-linked List functions.
|
||||
*/
|
||||
#define SLIST_INIT(head) { \
|
||||
SLIST_FIRST(head) = SLIST_END(head); \
|
||||
}
|
||||
|
||||
#define SLIST_INSERT_AFTER(slistelm, elm, field) do { \
|
||||
(elm)->field.sle_next = (slistelm)->field.sle_next; \
|
||||
(slistelm)->field.sle_next = (elm); \
|
||||
} while (0)
|
||||
|
||||
#define SLIST_INSERT_HEAD(head, elm, field) do { \
|
||||
(elm)->field.sle_next = (head)->slh_first; \
|
||||
(head)->slh_first = (elm); \
|
||||
} while (0)
|
||||
|
||||
#define SLIST_REMOVE_AFTER(elm, field) do { \
|
||||
(elm)->field.sle_next = (elm)->field.sle_next->field.sle_next; \
|
||||
} while (0)
|
||||
|
||||
#define SLIST_REMOVE_HEAD(head, field) do { \
|
||||
(head)->slh_first = (head)->slh_first->field.sle_next; \
|
||||
} while (0)
|
||||
|
||||
#define SLIST_REMOVE(head, elm, type, field) do { \
|
||||
if ((head)->slh_first == (elm)) { \
|
||||
SLIST_REMOVE_HEAD((head), field); \
|
||||
} else { \
|
||||
struct type *curelm = (head)->slh_first; \
|
||||
\
|
||||
while (curelm->field.sle_next != (elm)) \
|
||||
curelm = curelm->field.sle_next; \
|
||||
curelm->field.sle_next = \
|
||||
curelm->field.sle_next->field.sle_next; \
|
||||
_Q_INVALIDATE((elm)->field.sle_next); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
/*
|
||||
* List definitions.
|
||||
*/
|
||||
#define LIST_HEAD(name, type) \
|
||||
struct name { \
|
||||
struct type *lh_first; /* first element */ \
|
||||
}
|
||||
|
||||
#define LIST_HEAD_INITIALIZER(head) \
|
||||
{ NULL }
|
||||
|
||||
#define LIST_ENTRY(type) \
|
||||
struct { \
|
||||
struct type *le_next; /* next element */ \
|
||||
struct type **le_prev; /* address of previous next element */ \
|
||||
}
|
||||
|
||||
/*
|
||||
* List access methods
|
||||
*/
|
||||
#define LIST_FIRST(head) ((head)->lh_first)
|
||||
#define LIST_END(head) NULL
|
||||
#define LIST_EMPTY(head) (LIST_FIRST(head) == LIST_END(head))
|
||||
#define LIST_NEXT(elm, field) ((elm)->field.le_next)
|
||||
|
||||
#define LIST_FOREACH(var, head, field) \
|
||||
for((var) = LIST_FIRST(head); \
|
||||
(var)!= LIST_END(head); \
|
||||
(var) = LIST_NEXT(var, field))
|
||||
|
||||
#define LIST_FOREACH_SAFE(var, head, field, tvar) \
|
||||
for ((var) = LIST_FIRST(head); \
|
||||
(var) && ((tvar) = LIST_NEXT(var, field), 1); \
|
||||
(var) = (tvar))
|
||||
|
||||
/*
|
||||
* List functions.
|
||||
*/
|
||||
#define LIST_INIT(head) do { \
|
||||
LIST_FIRST(head) = LIST_END(head); \
|
||||
} while (0)
|
||||
|
||||
#define LIST_INSERT_AFTER(listelm, elm, field) do { \
|
||||
if (((elm)->field.le_next = (listelm)->field.le_next) != NULL) \
|
||||
(listelm)->field.le_next->field.le_prev = \
|
||||
&(elm)->field.le_next; \
|
||||
(listelm)->field.le_next = (elm); \
|
||||
(elm)->field.le_prev = &(listelm)->field.le_next; \
|
||||
} while (0)
|
||||
|
||||
#define LIST_INSERT_BEFORE(listelm, elm, field) do { \
|
||||
(elm)->field.le_prev = (listelm)->field.le_prev; \
|
||||
(elm)->field.le_next = (listelm); \
|
||||
*(listelm)->field.le_prev = (elm); \
|
||||
(listelm)->field.le_prev = &(elm)->field.le_next; \
|
||||
} while (0)
|
||||
|
||||
#define LIST_INSERT_HEAD(head, elm, field) do { \
|
||||
if (((elm)->field.le_next = (head)->lh_first) != NULL) \
|
||||
(head)->lh_first->field.le_prev = &(elm)->field.le_next;\
|
||||
(head)->lh_first = (elm); \
|
||||
(elm)->field.le_prev = &(head)->lh_first; \
|
||||
} while (0)
|
||||
|
||||
#define LIST_REMOVE(elm, field) do { \
|
||||
if ((elm)->field.le_next != NULL) \
|
||||
(elm)->field.le_next->field.le_prev = \
|
||||
(elm)->field.le_prev; \
|
||||
*(elm)->field.le_prev = (elm)->field.le_next; \
|
||||
_Q_INVALIDATE((elm)->field.le_prev); \
|
||||
_Q_INVALIDATE((elm)->field.le_next); \
|
||||
} while (0)
|
||||
|
||||
#define LIST_REPLACE(elm, elm2, field) do { \
|
||||
if (((elm2)->field.le_next = (elm)->field.le_next) != NULL) \
|
||||
(elm2)->field.le_next->field.le_prev = \
|
||||
&(elm2)->field.le_next; \
|
||||
(elm2)->field.le_prev = (elm)->field.le_prev; \
|
||||
*(elm2)->field.le_prev = (elm2); \
|
||||
_Q_INVALIDATE((elm)->field.le_prev); \
|
||||
_Q_INVALIDATE((elm)->field.le_next); \
|
||||
} while (0)
|
||||
|
||||
/*
|
||||
* Simple queue definitions.
|
||||
*/
|
||||
#define SIMPLEQ_HEAD(name, type) \
|
||||
struct name { \
|
||||
struct type *sqh_first; /* first element */ \
|
||||
struct type **sqh_last; /* addr of last next element */ \
|
||||
}
|
||||
|
||||
#define SIMPLEQ_HEAD_INITIALIZER(head) \
|
||||
{ NULL, &(head).sqh_first }
|
||||
|
||||
#define SIMPLEQ_ENTRY(type) \
|
||||
struct { \
|
||||
struct type *sqe_next; /* next element */ \
|
||||
}
|
||||
|
||||
/*
|
||||
* Simple queue access methods.
|
||||
*/
|
||||
#define SIMPLEQ_FIRST(head) ((head)->sqh_first)
|
||||
#define SIMPLEQ_END(head) NULL
|
||||
#define SIMPLEQ_EMPTY(head) (SIMPLEQ_FIRST(head) == SIMPLEQ_END(head))
|
||||
#define SIMPLEQ_NEXT(elm, field) ((elm)->field.sqe_next)
|
||||
|
||||
#define SIMPLEQ_FOREACH(var, head, field) \
|
||||
for((var) = SIMPLEQ_FIRST(head); \
|
||||
(var) != SIMPLEQ_END(head); \
|
||||
(var) = SIMPLEQ_NEXT(var, field))
|
||||
|
||||
#define SIMPLEQ_FOREACH_SAFE(var, head, field, tvar) \
|
||||
for ((var) = SIMPLEQ_FIRST(head); \
|
||||
(var) && ((tvar) = SIMPLEQ_NEXT(var, field), 1); \
|
||||
(var) = (tvar))
|
||||
|
||||
/*
|
||||
* Simple queue functions.
|
||||
*/
|
||||
#define SIMPLEQ_INIT(head) do { \
|
||||
(head)->sqh_first = NULL; \
|
||||
(head)->sqh_last = &(head)->sqh_first; \
|
||||
} while (0)
|
||||
|
||||
#define SIMPLEQ_INSERT_HEAD(head, elm, field) do { \
|
||||
if (((elm)->field.sqe_next = (head)->sqh_first) == NULL) \
|
||||
(head)->sqh_last = &(elm)->field.sqe_next; \
|
||||
(head)->sqh_first = (elm); \
|
||||
} while (0)
|
||||
|
||||
#define SIMPLEQ_INSERT_TAIL(head, elm, field) do { \
|
||||
(elm)->field.sqe_next = NULL; \
|
||||
*(head)->sqh_last = (elm); \
|
||||
(head)->sqh_last = &(elm)->field.sqe_next; \
|
||||
} while (0)
|
||||
|
||||
#define SIMPLEQ_INSERT_AFTER(head, listelm, elm, field) do { \
|
||||
if (((elm)->field.sqe_next = (listelm)->field.sqe_next) == NULL)\
|
||||
(head)->sqh_last = &(elm)->field.sqe_next; \
|
||||
(listelm)->field.sqe_next = (elm); \
|
||||
} while (0)
|
||||
|
||||
#define SIMPLEQ_REMOVE_HEAD(head, field) do { \
|
||||
if (((head)->sqh_first = (head)->sqh_first->field.sqe_next) == NULL) \
|
||||
(head)->sqh_last = &(head)->sqh_first; \
|
||||
} while (0)
|
||||
|
||||
#define SIMPLEQ_REMOVE_AFTER(head, elm, field) do { \
|
||||
if (((elm)->field.sqe_next = (elm)->field.sqe_next->field.sqe_next) \
|
||||
== NULL) \
|
||||
(head)->sqh_last = &(elm)->field.sqe_next; \
|
||||
} while (0)
|
||||
|
||||
/*
|
||||
* XOR Simple queue definitions.
|
||||
*/
|
||||
#define XSIMPLEQ_HEAD(name, type) \
|
||||
struct name { \
|
||||
struct type *sqx_first; /* first element */ \
|
||||
struct type **sqx_last; /* addr of last next element */ \
|
||||
unsigned long sqx_cookie; \
|
||||
}
|
||||
|
||||
#define XSIMPLEQ_ENTRY(type) \
|
||||
struct { \
|
||||
struct type *sqx_next; /* next element */ \
|
||||
}
|
||||
|
||||
/*
|
||||
* XOR Simple queue access methods.
|
||||
*/
|
||||
#define XSIMPLEQ_XOR(head, ptr) ((__typeof(ptr))((head)->sqx_cookie ^ \
|
||||
(unsigned long)(ptr)))
|
||||
#define XSIMPLEQ_FIRST(head) XSIMPLEQ_XOR(head, ((head)->sqx_first))
|
||||
#define XSIMPLEQ_END(head) NULL
|
||||
#define XSIMPLEQ_EMPTY(head) (XSIMPLEQ_FIRST(head) == XSIMPLEQ_END(head))
|
||||
#define XSIMPLEQ_NEXT(head, elm, field) XSIMPLEQ_XOR(head, ((elm)->field.sqx_next))
|
||||
|
||||
|
||||
#define XSIMPLEQ_FOREACH(var, head, field) \
|
||||
for ((var) = XSIMPLEQ_FIRST(head); \
|
||||
(var) != XSIMPLEQ_END(head); \
|
||||
(var) = XSIMPLEQ_NEXT(head, var, field))
|
||||
|
||||
#define XSIMPLEQ_FOREACH_SAFE(var, head, field, tvar) \
|
||||
for ((var) = XSIMPLEQ_FIRST(head); \
|
||||
(var) && ((tvar) = XSIMPLEQ_NEXT(head, var, field), 1); \
|
||||
(var) = (tvar))
|
||||
|
||||
/*
|
||||
* XOR Simple queue functions.
|
||||
*/
|
||||
#define XSIMPLEQ_INIT(head) do { \
|
||||
arc4random_buf(&(head)->sqx_cookie, sizeof((head)->sqx_cookie)); \
|
||||
(head)->sqx_first = XSIMPLEQ_XOR(head, NULL); \
|
||||
(head)->sqx_last = XSIMPLEQ_XOR(head, &(head)->sqx_first); \
|
||||
} while (0)
|
||||
|
||||
#define XSIMPLEQ_INSERT_HEAD(head, elm, field) do { \
|
||||
if (((elm)->field.sqx_next = (head)->sqx_first) == \
|
||||
XSIMPLEQ_XOR(head, NULL)) \
|
||||
(head)->sqx_last = XSIMPLEQ_XOR(head, &(elm)->field.sqx_next); \
|
||||
(head)->sqx_first = XSIMPLEQ_XOR(head, (elm)); \
|
||||
} while (0)
|
||||
|
||||
#define XSIMPLEQ_INSERT_TAIL(head, elm, field) do { \
|
||||
(elm)->field.sqx_next = XSIMPLEQ_XOR(head, NULL); \
|
||||
*(XSIMPLEQ_XOR(head, (head)->sqx_last)) = XSIMPLEQ_XOR(head, (elm)); \
|
||||
(head)->sqx_last = XSIMPLEQ_XOR(head, &(elm)->field.sqx_next); \
|
||||
} while (0)
|
||||
|
||||
#define XSIMPLEQ_INSERT_AFTER(head, listelm, elm, field) do { \
|
||||
if (((elm)->field.sqx_next = (listelm)->field.sqx_next) == \
|
||||
XSIMPLEQ_XOR(head, NULL)) \
|
||||
(head)->sqx_last = XSIMPLEQ_XOR(head, &(elm)->field.sqx_next); \
|
||||
(listelm)->field.sqx_next = XSIMPLEQ_XOR(head, (elm)); \
|
||||
} while (0)
|
||||
|
||||
#define XSIMPLEQ_REMOVE_HEAD(head, field) do { \
|
||||
if (((head)->sqx_first = XSIMPLEQ_XOR(head, \
|
||||
(head)->sqx_first)->field.sqx_next) == XSIMPLEQ_XOR(head, NULL)) \
|
||||
(head)->sqx_last = XSIMPLEQ_XOR(head, &(head)->sqx_first); \
|
||||
} while (0)
|
||||
|
||||
#define XSIMPLEQ_REMOVE_AFTER(head, elm, field) do { \
|
||||
if (((elm)->field.sqx_next = XSIMPLEQ_XOR(head, \
|
||||
(elm)->field.sqx_next)->field.sqx_next) \
|
||||
== XSIMPLEQ_XOR(head, NULL)) \
|
||||
(head)->sqx_last = \
|
||||
XSIMPLEQ_XOR(head, &(elm)->field.sqx_next); \
|
||||
} while (0)
|
||||
|
||||
|
||||
/*
|
||||
* Tail queue definitions.
|
||||
*/
|
||||
#define TAILQ_HEAD(name, type) \
|
||||
struct name { \
|
||||
struct type *tqh_first; /* first element */ \
|
||||
struct type **tqh_last; /* addr of last next element */ \
|
||||
}
|
||||
|
||||
#define TAILQ_HEAD_INITIALIZER(head) \
|
||||
{ NULL, &(head).tqh_first }
|
||||
|
||||
#define TAILQ_ENTRY(type) \
|
||||
struct { \
|
||||
struct type *tqe_next; /* next element */ \
|
||||
struct type **tqe_prev; /* address of previous next element */ \
|
||||
}
|
||||
|
||||
/*
|
||||
* tail queue access methods
|
||||
*/
|
||||
#define TAILQ_FIRST(head) ((head)->tqh_first)
|
||||
#define TAILQ_END(head) NULL
|
||||
#define TAILQ_NEXT(elm, field) ((elm)->field.tqe_next)
|
||||
#define TAILQ_LAST(head, headname) \
|
||||
(*(((struct headname *)((head)->tqh_last))->tqh_last))
|
||||
/* XXX */
|
||||
#define TAILQ_PREV(elm, headname, field) \
|
||||
(*(((struct headname *)((elm)->field.tqe_prev))->tqh_last))
|
||||
#define TAILQ_EMPTY(head) \
|
||||
(TAILQ_FIRST(head) == TAILQ_END(head))
|
||||
|
||||
#define TAILQ_FOREACH(var, head, field) \
|
||||
for((var) = TAILQ_FIRST(head); \
|
||||
(var) != TAILQ_END(head); \
|
||||
(var) = TAILQ_NEXT(var, field))
|
||||
|
||||
#define TAILQ_FOREACH_SAFE(var, head, field, tvar) \
|
||||
for ((var) = TAILQ_FIRST(head); \
|
||||
(var) != TAILQ_END(head) && \
|
||||
((tvar) = TAILQ_NEXT(var, field), 1); \
|
||||
(var) = (tvar))
|
||||
|
||||
|
||||
#define TAILQ_FOREACH_REVERSE(var, head, headname, field) \
|
||||
for((var) = TAILQ_LAST(head, headname); \
|
||||
(var) != TAILQ_END(head); \
|
||||
(var) = TAILQ_PREV(var, headname, field))
|
||||
|
||||
#define TAILQ_FOREACH_REVERSE_SAFE(var, head, headname, field, tvar) \
|
||||
for ((var) = TAILQ_LAST(head, headname); \
|
||||
(var) != TAILQ_END(head) && \
|
||||
((tvar) = TAILQ_PREV(var, headname, field), 1); \
|
||||
(var) = (tvar))
|
||||
|
||||
/*
|
||||
* Tail queue functions.
|
||||
*/
|
||||
#define TAILQ_INIT(head) do { \
|
||||
(head)->tqh_first = NULL; \
|
||||
(head)->tqh_last = &(head)->tqh_first; \
|
||||
} while (0)
|
||||
|
||||
#define TAILQ_INSERT_HEAD(head, elm, field) do { \
|
||||
if (((elm)->field.tqe_next = (head)->tqh_first) != NULL) \
|
||||
(head)->tqh_first->field.tqe_prev = \
|
||||
&(elm)->field.tqe_next; \
|
||||
else \
|
||||
(head)->tqh_last = &(elm)->field.tqe_next; \
|
||||
(head)->tqh_first = (elm); \
|
||||
(elm)->field.tqe_prev = &(head)->tqh_first; \
|
||||
} while (0)
|
||||
|
||||
#define TAILQ_INSERT_TAIL(head, elm, field) do { \
|
||||
(elm)->field.tqe_next = NULL; \
|
||||
(elm)->field.tqe_prev = (head)->tqh_last; \
|
||||
*(head)->tqh_last = (elm); \
|
||||
(head)->tqh_last = &(elm)->field.tqe_next; \
|
||||
} while (0)
|
||||
|
||||
#define TAILQ_INSERT_AFTER(head, listelm, elm, field) do { \
|
||||
if (((elm)->field.tqe_next = (listelm)->field.tqe_next) != NULL)\
|
||||
(elm)->field.tqe_next->field.tqe_prev = \
|
||||
&(elm)->field.tqe_next; \
|
||||
else \
|
||||
(head)->tqh_last = &(elm)->field.tqe_next; \
|
||||
(listelm)->field.tqe_next = (elm); \
|
||||
(elm)->field.tqe_prev = &(listelm)->field.tqe_next; \
|
||||
} while (0)
|
||||
|
||||
#define TAILQ_INSERT_BEFORE(listelm, elm, field) do { \
|
||||
(elm)->field.tqe_prev = (listelm)->field.tqe_prev; \
|
||||
(elm)->field.tqe_next = (listelm); \
|
||||
*(listelm)->field.tqe_prev = (elm); \
|
||||
(listelm)->field.tqe_prev = &(elm)->field.tqe_next; \
|
||||
} while (0)
|
||||
|
||||
#define TAILQ_REMOVE(head, elm, field) do { \
|
||||
if (((elm)->field.tqe_next) != NULL) \
|
||||
(elm)->field.tqe_next->field.tqe_prev = \
|
||||
(elm)->field.tqe_prev; \
|
||||
else \
|
||||
(head)->tqh_last = (elm)->field.tqe_prev; \
|
||||
*(elm)->field.tqe_prev = (elm)->field.tqe_next; \
|
||||
_Q_INVALIDATE((elm)->field.tqe_prev); \
|
||||
_Q_INVALIDATE((elm)->field.tqe_next); \
|
||||
} while (0)
|
||||
|
||||
#define TAILQ_REPLACE(head, elm, elm2, field) do { \
|
||||
if (((elm2)->field.tqe_next = (elm)->field.tqe_next) != NULL) \
|
||||
(elm2)->field.tqe_next->field.tqe_prev = \
|
||||
&(elm2)->field.tqe_next; \
|
||||
else \
|
||||
(head)->tqh_last = &(elm2)->field.tqe_next; \
|
||||
(elm2)->field.tqe_prev = (elm)->field.tqe_prev; \
|
||||
*(elm2)->field.tqe_prev = (elm2); \
|
||||
_Q_INVALIDATE((elm)->field.tqe_prev); \
|
||||
_Q_INVALIDATE((elm)->field.tqe_next); \
|
||||
} while (0)
|
||||
|
||||
/*
|
||||
* Circular queue definitions.
|
||||
*/
|
||||
#define CIRCLEQ_HEAD(name, type) \
|
||||
struct name { \
|
||||
struct type *cqh_first; /* first element */ \
|
||||
struct type *cqh_last; /* last element */ \
|
||||
}
|
||||
|
||||
#define CIRCLEQ_HEAD_INITIALIZER(head) \
|
||||
{ CIRCLEQ_END(&head), CIRCLEQ_END(&head) }
|
||||
|
||||
#define CIRCLEQ_ENTRY(type) \
|
||||
struct { \
|
||||
struct type *cqe_next; /* next element */ \
|
||||
struct type *cqe_prev; /* previous element */ \
|
||||
}
|
||||
|
||||
/*
|
||||
* Circular queue access methods
|
||||
*/
|
||||
#define CIRCLEQ_FIRST(head) ((head)->cqh_first)
|
||||
#define CIRCLEQ_LAST(head) ((head)->cqh_last)
|
||||
#define CIRCLEQ_END(head) ((void *)(head))
|
||||
#define CIRCLEQ_NEXT(elm, field) ((elm)->field.cqe_next)
|
||||
#define CIRCLEQ_PREV(elm, field) ((elm)->field.cqe_prev)
|
||||
#define CIRCLEQ_EMPTY(head) \
|
||||
(CIRCLEQ_FIRST(head) == CIRCLEQ_END(head))
|
||||
|
||||
#define CIRCLEQ_FOREACH(var, head, field) \
|
||||
for((var) = CIRCLEQ_FIRST(head); \
|
||||
(var) != CIRCLEQ_END(head); \
|
||||
(var) = CIRCLEQ_NEXT(var, field))
|
||||
|
||||
#define CIRCLEQ_FOREACH_SAFE(var, head, field, tvar) \
|
||||
for ((var) = CIRCLEQ_FIRST(head); \
|
||||
(var) != CIRCLEQ_END(head) && \
|
||||
((tvar) = CIRCLEQ_NEXT(var, field), 1); \
|
||||
(var) = (tvar))
|
||||
|
||||
#define CIRCLEQ_FOREACH_REVERSE(var, head, field) \
|
||||
for((var) = CIRCLEQ_LAST(head); \
|
||||
(var) != CIRCLEQ_END(head); \
|
||||
(var) = CIRCLEQ_PREV(var, field))
|
||||
|
||||
#define CIRCLEQ_FOREACH_REVERSE_SAFE(var, head, headname, field, tvar) \
|
||||
for ((var) = CIRCLEQ_LAST(head, headname); \
|
||||
(var) != CIRCLEQ_END(head) && \
|
||||
((tvar) = CIRCLEQ_PREV(var, headname, field), 1); \
|
||||
(var) = (tvar))
|
||||
|
||||
/*
|
||||
* Circular queue functions.
|
||||
*/
|
||||
#define CIRCLEQ_INIT(head) do { \
|
||||
(head)->cqh_first = CIRCLEQ_END(head); \
|
||||
(head)->cqh_last = CIRCLEQ_END(head); \
|
||||
} while (0)
|
||||
|
||||
#define CIRCLEQ_INSERT_AFTER(head, listelm, elm, field) do { \
|
||||
(elm)->field.cqe_next = (listelm)->field.cqe_next; \
|
||||
(elm)->field.cqe_prev = (listelm); \
|
||||
if ((listelm)->field.cqe_next == CIRCLEQ_END(head)) \
|
||||
(head)->cqh_last = (elm); \
|
||||
else \
|
||||
(listelm)->field.cqe_next->field.cqe_prev = (elm); \
|
||||
(listelm)->field.cqe_next = (elm); \
|
||||
} while (0)
|
||||
|
||||
#define CIRCLEQ_INSERT_BEFORE(head, listelm, elm, field) do { \
|
||||
(elm)->field.cqe_next = (listelm); \
|
||||
(elm)->field.cqe_prev = (listelm)->field.cqe_prev; \
|
||||
if ((listelm)->field.cqe_prev == CIRCLEQ_END(head)) \
|
||||
(head)->cqh_first = (elm); \
|
||||
else \
|
||||
(listelm)->field.cqe_prev->field.cqe_next = (elm); \
|
||||
(listelm)->field.cqe_prev = (elm); \
|
||||
} while (0)
|
||||
|
||||
#define CIRCLEQ_INSERT_HEAD(head, elm, field) do { \
|
||||
(elm)->field.cqe_next = (head)->cqh_first; \
|
||||
(elm)->field.cqe_prev = CIRCLEQ_END(head); \
|
||||
if ((head)->cqh_last == CIRCLEQ_END(head)) \
|
||||
(head)->cqh_last = (elm); \
|
||||
else \
|
||||
(head)->cqh_first->field.cqe_prev = (elm); \
|
||||
(head)->cqh_first = (elm); \
|
||||
} while (0)
|
||||
|
||||
#define CIRCLEQ_INSERT_TAIL(head, elm, field) do { \
|
||||
(elm)->field.cqe_next = CIRCLEQ_END(head); \
|
||||
(elm)->field.cqe_prev = (head)->cqh_last; \
|
||||
if ((head)->cqh_first == CIRCLEQ_END(head)) \
|
||||
(head)->cqh_first = (elm); \
|
||||
else \
|
||||
(head)->cqh_last->field.cqe_next = (elm); \
|
||||
(head)->cqh_last = (elm); \
|
||||
} while (0)
|
||||
|
||||
#define CIRCLEQ_REMOVE(head, elm, field) do { \
|
||||
if ((elm)->field.cqe_next == CIRCLEQ_END(head)) \
|
||||
(head)->cqh_last = (elm)->field.cqe_prev; \
|
||||
else \
|
||||
(elm)->field.cqe_next->field.cqe_prev = \
|
||||
(elm)->field.cqe_prev; \
|
||||
if ((elm)->field.cqe_prev == CIRCLEQ_END(head)) \
|
||||
(head)->cqh_first = (elm)->field.cqe_next; \
|
||||
else \
|
||||
(elm)->field.cqe_prev->field.cqe_next = \
|
||||
(elm)->field.cqe_next; \
|
||||
_Q_INVALIDATE((elm)->field.cqe_prev); \
|
||||
_Q_INVALIDATE((elm)->field.cqe_next); \
|
||||
} while (0)
|
||||
|
||||
#define CIRCLEQ_REPLACE(head, elm, elm2, field) do { \
|
||||
if (((elm2)->field.cqe_next = (elm)->field.cqe_next) == \
|
||||
CIRCLEQ_END(head)) \
|
||||
(head)->cqh_last = (elm2); \
|
||||
else \
|
||||
(elm2)->field.cqe_next->field.cqe_prev = (elm2); \
|
||||
if (((elm2)->field.cqe_prev = (elm)->field.cqe_prev) == \
|
||||
CIRCLEQ_END(head)) \
|
||||
(head)->cqh_first = (elm2); \
|
||||
else \
|
||||
(elm2)->field.cqe_prev->field.cqe_next = (elm2); \
|
||||
_Q_INVALIDATE((elm)->field.cqe_prev); \
|
||||
_Q_INVALIDATE((elm)->field.cqe_next); \
|
||||
} while (0)
|
||||
|
||||
#endif /* !_SYS_QUEUE_H_ */
|
145
include/server/ua_nodes.h
Normal file
145
include/server/ua_nodes.h
Normal file
@ -0,0 +1,145 @@
|
||||
#ifndef UA_NODES_H_
|
||||
#define UA_NODES_H_
|
||||
|
||||
#include "ua_server.h"
|
||||
#include "ua_types_generated.h"
|
||||
#include "ua_types_encoding_binary.h"
|
||||
|
||||
/*
|
||||
* Most APIs take and return UA_EditNode and UA_ConstNode. By looking up the
|
||||
* nodeclass, nodes can be cast to their "true" class, i.e. UA_VariableNode,
|
||||
* UA_ObjectNode, and so on.
|
||||
*/
|
||||
|
||||
#define UA_STANDARD_NODEMEMBERS \
|
||||
UA_NodeId nodeId; \
|
||||
UA_NodeClass nodeClass; \
|
||||
UA_QualifiedName browseName; \
|
||||
UA_LocalizedText displayName; \
|
||||
UA_LocalizedText description; \
|
||||
UA_UInt32 writeMask; \
|
||||
UA_UInt32 userWriteMask; \
|
||||
size_t referencesSize; \
|
||||
UA_ReferenceNode *references;
|
||||
|
||||
typedef struct {
|
||||
UA_STANDARD_NODEMEMBERS
|
||||
} UA_Node;
|
||||
|
||||
void UA_Node_deleteMembersAnyNodeClass(UA_Node *node);
|
||||
UA_StatusCode UA_Node_copyAnyNodeClass(const UA_Node *src, UA_Node *dst);
|
||||
|
||||
/**************/
|
||||
/* ObjectNode */
|
||||
/**************/
|
||||
|
||||
typedef struct {
|
||||
UA_STANDARD_NODEMEMBERS
|
||||
UA_Byte eventNotifier;
|
||||
void *instanceHandle;
|
||||
} UA_ObjectNode;
|
||||
|
||||
/******************/
|
||||
/* ObjectTypeNode */
|
||||
/******************/
|
||||
|
||||
typedef struct {
|
||||
UA_STANDARD_NODEMEMBERS
|
||||
UA_Boolean isAbstract;
|
||||
UA_ObjectLifecycleManagement lifecycleManagement;
|
||||
} UA_ObjectTypeNode;
|
||||
|
||||
typedef enum {
|
||||
UA_VALUESOURCE_VARIANT,
|
||||
UA_VALUESOURCE_DATASOURCE
|
||||
} UA_ValueSource;
|
||||
|
||||
/****************/
|
||||
/* VariableNode */
|
||||
/****************/
|
||||
|
||||
typedef struct {
|
||||
UA_STANDARD_NODEMEMBERS
|
||||
UA_Int32 valueRank; /**< n >= 1: the value is an array with the specified number of dimensions.
|
||||
n = 0: the value is an array with one or more dimensions.
|
||||
n = -1: the value is a scalar.
|
||||
n = -2: the value can be a scalar or an array with any number of dimensions.
|
||||
n = -3: the value can be a scalar or a one dimensional array. */
|
||||
UA_ValueSource valueSource;
|
||||
union {
|
||||
struct {
|
||||
UA_Variant value;
|
||||
UA_ValueCallback callback;
|
||||
} variant;
|
||||
UA_DataSource dataSource;
|
||||
} value;
|
||||
/* <--- similar to variabletypenodes up to there--->*/
|
||||
UA_Byte accessLevel;
|
||||
UA_Byte userAccessLevel;
|
||||
UA_Double minimumSamplingInterval;
|
||||
UA_Boolean historizing;
|
||||
} UA_VariableNode;
|
||||
|
||||
/********************/
|
||||
/* VariableTypeNode */
|
||||
/********************/
|
||||
|
||||
typedef struct {
|
||||
UA_STANDARD_NODEMEMBERS
|
||||
UA_Int32 valueRank;
|
||||
UA_ValueSource valueSource;
|
||||
union {
|
||||
struct {
|
||||
UA_Variant value;
|
||||
UA_ValueCallback callback;
|
||||
} variant;
|
||||
UA_DataSource dataSource;
|
||||
} value;
|
||||
/* <--- similar to variablenodes up to there--->*/
|
||||
UA_Boolean isAbstract;
|
||||
} UA_VariableTypeNode;
|
||||
|
||||
/*********************/
|
||||
/* ReferenceTypeNode */
|
||||
/*********************/
|
||||
|
||||
typedef struct {
|
||||
UA_STANDARD_NODEMEMBERS
|
||||
UA_Boolean isAbstract;
|
||||
UA_Boolean symmetric;
|
||||
UA_LocalizedText inverseName;
|
||||
} UA_ReferenceTypeNode;
|
||||
|
||||
/**************/
|
||||
/* MethodNode */
|
||||
/**************/
|
||||
|
||||
typedef struct {
|
||||
UA_STANDARD_NODEMEMBERS
|
||||
UA_Boolean executable;
|
||||
UA_Boolean userExecutable;
|
||||
void *methodHandle;
|
||||
UA_MethodCallback attachedMethod;
|
||||
} UA_MethodNode;
|
||||
|
||||
/************/
|
||||
/* ViewNode */
|
||||
/************/
|
||||
|
||||
typedef struct {
|
||||
UA_STANDARD_NODEMEMBERS
|
||||
UA_Byte eventNotifier;
|
||||
/* <-- the same as objectnode until here --> */
|
||||
UA_Boolean containsNoLoops;
|
||||
} UA_ViewNode;
|
||||
|
||||
/****************/
|
||||
/* DataTypeNode */
|
||||
/****************/
|
||||
|
||||
typedef struct {
|
||||
UA_STANDARD_NODEMEMBERS
|
||||
UA_Boolean isAbstract;
|
||||
} UA_DataTypeNode;
|
||||
|
||||
#endif /* UA_NODES_H_ */
|
88
include/server/ua_nodestore.h
Normal file
88
include/server/ua_nodestore.h
Normal file
@ -0,0 +1,88 @@
|
||||
#ifndef UA_NODESTORE_H_
|
||||
#define UA_NODESTORE_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "ua_types_generated.h"
|
||||
#include "ua_nodes.h"
|
||||
|
||||
/**
|
||||
* Nodestore
|
||||
* =========
|
||||
* Stores nodes that can be indexed by their NodeId. Internally, it is based on
|
||||
* a hash-map implementation. */
|
||||
struct UA_NodeStore;
|
||||
typedef struct UA_NodeStore UA_NodeStore;
|
||||
|
||||
/**
|
||||
* Nodestore Lifecycle
|
||||
* ------------------- */
|
||||
/* Create a new nodestore */
|
||||
UA_NodeStore * UA_NodeStore_new(void);
|
||||
|
||||
/* Delete the nodestore and all nodes in it. Do not call from a read-side
|
||||
critical section (multithreading). */
|
||||
void UA_NodeStore_delete(UA_NodeStore *ns);
|
||||
|
||||
/**
|
||||
* Node Lifecycle
|
||||
* ---------------
|
||||
*
|
||||
* The following definitions are used to create empty nodes of the different
|
||||
* node types. The memory is managed by the nodestore. Therefore, the node has
|
||||
* to be removed via a special deleteNode function. (If the new node is not
|
||||
* added to the nodestore.) */
|
||||
/* Create an editable node of the given NodeClass. */
|
||||
UA_Node * UA_NodeStore_newNode(UA_NodeClass nodeClass);
|
||||
#define UA_NodeStore_newObjectNode() (UA_ObjectNode*)UA_NodeStore_newNode(UA_NODECLASS_OBJECT)
|
||||
#define UA_NodeStore_newVariableNode() (UA_VariableNode*)UA_NodeStore_newNode(UA_NODECLASS_VARIABLE)
|
||||
#define UA_NodeStore_newMethodNode() (UA_MethodNode*)UA_NodeStore_newNode(UA_NODECLASS_METHOD)
|
||||
#define UA_NodeStore_newObjectTypeNode() (UA_ObjectTypeNode*)UA_NodeStore_newNode(UA_NODECLASS_OBJECTTYPE)
|
||||
#define UA_NodeStore_newVariableTypeNode() (UA_VariableTypeNode*)UA_NodeStore_newNode(UA_NODECLASS_VARIABLETYPE)
|
||||
#define UA_NodeStore_newReferenceTypeNode() (UA_ReferenceTypeNode*)UA_NodeStore_newNode(UA_NODECLASS_REFERENCETYPE)
|
||||
#define UA_NodeStore_newDataTypeNode() (UA_DataTypeNode*)UA_NodeStore_newNode(UA_NODECLASS_DATATYPE)
|
||||
#define UA_NodeStore_newViewNode() (UA_ViewNode*)UA_NodeStore_newNode(UA_NODECLASS_VIEW)
|
||||
|
||||
/* Delete an editable node. */
|
||||
void UA_NodeStore_deleteNode(UA_Node *node);
|
||||
|
||||
/**
|
||||
* Insert / Get / Replace / Remove
|
||||
* ------------------------------- */
|
||||
/* Inserts a new node into the nodestore. If the nodeid is zero, then a fresh
|
||||
* numeric nodeid from namespace 1 is assigned. If insertion fails, the node is
|
||||
* deleted. */
|
||||
UA_StatusCode UA_NodeStore_insert(UA_NodeStore *ns, UA_Node *node);
|
||||
|
||||
/* The returned node is immutable. */
|
||||
const UA_Node * UA_NodeStore_get(UA_NodeStore *ns, const UA_NodeId *nodeid);
|
||||
|
||||
/* Returns an editable copy of a node (needs to be deleted with the deleteNode
|
||||
function or inserted / replaced into the nodestore). */
|
||||
UA_Node * UA_NodeStore_getCopy(UA_NodeStore *ns, const UA_NodeId *nodeid);
|
||||
|
||||
/* To replace a node, get an editable copy of the node, edit and replace with
|
||||
* this function. If the node was already replaced since the copy was made,
|
||||
* UA_STATUSCODE_BADINTERNALERROR is returned. If the nodeid is not found,
|
||||
* UA_STATUSCODE_BADNODEIDUNKNOWN is returned. In both error cases, the editable
|
||||
* node is deleted. */
|
||||
UA_StatusCode UA_NodeStore_replace(UA_NodeStore *ns, UA_Node *node);
|
||||
|
||||
/* Remove a node in the nodestore. */
|
||||
UA_StatusCode UA_NodeStore_remove(UA_NodeStore *ns, const UA_NodeId *nodeid);
|
||||
|
||||
/**
|
||||
* Iteration
|
||||
* ---------
|
||||
* The following definitions are used to call a callback for every node in the
|
||||
* nodestore. */
|
||||
typedef void (*UA_NodeStore_nodeVisitor)(const UA_Node *node);
|
||||
void UA_NodeStore_iterate(UA_NodeStore *ns, UA_NodeStore_nodeVisitor visitor);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif /* UA_NODESTORE_H_ */
|
51
include/server/ua_securechannel_manager.h
Normal file
51
include/server/ua_securechannel_manager.h
Normal file
@ -0,0 +1,51 @@
|
||||
#ifndef UA_CHANNEL_MANAGER_H_
|
||||
#define UA_CHANNEL_MANAGER_H_
|
||||
|
||||
#include "ua_util.h"
|
||||
#include "ua_server.h"
|
||||
#include "ua_securechannel.h"
|
||||
#include "queue.h"
|
||||
|
||||
typedef struct channel_list_entry {
|
||||
UA_SecureChannel channel;
|
||||
LIST_ENTRY(channel_list_entry) pointers;
|
||||
} channel_list_entry;
|
||||
|
||||
typedef struct UA_SecureChannelManager {
|
||||
LIST_HEAD(channel_list, channel_list_entry) channels; // doubly-linked list of channels
|
||||
size_t maxChannelCount;
|
||||
size_t currentChannelCount;
|
||||
UA_UInt32 maxChannelLifetime;
|
||||
UA_MessageSecurityMode securityMode;
|
||||
UA_DateTime channelLifeTime;
|
||||
UA_UInt32 lastChannelId;
|
||||
UA_UInt32 lastTokenId;
|
||||
UA_Server *server;
|
||||
} UA_SecureChannelManager;
|
||||
|
||||
UA_StatusCode
|
||||
UA_SecureChannelManager_init(UA_SecureChannelManager *cm, size_t maxChannelCount,
|
||||
UA_UInt32 tokenLifetime, UA_UInt32 startChannelId,
|
||||
UA_UInt32 startTokenId, UA_Server *server);
|
||||
|
||||
void UA_SecureChannelManager_deleteMembers(UA_SecureChannelManager *cm);
|
||||
|
||||
void UA_SecureChannelManager_cleanupTimedOut(UA_SecureChannelManager *cm, UA_DateTime now);
|
||||
|
||||
UA_StatusCode
|
||||
UA_SecureChannelManager_open(UA_SecureChannelManager *cm, UA_Connection *conn,
|
||||
const UA_OpenSecureChannelRequest *request,
|
||||
UA_OpenSecureChannelResponse *response);
|
||||
|
||||
UA_StatusCode
|
||||
UA_SecureChannelManager_renew(UA_SecureChannelManager *cm, UA_Connection *conn,
|
||||
const UA_OpenSecureChannelRequest *request,
|
||||
UA_OpenSecureChannelResponse *response);
|
||||
|
||||
UA_SecureChannel *
|
||||
UA_SecureChannelManager_get(UA_SecureChannelManager *cm, UA_UInt32 channelId);
|
||||
|
||||
UA_StatusCode
|
||||
UA_SecureChannelManager_close(UA_SecureChannelManager *cm, UA_UInt32 channelId);
|
||||
|
||||
#endif /* UA_CHANNEL_MANAGER_H_ */
|
93
include/server/ua_server_internal.h
Normal file
93
include/server/ua_server_internal.h
Normal file
@ -0,0 +1,93 @@
|
||||
#ifndef UA_SERVER_INTERNAL_H_
|
||||
#define UA_SERVER_INTERNAL_H_
|
||||
|
||||
#include "ua_util.h"
|
||||
#include "ua_server.h"
|
||||
#include "ua_server_external_ns.h"
|
||||
#include "ua_connection_internal.h"
|
||||
#include "ua_session_manager.h"
|
||||
#include "ua_securechannel_manager.h"
|
||||
#include "ua_nodestore.h"
|
||||
|
||||
#define ANONYMOUS_POLICY "open62541-anonymous-policy"
|
||||
#define USERNAME_POLICY "open62541-username-policy"
|
||||
|
||||
#ifdef UA_ENABLE_EXTERNAL_NAMESPACES
|
||||
/** Mapping of namespace-id and url to an external nodestore. For namespaces
|
||||
that have no mapping defined, the internal nodestore is used by default. */
|
||||
typedef struct UA_ExternalNamespace {
|
||||
UA_UInt16 index;
|
||||
UA_String url;
|
||||
UA_ExternalNodeStore externalNodeStore;
|
||||
} UA_ExternalNamespace;
|
||||
#endif
|
||||
|
||||
#ifdef UA_ENABLE_MULTITHREADING
|
||||
typedef struct {
|
||||
UA_Server *server;
|
||||
pthread_t thr;
|
||||
UA_UInt32 counter;
|
||||
volatile UA_Boolean running;
|
||||
char padding[64 - sizeof(void*) - sizeof(pthread_t) -
|
||||
sizeof(UA_UInt32) - sizeof(UA_Boolean)]; // separate cache lines
|
||||
} UA_Worker;
|
||||
#endif
|
||||
|
||||
struct UA_Server {
|
||||
/* Meta */
|
||||
UA_DateTime startTime;
|
||||
size_t endpointDescriptionsSize;
|
||||
UA_EndpointDescription *endpointDescriptions;
|
||||
|
||||
/* Security */
|
||||
UA_SecureChannelManager secureChannelManager;
|
||||
UA_SessionManager sessionManager;
|
||||
|
||||
/* Address Space */
|
||||
UA_NodeStore *nodestore;
|
||||
|
||||
size_t namespacesSize;
|
||||
UA_String *namespaces;
|
||||
|
||||
#ifdef UA_ENABLE_EXTERNAL_NAMESPACES
|
||||
size_t externalNamespacesSize;
|
||||
UA_ExternalNamespace *externalNamespaces;
|
||||
#endif
|
||||
|
||||
/* Jobs with a repetition interval */
|
||||
LIST_HEAD(RepeatedJobsList, RepeatedJobs) repeatedJobs;
|
||||
|
||||
#ifdef UA_ENABLE_MULTITHREADING
|
||||
/* Dispatch queue head for the worker threads (the tail should not be in the same cache line) */
|
||||
struct cds_wfcq_head dispatchQueue_head;
|
||||
UA_Worker *workers; /* there are nThread workers in a running server */
|
||||
struct cds_lfs_stack mainLoopJobs; /* Work that shall be executed only in the main loop and not
|
||||
by worker threads */
|
||||
struct DelayedJobs *delayedJobs;
|
||||
pthread_cond_t dispatchQueue_condition; /* so the workers don't spin if the queue is empty */
|
||||
struct cds_wfcq_tail dispatchQueue_tail; /* Dispatch queue tail for the worker threads */
|
||||
#endif
|
||||
|
||||
/* Config is the last element so that MSVC allows the usernamePasswordLogins
|
||||
field with zero-sized array */
|
||||
UA_ServerConfig config;
|
||||
};
|
||||
|
||||
typedef UA_StatusCode (*UA_EditNodeCallback)(UA_Server*, UA_Session*, UA_Node*, const void*);
|
||||
|
||||
/* Calls callback on the node. In the multithreaded case, the node is copied before and replaced in
|
||||
the nodestore. */
|
||||
UA_StatusCode UA_Server_editNode(UA_Server *server, UA_Session *session, const UA_NodeId *nodeId,
|
||||
UA_EditNodeCallback callback, const void *data);
|
||||
|
||||
void UA_Server_processBinaryMessage(UA_Server *server, UA_Connection *connection, const UA_ByteString *msg);
|
||||
|
||||
UA_StatusCode UA_Server_delayedCallback(UA_Server *server, UA_ServerCallback callback, void *data);
|
||||
UA_StatusCode UA_Server_delayedFree(UA_Server *server, void *data);
|
||||
void UA_Server_deleteAllRepeatedJobs(UA_Server *server);
|
||||
|
||||
#ifdef UA_BUILD_UNIT_TESTS
|
||||
UA_StatusCode parse_numericrange(const UA_String *str, UA_NumericRange *range);
|
||||
#endif
|
||||
|
||||
#endif /* UA_SERVER_INTERNAL_H_ */
|
339
include/server/ua_services.h
Normal file
339
include/server/ua_services.h
Normal file
@ -0,0 +1,339 @@
|
||||
#ifndef UA_SERVICES_H_
|
||||
#define UA_SERVICES_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "ua_util.h"
|
||||
#include "ua_types.h"
|
||||
#include "ua_types_generated.h"
|
||||
#include "ua_server.h"
|
||||
#include "ua_session.h"
|
||||
#include "ua_nodes.h"
|
||||
|
||||
/**
|
||||
* .. _services:
|
||||
*
|
||||
* Services
|
||||
* ========
|
||||
* The services defined in the OPC UA standard. */
|
||||
/* Most services take as input the server, the current session and pointers to
|
||||
the request and response. The possible error codes are returned as part of
|
||||
the response. */
|
||||
typedef void (*UA_Service)(UA_Server*, UA_Session*, const void*, void*);
|
||||
|
||||
/**
|
||||
* Discovery Service Set
|
||||
* ---------------------
|
||||
* This Service Set defines Services used to discover the Endpoints implemented
|
||||
* by a Server and to read the security configuration for those Endpoints. */
|
||||
void Service_FindServers(UA_Server *server, UA_Session *session,
|
||||
const UA_FindServersRequest *request,
|
||||
UA_FindServersResponse *response);
|
||||
|
||||
/* Returns the Endpoints supported by a Server and all of the configuration
|
||||
* information required to establish a SecureChannel and a Session. */
|
||||
void Service_GetEndpoints(UA_Server *server, UA_Session *session,
|
||||
const UA_GetEndpointsRequest *request,
|
||||
UA_GetEndpointsResponse *response);
|
||||
|
||||
/* Not Implemented: Service_RegisterServer */
|
||||
|
||||
/**
|
||||
* SecureChannel Service Set
|
||||
* -------------------------
|
||||
* This Service Set defines Services used to open a communication channel that
|
||||
* ensures the confidentiality and Integrity of all Messages exchanged with the
|
||||
* Server. */
|
||||
|
||||
/* Open or renew a SecureChannel that can be used to ensure Confidentiality and
|
||||
* Integrity for Message exchange during a Session. */
|
||||
void Service_OpenSecureChannel(UA_Server *server, UA_Connection *connection,
|
||||
const UA_OpenSecureChannelRequest *request,
|
||||
UA_OpenSecureChannelResponse *response);
|
||||
|
||||
/** Used to terminate a SecureChannel. */
|
||||
void Service_CloseSecureChannel(UA_Server *server, UA_UInt32 channelId);
|
||||
|
||||
/**
|
||||
* Session Service Set
|
||||
* -------------------
|
||||
* This Service Set defines Services for an application layer connection
|
||||
* establishment in the context of a Session. */
|
||||
|
||||
/* Used by an OPC UA Client to create a Session and the Server returns two
|
||||
* values which uniquely identify the Session. The first value is the sessionId
|
||||
* which is used to identify the Session in the audit logs and in the Server's
|
||||
* address space. The second is the authenticationToken which is used to
|
||||
* associate an incoming request with a Session. */
|
||||
void Service_CreateSession(UA_Server *server, UA_Session *session,
|
||||
const UA_CreateSessionRequest *request,
|
||||
UA_CreateSessionResponse *response);
|
||||
|
||||
/* Used by the Client to submit its SoftwareCertificates to the Server for
|
||||
* validation and to specify the identity of the user associated with the
|
||||
* Session. This Service request shall be issued by the Client before it issues
|
||||
* any other Service request after CreateSession. Failure to do so shall cause
|
||||
* the Server to close the Session. */
|
||||
void Service_ActivateSession(UA_Server *server, UA_Session *session,
|
||||
const UA_ActivateSessionRequest *request,
|
||||
UA_ActivateSessionResponse *response);
|
||||
|
||||
/* Used to terminate a Session. */
|
||||
void Service_CloseSession(UA_Server *server, UA_Session *session,
|
||||
const UA_CloseSessionRequest *request,
|
||||
UA_CloseSessionResponse *response);
|
||||
|
||||
/* Not Implemented: Service_Cancel */
|
||||
|
||||
/**
|
||||
* NodeManagement Service Set
|
||||
* --------------------------
|
||||
* This Service Set defines Services to add and delete AddressSpace Nodes and
|
||||
* References between them. All added Nodes continue to exist in the
|
||||
* AddressSpace even if the Client that created them disconnects from the
|
||||
* Server. */
|
||||
|
||||
/* Used to add one or more Nodes into the AddressSpace hierarchy. */
|
||||
void Service_AddNodes(UA_Server *server, UA_Session *session,
|
||||
const UA_AddNodesRequest *request,
|
||||
UA_AddNodesResponse *response);
|
||||
|
||||
void Service_AddNodes_single(UA_Server *server, UA_Session *session,
|
||||
const UA_AddNodesItem *item, UA_AddNodesResult *result,
|
||||
UA_InstantiationCallback *instantiationCallback);
|
||||
|
||||
/* Add an existing node. The node is assumed to be "finished", i.e. no
|
||||
* instantiation from inheritance is necessary */
|
||||
void Service_AddNodes_existing(UA_Server *server, UA_Session *session, UA_Node *node,
|
||||
const UA_NodeId *parentNodeId, const UA_NodeId *referenceTypeId,
|
||||
UA_AddNodesResult *result);
|
||||
|
||||
/* Used to add one or more References to one or more Nodes. */
|
||||
void Service_AddReferences(UA_Server *server, UA_Session *session,
|
||||
const UA_AddReferencesRequest *request,
|
||||
UA_AddReferencesResponse *response);
|
||||
|
||||
UA_StatusCode Service_AddReferences_single(UA_Server *server, UA_Session *session,
|
||||
const UA_AddReferencesItem *item);
|
||||
|
||||
/* Used to delete one or more Nodes from the AddressSpace. */
|
||||
void Service_DeleteNodes(UA_Server *server, UA_Session *session,
|
||||
const UA_DeleteNodesRequest *request,
|
||||
UA_DeleteNodesResponse *response);
|
||||
|
||||
UA_StatusCode Service_DeleteNodes_single(UA_Server *server, UA_Session *session,
|
||||
const UA_NodeId *nodeId,
|
||||
UA_Boolean deleteReferences);
|
||||
|
||||
/* Used to delete one or more References of a Node. */
|
||||
void Service_DeleteReferences(UA_Server *server, UA_Session *session,
|
||||
const UA_DeleteReferencesRequest *request,
|
||||
UA_DeleteReferencesResponse *response);
|
||||
|
||||
UA_StatusCode Service_DeleteReferences_single(UA_Server *server, UA_Session *session,
|
||||
const UA_DeleteReferencesItem *item);
|
||||
|
||||
/**
|
||||
* View Service Set
|
||||
* ----------------
|
||||
* Clients use the browse Services of the View Service Set to navigate through
|
||||
* the AddressSpace or through a View which is a subset of the AddressSpace. */
|
||||
|
||||
/* Used to discover the References of a specified Node. The browse can be
|
||||
* further limited by the use of a View. This Browse Service also supports a
|
||||
* primitive filtering capability. */
|
||||
void Service_Browse(UA_Server *server, UA_Session *session,
|
||||
const UA_BrowseRequest *request,
|
||||
UA_BrowseResponse *response);
|
||||
|
||||
void Service_Browse_single(UA_Server *server, UA_Session *session,
|
||||
struct ContinuationPointEntry *cp, const UA_BrowseDescription *descr,
|
||||
UA_UInt32 maxrefs, UA_BrowseResult *result);
|
||||
|
||||
/* Used to request the next set of Browse or BrowseNext response information
|
||||
* that is too large to be sent in a single response. "Too large" in this
|
||||
* context means that the Server is not able to return a larger response or that
|
||||
* the number of results to return exceeds the maximum number of results to
|
||||
* return that was specified by the Client in the original Browse request. */
|
||||
void Service_BrowseNext(UA_Server *server, UA_Session *session,
|
||||
const UA_BrowseNextRequest *request,
|
||||
UA_BrowseNextResponse *response);
|
||||
|
||||
void UA_Server_browseNext_single(UA_Server *server, UA_Session *session,
|
||||
UA_Boolean releaseContinuationPoint,
|
||||
const UA_ByteString *continuationPoint,
|
||||
UA_BrowseResult *result);
|
||||
|
||||
/* Used to translate textual node paths to their respective ids. */
|
||||
void Service_TranslateBrowsePathsToNodeIds(UA_Server *server, UA_Session *session,
|
||||
const UA_TranslateBrowsePathsToNodeIdsRequest *request,
|
||||
UA_TranslateBrowsePathsToNodeIdsResponse *response);
|
||||
|
||||
void Service_TranslateBrowsePathsToNodeIds_single(UA_Server *server, UA_Session *session,
|
||||
const UA_BrowsePath *path,
|
||||
UA_BrowsePathResult *result);
|
||||
|
||||
/* Used by Clients to register the Nodes that they know they will access
|
||||
* repeatedly (e.g. Write, Call). It allows Servers to set up anything needed so
|
||||
* that the access operations will be more efficient. */
|
||||
void Service_RegisterNodes(UA_Server *server, UA_Session *session,
|
||||
const UA_RegisterNodesRequest *request,
|
||||
UA_RegisterNodesResponse *response);
|
||||
|
||||
/* This Service is used to unregister NodeIds that have been obtained via the
|
||||
* RegisterNodes service. */
|
||||
void Service_UnregisterNodes(UA_Server *server, UA_Session *session,
|
||||
const UA_UnregisterNodesRequest *request,
|
||||
UA_UnregisterNodesResponse *response);
|
||||
/**
|
||||
* Query Service Set
|
||||
* -----------------
|
||||
* This Service Set is used to issue a Query to a Server. OPC UA Query is
|
||||
* generic in that it provides an underlying storage mechanism independent Query
|
||||
* capability that can be used to access a wide variety of OPC UA data stores
|
||||
* and information management systems. OPC UA Query permits a Client to access
|
||||
* data maintained by a Server without any knowledge of the logical schema used
|
||||
* for internal storage of the data. Knowledge of the AddressSpace is
|
||||
* sufficient. */
|
||||
/* Not Implemented: Service_QueryFirst */
|
||||
/* Not Impelemented: Service_QueryNext */
|
||||
|
||||
/**
|
||||
* Attribute Service Set
|
||||
* ---------------------
|
||||
* This Service Set provides Services to access Attributes that are part of
|
||||
* Nodes. */
|
||||
|
||||
/* Used to read one or more Attributes of one or more Nodes. For constructed
|
||||
* Attribute values whose elements are indexed, such as an array, this Service
|
||||
* allows Clients to read the entire set of indexed values as a composite, to
|
||||
* read individual elements or to read ranges of elements of the composite. */
|
||||
void Service_Read(UA_Server *server, UA_Session *session,
|
||||
const UA_ReadRequest *request,
|
||||
UA_ReadResponse *response);
|
||||
|
||||
void Service_Read_single(UA_Server *server, UA_Session *session,
|
||||
UA_TimestampsToReturn timestamps,
|
||||
const UA_ReadValueId *id, UA_DataValue *v);
|
||||
|
||||
/* Used to write one or more Attributes of one or more Nodes. For constructed
|
||||
* Attribute values whose elements are indexed, such as an array, this Service
|
||||
* allows Clients to write the entire set of indexed values as a composite, to
|
||||
* write individual elements or to write ranges of elements of the composite. */
|
||||
void Service_Write(UA_Server *server, UA_Session *session,
|
||||
const UA_WriteRequest *request,
|
||||
UA_WriteResponse *response);
|
||||
|
||||
UA_StatusCode Service_Write_single(UA_Server *server, UA_Session *session,
|
||||
const UA_WriteValue *wvalue);
|
||||
|
||||
/* Not Implemented: Service_HistoryRead */
|
||||
/* Not Implemented: Service_HistoryUpdate */
|
||||
|
||||
/**
|
||||
* Method Service Set
|
||||
* ------------------
|
||||
* The Method Service Set defines the means to invoke methods. A method shall be
|
||||
* a component of an Object. */
|
||||
#ifdef UA_ENABLE_METHODCALLS
|
||||
/* Used to call (invoke) a list of Methods. Each method call is invoked within
|
||||
* the context of an existing Session. If the Session is terminated, the results
|
||||
* of the method's execution cannot be returned to the Client and are
|
||||
* discarded. */
|
||||
void Service_Call(UA_Server *server, UA_Session *session,
|
||||
const UA_CallRequest *request,
|
||||
UA_CallResponse *response);
|
||||
|
||||
void Service_Call_single(UA_Server *server, UA_Session *session,
|
||||
const UA_CallMethodRequest *request,
|
||||
UA_CallMethodResult *result);
|
||||
#endif
|
||||
|
||||
/**
|
||||
* MonitoredItem Service Set
|
||||
* -------------------------
|
||||
* Clients define MonitoredItems to subscribe to data and Events. Each
|
||||
* MonitoredItem identifies the item to be monitored and the Subscription to use
|
||||
* to send Notifications. The item to be monitored may be any Node Attribute. */
|
||||
#ifdef UA_ENABLE_SUBSCRIPTIONS
|
||||
|
||||
/* Used to create and add one or more MonitoredItems to a Subscription. A
|
||||
* MonitoredItem is deleted automatically by the Server when the Subscription is
|
||||
* deleted. Deleting a MonitoredItem causes its entire set of triggered item
|
||||
* links to be deleted, but has no effect on the MonitoredItems referenced by
|
||||
* the triggered items. */
|
||||
void Service_CreateMonitoredItems(UA_Server *server, UA_Session *session,
|
||||
const UA_CreateMonitoredItemsRequest *request,
|
||||
UA_CreateMonitoredItemsResponse *response);
|
||||
|
||||
/* Used to remove one or more MonitoredItems of a Subscription. When a
|
||||
* MonitoredItem is deleted, its triggered item links are also deleted. */
|
||||
void Service_DeleteMonitoredItems(UA_Server *server, UA_Session *session,
|
||||
const UA_DeleteMonitoredItemsRequest *request,
|
||||
UA_DeleteMonitoredItemsResponse *response);
|
||||
|
||||
void Service_ModifyMonitoredItems(UA_Server *server, UA_Session *session,
|
||||
const UA_ModifyMonitoredItemsRequest *request,
|
||||
UA_ModifyMonitoredItemsResponse *response);
|
||||
/* Not Implemented: Service_SetMonitoringMode */
|
||||
/* Not Implemented: Service_SetTriggering */
|
||||
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Subscription Service Set
|
||||
* ------------------------
|
||||
* Subscriptions are used to report Notifications to the Client. */
|
||||
#ifdef UA_ENABLE_SUBSCRIPTIONS
|
||||
|
||||
/* Used to create a Subscription. Subscriptions monitor a set of MonitoredItems
|
||||
* for Notifications and return them to the Client in response to Publish
|
||||
* requests. */
|
||||
void Service_CreateSubscription(UA_Server *server, UA_Session *session,
|
||||
const UA_CreateSubscriptionRequest *request,
|
||||
UA_CreateSubscriptionResponse *response);
|
||||
|
||||
/* Used to modify a Subscription. */
|
||||
void Service_ModifySubscription(UA_Server *server, UA_Session *session,
|
||||
const UA_ModifySubscriptionRequest *request,
|
||||
UA_ModifySubscriptionResponse *response);
|
||||
|
||||
/* Used to enable sending of Notifications on one or more Subscriptions. */
|
||||
void Service_SetPublishingMode(UA_Server *server, UA_Session *session,
|
||||
const UA_SetPublishingModeRequest *request,
|
||||
UA_SetPublishingModeResponse *response);
|
||||
|
||||
/* Used for two purposes. First, it is used to acknowledge the receipt of
|
||||
* NotificationMessages for one or more Subscriptions. Second, it is used to
|
||||
* request the Server to return a NotificationMessage or a keep-alive
|
||||
* Message.
|
||||
*
|
||||
* Note that the service signature is an exception and does not contain a
|
||||
* pointer to a PublishResponse. That is because the service queues up publish
|
||||
* requests internally and sends responses asynchronously based on timeouts. */
|
||||
void Service_Publish(UA_Server *server, UA_Session *session,
|
||||
const UA_PublishRequest *request, UA_UInt32 requestId);
|
||||
|
||||
/* Requests the Subscription to republish a NotificationMessage from its
|
||||
* retransmission queue. */
|
||||
void Service_Republish(UA_Server *server, UA_Session *session,
|
||||
const UA_RepublishRequest *request,
|
||||
UA_RepublishResponse *response);
|
||||
|
||||
/* Invoked to delete one or more Subscriptions that belong to the Client's
|
||||
* Session. */
|
||||
void Service_DeleteSubscriptions(UA_Server *server, UA_Session *session,
|
||||
const UA_DeleteSubscriptionsRequest *request,
|
||||
UA_DeleteSubscriptionsResponse *response);
|
||||
|
||||
/* Not Implemented: Service_TransferSubscription */
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif /* UA_SERVICES_H_ */
|
41
include/server/ua_session_manager.h
Normal file
41
include/server/ua_session_manager.h
Normal file
@ -0,0 +1,41 @@
|
||||
#ifndef UA_SESSION_MANAGER_H_
|
||||
#define UA_SESSION_MANAGER_H_
|
||||
|
||||
#include "queue.h"
|
||||
#include "ua_server.h"
|
||||
#include "ua_util.h"
|
||||
#include "ua_session.h"
|
||||
|
||||
typedef struct session_list_entry {
|
||||
LIST_ENTRY(session_list_entry) pointers;
|
||||
UA_Session session;
|
||||
} session_list_entry;
|
||||
|
||||
typedef struct UA_SessionManager {
|
||||
LIST_HEAD(session_list, session_list_entry) sessions; // doubly-linked list of sessions
|
||||
UA_UInt32 maxSessionCount;
|
||||
UA_UInt32 lastSessionId;
|
||||
UA_UInt32 currentSessionCount;
|
||||
UA_UInt32 maxSessionLifeTime; // time in [ms]
|
||||
UA_Server *server;
|
||||
} UA_SessionManager;
|
||||
|
||||
UA_StatusCode
|
||||
UA_SessionManager_init(UA_SessionManager *sessionManager, UA_UInt32 maxSessionCount,
|
||||
UA_UInt32 maxSessionLifeTime, UA_UInt32 startSessionId, UA_Server *server);
|
||||
|
||||
void UA_SessionManager_deleteMembers(UA_SessionManager *sessionManager);
|
||||
|
||||
void UA_SessionManager_cleanupTimedOut(UA_SessionManager *sessionManager, UA_DateTime now);
|
||||
|
||||
UA_StatusCode
|
||||
UA_SessionManager_createSession(UA_SessionManager *sessionManager, UA_SecureChannel *channel,
|
||||
const UA_CreateSessionRequest *request, UA_Session **session);
|
||||
|
||||
UA_StatusCode
|
||||
UA_SessionManager_removeSession(UA_SessionManager *sessionManager, const UA_NodeId *token);
|
||||
|
||||
UA_Session *
|
||||
UA_SessionManager_getSession(UA_SessionManager *sessionManager, const UA_NodeId *token);
|
||||
|
||||
#endif /* UA_SESSION_MANAGER_H_ */
|
118
include/server/ua_subscription.h
Normal file
118
include/server/ua_subscription.h
Normal file
@ -0,0 +1,118 @@
|
||||
#ifndef UA_SUBSCRIPTION_H_
|
||||
#define UA_SUBSCRIPTION_H_
|
||||
|
||||
#include "ua_util.h"
|
||||
#include "ua_types.h"
|
||||
#include "ua_types_generated.h"
|
||||
#include "ua_nodes.h"
|
||||
#include "ua_session.h"
|
||||
|
||||
/*****************/
|
||||
/* MonitoredItem */
|
||||
/*****************/
|
||||
|
||||
typedef enum {
|
||||
UA_MONITOREDITEMTYPE_CHANGENOTIFY = 1,
|
||||
UA_MONITOREDITEMTYPE_STATUSNOTIFY = 2,
|
||||
UA_MONITOREDITEMTYPE_EVENTNOTIFY = 4
|
||||
} UA_MonitoredItemType;
|
||||
|
||||
typedef struct MonitoredItem_queuedValue {
|
||||
TAILQ_ENTRY(MonitoredItem_queuedValue) listEntry;
|
||||
UA_UInt32 clientHandle;
|
||||
UA_DataValue value;
|
||||
} MonitoredItem_queuedValue;
|
||||
|
||||
typedef struct UA_MonitoredItem {
|
||||
LIST_ENTRY(UA_MonitoredItem) listEntry;
|
||||
|
||||
/* Settings */
|
||||
UA_Subscription *subscription;
|
||||
UA_UInt32 itemId;
|
||||
UA_MonitoredItemType monitoredItemType;
|
||||
UA_TimestampsToReturn timestampsToReturn;
|
||||
UA_MonitoringMode monitoringMode;
|
||||
UA_NodeId monitoredNodeId;
|
||||
UA_UInt32 attributeID;
|
||||
UA_UInt32 clientHandle;
|
||||
UA_Double samplingInterval; // [ms]
|
||||
UA_UInt32 currentQueueSize;
|
||||
UA_UInt32 maxQueueSize;
|
||||
UA_Boolean discardOldest;
|
||||
UA_String indexRange;
|
||||
// TODO: dataEncoding is hardcoded to UA binary
|
||||
|
||||
/* Sample Job */
|
||||
UA_Guid sampleJobGuid;
|
||||
UA_Boolean sampleJobIsRegistered;
|
||||
|
||||
/* Sample Queue */
|
||||
UA_ByteString lastSampledValue;
|
||||
TAILQ_HEAD(QueueOfQueueDataValues, MonitoredItem_queuedValue) queue;
|
||||
} UA_MonitoredItem;
|
||||
|
||||
UA_MonitoredItem *UA_MonitoredItem_new(void);
|
||||
void MonitoredItem_delete(UA_Server *server, UA_MonitoredItem *monitoredItem);
|
||||
UA_StatusCode MonitoredItem_registerSampleJob(UA_Server *server, UA_MonitoredItem *mon);
|
||||
UA_StatusCode MonitoredItem_unregisterSampleJob(UA_Server *server, UA_MonitoredItem *mon);
|
||||
|
||||
/****************/
|
||||
/* Subscription */
|
||||
/****************/
|
||||
|
||||
typedef struct UA_NotificationMessageEntry {
|
||||
LIST_ENTRY(UA_NotificationMessageEntry) listEntry;
|
||||
UA_NotificationMessage message;
|
||||
} UA_NotificationMessageEntry;
|
||||
|
||||
/* We use only a subset of the states defined in the standard */
|
||||
typedef enum {
|
||||
/* UA_SUBSCRIPTIONSTATE_CLOSED */
|
||||
/* UA_SUBSCRIPTIONSTATE_CREATING */
|
||||
UA_SUBSCRIPTIONSTATE_NORMAL,
|
||||
UA_SUBSCRIPTIONSTATE_LATE,
|
||||
UA_SUBSCRIPTIONSTATE_KEEPALIVE
|
||||
} UA_SubscriptionState;
|
||||
|
||||
struct UA_Subscription {
|
||||
LIST_ENTRY(UA_Subscription) listEntry;
|
||||
|
||||
/* Settings */
|
||||
UA_Session *session;
|
||||
UA_UInt32 lifeTimeCount;
|
||||
UA_UInt32 maxKeepAliveCount;
|
||||
UA_Double publishingInterval; // [ms]
|
||||
UA_UInt32 subscriptionID;
|
||||
UA_UInt32 notificationsPerPublish;
|
||||
UA_Boolean publishingEnabled;
|
||||
UA_UInt32 priority;
|
||||
UA_UInt32 sequenceNumber;
|
||||
|
||||
/* Runtime information */
|
||||
UA_SubscriptionState state;
|
||||
UA_UInt32 currentKeepAliveCount;
|
||||
UA_UInt32 currentLifetimeCount;
|
||||
|
||||
/* Publish Job */
|
||||
UA_Guid publishJobGuid;
|
||||
UA_Boolean publishJobIsRegistered;
|
||||
|
||||
LIST_HEAD(UA_ListOfUAMonitoredItems, UA_MonitoredItem) MonitoredItems;
|
||||
LIST_HEAD(UA_ListOfNotificationMessages, UA_NotificationMessageEntry) retransmissionQueue;
|
||||
};
|
||||
|
||||
UA_Subscription *UA_Subscription_new(UA_Session *session, UA_UInt32 subscriptionID);
|
||||
void UA_Subscription_deleteMembers(UA_Subscription *subscription, UA_Server *server);
|
||||
UA_StatusCode Subscription_registerPublishJob(UA_Server *server, UA_Subscription *sub);
|
||||
UA_StatusCode Subscription_unregisterPublishJob(UA_Server *server, UA_Subscription *sub);
|
||||
|
||||
UA_StatusCode
|
||||
UA_Subscription_deleteMonitoredItem(UA_Server *server, UA_Subscription *sub,
|
||||
UA_UInt32 monitoredItemID);
|
||||
|
||||
UA_MonitoredItem *
|
||||
UA_Subscription_getMonitoredItem(UA_Subscription *sub, UA_UInt32 monitoredItemID);
|
||||
|
||||
void UA_Subscription_publishCallback(UA_Server *server, UA_Subscription *sub);
|
||||
|
||||
#endif /* UA_SUBSCRIPTION_H_ */
|
305
include/ua_client.h
Normal file
305
include/ua_client.h
Normal file
@ -0,0 +1,305 @@
|
||||
/*
|
||||
* Copyright (C) 2014 the contributors as stated in the AUTHORS file
|
||||
*
|
||||
* This file is part of open62541. open62541 is free software: you can
|
||||
* redistribute it and/or modify it under the terms of the GNU Lesser General
|
||||
* Public License, version 3 (as published by the Free Software Foundation) with
|
||||
* a static linking exception as stated in the LICENSE file provided with
|
||||
* open62541.
|
||||
*
|
||||
* open62541 is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
* A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*/
|
||||
|
||||
#ifndef UA_CLIENT_H_
|
||||
#define UA_CLIENT_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "ua_config.h"
|
||||
#include "ua_types.h"
|
||||
#include "ua_connection.h"
|
||||
#include "ua_log.h"
|
||||
#include "ua_types_generated.h"
|
||||
|
||||
/**
|
||||
* Client
|
||||
* ======
|
||||
*
|
||||
* Client Configuration
|
||||
* -------------------- */
|
||||
typedef UA_Connection (*UA_ConnectClientConnection)(UA_ConnectionConfig localConf,
|
||||
const char *endpointUrl,
|
||||
UA_Logger logger);
|
||||
|
||||
typedef struct UA_ClientConfig {
|
||||
UA_UInt32 timeout; //sync response timeout
|
||||
UA_UInt32 secureChannelLifeTime; // lifetime in ms (then the channel needs to be renewed)
|
||||
UA_Logger logger;
|
||||
UA_ConnectionConfig localConnectionConfig;
|
||||
UA_ConnectClientConnection connectionFunc;
|
||||
} UA_ClientConfig;
|
||||
|
||||
/**
|
||||
* Client Lifecycle
|
||||
* ---------------- */
|
||||
typedef enum {
|
||||
UA_CLIENTSTATE_READY, /* The client is not connected but initialized and ready to
|
||||
use. */
|
||||
UA_CLIENTSTATE_CONNECTED, /* The client is connected to a server. */
|
||||
UA_CLIENTSTATE_FAULTED, /* An error has occured that might have influenced the
|
||||
connection state. A successfull service call or renewal
|
||||
of the secure channel will reset the state to
|
||||
CONNECTED. */
|
||||
UA_CLIENTSTATE_ERRORED /* A non-recoverable error has occured and the connection
|
||||
is no longer reliable. The client needs to be
|
||||
disconnected and reinitialized to recover into a
|
||||
CONNECTED state. */
|
||||
} UA_ClientState;
|
||||
|
||||
struct UA_Client;
|
||||
typedef struct UA_Client UA_Client;
|
||||
|
||||
/* Create a new client
|
||||
*
|
||||
* @param config for the new client. You can use UA_ClientConfig_standard which has sane defaults
|
||||
* @param logger function pointer to a logger function. See examples/logger_stdout.c for a simple
|
||||
* implementation
|
||||
* @return return the new Client object */
|
||||
UA_Client UA_EXPORT * UA_Client_new(UA_ClientConfig config);
|
||||
|
||||
/* Get the client connection status */
|
||||
UA_ClientState UA_EXPORT UA_Client_getState(UA_Client *client);
|
||||
|
||||
/* Reset a client */
|
||||
void UA_EXPORT UA_Client_reset(UA_Client *client);
|
||||
|
||||
/* Delete a client */
|
||||
void UA_EXPORT UA_Client_delete(UA_Client *client);
|
||||
|
||||
/**
|
||||
* Manage the Connection
|
||||
* --------------------- */
|
||||
/* Gets a list of endpoints of a server
|
||||
*
|
||||
* @param client to use
|
||||
* @param server url to connect (for example "opc.tcp://localhost:16664")
|
||||
* @param endpointDescriptionsSize size of the array of endpoint descriptions
|
||||
* @param endpointDescriptions array of endpoint descriptions that is allocated by the function (you need to free manually)
|
||||
* @return Indicates whether the operation succeeded or returns an error code */
|
||||
UA_StatusCode UA_EXPORT
|
||||
UA_Client_getEndpoints(UA_Client *client, const char *serverUrl,
|
||||
size_t* endpointDescriptionsSize,
|
||||
UA_EndpointDescription** endpointDescriptions);
|
||||
|
||||
/* Connect to the selected server
|
||||
*
|
||||
* @param client to use
|
||||
* @param endpointURL to connect (for example "opc.tcp://localhost:16664")
|
||||
* @return Indicates whether the operation succeeded or returns an error code */
|
||||
UA_StatusCode UA_EXPORT
|
||||
UA_Client_connect(UA_Client *client, const char *endpointUrl);
|
||||
|
||||
/* Connect to the selected server with the given username and password
|
||||
*
|
||||
* @param client to use
|
||||
* @param endpointURL to connect (for example "opc.tcp://localhost:16664")
|
||||
* @param username
|
||||
* @param password
|
||||
* @return Indicates whether the operation succeeded or returns an error code */
|
||||
UA_StatusCode UA_EXPORT
|
||||
UA_Client_connect_username(UA_Client *client, const char *endpointUrl,
|
||||
const char *username, const char *password);
|
||||
|
||||
/* Close a connection to the selected server */
|
||||
UA_StatusCode UA_EXPORT UA_Client_disconnect(UA_Client *client);
|
||||
|
||||
/* Renew the underlying secure channel */
|
||||
UA_StatusCode UA_EXPORT UA_Client_manuallyRenewSecureChannel(UA_Client *client);
|
||||
|
||||
/**
|
||||
* Raw Services
|
||||
* ------------
|
||||
* The raw OPC UA services are exposed to the client. But most of them time, it is better to use the
|
||||
* convenience functions from `ua_client_highlevel.h` that wrap the raw services. See the Section
|
||||
* :ref:`services` for a detailed description of each service. */
|
||||
/* Don't use this function. Use the type versions below instead. */
|
||||
void UA_EXPORT
|
||||
__UA_Client_Service(UA_Client *client, const void *request, const UA_DataType *requestType,
|
||||
void *response, const UA_DataType *responseType);
|
||||
|
||||
/**
|
||||
* Attribute Service Set
|
||||
* ^^^^^^^^^^^^^^^^^^^^^ */
|
||||
static UA_INLINE UA_ReadResponse
|
||||
UA_Client_Service_read(UA_Client *client, const UA_ReadRequest request) {
|
||||
UA_ReadResponse response;
|
||||
__UA_Client_Service(client, &request, &UA_TYPES[UA_TYPES_READREQUEST],
|
||||
&response, &UA_TYPES[UA_TYPES_READRESPONSE]);
|
||||
return response; }
|
||||
|
||||
static UA_INLINE UA_WriteResponse
|
||||
UA_Client_Service_write(UA_Client *client, const UA_WriteRequest request) {
|
||||
UA_WriteResponse response;
|
||||
__UA_Client_Service(client, &request, &UA_TYPES[UA_TYPES_WRITEREQUEST],
|
||||
&response, &UA_TYPES[UA_TYPES_WRITERESPONSE]);
|
||||
return response; }
|
||||
|
||||
/**
|
||||
* Method Service Set
|
||||
* ^^^^^^^^^^^^^^^^^^ */
|
||||
static UA_INLINE UA_CallResponse
|
||||
UA_Client_Service_call(UA_Client *client, const UA_CallRequest request) {
|
||||
UA_CallResponse response;
|
||||
__UA_Client_Service(client, &request, &UA_TYPES[UA_TYPES_CALLREQUEST],
|
||||
&response, &UA_TYPES[UA_TYPES_CALLRESPONSE]);
|
||||
return response; }
|
||||
|
||||
/**
|
||||
* NodeManagement Service Set
|
||||
* ^^^^^^^^^^^^^^^^^^^^^^^^^^ */
|
||||
static UA_INLINE UA_AddNodesResponse
|
||||
UA_Client_Service_addNodes(UA_Client *client, const UA_AddNodesRequest request) {
|
||||
UA_AddNodesResponse response;
|
||||
__UA_Client_Service(client, &request, &UA_TYPES[UA_TYPES_ADDNODESREQUEST],
|
||||
&response, &UA_TYPES[UA_TYPES_ADDNODESRESPONSE]);
|
||||
return response; }
|
||||
|
||||
static UA_INLINE UA_AddReferencesResponse
|
||||
UA_Client_Service_addReferences(UA_Client *client, const UA_AddReferencesRequest request) {
|
||||
UA_AddReferencesResponse response;
|
||||
__UA_Client_Service(client, &request, &UA_TYPES[UA_TYPES_ADDNODESREQUEST],
|
||||
&response, &UA_TYPES[UA_TYPES_ADDNODESRESPONSE]);
|
||||
return response; }
|
||||
|
||||
static UA_INLINE UA_DeleteNodesResponse
|
||||
UA_Client_Service_deleteNodes(UA_Client *client, const UA_DeleteNodesRequest request) {
|
||||
UA_DeleteNodesResponse response;
|
||||
__UA_Client_Service(client, &request, &UA_TYPES[UA_TYPES_DELETENODESREQUEST],
|
||||
&response, &UA_TYPES[UA_TYPES_DELETENODESRESPONSE]);
|
||||
return response; }
|
||||
|
||||
static UA_INLINE UA_DeleteReferencesResponse
|
||||
UA_Client_Service_deleteReferences(UA_Client *client, const UA_DeleteReferencesRequest request) {
|
||||
UA_DeleteReferencesResponse response;
|
||||
__UA_Client_Service(client, &request, &UA_TYPES[UA_TYPES_DELETENODESREQUEST],
|
||||
&response, &UA_TYPES[UA_TYPES_DELETENODESRESPONSE]);
|
||||
return response; }
|
||||
|
||||
/**
|
||||
* View Service Set
|
||||
* ^^^^^^^^^^^^^^^^ */
|
||||
static UA_INLINE UA_BrowseResponse
|
||||
UA_Client_Service_browse(UA_Client *client, const UA_BrowseRequest request) {
|
||||
UA_BrowseResponse response;
|
||||
__UA_Client_Service(client, &request, &UA_TYPES[UA_TYPES_BROWSEREQUEST],
|
||||
&response, &UA_TYPES[UA_TYPES_BROWSERESPONSE]);
|
||||
return response; }
|
||||
|
||||
static UA_INLINE UA_BrowseNextResponse
|
||||
UA_Client_Service_browseNext(UA_Client *client, const UA_BrowseNextRequest request) {
|
||||
UA_BrowseNextResponse response;
|
||||
__UA_Client_Service(client, &request, &UA_TYPES[UA_TYPES_BROWSENEXTREQUEST],
|
||||
&response, &UA_TYPES[UA_TYPES_BROWSENEXTRESPONSE]);
|
||||
return response; }
|
||||
|
||||
static UA_INLINE UA_TranslateBrowsePathsToNodeIdsResponse
|
||||
UA_Client_Service_translateBrowsePathsToNodeIds(UA_Client *client,
|
||||
const UA_TranslateBrowsePathsToNodeIdsRequest request) {
|
||||
UA_TranslateBrowsePathsToNodeIdsResponse response;
|
||||
__UA_Client_Service(client, &request, &UA_TYPES[UA_TYPES_TRANSLATEBROWSEPATHSTONODEIDSREQUEST],
|
||||
&response, &UA_TYPES[UA_TYPES_TRANSLATEBROWSEPATHSTONODEIDSRESPONSE]);
|
||||
return response; }
|
||||
|
||||
static UA_INLINE UA_RegisterNodesResponse
|
||||
UA_Client_Service_registerNodes(UA_Client *client, const UA_RegisterNodesRequest request) {
|
||||
UA_RegisterNodesResponse response;
|
||||
__UA_Client_Service(client, &request, &UA_TYPES[UA_TYPES_REGISTERNODESREQUEST],
|
||||
&response, &UA_TYPES[UA_TYPES_REGISTERNODESRESPONSE]);
|
||||
return response; }
|
||||
|
||||
static UA_INLINE UA_UnregisterNodesResponse
|
||||
UA_Client_Service_unregisterNodes(UA_Client *client, const UA_UnregisterNodesRequest request) {
|
||||
UA_UnregisterNodesResponse response;
|
||||
__UA_Client_Service(client, &request, &UA_TYPES[UA_TYPES_UNREGISTERNODESREQUEST],
|
||||
&response, &UA_TYPES[UA_TYPES_UNREGISTERNODESRESPONSE]);
|
||||
return response; }
|
||||
|
||||
/**
|
||||
* Query Service Set
|
||||
* ^^^^^^^^^^^^^^^^^ */
|
||||
static UA_INLINE UA_QueryFirstResponse
|
||||
UA_Client_Service_queryFirst(UA_Client *client, const UA_QueryFirstRequest request) {
|
||||
UA_QueryFirstResponse response;
|
||||
__UA_Client_Service(client, &request, &UA_TYPES[UA_TYPES_QUERYFIRSTREQUEST],
|
||||
&response, &UA_TYPES[UA_TYPES_QUERYFIRSTRESPONSE]);
|
||||
return response; }
|
||||
|
||||
static UA_INLINE UA_QueryNextResponse
|
||||
UA_Client_Service_queryNext(UA_Client *client, const UA_QueryNextRequest request) {
|
||||
UA_QueryNextResponse response;
|
||||
__UA_Client_Service(client, &request, &UA_TYPES[UA_TYPES_QUERYFIRSTREQUEST],
|
||||
&response, &UA_TYPES[UA_TYPES_QUERYFIRSTRESPONSE]);
|
||||
return response; }
|
||||
|
||||
#ifdef UA_ENABLE_SUBSCRIPTIONS
|
||||
|
||||
/**
|
||||
* MonitoredItem Service Set
|
||||
* ^^^^^^^^^^^^^^^^^^^^^^^^^ */
|
||||
static UA_INLINE UA_CreateMonitoredItemsResponse
|
||||
UA_Client_Service_createMonitoredItems(UA_Client *client, const UA_CreateMonitoredItemsRequest request) {
|
||||
UA_CreateMonitoredItemsResponse response;
|
||||
__UA_Client_Service(client, &request, &UA_TYPES[UA_TYPES_CREATEMONITOREDITEMSREQUEST],
|
||||
&response, &UA_TYPES[UA_TYPES_CREATEMONITOREDITEMSRESPONSE]);
|
||||
return response; }
|
||||
|
||||
static UA_INLINE UA_DeleteMonitoredItemsResponse
|
||||
UA_Client_Service_deleteMonitoredItems(UA_Client *client, const UA_DeleteMonitoredItemsRequest request) {
|
||||
UA_DeleteMonitoredItemsResponse response;
|
||||
__UA_Client_Service(client, &request, &UA_TYPES[UA_TYPES_DELETEMONITOREDITEMSREQUEST],
|
||||
&response, &UA_TYPES[UA_TYPES_DELETEMONITOREDITEMSRESPONSE]);
|
||||
return response; }
|
||||
|
||||
/**
|
||||
* Subscription Service Set
|
||||
* ^^^^^^^^^^^^^^^^^^^^^^^^ */
|
||||
static UA_INLINE UA_CreateSubscriptionResponse
|
||||
UA_Client_Service_createSubscription(UA_Client *client, const UA_CreateSubscriptionRequest request) {
|
||||
UA_CreateSubscriptionResponse response;
|
||||
__UA_Client_Service(client, &request, &UA_TYPES[UA_TYPES_CREATESUBSCRIPTIONREQUEST],
|
||||
&response, &UA_TYPES[UA_TYPES_CREATESUBSCRIPTIONRESPONSE]);
|
||||
return response; }
|
||||
|
||||
static UA_INLINE UA_ModifySubscriptionResponse
|
||||
UA_Client_Service_modifySubscription(UA_Client *client, const UA_ModifySubscriptionRequest request) {
|
||||
UA_ModifySubscriptionResponse response;
|
||||
__UA_Client_Service(client, &request, &UA_TYPES[UA_TYPES_MODIFYSUBSCRIPTIONREQUEST],
|
||||
&response, &UA_TYPES[UA_TYPES_MODIFYSUBSCRIPTIONRESPONSE]);
|
||||
return response; }
|
||||
|
||||
static UA_INLINE UA_DeleteSubscriptionsResponse
|
||||
UA_Client_Service_deleteSubscriptions(UA_Client *client, const UA_DeleteSubscriptionsRequest request) {
|
||||
UA_DeleteSubscriptionsResponse response;
|
||||
__UA_Client_Service(client, &request, &UA_TYPES[UA_TYPES_DELETESUBSCRIPTIONSREQUEST],
|
||||
&response, &UA_TYPES[UA_TYPES_DELETESUBSCRIPTIONSRESPONSE]);
|
||||
return response; }
|
||||
|
||||
static UA_INLINE UA_PublishResponse
|
||||
UA_Client_Service_publish(UA_Client *client, const UA_PublishRequest request) {
|
||||
UA_PublishResponse response;
|
||||
__UA_Client_Service(client, &request, &UA_TYPES[UA_TYPES_PUBLISHREQUEST],
|
||||
&response, &UA_TYPES[UA_TYPES_PUBLISHRESPONSE]);
|
||||
return response; }
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif /* UA_CLIENT_H_ */
|
406
include/ua_client_highlevel.h
Normal file
406
include/ua_client_highlevel.h
Normal file
@ -0,0 +1,406 @@
|
||||
/*
|
||||
* Copyright (C) 2014-2016 the contributors as stated in the AUTHORS file
|
||||
*
|
||||
* This file is part of open62541. open62541 is free software: you can
|
||||
* redistribute it and/or modify it under the terms of the GNU Lesser General
|
||||
* Public License, version 3 (as published by the Free Software Foundation) with
|
||||
* a static linking exception as stated in the LICENSE file provided with
|
||||
* open62541.
|
||||
*
|
||||
* open62541 is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
* A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*/
|
||||
|
||||
#ifndef UA_CLIENT_HIGHLEVEL_H_
|
||||
#define UA_CLIENT_HIGHLEVEL_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "ua_client.h"
|
||||
|
||||
/**
|
||||
* Highlevel Client Functionality
|
||||
* ------------------------------
|
||||
* The following definitions are convenience functions making use of the
|
||||
* standard OPC UA services in the background.
|
||||
*
|
||||
* Read Attributes
|
||||
* ===============
|
||||
* The following functions can be used to retrieve a single node attribute. Use
|
||||
* the regular service to read several attributes at once. */
|
||||
/* Don't call this function, use the typed versions */
|
||||
UA_StatusCode UA_EXPORT
|
||||
__UA_Client_readAttribute(UA_Client *client, const UA_NodeId *nodeId, UA_AttributeId attributeId,
|
||||
void *out, const UA_DataType *outDataType);
|
||||
|
||||
static UA_INLINE UA_StatusCode
|
||||
UA_Client_readNodeIdAttribute(UA_Client *client, const UA_NodeId nodeId, UA_NodeId *outNodeId) {
|
||||
return __UA_Client_readAttribute(client, &nodeId, UA_ATTRIBUTEID_NODEID, outNodeId, &UA_TYPES[UA_TYPES_NODEID]); }
|
||||
|
||||
static UA_INLINE UA_StatusCode
|
||||
UA_Client_readNodeClassAttribute(UA_Client *client, const UA_NodeId nodeId, UA_NodeClass *outNodeClass) {
|
||||
return __UA_Client_readAttribute(client, &nodeId, UA_ATTRIBUTEID_NODECLASS, outNodeClass, &UA_TYPES[UA_TYPES_NODECLASS]); }
|
||||
|
||||
static UA_INLINE UA_StatusCode
|
||||
UA_Client_readBrowseNameAttribute(UA_Client *client, const UA_NodeId nodeId, UA_QualifiedName *outBrowseName) {
|
||||
return __UA_Client_readAttribute(client, &nodeId, UA_ATTRIBUTEID_BROWSENAME, outBrowseName, &UA_TYPES[UA_TYPES_QUALIFIEDNAME]); }
|
||||
|
||||
static UA_INLINE UA_StatusCode
|
||||
UA_Client_readDisplayNameAttribute(UA_Client *client, const UA_NodeId nodeId, UA_LocalizedText *outDisplayName) {
|
||||
return __UA_Client_readAttribute(client, &nodeId, UA_ATTRIBUTEID_DISPLAYNAME, outDisplayName, &UA_TYPES[UA_TYPES_LOCALIZEDTEXT]); }
|
||||
|
||||
static UA_INLINE UA_StatusCode
|
||||
UA_Client_readDescriptionAttribute(UA_Client *client, const UA_NodeId nodeId, UA_LocalizedText *outDescription) {
|
||||
return __UA_Client_readAttribute(client, &nodeId, UA_ATTRIBUTEID_DESCRIPTION, outDescription, &UA_TYPES[UA_TYPES_LOCALIZEDTEXT]); }
|
||||
|
||||
static UA_INLINE UA_StatusCode
|
||||
UA_Client_readWriteMaskAttribute(UA_Client *client, const UA_NodeId nodeId, UA_UInt32 *outWriteMask) {
|
||||
return __UA_Client_readAttribute(client, &nodeId, UA_ATTRIBUTEID_WRITEMASK, outWriteMask, &UA_TYPES[UA_TYPES_UINT32]); }
|
||||
|
||||
static UA_INLINE UA_StatusCode
|
||||
UA_Client_readUserWriteMaskAttribute(UA_Client *client, const UA_NodeId nodeId, UA_UInt32 *outUserWriteMask) {
|
||||
return __UA_Client_readAttribute(client, &nodeId, UA_ATTRIBUTEID_USERWRITEMASK, outUserWriteMask, &UA_TYPES[UA_TYPES_UINT32]); }
|
||||
|
||||
static UA_INLINE UA_StatusCode
|
||||
UA_Client_readIsAbstractAttribute(UA_Client *client, const UA_NodeId nodeId, UA_Boolean *outIsAbstract) {
|
||||
return __UA_Client_readAttribute(client, &nodeId, UA_ATTRIBUTEID_ISABSTRACT, outIsAbstract, &UA_TYPES[UA_TYPES_BOOLEAN]); }
|
||||
|
||||
static UA_INLINE UA_StatusCode
|
||||
UA_Client_readSymmetricAttribute(UA_Client *client, const UA_NodeId nodeId, UA_Boolean *outSymmetric) {
|
||||
return __UA_Client_readAttribute(client, &nodeId, UA_ATTRIBUTEID_SYMMETRIC, outSymmetric, &UA_TYPES[UA_TYPES_BOOLEAN]); }
|
||||
|
||||
static UA_INLINE UA_StatusCode
|
||||
UA_Client_readInverseNameAttribute(UA_Client *client, const UA_NodeId nodeId, UA_LocalizedText *outInverseName) {
|
||||
return __UA_Client_readAttribute(client, &nodeId, UA_ATTRIBUTEID_INVERSENAME, outInverseName, &UA_TYPES[UA_TYPES_LOCALIZEDTEXT]); }
|
||||
|
||||
static UA_INLINE UA_StatusCode
|
||||
UA_Client_readContainsNoLoopsAttribute(UA_Client *client, const UA_NodeId nodeId, UA_Boolean *outContainsNoLoops) {
|
||||
return __UA_Client_readAttribute(client, &nodeId, UA_ATTRIBUTEID_CONTAINSNOLOOPS, outContainsNoLoops, &UA_TYPES[UA_TYPES_BOOLEAN]); }
|
||||
|
||||
static UA_INLINE UA_StatusCode
|
||||
UA_Client_readEventNotifierAttribute(UA_Client *client, const UA_NodeId nodeId, UA_Byte *outEventNotifier) {
|
||||
return __UA_Client_readAttribute(client, &nodeId, UA_ATTRIBUTEID_EVENTNOTIFIER, outEventNotifier, &UA_TYPES[UA_TYPES_BYTE]); }
|
||||
|
||||
static UA_INLINE UA_StatusCode
|
||||
UA_Client_readValueAttribute(UA_Client *client, const UA_NodeId nodeId, UA_Variant *outValue) {
|
||||
return __UA_Client_readAttribute(client, &nodeId, UA_ATTRIBUTEID_VALUE, outValue, &UA_TYPES[UA_TYPES_VARIANT]); }
|
||||
|
||||
static UA_INLINE UA_StatusCode
|
||||
UA_Client_readDataTypeAttribute(UA_Client *client, const UA_NodeId nodeId, UA_NodeId *outDataType) {
|
||||
return __UA_Client_readAttribute(client, &nodeId, UA_ATTRIBUTEID_DATATYPE, outDataType, &UA_TYPES[UA_TYPES_NODEID]); }
|
||||
|
||||
static UA_INLINE UA_StatusCode
|
||||
UA_Client_readValueRankAttribute(UA_Client *client, const UA_NodeId nodeId, UA_Int32 *outValueRank) {
|
||||
return __UA_Client_readAttribute(client, &nodeId, UA_ATTRIBUTEID_VALUERANK, outValueRank, &UA_TYPES[UA_TYPES_INT32]); }
|
||||
|
||||
UA_StatusCode UA_EXPORT
|
||||
UA_Client_readArrayDimensionsAttribute(UA_Client *client, const UA_NodeId nodeId,
|
||||
UA_Int32 **outArrayDimensions, size_t *outArrayDimensionsSize);
|
||||
|
||||
static UA_INLINE UA_StatusCode
|
||||
UA_Client_readAccessLevelAttribute(UA_Client *client, const UA_NodeId nodeId, UA_UInt32 *outAccessLevel) {
|
||||
return __UA_Client_readAttribute(client, &nodeId, UA_ATTRIBUTEID_ACCESSLEVEL, outAccessLevel, &UA_TYPES[UA_TYPES_UINT32]); }
|
||||
|
||||
static UA_INLINE UA_StatusCode
|
||||
UA_Client_readUserAccessLevelAttribute(UA_Client *client, const UA_NodeId nodeId, UA_UInt32 *outUserAccessLevel) {
|
||||
return __UA_Client_readAttribute(client, &nodeId, UA_ATTRIBUTEID_USERACCESSLEVEL, outUserAccessLevel, &UA_TYPES[UA_TYPES_UINT32]); }
|
||||
|
||||
static UA_INLINE UA_StatusCode
|
||||
UA_Client_readMinimumSamplingIntervalAttribute(UA_Client *client, const UA_NodeId nodeId, UA_Double *outMinimumSamplingInterval) {
|
||||
return __UA_Client_readAttribute(client, &nodeId, UA_ATTRIBUTEID_MINIMUMSAMPLINGINTERVAL, outMinimumSamplingInterval, &UA_TYPES[UA_TYPES_DOUBLE]); }
|
||||
|
||||
static UA_INLINE UA_StatusCode
|
||||
UA_Client_readHistorizingAttribute(UA_Client *client, const UA_NodeId nodeId, UA_Boolean *outHistorizing) {
|
||||
return __UA_Client_readAttribute(client, &nodeId, UA_ATTRIBUTEID_HISTORIZING, outHistorizing, &UA_TYPES[UA_TYPES_BOOLEAN]); }
|
||||
|
||||
static UA_INLINE UA_StatusCode
|
||||
UA_Client_readExecutableAttribute(UA_Client *client, const UA_NodeId nodeId, UA_Boolean *outExecutable) {
|
||||
return __UA_Client_readAttribute(client, &nodeId, UA_ATTRIBUTEID_EXECUTABLE, outExecutable, &UA_TYPES[UA_TYPES_BOOLEAN]); }
|
||||
|
||||
static UA_INLINE UA_StatusCode
|
||||
UA_Client_readUserExecutableAttribute(UA_Client *client, const UA_NodeId nodeId, UA_Boolean *outUserExecutable) {
|
||||
return __UA_Client_readAttribute(client, &nodeId, UA_ATTRIBUTEID_USEREXECUTABLE, outUserExecutable, &UA_TYPES[UA_TYPES_BOOLEAN]); }
|
||||
|
||||
/**
|
||||
* Write Attributes
|
||||
* ================
|
||||
* The following functions can be use to write a single node attribute at a
|
||||
* time. Use the regular write service to write several attributes at once. */
|
||||
/* Don't call this function, use the typed versions */
|
||||
UA_StatusCode UA_EXPORT
|
||||
__UA_Client_writeAttribute(UA_Client *client, const UA_NodeId *nodeId,
|
||||
UA_AttributeId attributeId, const void *in,
|
||||
const UA_DataType *inDataType);
|
||||
|
||||
static UA_INLINE UA_StatusCode
|
||||
UA_Client_writeNodeIdAttribute(UA_Client *client, const UA_NodeId nodeId, const UA_NodeId *newNodeId) {
|
||||
return __UA_Client_writeAttribute(client, &nodeId, UA_ATTRIBUTEID_NODEID, newNodeId, &UA_TYPES[UA_TYPES_NODEID]); }
|
||||
|
||||
static UA_INLINE UA_StatusCode
|
||||
UA_Client_writeNodeClassAttribute(UA_Client *client, const UA_NodeId nodeId, const UA_NodeClass *newNodeClass) {
|
||||
return __UA_Client_writeAttribute(client, &nodeId, UA_ATTRIBUTEID_NODECLASS, newNodeClass, &UA_TYPES[UA_TYPES_NODECLASS]); }
|
||||
|
||||
static UA_INLINE UA_StatusCode
|
||||
UA_Client_writeBrowseNameAttribute(UA_Client *client, const UA_NodeId nodeId, const UA_QualifiedName *newBrowseName) {
|
||||
return __UA_Client_writeAttribute(client, &nodeId, UA_ATTRIBUTEID_BROWSENAME, newBrowseName, &UA_TYPES[UA_TYPES_QUALIFIEDNAME]); }
|
||||
|
||||
static UA_INLINE UA_StatusCode
|
||||
UA_Client_writeDisplayNameAttribute(UA_Client *client, const UA_NodeId nodeId, const UA_LocalizedText *newDisplayName) {
|
||||
return __UA_Client_writeAttribute(client, &nodeId, UA_ATTRIBUTEID_DISPLAYNAME, newDisplayName, &UA_TYPES[UA_TYPES_LOCALIZEDTEXT]); }
|
||||
|
||||
static UA_INLINE UA_StatusCode
|
||||
UA_Client_writeDescriptionAttribute(UA_Client *client, const UA_NodeId nodeId, const UA_LocalizedText *newDescription) {
|
||||
return __UA_Client_writeAttribute(client, &nodeId, UA_ATTRIBUTEID_DESCRIPTION, newDescription, &UA_TYPES[UA_TYPES_LOCALIZEDTEXT]); }
|
||||
|
||||
static UA_INLINE UA_StatusCode
|
||||
UA_Client_writeWriteMaskAttribute(UA_Client *client, const UA_NodeId nodeId, const UA_UInt32 *newWriteMask) {
|
||||
return __UA_Client_writeAttribute(client, &nodeId, UA_ATTRIBUTEID_WRITEMASK, newWriteMask, &UA_TYPES[UA_TYPES_UINT32]); }
|
||||
|
||||
static UA_INLINE UA_StatusCode
|
||||
UA_Client_writeUserWriteMaskAttribute(UA_Client *client, const UA_NodeId nodeId, const UA_UInt32 *newUserWriteMask) {
|
||||
return __UA_Client_writeAttribute(client, &nodeId, UA_ATTRIBUTEID_USERWRITEMASK, newUserWriteMask, &UA_TYPES[UA_TYPES_UINT32]); }
|
||||
|
||||
static UA_INLINE UA_StatusCode
|
||||
UA_Client_writeIsAbstractAttribute(UA_Client *client, const UA_NodeId nodeId, const UA_Boolean *newIsAbstract) {
|
||||
return __UA_Client_writeAttribute(client, &nodeId, UA_ATTRIBUTEID_ISABSTRACT, newIsAbstract, &UA_TYPES[UA_TYPES_BOOLEAN]); }
|
||||
|
||||
static UA_INLINE UA_StatusCode
|
||||
UA_Client_writeSymmetricAttribute(UA_Client *client, const UA_NodeId nodeId, const UA_Boolean *newSymmetric) {
|
||||
return __UA_Client_writeAttribute(client, &nodeId, UA_ATTRIBUTEID_SYMMETRIC, newSymmetric, &UA_TYPES[UA_TYPES_BOOLEAN]); }
|
||||
|
||||
static UA_INLINE UA_StatusCode
|
||||
UA_Client_writeInverseNameAttribute(UA_Client *client, const UA_NodeId nodeId, const UA_LocalizedText *newInverseName) {
|
||||
return __UA_Client_writeAttribute(client, &nodeId, UA_ATTRIBUTEID_INVERSENAME, newInverseName, &UA_TYPES[UA_TYPES_LOCALIZEDTEXT]); }
|
||||
|
||||
static UA_INLINE UA_StatusCode
|
||||
UA_Client_writeContainsNoLoopsAttribute(UA_Client *client, const UA_NodeId nodeId, const UA_Boolean *newContainsNoLoops) {
|
||||
return __UA_Client_writeAttribute(client, &nodeId, UA_ATTRIBUTEID_CONTAINSNOLOOPS, newContainsNoLoops, &UA_TYPES[UA_TYPES_BOOLEAN]); }
|
||||
|
||||
static UA_INLINE UA_StatusCode
|
||||
UA_Client_writeEventNotifierAttribute(UA_Client *client, const UA_NodeId nodeId, const UA_Byte *newEventNotifier) {
|
||||
return __UA_Client_writeAttribute(client, &nodeId, UA_ATTRIBUTEID_EVENTNOTIFIER, newEventNotifier, &UA_TYPES[UA_TYPES_BYTE]); }
|
||||
|
||||
static UA_INLINE UA_StatusCode
|
||||
UA_Client_writeValueAttribute(UA_Client *client, const UA_NodeId nodeId, const UA_Variant *newValue) {
|
||||
return __UA_Client_writeAttribute(client, &nodeId, UA_ATTRIBUTEID_VALUE, newValue, &UA_TYPES[UA_TYPES_VARIANT]); }
|
||||
|
||||
static UA_INLINE UA_StatusCode
|
||||
UA_Client_writeDataTypeAttribute(UA_Client *client, const UA_NodeId nodeId, const UA_NodeId *newDataType) {
|
||||
return __UA_Client_writeAttribute(client, &nodeId, UA_ATTRIBUTEID_DATATYPE, newDataType, &UA_TYPES[UA_TYPES_NODEID]); }
|
||||
|
||||
static UA_INLINE UA_StatusCode
|
||||
UA_Client_writeValueRankAttribute(UA_Client *client, const UA_NodeId nodeId, const UA_Int32 *newValueRank) {
|
||||
return __UA_Client_writeAttribute(client, &nodeId, UA_ATTRIBUTEID_VALUERANK, newValueRank, &UA_TYPES[UA_TYPES_INT32]); }
|
||||
|
||||
UA_StatusCode UA_EXPORT
|
||||
UA_Client_writeArrayDimensionsAttribute(UA_Client *client, const UA_NodeId nodeId,
|
||||
const UA_Int32 *newArrayDimensions, size_t newArrayDimensionsSize);
|
||||
|
||||
static UA_INLINE UA_StatusCode
|
||||
UA_Client_writeAccessLevelAttribute(UA_Client *client, const UA_NodeId nodeId, const UA_UInt32 *newAccessLevel) {
|
||||
return __UA_Client_writeAttribute(client, &nodeId, UA_ATTRIBUTEID_ACCESSLEVEL, newAccessLevel, &UA_TYPES[UA_TYPES_UINT32]); }
|
||||
|
||||
static UA_INLINE UA_StatusCode
|
||||
UA_Client_writeUserAccessLevelAttribute(UA_Client *client, const UA_NodeId nodeId, const UA_UInt32 *newUserAccessLevel) {
|
||||
return __UA_Client_writeAttribute(client, &nodeId, UA_ATTRIBUTEID_USERACCESSLEVEL, newUserAccessLevel, &UA_TYPES[UA_TYPES_UINT32]); }
|
||||
|
||||
static UA_INLINE UA_StatusCode
|
||||
UA_Client_writeMinimumSamplingIntervalAttribute(UA_Client *client, const UA_NodeId nodeId, const UA_Double *newMinimumSamplingInterval) {
|
||||
return __UA_Client_writeAttribute(client, &nodeId, UA_ATTRIBUTEID_MINIMUMSAMPLINGINTERVAL, newMinimumSamplingInterval, &UA_TYPES[UA_TYPES_DOUBLE]); }
|
||||
|
||||
static UA_INLINE UA_StatusCode
|
||||
UA_Client_writeHistorizingAttribute(UA_Client *client, const UA_NodeId nodeId, const UA_Boolean *newHistorizing) {
|
||||
return __UA_Client_writeAttribute(client, &nodeId, UA_ATTRIBUTEID_HISTORIZING, newHistorizing, &UA_TYPES[UA_TYPES_BOOLEAN]); }
|
||||
|
||||
static UA_INLINE UA_StatusCode
|
||||
UA_Client_writeExecutableAttribute(UA_Client *client, const UA_NodeId nodeId, const UA_Boolean *newExecutable) {
|
||||
return __UA_Client_writeAttribute(client, &nodeId, UA_ATTRIBUTEID_EXECUTABLE, newExecutable, &UA_TYPES[UA_TYPES_BOOLEAN]); }
|
||||
|
||||
static UA_INLINE UA_StatusCode
|
||||
UA_Client_writeUserExecutableAttribute(UA_Client *client, const UA_NodeId nodeId, const UA_Boolean *newUserExecutable) {
|
||||
return __UA_Client_writeAttribute(client, &nodeId, UA_ATTRIBUTEID_USEREXECUTABLE, newUserExecutable, &UA_TYPES[UA_TYPES_BOOLEAN]); }
|
||||
|
||||
/**
|
||||
* Method Calling
|
||||
* ============== */
|
||||
UA_StatusCode UA_EXPORT
|
||||
UA_Client_call(UA_Client *client, const UA_NodeId objectId, const UA_NodeId methodId,
|
||||
size_t inputSize, const UA_Variant *input, size_t *outputSize, UA_Variant **output);
|
||||
|
||||
/**
|
||||
* Node Management
|
||||
* =============== */
|
||||
UA_StatusCode UA_EXPORT
|
||||
UA_Client_addReference(UA_Client *client, const UA_NodeId sourceNodeId, const UA_NodeId referenceTypeId,
|
||||
UA_Boolean isForward, const UA_String targetServerUri,
|
||||
const UA_ExpandedNodeId targetNodeId, UA_NodeClass targetNodeClass);
|
||||
|
||||
UA_StatusCode UA_EXPORT
|
||||
UA_Client_deleteReference(UA_Client *client, const UA_NodeId sourceNodeId, const UA_NodeId referenceTypeId,
|
||||
UA_Boolean isForward, const UA_ExpandedNodeId targetNodeId,
|
||||
UA_Boolean deleteBidirectional);
|
||||
|
||||
UA_StatusCode UA_EXPORT
|
||||
UA_Client_deleteNode(UA_Client *client, const UA_NodeId nodeId, UA_Boolean deleteTargetReferences);
|
||||
|
||||
/* Don't call this function, use the typed versions */
|
||||
UA_StatusCode UA_EXPORT
|
||||
__UA_Client_addNode(UA_Client *client, const UA_NodeClass nodeClass,
|
||||
const UA_NodeId requestedNewNodeId, const UA_NodeId parentNodeId,
|
||||
const UA_NodeId referenceTypeId, const UA_QualifiedName browseName,
|
||||
const UA_NodeId typeDefinition, const UA_NodeAttributes *attr,
|
||||
const UA_DataType *attributeType, UA_NodeId *outNewNodeId);
|
||||
|
||||
static UA_INLINE UA_StatusCode
|
||||
UA_Client_addVariableNode(UA_Client *client, const UA_NodeId requestedNewNodeId,
|
||||
const UA_NodeId parentNodeId, const UA_NodeId referenceTypeId,
|
||||
const UA_QualifiedName browseName, const UA_NodeId typeDefinition,
|
||||
const UA_VariableAttributes attr, UA_NodeId *outNewNodeId) {
|
||||
return __UA_Client_addNode(client, UA_NODECLASS_VARIABLE, requestedNewNodeId,
|
||||
parentNodeId, referenceTypeId, browseName, typeDefinition,
|
||||
(const UA_NodeAttributes*)&attr, &UA_TYPES[UA_TYPES_VARIABLEATTRIBUTES],
|
||||
outNewNodeId); }
|
||||
|
||||
static UA_INLINE UA_StatusCode
|
||||
UA_Client_addVariableTypeNode(UA_Client *client, const UA_NodeId requestedNewNodeId,
|
||||
const UA_NodeId parentNodeId, const UA_NodeId referenceTypeId,
|
||||
const UA_QualifiedName browseName, const UA_VariableTypeAttributes attr,
|
||||
UA_NodeId *outNewNodeId) {
|
||||
return __UA_Client_addNode(client, UA_NODECLASS_VARIABLETYPE, requestedNewNodeId,
|
||||
parentNodeId, referenceTypeId, browseName, UA_NODEID_NULL,
|
||||
(const UA_NodeAttributes*)&attr, &UA_TYPES[UA_TYPES_VARIABLETYPEATTRIBUTES],
|
||||
outNewNodeId); }
|
||||
|
||||
static UA_INLINE UA_StatusCode
|
||||
UA_Client_addObjectNode(UA_Client *client, const UA_NodeId requestedNewNodeId,
|
||||
const UA_NodeId parentNodeId, const UA_NodeId referenceTypeId,
|
||||
const UA_QualifiedName browseName, const UA_NodeId typeDefinition,
|
||||
const UA_ObjectAttributes attr, UA_NodeId *outNewNodeId) {
|
||||
return __UA_Client_addNode(client, UA_NODECLASS_OBJECT, requestedNewNodeId,
|
||||
parentNodeId, referenceTypeId, browseName, typeDefinition,
|
||||
(const UA_NodeAttributes*)&attr, &UA_TYPES[UA_TYPES_OBJECTATTRIBUTES],
|
||||
outNewNodeId); }
|
||||
|
||||
static UA_INLINE UA_StatusCode
|
||||
UA_Client_addObjectTypeNode(UA_Client *client, const UA_NodeId requestedNewNodeId,
|
||||
const UA_NodeId parentNodeId, const UA_NodeId referenceTypeId,
|
||||
const UA_QualifiedName browseName, const UA_ObjectTypeAttributes attr,
|
||||
UA_NodeId *outNewNodeId) {
|
||||
return __UA_Client_addNode(client, UA_NODECLASS_OBJECTTYPE, requestedNewNodeId,
|
||||
parentNodeId, referenceTypeId, browseName, UA_NODEID_NULL,
|
||||
(const UA_NodeAttributes*)&attr, &UA_TYPES[UA_TYPES_OBJECTTYPEATTRIBUTES],
|
||||
outNewNodeId); }
|
||||
|
||||
static UA_INLINE UA_StatusCode
|
||||
UA_Client_addViewNode(UA_Client *client, const UA_NodeId requestedNewNodeId,
|
||||
const UA_NodeId parentNodeId, const UA_NodeId referenceTypeId,
|
||||
const UA_QualifiedName browseName, const UA_ViewAttributes attr,
|
||||
UA_NodeId *outNewNodeId) {
|
||||
return __UA_Client_addNode(client, UA_NODECLASS_VIEW, requestedNewNodeId,
|
||||
parentNodeId, referenceTypeId, browseName, UA_NODEID_NULL,
|
||||
(const UA_NodeAttributes*)&attr, &UA_TYPES[UA_TYPES_VIEWATTRIBUTES],
|
||||
outNewNodeId); }
|
||||
|
||||
static UA_INLINE UA_StatusCode
|
||||
UA_Client_addReferenceTypeNode(UA_Client *client, const UA_NodeId requestedNewNodeId,
|
||||
const UA_NodeId parentNodeId, const UA_NodeId referenceTypeId,
|
||||
const UA_QualifiedName browseName, const UA_ReferenceTypeAttributes attr,
|
||||
UA_NodeId *outNewNodeId) {
|
||||
return __UA_Client_addNode(client, UA_NODECLASS_REFERENCETYPE, requestedNewNodeId,
|
||||
parentNodeId, referenceTypeId, browseName, UA_NODEID_NULL,
|
||||
(const UA_NodeAttributes*)&attr, &UA_TYPES[UA_TYPES_REFERENCETYPEATTRIBUTES],
|
||||
outNewNodeId); }
|
||||
|
||||
static UA_INLINE UA_StatusCode
|
||||
UA_Client_addDataTypeNode(UA_Client *client, const UA_NodeId requestedNewNodeId,
|
||||
const UA_NodeId parentNodeId, const UA_NodeId referenceTypeId,
|
||||
const UA_QualifiedName browseName, const UA_DataTypeAttributes attr,
|
||||
UA_NodeId *outNewNodeId) {
|
||||
return __UA_Client_addNode(client, UA_NODECLASS_DATATYPE, requestedNewNodeId,
|
||||
parentNodeId, referenceTypeId, browseName, UA_NODEID_NULL,
|
||||
(const UA_NodeAttributes*)&attr, &UA_TYPES[UA_TYPES_DATATYPEATTRIBUTES],
|
||||
outNewNodeId); }
|
||||
|
||||
static UA_INLINE UA_StatusCode
|
||||
UA_Client_addMethodNode(UA_Client *client, const UA_NodeId requestedNewNodeId,
|
||||
const UA_NodeId parentNodeId, const UA_NodeId referenceTypeId,
|
||||
const UA_QualifiedName browseName, const UA_MethodAttributes attr,
|
||||
UA_NodeId *outNewNodeId) {
|
||||
return __UA_Client_addNode(client, UA_NODECLASS_METHOD, requestedNewNodeId,
|
||||
parentNodeId, referenceTypeId, browseName, UA_NODEID_NULL,
|
||||
(const UA_NodeAttributes*)&attr, &UA_TYPES[UA_TYPES_METHODATTRIBUTES],
|
||||
outNewNodeId); }
|
||||
|
||||
/**
|
||||
* Subscriptions Handling
|
||||
* ====================== */
|
||||
#ifdef UA_ENABLE_SUBSCRIPTIONS
|
||||
|
||||
typedef struct {
|
||||
UA_Double requestedPublishingInterval;
|
||||
UA_UInt32 requestedLifetimeCount;
|
||||
UA_UInt32 requestedMaxKeepAliveCount;
|
||||
UA_UInt32 maxNotificationsPerPublish;
|
||||
UA_Boolean publishingEnabled;
|
||||
UA_Byte priority;
|
||||
} UA_SubscriptionSettings;
|
||||
|
||||
extern const UA_EXPORT UA_SubscriptionSettings UA_SubscriptionSettings_standard;
|
||||
|
||||
UA_StatusCode UA_EXPORT
|
||||
UA_Client_Subscriptions_new(UA_Client *client, UA_SubscriptionSettings settings,
|
||||
UA_UInt32 *newSubscriptionId);
|
||||
|
||||
UA_StatusCode UA_EXPORT
|
||||
UA_Client_Subscriptions_remove(UA_Client *client, UA_UInt32 subscriptionId);
|
||||
|
||||
UA_StatusCode UA_EXPORT UA_Client_Subscriptions_manuallySendPublishRequest(UA_Client *client);
|
||||
|
||||
typedef void (*UA_MonitoredItemHandlingFunction) (UA_UInt32 handle, UA_DataValue *value, void *context);
|
||||
|
||||
UA_StatusCode UA_EXPORT
|
||||
UA_Client_Subscriptions_addMonitoredItem(UA_Client *client, UA_UInt32 subscriptionId,
|
||||
UA_NodeId nodeId, UA_UInt32 attributeID,
|
||||
UA_MonitoredItemHandlingFunction handlingFunction,
|
||||
void *handlingContext, UA_UInt32 *newMonitoredItemId);
|
||||
|
||||
UA_StatusCode UA_EXPORT
|
||||
UA_Client_Subscriptions_removeMonitoredItem(UA_Client *client, UA_UInt32 subscriptionId,
|
||||
UA_UInt32 monitoredItemId);
|
||||
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Misc Highlevel Functionality
|
||||
* ============================ */
|
||||
/* Get the namespace-index of a namespace-URI
|
||||
*
|
||||
* @param client The UA_Client struct for this connection
|
||||
* @param namespaceUri The interested namespace URI
|
||||
* @param namespaceIndex The namespace index of the URI. The value is unchanged
|
||||
* in case of an error
|
||||
* @return Indicates whether the operation succeeded or returns an error code */
|
||||
UA_StatusCode UA_EXPORT
|
||||
UA_Client_NamespaceGetIndex(UA_Client *client, UA_String *namespaceUri, UA_UInt16 *namespaceIndex);
|
||||
|
||||
#ifndef HAVE_NODEITER_CALLBACK
|
||||
#define HAVE_NODEITER_CALLBACK
|
||||
/* Iterate over all nodes referenced by parentNodeId by calling the callback
|
||||
function for each child node */
|
||||
typedef UA_StatusCode (*UA_NodeIteratorCallback)(UA_NodeId childId, UA_Boolean isInverse,
|
||||
UA_NodeId referenceTypeId, void *handle);
|
||||
#endif
|
||||
|
||||
UA_StatusCode UA_EXPORT
|
||||
UA_Client_forEachChildNodeCall(UA_Client *client, UA_NodeId parentNodeId,
|
||||
UA_NodeIteratorCallback callback, void *handle) ;
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif /* UA_CLIENT_HIGHLEVEL_H_ */
|
201
include/ua_config.h
Normal file
201
include/ua_config.h
Normal file
@ -0,0 +1,201 @@
|
||||
/*
|
||||
* Copyright (C) 2013-2015 the contributors as stated in the AUTHORS file
|
||||
*
|
||||
* This file is part of open62541. open62541 is free software: you can
|
||||
* redistribute it and/or modify it under the terms of the GNU Lesser General
|
||||
* Public License, version 3 (as published by the Free Software Foundation) with
|
||||
* a static linking exception as stated in the LICENSE file provided with
|
||||
* open62541.
|
||||
*
|
||||
* open62541 is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
* A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*/
|
||||
|
||||
#ifndef UA_CONFIG_H_
|
||||
#define UA_CONFIG_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef _XOPEN_SOURCE
|
||||
# define _XOPEN_SOURCE 500
|
||||
#endif
|
||||
#ifndef _DEFAULT_SOURCE
|
||||
# define _DEFAULT_SOURCE
|
||||
#endif
|
||||
|
||||
#define UA_LOGLEVEL 300
|
||||
/* #undef UA_ENABLE_MULTITHREADING */
|
||||
#define UA_ENABLE_METHODCALLS
|
||||
/* #undef UA_ENABLE_SUBSCRIPTIONS */
|
||||
/* #undef UA_ENABLE_TYPENAMES */
|
||||
/* #undef UA_ENABLE_EMBEDDED_LIBC */
|
||||
/* #undef UA_ENABLE_GENERATE_NAMESPACE0 */
|
||||
/* #undef UA_ENABLE_EXTERNAL_NAMESPACES */
|
||||
#define UA_ENABLE_NODEMANAGEMENT
|
||||
|
||||
/* #undef UA_ENABLE_NONSTANDARD_UDP */
|
||||
/* #undef UA_ENABLE_NONSTANDARD_STATELESS */
|
||||
|
||||
/**
|
||||
* Function Export
|
||||
* --------------- */
|
||||
#ifdef _WIN32
|
||||
# ifdef UA_DYNAMIC_LINKING
|
||||
# ifdef __GNUC__
|
||||
# define UA_EXPORT __attribute__ ((dllexport))
|
||||
# else
|
||||
# define UA_EXPORT __declspec(dllexport)
|
||||
# endif
|
||||
# else
|
||||
# ifdef __GNUC__
|
||||
# define UA_EXPORT __attribute__ ((dllexport))
|
||||
# else
|
||||
# define UA_EXPORT __declspec(dllimport)
|
||||
# endif
|
||||
# endif
|
||||
#else
|
||||
# if __GNUC__ || __clang__
|
||||
# define UA_EXPORT __attribute__ ((visibility ("default")))
|
||||
# else
|
||||
# define UA_EXPORT
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Inline Functions
|
||||
* ---------------- */
|
||||
#ifdef _MSC_VER
|
||||
# define UA_INLINE __inline
|
||||
#else
|
||||
# define UA_INLINE inline
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Non-aliasing pointers
|
||||
* -------------------- */
|
||||
#ifdef _MSC_VER
|
||||
# define UA_RESTRICT __restrict
|
||||
#elif defined(__GNUC__)
|
||||
# define UA_RESTRICT __restrict__
|
||||
#else
|
||||
# define UA_RESTRICT restrict
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Function attributes
|
||||
* ------------------- */
|
||||
#ifdef __GNUC__
|
||||
# define UA_FUNC_ATTR_MALLOC __attribute__((malloc))
|
||||
# define UA_FUNC_ATTR_PURE __attribute__ ((pure))
|
||||
# define UA_FUNC_ATTR_CONST __attribute__((const))
|
||||
# define UA_FUNC_ATTR_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
|
||||
#else
|
||||
# define UA_FUNC_ATTR_MALLOC
|
||||
# define UA_FUNC_ATTR_PURE
|
||||
# define UA_FUNC_ATTR_CONST
|
||||
# define UA_FUNC_ATTR_WARN_UNUSED_RESULT
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Integer Endianness
|
||||
* ------------------ */
|
||||
#if defined(_WIN32) || (defined(__BYTE_ORDER__) && defined(__ORDER_LITTLE_ENDIAN__) && \
|
||||
(__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__)) /* little endian detected */
|
||||
# define UA_BINARY_OVERLAYABLE_INTEGER true
|
||||
#elif defined(__ANDROID__) /* Andoid */
|
||||
# include <endian.h>
|
||||
# if __BYTE_ORDER == __LITTLE_ENDIAN
|
||||
# define UA_BINARY_OVERLAYABLE_INTEGER true
|
||||
# endif
|
||||
#elif defined(__linux__) /* Linux */
|
||||
# include <endian.h>
|
||||
# if __BYTE_ORDER == __LITTLE_ENDIAN
|
||||
# define UA_BINARY_OVERLAYABLE_INTEGER true
|
||||
# endif
|
||||
# if __FLOAT_BYTE_ORDER == __LITTLE_ENDIAN
|
||||
# define UA_BINARY_OVERLAYABLE_FLOAT true
|
||||
# endif
|
||||
#elif defined(__OpenBSD__) /* OpenBSD */
|
||||
# include <sys/endian.h>
|
||||
# if BYTE_ORDER == LITTLE_ENDIAN
|
||||
# define UA_BINARY_OVERLAYABLE_INTEGER true
|
||||
# endif
|
||||
#elif defined(__NetBSD__) || defined(__FreeBSD__) || defined(__DragonFly__) /* Other BSD */
|
||||
# include <sys/endian.h>
|
||||
# if _BYTE_ORDER == _LITTLE_ENDIAN
|
||||
# define UA_BINARY_OVERLAYABLE_INTEGER true
|
||||
# endif
|
||||
#elif defined(__APPLE__) /* Apple (MacOS, iOS) */
|
||||
# include <libkern/OSByteOrder.h>
|
||||
# if defined(__LITTLE_ENDIAN__)
|
||||
# define UA_BINARY_OVERLAYABLE_INTEGER true
|
||||
# endif
|
||||
#elif defined(__QNX__) || defined(__QNXNTO__) /* QNX */
|
||||
# include <gulliver.h>
|
||||
# if defined(__LITTLEENDIAN__)
|
||||
# define UA_BINARY_OVERLAYABLE_INTEGER true
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Float Endianness
|
||||
* ---------------- */
|
||||
#if defined(_WIN32)
|
||||
# define UA_BINARY_OVERLAYABLE_FLOAT true
|
||||
#elif defined(__FLOAT_WORD_ORDER__) && defined(__ORDER_LITTLE_ENDIAN__) && \
|
||||
(__FLOAT_WORD_ORDER__ == __ORDER_LITTLE_ENDIAN__) /* Defined only in GCC */
|
||||
# define UA_BINARY_OVERLAYABLE_FLOAT true
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Binary Encoding Overlays
|
||||
* ------------------------
|
||||
* Some data types have the same layout in memory as on the binary data stream.
|
||||
* This can be used to speed up the decoding. If we could not detect
|
||||
* little-endianness of integers and floats, this is not possible for types that
|
||||
* contain integers or floats respectively. See the definition of the
|
||||
* overlayable flag defined in `UA_DataType`. */
|
||||
|
||||
/* Demote error to a warning on clang. There is no robust way to detect float
|
||||
* endianness here. On x86/x86-64, floats are always in the right IEEE 754
|
||||
* format. So floats are overlayable is the architecture is little-endian. */
|
||||
#if defined(__clang__)
|
||||
# pragma GCC diagnostic push
|
||||
# pragma GCC diagnostic warning "-W#warnings"
|
||||
#endif
|
||||
|
||||
#ifndef UA_BINARY_OVERLAYABLE_INTEGER
|
||||
# define UA_BINARY_OVERLAYABLE_INTEGER false
|
||||
# warning Slow Integer Encoding
|
||||
#endif
|
||||
#ifndef UA_BINARY_OVERLAYABLE_FLOAT
|
||||
# define UA_BINARY_OVERLAYABLE_FLOAT false
|
||||
# warning Slow Float Encoding
|
||||
#endif
|
||||
|
||||
#if defined(__clang__)
|
||||
# pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Embed unavailable libc functions
|
||||
* -------------------------------- */
|
||||
#include <stddef.h>
|
||||
#ifdef UA_ENABLE_EMBEDDED_LIBC
|
||||
void *memcpy(void *UA_RESTRICT dest, const void *UA_RESTRICT src, size_t n);
|
||||
void *memset(void *dest, int c, size_t n);
|
||||
size_t strlen(const char *s);
|
||||
int memcmp(const void *vl, const void *vr, size_t n);
|
||||
#else
|
||||
# include <string.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif /* UA_CONFIG_H_ */
|
201
include/ua_config.h.in
Normal file
201
include/ua_config.h.in
Normal file
@ -0,0 +1,201 @@
|
||||
/*
|
||||
* Copyright (C) 2013-2015 the contributors as stated in the AUTHORS file
|
||||
*
|
||||
* This file is part of open62541. open62541 is free software: you can
|
||||
* redistribute it and/or modify it under the terms of the GNU Lesser General
|
||||
* Public License, version 3 (as published by the Free Software Foundation) with
|
||||
* a static linking exception as stated in the LICENSE file provided with
|
||||
* open62541.
|
||||
*
|
||||
* open62541 is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
* A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*/
|
||||
|
||||
#ifndef UA_CONFIG_H_
|
||||
#define UA_CONFIG_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef _XOPEN_SOURCE
|
||||
# define _XOPEN_SOURCE 500
|
||||
#endif
|
||||
#ifndef _DEFAULT_SOURCE
|
||||
# define _DEFAULT_SOURCE
|
||||
#endif
|
||||
|
||||
#define UA_LOGLEVEL ${UA_LOGLEVEL}
|
||||
#cmakedefine UA_ENABLE_MULTITHREADING
|
||||
#cmakedefine UA_ENABLE_METHODCALLS
|
||||
#cmakedefine UA_ENABLE_SUBSCRIPTIONS
|
||||
#cmakedefine UA_ENABLE_TYPENAMES
|
||||
#cmakedefine UA_ENABLE_EMBEDDED_LIBC
|
||||
#cmakedefine UA_ENABLE_GENERATE_NAMESPACE0
|
||||
#cmakedefine UA_ENABLE_EXTERNAL_NAMESPACES
|
||||
#cmakedefine UA_ENABLE_NODEMANAGEMENT
|
||||
|
||||
#cmakedefine UA_ENABLE_NONSTANDARD_UDP
|
||||
#cmakedefine UA_ENABLE_NONSTANDARD_STATELESS
|
||||
|
||||
/**
|
||||
* Function Export
|
||||
* --------------- */
|
||||
#ifdef _WIN32
|
||||
# ifdef UA_DYNAMIC_LINKING
|
||||
# ifdef __GNUC__
|
||||
# define UA_EXPORT __attribute__ ((dllexport))
|
||||
# else
|
||||
# define UA_EXPORT __declspec(dllexport)
|
||||
# endif
|
||||
# else
|
||||
# ifdef __GNUC__
|
||||
# define UA_EXPORT __attribute__ ((dllexport))
|
||||
# else
|
||||
# define UA_EXPORT __declspec(dllimport)
|
||||
# endif
|
||||
# endif
|
||||
#else
|
||||
# if __GNUC__ || __clang__
|
||||
# define UA_EXPORT __attribute__ ((visibility ("default")))
|
||||
# else
|
||||
# define UA_EXPORT
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Inline Functions
|
||||
* ---------------- */
|
||||
#ifdef _MSC_VER
|
||||
# define UA_INLINE __inline
|
||||
#else
|
||||
# define UA_INLINE inline
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Non-aliasing pointers
|
||||
* -------------------- */
|
||||
#ifdef _MSC_VER
|
||||
# define UA_RESTRICT __restrict
|
||||
#elif defined(__GNUC__)
|
||||
# define UA_RESTRICT __restrict__
|
||||
#else
|
||||
# define UA_RESTRICT restrict
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Function attributes
|
||||
* ------------------- */
|
||||
#ifdef __GNUC__
|
||||
# define UA_FUNC_ATTR_MALLOC __attribute__((malloc))
|
||||
# define UA_FUNC_ATTR_PURE __attribute__ ((pure))
|
||||
# define UA_FUNC_ATTR_CONST __attribute__((const))
|
||||
# define UA_FUNC_ATTR_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
|
||||
#else
|
||||
# define UA_FUNC_ATTR_MALLOC
|
||||
# define UA_FUNC_ATTR_PURE
|
||||
# define UA_FUNC_ATTR_CONST
|
||||
# define UA_FUNC_ATTR_WARN_UNUSED_RESULT
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Integer Endianness
|
||||
* ------------------ */
|
||||
#if defined(_WIN32) || (defined(__BYTE_ORDER__) && defined(__ORDER_LITTLE_ENDIAN__) && \
|
||||
(__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__)) /* little endian detected */
|
||||
# define UA_BINARY_OVERLAYABLE_INTEGER true
|
||||
#elif defined(__ANDROID__) /* Andoid */
|
||||
# include <endian.h>
|
||||
# if __BYTE_ORDER == __LITTLE_ENDIAN
|
||||
# define UA_BINARY_OVERLAYABLE_INTEGER true
|
||||
# endif
|
||||
#elif defined(__linux__) /* Linux */
|
||||
# include <endian.h>
|
||||
# if __BYTE_ORDER == __LITTLE_ENDIAN
|
||||
# define UA_BINARY_OVERLAYABLE_INTEGER true
|
||||
# endif
|
||||
# if __FLOAT_BYTE_ORDER == __LITTLE_ENDIAN
|
||||
# define UA_BINARY_OVERLAYABLE_FLOAT true
|
||||
# endif
|
||||
#elif defined(__OpenBSD__) /* OpenBSD */
|
||||
# include <sys/endian.h>
|
||||
# if BYTE_ORDER == LITTLE_ENDIAN
|
||||
# define UA_BINARY_OVERLAYABLE_INTEGER true
|
||||
# endif
|
||||
#elif defined(__NetBSD__) || defined(__FreeBSD__) || defined(__DragonFly__) /* Other BSD */
|
||||
# include <sys/endian.h>
|
||||
# if _BYTE_ORDER == _LITTLE_ENDIAN
|
||||
# define UA_BINARY_OVERLAYABLE_INTEGER true
|
||||
# endif
|
||||
#elif defined(__APPLE__) /* Apple (MacOS, iOS) */
|
||||
# include <libkern/OSByteOrder.h>
|
||||
# if defined(__LITTLE_ENDIAN__)
|
||||
# define UA_BINARY_OVERLAYABLE_INTEGER true
|
||||
# endif
|
||||
#elif defined(__QNX__) || defined(__QNXNTO__) /* QNX */
|
||||
# include <gulliver.h>
|
||||
# if defined(__LITTLEENDIAN__)
|
||||
# define UA_BINARY_OVERLAYABLE_INTEGER true
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Float Endianness
|
||||
* ---------------- */
|
||||
#if defined(_WIN32)
|
||||
# define UA_BINARY_OVERLAYABLE_FLOAT true
|
||||
#elif defined(__FLOAT_WORD_ORDER__) && defined(__ORDER_LITTLE_ENDIAN__) && \
|
||||
(__FLOAT_WORD_ORDER__ == __ORDER_LITTLE_ENDIAN__) /* Defined only in GCC */
|
||||
# define UA_BINARY_OVERLAYABLE_FLOAT true
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Binary Encoding Overlays
|
||||
* ------------------------
|
||||
* Some data types have the same layout in memory as on the binary data stream.
|
||||
* This can be used to speed up the decoding. If we could not detect
|
||||
* little-endianness of integers and floats, this is not possible for types that
|
||||
* contain integers or floats respectively. See the definition of the
|
||||
* overlayable flag defined in `UA_DataType`. */
|
||||
|
||||
/* Demote error to a warning on clang. There is no robust way to detect float
|
||||
* endianness here. On x86/x86-64, floats are always in the right IEEE 754
|
||||
* format. So floats are overlayable is the architecture is little-endian. */
|
||||
#if defined(__clang__)
|
||||
# pragma GCC diagnostic push
|
||||
# pragma GCC diagnostic warning "-W#warnings"
|
||||
#endif
|
||||
|
||||
#ifndef UA_BINARY_OVERLAYABLE_INTEGER
|
||||
# define UA_BINARY_OVERLAYABLE_INTEGER false
|
||||
# warning Slow Integer Encoding
|
||||
#endif
|
||||
#ifndef UA_BINARY_OVERLAYABLE_FLOAT
|
||||
# define UA_BINARY_OVERLAYABLE_FLOAT false
|
||||
# warning Slow Float Encoding
|
||||
#endif
|
||||
|
||||
#if defined(__clang__)
|
||||
# pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Embed unavailable libc functions
|
||||
* -------------------------------- */
|
||||
#include <stddef.h>
|
||||
#ifdef UA_ENABLE_EMBEDDED_LIBC
|
||||
void *memcpy(void *UA_RESTRICT dest, const void *UA_RESTRICT src, size_t n);
|
||||
void *memset(void *dest, int c, size_t n);
|
||||
size_t strlen(const char *s);
|
||||
int memcmp(const void *vl, const void *vr, size_t n);
|
||||
#else
|
||||
# include <string.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif /* UA_CONFIG_H_ */
|
25
include/ua_config_standard.h
Normal file
25
include/ua_config_standard.h
Normal file
@ -0,0 +1,25 @@
|
||||
/*
|
||||
* This work is licensed under a Creative Commons CCZero 1.0 Universal License.
|
||||
* See http://creativecommons.org/publicdomain/zero/1.0/ for more information.
|
||||
*/
|
||||
|
||||
#ifndef UA_CONFIG_STANDARD_H_
|
||||
#define UA_CONFIG_STANDARD_H_
|
||||
|
||||
#include "ua_server.h"
|
||||
#include "ua_client.h"
|
||||
#include "logger_stdout.h"
|
||||
#include "networklayer_tcp.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern UA_EXPORT const UA_ServerConfig UA_ServerConfig_standard;
|
||||
extern UA_EXPORT const UA_ClientConfig UA_ClientConfig_standard;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* UA_CONFIG_STANDARD_H_ */
|
123
include/ua_connection.h
Normal file
123
include/ua_connection.h
Normal file
@ -0,0 +1,123 @@
|
||||
/*
|
||||
* Copyright (C) 2014-2016 the contributors as stated in the AUTHORS file
|
||||
*
|
||||
* This file is part of open62541. open62541 is free software: you can
|
||||
* redistribute it and/or modify it under the terms of the GNU Lesser General
|
||||
* Public License, version 3 (as published by the Free Software Foundation) with
|
||||
* a static linking exception as stated in the LICENSE file provided with
|
||||
* open62541.
|
||||
*
|
||||
* open62541 is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
* A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*/
|
||||
|
||||
#ifndef UA_CONNECTION_H_
|
||||
#define UA_CONNECTION_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "ua_types.h"
|
||||
|
||||
/* Forward declarations */
|
||||
struct UA_Connection;
|
||||
typedef struct UA_Connection UA_Connection;
|
||||
|
||||
struct UA_SecureChannel;
|
||||
typedef struct UA_SecureChannel UA_SecureChannel;
|
||||
|
||||
/**
|
||||
* Networking
|
||||
* ----------
|
||||
* Client-server connection is represented by a `UA_Connection` structure. In
|
||||
* order to allow for different operating systems and connection types. For
|
||||
* this, `UA_Connection` stores a pointer to user-defined data and
|
||||
* function-pointers to interact with the underlying networking implementation.
|
||||
*
|
||||
* An example networklayer for TCP communication is contained in the plugins
|
||||
* folder. The networklayer forwards messages with `UA_Connection` structures to
|
||||
* the main open62541 library. The library can then return messages vie TCP
|
||||
* without being aware of the underlying transport technology.
|
||||
*
|
||||
* Connection Config
|
||||
* ================= */
|
||||
typedef struct UA_ConnectionConfig {
|
||||
UA_UInt32 protocolVersion;
|
||||
UA_UInt32 sendBufferSize;
|
||||
UA_UInt32 recvBufferSize;
|
||||
UA_UInt32 maxMessageSize;
|
||||
UA_UInt32 maxChunkCount;
|
||||
} UA_ConnectionConfig;
|
||||
|
||||
extern const UA_EXPORT UA_ConnectionConfig UA_ConnectionConfig_standard;
|
||||
|
||||
/**
|
||||
* Connection Structure
|
||||
* ==================== */
|
||||
typedef enum UA_ConnectionState {
|
||||
UA_CONNECTION_OPENING, /* The socket is open, but the HEL/ACK handshake
|
||||
is not done */
|
||||
UA_CONNECTION_ESTABLISHED, /* The socket is open and the connection
|
||||
configured */
|
||||
UA_CONNECTION_CLOSED, /* The socket has been closed and the connection
|
||||
will be deleted */
|
||||
} UA_ConnectionState;
|
||||
|
||||
struct UA_Connection {
|
||||
UA_ConnectionState state;
|
||||
UA_ConnectionConfig localConf;
|
||||
UA_ConnectionConfig remoteConf;
|
||||
UA_SecureChannel *channel; /* The securechannel that is attached to
|
||||
this connection */
|
||||
UA_Int32 sockfd; /* Most connectivity solutions run on
|
||||
sockets. Having the socket id here
|
||||
simplifies the design. */
|
||||
void *handle; /* A pointer to the networklayer */
|
||||
UA_ByteString incompleteMessage; /* A half-received message (TCP is a
|
||||
streaming protocol) is stored here */
|
||||
|
||||
/* Get a buffer for sending */
|
||||
UA_StatusCode (*getSendBuffer)(UA_Connection *connection, size_t length,
|
||||
UA_ByteString *buf);
|
||||
|
||||
/* Release the send buffer manually */
|
||||
void (*releaseSendBuffer)(UA_Connection *connection, UA_ByteString *buf);
|
||||
|
||||
/* Sends a message over the connection. The message buffer is always freed,
|
||||
* even if sending fails.
|
||||
*
|
||||
* @param connection The connection
|
||||
* @param buf The message buffer
|
||||
* @return Returns an error code or UA_STATUSCODE_GOOD. */
|
||||
UA_StatusCode (*send)(UA_Connection *connection, UA_ByteString *buf);
|
||||
|
||||
/* Receive a message from the remote connection
|
||||
*
|
||||
* @param connection The connection
|
||||
* @param response The response string. It is allocated by the connection
|
||||
* and needs to be freed with connection->releaseBuffer
|
||||
* @param timeout Timeout of the recv operation in milliseconds
|
||||
* @return Returns UA_STATUSCODE_BADCOMMUNICATIONERROR if the recv operation
|
||||
* can be repeated, UA_STATUSCODE_GOOD if it succeeded and
|
||||
* UA_STATUSCODE_BADCONNECTIONCLOSED if the connection was
|
||||
* closed. */
|
||||
UA_StatusCode (*recv)(UA_Connection *connection, UA_ByteString *response, UA_UInt32 timeout);
|
||||
|
||||
/* Release the buffer of a received message */
|
||||
void (*releaseRecvBuffer)(UA_Connection *connection, UA_ByteString *buf);
|
||||
|
||||
/* Close the connection */
|
||||
void (*close)(UA_Connection *connection);
|
||||
};
|
||||
|
||||
void UA_EXPORT UA_Connection_init(UA_Connection *connection);
|
||||
void UA_EXPORT UA_Connection_deleteMembers(UA_Connection *connection);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif /* UA_CONNECTION_H_ */
|
31
include/ua_connection_internal.h
Normal file
31
include/ua_connection_internal.h
Normal file
@ -0,0 +1,31 @@
|
||||
#ifndef UA_CONNECTION_INTERNAL_H_
|
||||
#define UA_CONNECTION_INTERNAL_H_
|
||||
|
||||
#include "ua_connection.h"
|
||||
|
||||
/**
|
||||
* The network layer may receive chopped up messages since TCP is a streaming
|
||||
* protocol. Furthermore, the networklayer may operate on ringbuffers or
|
||||
* statically assigned memory.
|
||||
*
|
||||
* If an entire message is received, it is forwarded directly. But the memory
|
||||
* needs to be freed with the networklayer-specific mechanism. If a half message
|
||||
* is received, we copy it into a local buffer. Then, the stack-specific free
|
||||
* needs to be used.
|
||||
*
|
||||
* @param connection The connection
|
||||
* @param message The received message. The content may be overwritten when a
|
||||
* previsouly received buffer is completed.
|
||||
* @param realloced The Boolean value is set to true if the outgoing message has
|
||||
* been reallocated from the network layer.
|
||||
* @return Returns UA_STATUSCODE_GOOD or an error code. When an error occurs, the ingoing message
|
||||
* and the current buffer in the connection are freed.
|
||||
*/
|
||||
UA_StatusCode
|
||||
UA_Connection_completeMessages(UA_Connection *connection, UA_ByteString * UA_RESTRICT message,
|
||||
UA_Boolean * UA_RESTRICT realloced);
|
||||
|
||||
void UA_EXPORT UA_Connection_detachSecureChannel(UA_Connection *connection);
|
||||
void UA_EXPORT UA_Connection_attachSecureChannel(UA_Connection *connection, UA_SecureChannel *channel);
|
||||
|
||||
#endif /* UA_CONNECTION_INTERNAL_H_ */
|
308
include/ua_constants.h
Normal file
308
include/ua_constants.h
Normal file
@ -0,0 +1,308 @@
|
||||
/*
|
||||
* Copyright (C) 2013-2015 the contributors as stated in the AUTHORS file
|
||||
*
|
||||
* This file is part of open62541. open62541 is free software: you can
|
||||
* redistribute it and/or modify it under the terms of the GNU Lesser General
|
||||
* Public License, version 3 (as published by the Free Software Foundation) with
|
||||
* a static linking exception as stated in the LICENSE file provided with
|
||||
* open62541.
|
||||
*
|
||||
* open62541 is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
* A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*/
|
||||
|
||||
#ifndef UA_CONSTANTS_H_
|
||||
#define UA_CONSTANTS_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Standard-Defined Constants
|
||||
* ==========================
|
||||
* This section contains numerical and string constants that are defined in the
|
||||
* OPC UA standard.
|
||||
*
|
||||
* Attribute Id
|
||||
* ------------
|
||||
* Every node in an OPC UA information model contains attributes depending on
|
||||
* the node type. Possible attributes are as follows: */
|
||||
typedef enum {
|
||||
UA_ATTRIBUTEID_NODEID = 1,
|
||||
UA_ATTRIBUTEID_NODECLASS = 2,
|
||||
UA_ATTRIBUTEID_BROWSENAME = 3,
|
||||
UA_ATTRIBUTEID_DISPLAYNAME = 4,
|
||||
UA_ATTRIBUTEID_DESCRIPTION = 5,
|
||||
UA_ATTRIBUTEID_WRITEMASK = 6,
|
||||
UA_ATTRIBUTEID_USERWRITEMASK = 7,
|
||||
UA_ATTRIBUTEID_ISABSTRACT = 8,
|
||||
UA_ATTRIBUTEID_SYMMETRIC = 9,
|
||||
UA_ATTRIBUTEID_INVERSENAME = 10,
|
||||
UA_ATTRIBUTEID_CONTAINSNOLOOPS = 11,
|
||||
UA_ATTRIBUTEID_EVENTNOTIFIER = 12,
|
||||
UA_ATTRIBUTEID_VALUE = 13,
|
||||
UA_ATTRIBUTEID_DATATYPE = 14,
|
||||
UA_ATTRIBUTEID_VALUERANK = 15,
|
||||
UA_ATTRIBUTEID_ARRAYDIMENSIONS = 16,
|
||||
UA_ATTRIBUTEID_ACCESSLEVEL = 17,
|
||||
UA_ATTRIBUTEID_USERACCESSLEVEL = 18,
|
||||
UA_ATTRIBUTEID_MINIMUMSAMPLINGINTERVAL = 19,
|
||||
UA_ATTRIBUTEID_HISTORIZING = 20,
|
||||
UA_ATTRIBUTEID_EXECUTABLE = 21,
|
||||
UA_ATTRIBUTEID_USEREXECUTABLE = 22
|
||||
} UA_AttributeId;
|
||||
|
||||
/**
|
||||
* Access Level Masks
|
||||
* ------------------
|
||||
* The access level to a node is given by the following constants that are XORed
|
||||
* for the overall access level. */
|
||||
#define UA_ACCESSLEVELMASK_READ 0x01
|
||||
#define UA_ACCESSLEVELMASK_WRITE 0x02
|
||||
#define UA_ACCESSLEVELMASK_HISTORYREAD 0x4
|
||||
#define UA_ACCESSLEVELMASK_HISTORYWRITE 0x08
|
||||
#define UA_ACCESSLEVELMASK_SEMANTICCHANGE 0x10
|
||||
|
||||
/**
|
||||
* Encoding Offsets
|
||||
* ----------------
|
||||
* Subtract from the typeid of the encoding nodeids to get to the type
|
||||
* definition. */
|
||||
#define UA_ENCODINGOFFSET_XML 1
|
||||
#define UA_ENCODINGOFFSET_BINARY 2
|
||||
|
||||
/**
|
||||
* .. _statuscodes:
|
||||
*
|
||||
* StatusCodes
|
||||
* -----------
|
||||
* StatusCodes are extensively used in the OPC UA protocol and in the open62541
|
||||
* API. They are represented by the :ref:`statuscode` data type. The following
|
||||
* definitions are autogenerated from the ``Opc.Ua.StatusCodes.csv`` file provided
|
||||
* with the OPC UA standard. */
|
||||
#define UA_STATUSCODE_GOOD 0x00
|
||||
#define UA_STATUSCODE_BADUNEXPECTEDERROR 0x80010000 // An unexpected error occurred.
|
||||
#define UA_STATUSCODE_BADINTERNALERROR 0x80020000 // An internal error occurred as a result of a programming or configuration error.
|
||||
#define UA_STATUSCODE_BADOUTOFMEMORY 0x80030000 // Not enough memory to complete the operation.
|
||||
#define UA_STATUSCODE_BADRESOURCEUNAVAILABLE 0x80040000 // An operating system resource is not available.
|
||||
#define UA_STATUSCODE_BADCOMMUNICATIONERROR 0x80050000 // A low level communication error occurred.
|
||||
#define UA_STATUSCODE_BADENCODINGERROR 0x80060000 // Encoding halted because of invalid data in the objects being serialized.
|
||||
#define UA_STATUSCODE_BADDECODINGERROR 0x80070000 // Decoding halted because of invalid data in the stream.
|
||||
#define UA_STATUSCODE_BADENCODINGLIMITSEXCEEDED 0x80080000 // The message encoding/decoding limits imposed by the stack have been exceeded.
|
||||
#define UA_STATUSCODE_BADREQUESTTOOLARGE 0x80b80000 // The request message size exceeds limits set by the server.
|
||||
#define UA_STATUSCODE_BADRESPONSETOOLARGE 0x80b90000 // The response message size exceeds limits set by the client.
|
||||
#define UA_STATUSCODE_BADUNKNOWNRESPONSE 0x80090000 // An unrecognized response was received from the server.
|
||||
#define UA_STATUSCODE_BADTIMEOUT 0x800a0000 // The operation timed out.
|
||||
#define UA_STATUSCODE_BADSERVICEUNSUPPORTED 0x800b0000 // The server does not support the requested service.
|
||||
#define UA_STATUSCODE_BADSHUTDOWN 0x800c0000 // The operation was cancelled because the application is shutting down.
|
||||
#define UA_STATUSCODE_BADSERVERNOTCONNECTED 0x800d0000 // The operation could not complete because the client is not connected to the server.
|
||||
#define UA_STATUSCODE_BADSERVERHALTED 0x800e0000 // The server has stopped and cannot process any requests.
|
||||
#define UA_STATUSCODE_BADNOTHINGTODO 0x800f0000 // There was nothing to do because the client passed a list of operations with no elements.
|
||||
#define UA_STATUSCODE_BADTOOMANYOPERATIONS 0x80100000 // The request could not be processed because it specified too many operations.
|
||||
#define UA_STATUSCODE_BADTOOMANYMONITOREDITEMS 0x80db0000 // The request could not be processed because there are too many monitored items in the subscription.
|
||||
#define UA_STATUSCODE_BADDATATYPEIDUNKNOWN 0x80110000 // The extension object cannot be (de)serialized because the data type id is not recognized.
|
||||
#define UA_STATUSCODE_BADCERTIFICATEINVALID 0x80120000 // The certificate provided as a parameter is not valid.
|
||||
#define UA_STATUSCODE_BADSECURITYCHECKSFAILED 0x80130000 // An error occurred verifying security.
|
||||
#define UA_STATUSCODE_BADCERTIFICATETIMEINVALID 0x80140000 // The Certificate has expired or is not yet valid.
|
||||
#define UA_STATUSCODE_BADCERTIFICATEISSUERTIMEINVALID 0x80150000 // An Issuer Certificate has expired or is not yet valid.
|
||||
#define UA_STATUSCODE_BADCERTIFICATEHOSTNAMEINVALID 0x80160000 // The HostName used to connect to a Server does not match a HostName in the Certificate.
|
||||
#define UA_STATUSCODE_BADCERTIFICATEURIINVALID 0x80170000 // The URI specified in the ApplicationDescription does not match the URI in the Certificate.
|
||||
#define UA_STATUSCODE_BADCERTIFICATEUSENOTALLOWED 0x80180000 // The Certificate may not be used for the requested operation.
|
||||
#define UA_STATUSCODE_BADCERTIFICATEISSUERUSENOTALLOWED 0x80190000 // The Issuer Certificate may not be used for the requested operation.
|
||||
#define UA_STATUSCODE_BADCERTIFICATEUNTRUSTED 0x801a0000 // The Certificate is not trusted.
|
||||
#define UA_STATUSCODE_BADCERTIFICATEREVOCATIONUNKNOWN 0x801b0000 // It was not possible to determine if the Certificate has been revoked.
|
||||
#define UA_STATUSCODE_BADCERTIFICATEISSUERREVOCATIONUNKNOWN 0x801c0000 // It was not possible to determine if the Issuer Certificate has been revoked.
|
||||
#define UA_STATUSCODE_BADCERTIFICATEREVOKED 0x801d0000 // The Certificate has been revoked.
|
||||
#define UA_STATUSCODE_BADCERTIFICATEISSUERREVOKED 0x801e0000 // The Issuer Certificate has been revoked.
|
||||
#define UA_STATUSCODE_BADUSERACCESSDENIED 0x801f0000 // User does not have permission to perform the requested operation.
|
||||
#define UA_STATUSCODE_BADIDENTITYTOKENINVALID 0x80200000 // The user identity token is not valid.
|
||||
#define UA_STATUSCODE_BADIDENTITYTOKENREJECTED 0x80210000 // The user identity token is valid but the server has rejected it.
|
||||
#define UA_STATUSCODE_BADSECURECHANNELIDINVALID 0x80220000 // The specified secure channel is no longer valid.
|
||||
#define UA_STATUSCODE_BADINVALIDTIMESTAMP 0x80230000 // The timestamp is outside the range allowed by the server.
|
||||
#define UA_STATUSCODE_BADNONCEINVALID 0x80240000 // The nonce does appear to be not a random value or it is not the correct length.
|
||||
#define UA_STATUSCODE_BADSESSIONIDINVALID 0x80250000 // The session id is not valid.
|
||||
#define UA_STATUSCODE_BADSESSIONCLOSED 0x80260000 // The session was closed by the client.
|
||||
#define UA_STATUSCODE_BADSESSIONNOTACTIVATED 0x80270000 // The session cannot be used because ActivateSession has not been called.
|
||||
#define UA_STATUSCODE_BADSUBSCRIPTIONIDINVALID 0x80280000 // The subscription id is not valid.
|
||||
#define UA_STATUSCODE_BADREQUESTHEADERINVALID 0x802a0000 // The header for the request is missing or invalid.
|
||||
#define UA_STATUSCODE_BADTIMESTAMPSTORETURNINVALID 0x802b0000 // The timestamps to return parameter is invalid.
|
||||
#define UA_STATUSCODE_BADREQUESTCANCELLEDBYCLIENT 0x802c0000 // The request was cancelled by the client.
|
||||
#define UA_STATUSCODE_GOODSUBSCRIPTIONTRANSFERRED 0x002d0000 // The subscription was transferred to another session.
|
||||
#define UA_STATUSCODE_GOODCOMPLETESASYNCHRONOUSLY 0x002e0000 // The processing will complete asynchronously.
|
||||
#define UA_STATUSCODE_GOODOVERLOAD 0x002f0000 // Sampling has slowed down due to resource limitations.
|
||||
#define UA_STATUSCODE_GOODCLAMPED 0x00300000 // The value written was accepted but was clamped.
|
||||
#define UA_STATUSCODE_BADNOCOMMUNICATION 0x80310000 // Communication with the data source is defined, but not established and there is no last known value available.
|
||||
#define UA_STATUSCODE_BADWAITINGFORINITIALDATA 0x80320000 // Waiting for the server to obtain values from the underlying data source.
|
||||
#define UA_STATUSCODE_BADNODEIDINVALID 0x80330000 // The syntax of the node id is not valid.
|
||||
#define UA_STATUSCODE_BADNODEIDUNKNOWN 0x80340000 // The node id refers to a node that does not exist in the server address space.
|
||||
#define UA_STATUSCODE_BADATTRIBUTEIDINVALID 0x80350000 // The attribute is not supported for the specified Node.
|
||||
#define UA_STATUSCODE_BADINDEXRANGEINVALID 0x80360000 // The syntax of the index range parameter is invalid.
|
||||
#define UA_STATUSCODE_BADINDEXRANGENODATA 0x80370000 // No data exists within the range of indexes specified.
|
||||
#define UA_STATUSCODE_BADDATAENCODINGINVALID 0x80380000 // The data encoding is invalid.
|
||||
#define UA_STATUSCODE_BADDATAENCODINGUNSUPPORTED 0x80390000 // The server does not support the requested data encoding for the node.
|
||||
#define UA_STATUSCODE_BADNOTREADABLE 0x803a0000 // The access level does not allow reading or subscribing to the Node.
|
||||
#define UA_STATUSCODE_BADNOTWRITABLE 0x803b0000 // The access level does not allow writing to the Node.
|
||||
#define UA_STATUSCODE_BADOUTOFRANGE 0x803c0000 // The value was out of range.
|
||||
#define UA_STATUSCODE_BADNOTSUPPORTED 0x803d0000 // The requested operation is not supported.
|
||||
#define UA_STATUSCODE_BADNOTFOUND 0x803e0000 // A requested item was not found or a search operation ended without success.
|
||||
#define UA_STATUSCODE_BADOBJECTDELETED 0x803f0000 // The object cannot be used because it has been deleted.
|
||||
#define UA_STATUSCODE_BADNOTIMPLEMENTED 0x80400000 // Requested operation is not implemented.
|
||||
#define UA_STATUSCODE_BADMONITORINGMODEINVALID 0x80410000 // The monitoring mode is invalid.
|
||||
#define UA_STATUSCODE_BADMONITOREDITEMIDINVALID 0x80420000 // The monitoring item id does not refer to a valid monitored item.
|
||||
#define UA_STATUSCODE_BADMONITOREDITEMFILTERINVALID 0x80430000 // The monitored item filter parameter is not valid.
|
||||
#define UA_STATUSCODE_BADMONITOREDITEMFILTERUNSUPPORTED 0x80440000 // The server does not support the requested monitored item filter.
|
||||
#define UA_STATUSCODE_BADFILTERNOTALLOWED 0x80450000 // A monitoring filter cannot be used in combination with the attribute specified.
|
||||
#define UA_STATUSCODE_BADSTRUCTUREMISSING 0x80460000 // A mandatory structured parameter was missing or null.
|
||||
#define UA_STATUSCODE_BADEVENTFILTERINVALID 0x80470000 // The event filter is not valid.
|
||||
#define UA_STATUSCODE_BADCONTENTFILTERINVALID 0x80480000 // The content filter is not valid.
|
||||
#define UA_STATUSCODE_BADFILTEROPERATORINVALID 0x80c10000 // An unrecognized operator was provided in a filter.
|
||||
#define UA_STATUSCODE_BADFILTEROPERATORUNSUPPORTED 0x80c20000 // A valid operator was provided but the server does not provide support for this filter operator.
|
||||
#define UA_STATUSCODE_BADFILTEROPERANDCOUNTMISMATCH 0x80c30000 // The number of operands provided for the filter operator was less then expected for the operand provided.
|
||||
#define UA_STATUSCODE_BADFILTEROPERANDINVALID 0x80490000 // The operand used in a content filter is not valid.
|
||||
#define UA_STATUSCODE_BADFILTERELEMENTINVALID 0x80c40000 // The referenced element is not a valid element in the content filter.
|
||||
#define UA_STATUSCODE_BADFILTERLITERALINVALID 0x80c50000 // The referenced literal is not a valid value.
|
||||
#define UA_STATUSCODE_BADCONTINUATIONPOINTINVALID 0x804a0000 // The continuation point provide is longer valid.
|
||||
#define UA_STATUSCODE_BADNOCONTINUATIONPOINTS 0x804b0000 // The operation could not be processed because all continuation points have been allocated.
|
||||
#define UA_STATUSCODE_BADREFERENCETYPEIDINVALID 0x804c0000 // The operation could not be processed because all continuation points have been allocated.
|
||||
#define UA_STATUSCODE_BADBROWSEDIRECTIONINVALID 0x804d0000 // The browse direction is not valid.
|
||||
#define UA_STATUSCODE_BADNODENOTINVIEW 0x804e0000 // The node is not part of the view.
|
||||
#define UA_STATUSCODE_BADSERVERURIINVALID 0x804f0000 // The ServerUri is not a valid URI.
|
||||
#define UA_STATUSCODE_BADSERVERNAMEMISSING 0x80500000 // No ServerName was specified.
|
||||
#define UA_STATUSCODE_BADDISCOVERYURLMISSING 0x80510000 // No DiscoveryUrl was specified.
|
||||
#define UA_STATUSCODE_BADSEMPAHOREFILEMISSING 0x80520000 // The semaphore file specified by the client is not valid.
|
||||
#define UA_STATUSCODE_BADREQUESTTYPEINVALID 0x80530000 // The security token request type is not valid.
|
||||
#define UA_STATUSCODE_BADSECURITYMODEREJECTED 0x80540000 // The security mode does not meet the requirements set by the Server.
|
||||
#define UA_STATUSCODE_BADSECURITYPOLICYREJECTED 0x80550000 // The security policy does not meet the requirements set by the Server.
|
||||
#define UA_STATUSCODE_BADTOOMANYSESSIONS 0x80560000 // The server has reached its maximum number of sessions.
|
||||
#define UA_STATUSCODE_BADUSERSIGNATUREINVALID 0x80570000 // The user token signature is missing or invalid.
|
||||
#define UA_STATUSCODE_BADAPPLICATIONSIGNATUREINVALID 0x80580000 // The signature generated with the client certificate is missing or invalid.
|
||||
#define UA_STATUSCODE_BADNOVALIDCERTIFICATES 0x80590000 // The client did not provide at least one software certificate that is valid and meets the profile requirements for the server.
|
||||
#define UA_STATUSCODE_BADIDENTITYCHANGENOTSUPPORTED 0x80c60000 // The Server does not support changing the user identity assigned to the session.
|
||||
#define UA_STATUSCODE_BADREQUESTCANCELLEDBYREQUEST 0x805a0000 // The request was canceled by the client with the Cancel service.
|
||||
#define UA_STATUSCODE_BADPARENTNODEIDINVALID 0x805b0000 // The parent node id does not to refer to a valid node.
|
||||
#define UA_STATUSCODE_BADREFERENCENOTALLOWED 0x805c0000 // The reference could not be created because it violates constraints imposed by the data model.
|
||||
#define UA_STATUSCODE_BADNODEIDREJECTED 0x805d0000 // The requested node id was reject because it was either invalid or server does not allow node ids to be specified by the client.
|
||||
#define UA_STATUSCODE_BADNODEIDEXISTS 0x805e0000 // The requested node id is already used by another node.
|
||||
#define UA_STATUSCODE_BADNODECLASSINVALID 0x805f0000 // The node class is not valid.
|
||||
#define UA_STATUSCODE_BADBROWSENAMEINVALID 0x80600000 // The browse name is invalid.
|
||||
#define UA_STATUSCODE_BADBROWSENAMEDUPLICATED 0x80610000 // The browse name is not unique among nodes that share the same relationship with the parent.
|
||||
#define UA_STATUSCODE_BADNODEATTRIBUTESINVALID 0x80620000 // The node attributes are not valid for the node class.
|
||||
#define UA_STATUSCODE_BADTYPEDEFINITIONINVALID 0x80630000 // The type definition node id does not reference an appropriate type node.
|
||||
#define UA_STATUSCODE_BADSOURCENODEIDINVALID 0x80640000 // The source node id does not reference a valid node.
|
||||
#define UA_STATUSCODE_BADTARGETNODEIDINVALID 0x80650000 // The target node id does not reference a valid node.
|
||||
#define UA_STATUSCODE_BADDUPLICATEREFERENCENOTALLOWED 0x80660000 // The reference type between the nodes is already defined.
|
||||
#define UA_STATUSCODE_BADINVALIDSELFREFERENCE 0x80670000 // The server does not allow this type of self reference on this node.
|
||||
#define UA_STATUSCODE_BADREFERENCELOCALONLY 0x80680000 // The reference type is not valid for a reference to a remote server.
|
||||
#define UA_STATUSCODE_BADNODELETERIGHTS 0x80690000 // The server will not allow the node to be deleted.
|
||||
#define UA_STATUSCODE_UNCERTAINREFERENCENOTDELETED 0x40bc0000 // The server was not able to delete all target references.
|
||||
#define UA_STATUSCODE_BADSERVERINDEXINVALID 0x806a0000 // The server index is not valid.
|
||||
#define UA_STATUSCODE_BADVIEWIDUNKNOWN 0x806b0000 // The view id does not refer to a valid view node.
|
||||
#define UA_STATUSCODE_BADVIEWTIMESTAMPINVALID 0x80c90000 // The view timestamp is not available or not supported.
|
||||
#define UA_STATUSCODE_BADVIEWPARAMETERMISMATCH 0x80ca0000 // The view parameters are not consistent with each other.
|
||||
#define UA_STATUSCODE_BADVIEWVERSIONINVALID 0x80cb0000 // The view version is not available or not supported.
|
||||
#define UA_STATUSCODE_UNCERTAINNOTALLNODESAVAILABLE 0x40c00000 // The list of references may not be complete because the underlying system is not available.
|
||||
#define UA_STATUSCODE_GOODRESULTSMAYBEINCOMPLETE 0x00ba0000 // The server should have followed a reference to a node in a remote server but did not. The result set may be incomplete.
|
||||
#define UA_STATUSCODE_BADNOTTYPEDEFINITION 0x80c80000 // The provided Nodeid was not a type definition nodeid.
|
||||
#define UA_STATUSCODE_UNCERTAINREFERENCEOUTOFSERVER 0x406c0000 // One of the references to follow in the relative path references to a node in the address space in another server.
|
||||
#define UA_STATUSCODE_BADTOOMANYMATCHES 0x806d0000 // The requested operation has too many matches to return.
|
||||
#define UA_STATUSCODE_BADQUERYTOOCOMPLEX 0x806e0000 // The requested operation requires too many resources in the server.
|
||||
#define UA_STATUSCODE_BADNOMATCH 0x806f0000 // The requested operation has no match to return.
|
||||
#define UA_STATUSCODE_BADMAXAGEINVALID 0x80700000 // The max age parameter is invalid.
|
||||
#define UA_STATUSCODE_BADHISTORYOPERATIONINVALID 0x80710000 // The history details parameter is not valid.
|
||||
#define UA_STATUSCODE_BADHISTORYOPERATIONUNSUPPORTED 0x80720000 // The server does not support the requested operation.
|
||||
#define UA_STATUSCODE_BADINVALIDTIMESTAMPARGUMENT 0x80bd0000 // The defined timestamp to return was invalid.
|
||||
#define UA_STATUSCODE_BADWRITENOTSUPPORTED 0x80730000 // The server not does support writing the combination of value status and timestamps provided.
|
||||
#define UA_STATUSCODE_BADTYPEMISMATCH 0x80740000 // The value supplied for the attribute is not of the same type as the attribute's value.
|
||||
#define UA_STATUSCODE_BADMETHODINVALID 0x80750000 // The method id does not refer to a method for the specified object.
|
||||
#define UA_STATUSCODE_BADARGUMENTSMISSING 0x80760000 // The client did not specify all of the input arguments for the method.
|
||||
#define UA_STATUSCODE_BADTOOMANYSUBSCRIPTIONS 0x80770000 // The server has reached its maximum number of subscriptions.
|
||||
#define UA_STATUSCODE_BADTOOMANYPUBLISHREQUESTS 0x80780000 // The server has reached the maximum number of queued publish requests.
|
||||
#define UA_STATUSCODE_BADNOSUBSCRIPTION 0x80790000 // There is no subscription available for this session.
|
||||
#define UA_STATUSCODE_BADSEQUENCENUMBERUNKNOWN 0x807a0000 // The sequence number is unknown to the server.
|
||||
#define UA_STATUSCODE_BADMESSAGENOTAVAILABLE 0x807b0000 // The requested notification message is no longer available.
|
||||
#define UA_STATUSCODE_BADINSUFFICIENTCLIENTPROFILE 0x807c0000 // The Client of the current Session does not support one or more Profiles that are necessary for the Subscription.
|
||||
#define UA_STATUSCODE_BADSTATENOTACTIVE 0x80bf0000 // The sub-state machine is not currently active.
|
||||
#define UA_STATUSCODE_BADTCPSERVERTOOBUSY 0x807d0000 // The server cannot process the request because it is too busy.
|
||||
#define UA_STATUSCODE_BADTCPMESSAGETYPEINVALID 0x807e0000 // The type of the message specified in the header invalid.
|
||||
#define UA_STATUSCODE_BADTCPSECURECHANNELUNKNOWN 0x807f0000 // The SecureChannelId and/or TokenId are not currently in use.
|
||||
#define UA_STATUSCODE_BADTCPMESSAGETOOLARGE 0x80800000 // The size of the message specified in the header is too large.
|
||||
#define UA_STATUSCODE_BADTCPNOTENOUGHRESOURCES 0x80810000 // There are not enough resources to process the request.
|
||||
#define UA_STATUSCODE_BADTCPINTERNALERROR 0x80820000 // An internal error occurred.
|
||||
#define UA_STATUSCODE_BADTCPENDPOINTURLINVALID 0x80830000 // The Server does not recognize the QueryString specified.
|
||||
#define UA_STATUSCODE_BADREQUESTINTERRUPTED 0x80840000 // The request could not be sent because of a network interruption.
|
||||
#define UA_STATUSCODE_BADREQUESTTIMEOUT 0x80850000 // Timeout occurred while processing the request.
|
||||
#define UA_STATUSCODE_BADSECURECHANNELCLOSED 0x80860000 // The secure channel has been closed.
|
||||
#define UA_STATUSCODE_BADSECURECHANNELTOKENUNKNOWN 0x80870000 // The token has expired or is not recognized.
|
||||
#define UA_STATUSCODE_BADSEQUENCENUMBERINVALID 0x80880000 // The sequence number is not valid.
|
||||
#define UA_STATUSCODE_BADPROTOCOLVERSIONUNSUPPORTED 0x80be0000 // The applications do not have compatible protocol versions.
|
||||
#define UA_STATUSCODE_BADCONFIGURATIONERROR 0x80890000 // There is a problem with the configuration that affects the usefulness of the value.
|
||||
#define UA_STATUSCODE_BADNOTCONNECTED 0x808a0000 // The variable should receive its value from another variable but has never been configured to do so.
|
||||
#define UA_STATUSCODE_BADDEVICEFAILURE 0x808b0000 // There has been a failure in the device/data source that generates the value that has affected the value.
|
||||
#define UA_STATUSCODE_BADSENSORFAILURE 0x808c0000 // There has been a failure in the sensor from which the value is derived by the device/data source.
|
||||
#define UA_STATUSCODE_BADOUTOFSERVICE 0x808d0000 // The source of the data is not operational.
|
||||
#define UA_STATUSCODE_BADDEADBANDFILTERINVALID 0x808e0000 // The deadband filter is not valid.
|
||||
#define UA_STATUSCODE_UNCERTAINNOCOMMUNICATIONLASTUSABLEVALUE 0x408f0000 // Communication to the data source has failed. The variable value is the last value that had a good quality.
|
||||
#define UA_STATUSCODE_UNCERTAINLASTUSABLEVALUE 0x40900000 // Whatever was updating this value has stopped doing so.
|
||||
#define UA_STATUSCODE_UNCERTAINSUBSTITUTEVALUE 0x40910000 // The value is an operational value that was manually overwritten.
|
||||
#define UA_STATUSCODE_UNCERTAININITIALVALUE 0x40920000 // The value is an initial value for a variable that normally receives its value from another variable.
|
||||
#define UA_STATUSCODE_UNCERTAINSENSORNOTACCURATE 0x40930000 // The value is at one of the sensor limits.
|
||||
#define UA_STATUSCODE_UNCERTAINENGINEERINGUNITSEXCEEDED 0x40940000 // The value is outside of the range of values defined for this parameter.
|
||||
#define UA_STATUSCODE_UNCERTAINSUBNORMAL 0x40950000 // The value is derived from multiple sources and has less than the required number of Good sources.
|
||||
#define UA_STATUSCODE_GOODLOCALOVERRIDE 0x00960000 // The value has been overridden.
|
||||
#define UA_STATUSCODE_BADREFRESHINPROGRESS 0x80970000 // This Condition refresh failed a Condition refresh operation is already in progress.
|
||||
#define UA_STATUSCODE_BADCONDITIONALREADYDISABLED 0x80980000 // This condition has already been disabled.
|
||||
#define UA_STATUSCODE_BADCONDITIONALREADYENABLED 0x80cc0000 // This condition has already been enabled.
|
||||
#define UA_STATUSCODE_BADCONDITIONDISABLED 0x80990000 // Property not available this condition is disabled.
|
||||
#define UA_STATUSCODE_BADEVENTIDUNKNOWN 0x809a0000 // The specified event id is not recognized.
|
||||
#define UA_STATUSCODE_BADEVENTNOTACKNOWLEDGEABLE 0x80bb0000 // The event cannot be acknowledged.
|
||||
#define UA_STATUSCODE_BADDIALOGNOTACTIVE 0x80cd0000 // The dialog condition is not active.
|
||||
#define UA_STATUSCODE_BADDIALOGRESPONSEINVALID 0x80ce0000 // The response is not valid for the dialog.
|
||||
#define UA_STATUSCODE_BADCONDITIONBRANCHALREADYACKED 0x80cf0000 // The condition branch has already been acknowledged.
|
||||
#define UA_STATUSCODE_BADCONDITIONBRANCHALREADYCONFIRMED 0x80d00000 // The condition branch has already been confirmed.
|
||||
#define UA_STATUSCODE_BADCONDITIONALREADYSHELVED 0x80d10000 // The condition has already been shelved.
|
||||
#define UA_STATUSCODE_BADCONDITIONNOTSHELVED 0x80d20000 // The condition is not currently shelved.
|
||||
#define UA_STATUSCODE_BADSHELVINGTIMEOUTOFRANGE 0x80d30000 // The shelving time not within an acceptable range.
|
||||
#define UA_STATUSCODE_BADNODATA 0x809b0000 // No data exists for the requested time range or event filter.
|
||||
#define UA_STATUSCODE_BADBOUNDNOTFOUND 0x80d70000 // No data found to provide upper or lower bound value.
|
||||
#define UA_STATUSCODE_BADBOUNDNOTSUPPORTED 0x80d80000 // The server cannot retrieve a bound for the variable.
|
||||
#define UA_STATUSCODE_BADDATALOST 0x809d0000 // Data is missing due to collection started/stopped/lost.
|
||||
#define UA_STATUSCODE_BADDATAUNAVAILABLE 0x809e0000 // Expected data is unavailable for the requested time range due to an un-mounted volume, an off-line archive or tape or similar reason for temporary unavailability.
|
||||
#define UA_STATUSCODE_BADENTRYEXISTS 0x809f0000 // The data or event was not successfully inserted because a matching entry exists.
|
||||
#define UA_STATUSCODE_BADNOENTRYEXISTS 0x80a00000 // The data or event was not successfully updated because no matching entry exists.
|
||||
#define UA_STATUSCODE_BADTIMESTAMPNOTSUPPORTED 0x80a10000 // The client requested history using a timestamp format the server does not support (i.e requested ServerTimestamp when server only supports SourceTimestamp).
|
||||
#define UA_STATUSCODE_GOODENTRYINSERTED 0x00a20000 // The data or event was successfully inserted into the historical database.
|
||||
#define UA_STATUSCODE_GOODENTRYREPLACED 0x00a30000 // The data or event field was successfully replaced in the historical database.
|
||||
#define UA_STATUSCODE_UNCERTAINDATASUBNORMAL 0x40a40000 // The value is derived from multiple values and has less than the required number of Good values.
|
||||
#define UA_STATUSCODE_GOODNODATA 0x00a50000 // No data exists for the requested time range or event filter.
|
||||
#define UA_STATUSCODE_GOODMOREDATA 0x00a60000 // The data or event field was successfully replaced in the historical database.
|
||||
#define UA_STATUSCODE_BADAGGREGATELISTMISMATCH 0x80d40000 // The requested number of Aggregates does not match the requested number of NodeIds.
|
||||
#define UA_STATUSCODE_BADAGGREGATENOTSUPPORTED 0x80d50000 // The requested Aggregate is not support by the server.
|
||||
#define UA_STATUSCODE_BADAGGREGATEINVALIDINPUTS 0x80d60000 // The aggregate value could not be derived due to invalid data inputs.
|
||||
#define UA_STATUSCODE_BADAGGREGATECONFIGURATIONREJECTED 0x80da0000 // The aggregate configuration is not valid for specified node.
|
||||
#define UA_STATUSCODE_GOODDATAIGNORED 0x00d90000 // The request specifies fields which are not valid for the EventType or cannot be saved by the historian.
|
||||
#define UA_STATUSCODE_GOODCOMMUNICATIONEVENT 0x00a70000 // The communication layer has raised an event.
|
||||
#define UA_STATUSCODE_GOODSHUTDOWNEVENT 0x00a80000 // The system is shutting down.
|
||||
#define UA_STATUSCODE_GOODCALLAGAIN 0x00a90000 // The operation is not finished and needs to be called again.
|
||||
#define UA_STATUSCODE_GOODNONCRITICALTIMEOUT 0x00aa0000 // A non-critical timeout occurred.
|
||||
#define UA_STATUSCODE_BADINVALIDARGUMENT 0x80ab0000 // One or more arguments are invalid.
|
||||
#define UA_STATUSCODE_BADCONNECTIONREJECTED 0x80ac0000 // Could not establish a network connection to remote server.
|
||||
#define UA_STATUSCODE_BADDISCONNECT 0x80ad0000 // The server has disconnected from the client.
|
||||
#define UA_STATUSCODE_BADCONNECTIONCLOSED 0x80ae0000 // The network connection has been closed.
|
||||
#define UA_STATUSCODE_BADINVALIDSTATE 0x80af0000 // The operation cannot be completed because the object is closed uninitialized or in some other invalid state.
|
||||
#define UA_STATUSCODE_BADENDOFSTREAM 0x80b00000 // Cannot move beyond end of the stream.
|
||||
#define UA_STATUSCODE_BADNODATAAVAILABLE 0x80b10000 // No data is currently available for reading from a non-blocking stream.
|
||||
#define UA_STATUSCODE_BADWAITINGFORRESPONSE 0x80b20000 // The asynchronous operation is waiting for a response.
|
||||
#define UA_STATUSCODE_BADOPERATIONABANDONED 0x80b30000 // The asynchronous operation was abandoned by the caller.
|
||||
#define UA_STATUSCODE_BADEXPECTEDSTREAMTOBLOCK 0x80b40000 // The stream did not return all data requested (possibly because it is a non-blocking stream).
|
||||
#define UA_STATUSCODE_BADWOULDBLOCK 0x80b50000 // Non blocking behaviour is required and the operation would block.
|
||||
#define UA_STATUSCODE_BADSYNTAXERROR 0x80b60000 // A value had an invalid syntax.
|
||||
#define UA_STATUSCODE_BADMAXCONNECTIONSREACHED 0x80b70000 // The operation could not be finished because all available connections are in use.
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif /* UA_CONSTANTS_H_ */
|
57
include/ua_job.h
Normal file
57
include/ua_job.h
Normal file
@ -0,0 +1,57 @@
|
||||
/*
|
||||
* Copyright (C) 2014 the contributors as stated in the AUTHORS file
|
||||
*
|
||||
* This file is part of open62541. open62541 is free software: you can
|
||||
* redistribute it and/or modify it under the terms of the GNU Lesser General
|
||||
* Public License, version 3 (as published by the Free Software Foundation) with
|
||||
* a static linking exception as stated in the LICENSE file provided with
|
||||
* open62541.
|
||||
*
|
||||
* open62541 is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
* A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*/
|
||||
|
||||
#ifndef UA_JOB_H_
|
||||
#define UA_JOB_H_
|
||||
|
||||
#include "ua_connection.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct UA_Server;
|
||||
typedef struct UA_Server UA_Server;
|
||||
|
||||
typedef void (*UA_ServerCallback)(UA_Server *server, void *data);
|
||||
|
||||
/** Jobs describe work that is executed once or repeatedly in the server */
|
||||
typedef struct {
|
||||
enum {
|
||||
UA_JOBTYPE_NOTHING, ///< Guess what?
|
||||
UA_JOBTYPE_DETACHCONNECTION, ///< Detach the connection from the secure channel (but don't delete it)
|
||||
UA_JOBTYPE_BINARYMESSAGE_NETWORKLAYER, ///< The binary message is memory managed by the networklayer
|
||||
UA_JOBTYPE_BINARYMESSAGE_ALLOCATED, ///< The binary message was relocated away from the networklayer
|
||||
UA_JOBTYPE_METHODCALL, ///< Call the method as soon as possible
|
||||
UA_JOBTYPE_METHODCALL_DELAYED, ///< Call the method as soon as all previous jobs have finished
|
||||
} type;
|
||||
union {
|
||||
UA_Connection *closeConnection;
|
||||
struct {
|
||||
UA_Connection *connection;
|
||||
UA_ByteString message;
|
||||
} binaryMessage;
|
||||
struct {
|
||||
void *data;
|
||||
UA_ServerCallback method;
|
||||
} methodCall;
|
||||
} job;
|
||||
} UA_Job;
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif /* UA_JOB_H_ */
|
109
include/ua_log.h
Normal file
109
include/ua_log.h
Normal file
@ -0,0 +1,109 @@
|
||||
/*
|
||||
* Copyright (C) 2014-2016 the contributors as stated in the AUTHORS file
|
||||
*
|
||||
* This file is part of open62541. open62541 is free software: you can
|
||||
* redistribute it and/or modify it under the terms of the GNU Lesser General
|
||||
* Public License, version 3 (as published by the Free Software Foundation) with
|
||||
* a static linking exception as stated in the LICENSE file provided with
|
||||
* open62541.
|
||||
*
|
||||
* open62541 is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
* A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*/
|
||||
|
||||
#ifndef UA_LOG_H_
|
||||
#define UA_LOG_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "ua_config.h"
|
||||
|
||||
/**
|
||||
* Logging
|
||||
* -------
|
||||
* Servers and clients may contain a logger. Every logger needs to implement the
|
||||
* `UA_Logger` signature. An example logger that writes to stdout is provided in
|
||||
* the plugins folder.
|
||||
*
|
||||
* Every log-message consists of a log-level, a log-category and a string
|
||||
* message content. The timestamp of the log-message is created within the
|
||||
* logger.
|
||||
*/
|
||||
|
||||
typedef enum {
|
||||
UA_LOGLEVEL_TRACE,
|
||||
UA_LOGLEVEL_DEBUG,
|
||||
UA_LOGLEVEL_INFO,
|
||||
UA_LOGLEVEL_WARNING,
|
||||
UA_LOGLEVEL_ERROR,
|
||||
UA_LOGLEVEL_FATAL
|
||||
} UA_LogLevel;
|
||||
|
||||
typedef enum {
|
||||
UA_LOGCATEGORY_NETWORK,
|
||||
UA_LOGCATEGORY_SECURECHANNEL,
|
||||
UA_LOGCATEGORY_SESSION,
|
||||
UA_LOGCATEGORY_SERVER,
|
||||
UA_LOGCATEGORY_CLIENT,
|
||||
UA_LOGCATEGORY_USERLAND
|
||||
} UA_LogCategory;
|
||||
|
||||
/**
|
||||
* The signature of the logger. The msg string and following varargs are
|
||||
* formatted according to the rules of the printf command.
|
||||
*
|
||||
* Do not use the logger directly but make use of the following macros that take
|
||||
* the minimum log-level defined in ua_config.h into account. */
|
||||
typedef void (*UA_Logger)(UA_LogLevel level, UA_LogCategory category, const char *msg, ...);
|
||||
|
||||
#if UA_LOGLEVEL <= 100
|
||||
#define UA_LOG_TRACE(LOGGER, CATEGORY, ...) do { \
|
||||
if(LOGGER) LOGGER(UA_LOGLEVEL_TRACE, CATEGORY, __VA_ARGS__); } while(0)
|
||||
#else
|
||||
#define UA_LOG_TRACE(LOGGER, CATEGORY, ...) do {} while(0)
|
||||
#endif
|
||||
|
||||
#if UA_LOGLEVEL <= 200
|
||||
#define UA_LOG_DEBUG(LOGGER, CATEGORY, ...) do { \
|
||||
if(LOGGER) LOGGER(UA_LOGLEVEL_DEBUG, CATEGORY, __VA_ARGS__); } while(0)
|
||||
#else
|
||||
#define UA_LOG_DEBUG(LOGGER, CATEGORY, ...) do {} while(0)
|
||||
#endif
|
||||
|
||||
#if UA_LOGLEVEL <= 300
|
||||
#define UA_LOG_INFO(LOGGER, CATEGORY, ...) do { \
|
||||
if(LOGGER) LOGGER(UA_LOGLEVEL_INFO, CATEGORY, __VA_ARGS__); } while(0)
|
||||
#else
|
||||
#define UA_LOG_INFO(LOGGER, CATEGORY, ...) do {} while(0)
|
||||
#endif
|
||||
|
||||
#if UA_LOGLEVEL <= 400
|
||||
#define UA_LOG_WARNING(LOGGER, CATEGORY, ...) do { \
|
||||
if(LOGGER) LOGGER(UA_LOGLEVEL_WARNING, CATEGORY, __VA_ARGS__); } while(0)
|
||||
#else
|
||||
#define UA_LOG_WARNING(LOGGER, CATEGORY, ...) do {} while(0)
|
||||
#endif
|
||||
|
||||
#if UA_LOGLEVEL <= 500
|
||||
#define UA_LOG_ERROR(LOGGER, CATEGORY, ...) do { \
|
||||
if(LOGGER) LOGGER(UA_LOGLEVEL_ERROR, CATEGORY, __VA_ARGS__); } while(0)
|
||||
#else
|
||||
#define UA_LOG_ERROR(LOGGER, CATEGORY, ...) do {} while(0)
|
||||
#endif
|
||||
|
||||
#if UA_LOGLEVEL <= 600
|
||||
#define UA_LOG_FATAL(LOGGER, CATEGORY, ...) do { \
|
||||
if(LOGGER) LOGGER(UA_LOGLEVEL_FATAL, CATEGORY, __VA_ARGS__); } while(0)
|
||||
#else
|
||||
#define UA_LOG_FATAL(LOGGER, CATEGORY, ...) do {} while(0)
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif /* UA_LOG_H_ */
|
703
include/ua_nodeids.h
Normal file
703
include/ua_nodeids.h
Normal file
@ -0,0 +1,703 @@
|
||||
/**********************************************************
|
||||
* /home/wn/Sources/open62541-open62541-395ce48/build/src_generated/ua_nodeids.hgen -- do not modify
|
||||
**********************************************************
|
||||
* Generated from /home/wn/Sources/open62541-open62541-395ce48/tools/schema/NodeIds.csv with script /home/wn/Sources/open62541-open62541-395ce48/tools/generate_nodeids.py
|
||||
* on host debianX by user wn at 2016-06-08 10:05:20
|
||||
**********************************************************/
|
||||
|
||||
#ifndef UA_NODEIDS_H_
|
||||
#define UA_NODEIDS_H_
|
||||
|
||||
#define UA_NS0ID_BOOLEAN 1 // DataType
|
||||
#define UA_NS0ID_SBYTE 2 // DataType
|
||||
#define UA_NS0ID_BYTE 3 // DataType
|
||||
#define UA_NS0ID_INT16 4 // DataType
|
||||
#define UA_NS0ID_UINT16 5 // DataType
|
||||
#define UA_NS0ID_INT32 6 // DataType
|
||||
#define UA_NS0ID_UINT32 7 // DataType
|
||||
#define UA_NS0ID_INT64 8 // DataType
|
||||
#define UA_NS0ID_UINT64 9 // DataType
|
||||
#define UA_NS0ID_FLOAT 10 // DataType
|
||||
#define UA_NS0ID_DOUBLE 11 // DataType
|
||||
#define UA_NS0ID_STRING 12 // DataType
|
||||
#define UA_NS0ID_DATETIME 13 // DataType
|
||||
#define UA_NS0ID_GUID 14 // DataType
|
||||
#define UA_NS0ID_BYTESTRING 15 // DataType
|
||||
#define UA_NS0ID_XMLELEMENT 16 // DataType
|
||||
#define UA_NS0ID_NODEID 17 // DataType
|
||||
#define UA_NS0ID_EXPANDEDNODEID 18 // DataType
|
||||
#define UA_NS0ID_STATUSCODE 19 // DataType
|
||||
#define UA_NS0ID_QUALIFIEDNAME 20 // DataType
|
||||
#define UA_NS0ID_LOCALIZEDTEXT 21 // DataType
|
||||
#define UA_NS0ID_STRUCTURE 22 // DataType
|
||||
#define UA_NS0ID_DATAVALUE 23 // DataType
|
||||
#define UA_NS0ID_BASEDATATYPE 24 // DataType
|
||||
#define UA_NS0ID_DIAGNOSTICINFO 25 // DataType
|
||||
#define UA_NS0ID_NUMBER 26 // DataType
|
||||
#define UA_NS0ID_INTEGER 27 // DataType
|
||||
#define UA_NS0ID_UINTEGER 28 // DataType
|
||||
#define UA_NS0ID_ENUMERATION 29 // DataType
|
||||
#define UA_NS0ID_IMAGE 30 // DataType
|
||||
#define UA_NS0ID_REFERENCES 31 // ReferenceType
|
||||
#define UA_NS0ID_NONHIERARCHICALREFERENCES 32 // ReferenceType
|
||||
#define UA_NS0ID_HIERARCHICALREFERENCES 33 // ReferenceType
|
||||
#define UA_NS0ID_HASCHILD 34 // ReferenceType
|
||||
#define UA_NS0ID_ORGANIZES 35 // ReferenceType
|
||||
#define UA_NS0ID_HASEVENTSOURCE 36 // ReferenceType
|
||||
#define UA_NS0ID_HASMODELLINGRULE 37 // ReferenceType
|
||||
#define UA_NS0ID_HASENCODING 38 // ReferenceType
|
||||
#define UA_NS0ID_HASDESCRIPTION 39 // ReferenceType
|
||||
#define UA_NS0ID_HASTYPEDEFINITION 40 // ReferenceType
|
||||
#define UA_NS0ID_GENERATESEVENT 41 // ReferenceType
|
||||
#define UA_NS0ID_AGGREGATES 44 // ReferenceType
|
||||
#define UA_NS0ID_HASSUBTYPE 45 // ReferenceType
|
||||
#define UA_NS0ID_HASPROPERTY 46 // ReferenceType
|
||||
#define UA_NS0ID_HASCOMPONENT 47 // ReferenceType
|
||||
#define UA_NS0ID_HASNOTIFIER 48 // ReferenceType
|
||||
#define UA_NS0ID_HASORDEREDCOMPONENT 49 // ReferenceType
|
||||
#define UA_NS0ID_FROMSTATE 51 // ReferenceType
|
||||
#define UA_NS0ID_TOSTATE 52 // ReferenceType
|
||||
#define UA_NS0ID_HASCAUSE 53 // ReferenceType
|
||||
#define UA_NS0ID_HASEFFECT 54 // ReferenceType
|
||||
#define UA_NS0ID_HASHISTORICALCONFIGURATION 56 // ReferenceType
|
||||
#define UA_NS0ID_BASEOBJECTTYPE 58 // ObjectType
|
||||
#define UA_NS0ID_FOLDERTYPE 61 // ObjectType
|
||||
#define UA_NS0ID_BASEVARIABLETYPE 62 // VariableType
|
||||
#define UA_NS0ID_BASEDATAVARIABLETYPE 63 // VariableType
|
||||
#define UA_NS0ID_PROPERTYTYPE 68 // VariableType
|
||||
#define UA_NS0ID_DATATYPEDESCRIPTIONTYPE 69 // VariableType
|
||||
#define UA_NS0ID_DATATYPEDICTIONARYTYPE 72 // VariableType
|
||||
#define UA_NS0ID_DATATYPESYSTEMTYPE 75 // ObjectType
|
||||
#define UA_NS0ID_DATATYPEENCODINGTYPE 76 // ObjectType
|
||||
#define UA_NS0ID_MODELLINGRULETYPE 77 // ObjectType
|
||||
#define UA_NS0ID_MODELLINGRULE_MANDATORY 78 // Object
|
||||
#define UA_NS0ID_MODELLINGRULE_MANDATORYSHARED 79 // Object
|
||||
#define UA_NS0ID_MODELLINGRULE_OPTIONAL 80 // Object
|
||||
#define UA_NS0ID_MODELLINGRULE_EXPOSESITSARRAY 83 // Object
|
||||
#define UA_NS0ID_ROOTFOLDER 84 // Object
|
||||
#define UA_NS0ID_OBJECTSFOLDER 85 // Object
|
||||
#define UA_NS0ID_TYPESFOLDER 86 // Object
|
||||
#define UA_NS0ID_VIEWSFOLDER 87 // Object
|
||||
#define UA_NS0ID_OBJECTTYPESFOLDER 88 // Object
|
||||
#define UA_NS0ID_VARIABLETYPESFOLDER 89 // Object
|
||||
#define UA_NS0ID_DATATYPESFOLDER 90 // Object
|
||||
#define UA_NS0ID_REFERENCETYPESFOLDER 91 // Object
|
||||
#define UA_NS0ID_XMLSCHEMA_TYPESYSTEM 92 // Object
|
||||
#define UA_NS0ID_OPCBINARYSCHEMA_TYPESYSTEM 93 // Object
|
||||
#define UA_NS0ID_MODELLINGRULE_MANDATORY_NAMINGRULE 112 // Variable
|
||||
#define UA_NS0ID_MODELLINGRULE_OPTIONAL_NAMINGRULE 113 // Variable
|
||||
#define UA_NS0ID_MODELLINGRULE_EXPOSESITSARRAY_NAMINGRULE 114 // Variable
|
||||
#define UA_NS0ID_MODELLINGRULE_MANDATORYSHARED_NAMINGRULE 116 // Variable
|
||||
#define UA_NS0ID_HASSUBSTATEMACHINE 117 // ReferenceType
|
||||
#define UA_NS0ID_NAMINGRULETYPE 120 // DataType
|
||||
#define UA_NS0ID_IDTYPE 256 // DataType
|
||||
#define UA_NS0ID_NODECLASS 257 // DataType
|
||||
#define UA_NS0ID_NODE 258 // DataType
|
||||
#define UA_NS0ID_OBJECTNODE 261 // DataType
|
||||
#define UA_NS0ID_OBJECTTYPENODE 264 // DataType
|
||||
#define UA_NS0ID_VARIABLENODE 267 // DataType
|
||||
#define UA_NS0ID_VARIABLETYPENODE 270 // DataType
|
||||
#define UA_NS0ID_REFERENCETYPENODE 273 // DataType
|
||||
#define UA_NS0ID_METHODNODE 276 // DataType
|
||||
#define UA_NS0ID_VIEWNODE 279 // DataType
|
||||
#define UA_NS0ID_DATATYPENODE 282 // DataType
|
||||
#define UA_NS0ID_REFERENCENODE 285 // DataType
|
||||
#define UA_NS0ID_INTEGERID 288 // DataType
|
||||
#define UA_NS0ID_COUNTER 289 // DataType
|
||||
#define UA_NS0ID_DURATION 290 // DataType
|
||||
#define UA_NS0ID_NUMERICRANGE 291 // DataType
|
||||
#define UA_NS0ID_TIME 292 // DataType
|
||||
#define UA_NS0ID_DATE 293 // DataType
|
||||
#define UA_NS0ID_UTCTIME 294 // DataType
|
||||
#define UA_NS0ID_LOCALEID 295 // DataType
|
||||
#define UA_NS0ID_ARGUMENT 296 // DataType
|
||||
#define UA_NS0ID_STATUSRESULT 299 // DataType
|
||||
#define UA_NS0ID_MESSAGESECURITYMODE 302 // DataType
|
||||
#define UA_NS0ID_USERTOKENTYPE 303 // DataType
|
||||
#define UA_NS0ID_USERTOKENPOLICY 304 // DataType
|
||||
#define UA_NS0ID_APPLICATIONTYPE 307 // DataType
|
||||
#define UA_NS0ID_APPLICATIONDESCRIPTION 308 // DataType
|
||||
#define UA_NS0ID_APPLICATIONINSTANCECERTIFICATE 311 // DataType
|
||||
#define UA_NS0ID_ENDPOINTDESCRIPTION 312 // DataType
|
||||
#define UA_NS0ID_SECURITYTOKENREQUESTTYPE 315 // DataType
|
||||
#define UA_NS0ID_USERIDENTITYTOKEN 316 // DataType
|
||||
#define UA_NS0ID_ANONYMOUSIDENTITYTOKEN 319 // DataType
|
||||
#define UA_NS0ID_USERNAMEIDENTITYTOKEN 322 // DataType
|
||||
#define UA_NS0ID_X509IDENTITYTOKEN 325 // DataType
|
||||
#define UA_NS0ID_ENDPOINTCONFIGURATION 331 // DataType
|
||||
#define UA_NS0ID_COMPLIANCELEVEL 334 // DataType
|
||||
#define UA_NS0ID_SUPPORTEDPROFILE 335 // DataType
|
||||
#define UA_NS0ID_BUILDINFO 338 // DataType
|
||||
#define UA_NS0ID_SOFTWARECERTIFICATE 341 // DataType
|
||||
#define UA_NS0ID_SIGNEDSOFTWARECERTIFICATE 344 // DataType
|
||||
#define UA_NS0ID_ATTRIBUTEWRITEMASK 347 // DataType
|
||||
#define UA_NS0ID_NODEATTRIBUTESMASK 348 // DataType
|
||||
#define UA_NS0ID_NODEATTRIBUTES 349 // DataType
|
||||
#define UA_NS0ID_OBJECTATTRIBUTES 352 // DataType
|
||||
#define UA_NS0ID_VARIABLEATTRIBUTES 355 // DataType
|
||||
#define UA_NS0ID_METHODATTRIBUTES 358 // DataType
|
||||
#define UA_NS0ID_OBJECTTYPEATTRIBUTES 361 // DataType
|
||||
#define UA_NS0ID_VARIABLETYPEATTRIBUTES 364 // DataType
|
||||
#define UA_NS0ID_REFERENCETYPEATTRIBUTES 367 // DataType
|
||||
#define UA_NS0ID_DATATYPEATTRIBUTES 370 // DataType
|
||||
#define UA_NS0ID_VIEWATTRIBUTES 373 // DataType
|
||||
#define UA_NS0ID_ADDNODESITEM 376 // DataType
|
||||
#define UA_NS0ID_ADDREFERENCESITEM 379 // DataType
|
||||
#define UA_NS0ID_DELETENODESITEM 382 // DataType
|
||||
#define UA_NS0ID_DELETEREFERENCESITEM 385 // DataType
|
||||
#define UA_NS0ID_SESSIONAUTHENTICATIONTOKEN 388 // DataType
|
||||
#define UA_NS0ID_REQUESTHEADER 389 // DataType
|
||||
#define UA_NS0ID_RESPONSEHEADER 392 // DataType
|
||||
#define UA_NS0ID_SERVICEFAULT 395 // DataType
|
||||
#define UA_NS0ID_FINDSERVERSREQUEST 420 // DataType
|
||||
#define UA_NS0ID_FINDSERVERSRESPONSE 423 // DataType
|
||||
#define UA_NS0ID_GETENDPOINTSREQUEST 426 // DataType
|
||||
#define UA_NS0ID_GETENDPOINTSRESPONSE 429 // DataType
|
||||
#define UA_NS0ID_REGISTEREDSERVER 432 // DataType
|
||||
#define UA_NS0ID_REGISTERSERVERREQUEST 435 // DataType
|
||||
#define UA_NS0ID_REGISTERSERVERRESPONSE 438 // DataType
|
||||
#define UA_NS0ID_CHANNELSECURITYTOKEN 441 // DataType
|
||||
#define UA_NS0ID_OPENSECURECHANNELREQUEST 444 // DataType
|
||||
#define UA_NS0ID_OPENSECURECHANNELRESPONSE 447 // DataType
|
||||
#define UA_NS0ID_CLOSESECURECHANNELREQUEST 450 // DataType
|
||||
#define UA_NS0ID_CLOSESECURECHANNELRESPONSE 453 // DataType
|
||||
#define UA_NS0ID_SIGNATUREDATA 456 // DataType
|
||||
#define UA_NS0ID_CREATESESSIONREQUEST 459 // DataType
|
||||
#define UA_NS0ID_CREATESESSIONRESPONSE 462 // DataType
|
||||
#define UA_NS0ID_ACTIVATESESSIONREQUEST 465 // DataType
|
||||
#define UA_NS0ID_ACTIVATESESSIONRESPONSE 468 // DataType
|
||||
#define UA_NS0ID_CLOSESESSIONREQUEST 471 // DataType
|
||||
#define UA_NS0ID_CLOSESESSIONRESPONSE 474 // DataType
|
||||
#define UA_NS0ID_CANCELREQUEST 477 // DataType
|
||||
#define UA_NS0ID_CANCELRESPONSE 480 // DataType
|
||||
#define UA_NS0ID_ADDNODESRESULT 483 // DataType
|
||||
#define UA_NS0ID_ADDNODESREQUEST 486 // DataType
|
||||
#define UA_NS0ID_ADDNODESRESPONSE 489 // DataType
|
||||
#define UA_NS0ID_ADDREFERENCESREQUEST 492 // DataType
|
||||
#define UA_NS0ID_ADDREFERENCESRESPONSE 495 // DataType
|
||||
#define UA_NS0ID_DELETENODESREQUEST 498 // DataType
|
||||
#define UA_NS0ID_DELETENODESRESPONSE 501 // DataType
|
||||
#define UA_NS0ID_DELETEREFERENCESREQUEST 504 // DataType
|
||||
#define UA_NS0ID_DELETEREFERENCESRESPONSE 507 // DataType
|
||||
#define UA_NS0ID_BROWSEDIRECTION 510 // DataType
|
||||
#define UA_NS0ID_VIEWDESCRIPTION 511 // DataType
|
||||
#define UA_NS0ID_BROWSEDESCRIPTION 514 // DataType
|
||||
#define UA_NS0ID_BROWSERESULTMASK 517 // DataType
|
||||
#define UA_NS0ID_REFERENCEDESCRIPTION 518 // DataType
|
||||
#define UA_NS0ID_CONTINUATIONPOINT 521 // DataType
|
||||
#define UA_NS0ID_BROWSERESULT 522 // DataType
|
||||
#define UA_NS0ID_BROWSEREQUEST 525 // DataType
|
||||
#define UA_NS0ID_BROWSERESPONSE 528 // DataType
|
||||
#define UA_NS0ID_BROWSENEXTREQUEST 531 // DataType
|
||||
#define UA_NS0ID_BROWSENEXTRESPONSE 534 // DataType
|
||||
#define UA_NS0ID_RELATIVEPATHELEMENT 537 // DataType
|
||||
#define UA_NS0ID_RELATIVEPATH 540 // DataType
|
||||
#define UA_NS0ID_BROWSEPATH 543 // DataType
|
||||
#define UA_NS0ID_BROWSEPATHTARGET 546 // DataType
|
||||
#define UA_NS0ID_BROWSEPATHRESULT 549 // DataType
|
||||
#define UA_NS0ID_TRANSLATEBROWSEPATHSTONODEIDSREQUEST 552 // DataType
|
||||
#define UA_NS0ID_TRANSLATEBROWSEPATHSTONODEIDSRESPONSE 555 // DataType
|
||||
#define UA_NS0ID_REGISTERNODESREQUEST 558 // DataType
|
||||
#define UA_NS0ID_REGISTERNODESRESPONSE 561 // DataType
|
||||
#define UA_NS0ID_UNREGISTERNODESREQUEST 564 // DataType
|
||||
#define UA_NS0ID_UNREGISTERNODESRESPONSE 567 // DataType
|
||||
#define UA_NS0ID_QUERYDATADESCRIPTION 570 // DataType
|
||||
#define UA_NS0ID_NODETYPEDESCRIPTION 573 // DataType
|
||||
#define UA_NS0ID_FILTEROPERATOR 576 // DataType
|
||||
#define UA_NS0ID_QUERYDATASET 577 // DataType
|
||||
#define UA_NS0ID_NODEREFERENCE 580 // DataType
|
||||
#define UA_NS0ID_CONTENTFILTERELEMENT 583 // DataType
|
||||
#define UA_NS0ID_CONTENTFILTER 586 // DataType
|
||||
#define UA_NS0ID_FILTEROPERAND 589 // DataType
|
||||
#define UA_NS0ID_ELEMENTOPERAND 592 // DataType
|
||||
#define UA_NS0ID_LITERALOPERAND 595 // DataType
|
||||
#define UA_NS0ID_ATTRIBUTEOPERAND 598 // DataType
|
||||
#define UA_NS0ID_SIMPLEATTRIBUTEOPERAND 601 // DataType
|
||||
#define UA_NS0ID_CONTENTFILTERELEMENTRESULT 604 // DataType
|
||||
#define UA_NS0ID_CONTENTFILTERRESULT 607 // DataType
|
||||
#define UA_NS0ID_PARSINGRESULT 610 // DataType
|
||||
#define UA_NS0ID_QUERYFIRSTREQUEST 613 // DataType
|
||||
#define UA_NS0ID_QUERYFIRSTRESPONSE 616 // DataType
|
||||
#define UA_NS0ID_QUERYNEXTREQUEST 619 // DataType
|
||||
#define UA_NS0ID_QUERYNEXTRESPONSE 622 // DataType
|
||||
#define UA_NS0ID_TIMESTAMPSTORETURN 625 // DataType
|
||||
#define UA_NS0ID_READVALUEID 626 // DataType
|
||||
#define UA_NS0ID_READREQUEST 629 // DataType
|
||||
#define UA_NS0ID_READRESPONSE 632 // DataType
|
||||
#define UA_NS0ID_HISTORYREADVALUEID 635 // DataType
|
||||
#define UA_NS0ID_HISTORYREADRESULT 638 // DataType
|
||||
#define UA_NS0ID_HISTORYREADDETAILS 641 // DataType
|
||||
#define UA_NS0ID_READEVENTDETAILS 644 // DataType
|
||||
#define UA_NS0ID_READRAWMODIFIEDDETAILS 647 // DataType
|
||||
#define UA_NS0ID_READPROCESSEDDETAILS 650 // DataType
|
||||
#define UA_NS0ID_READATTIMEDETAILS 653 // DataType
|
||||
#define UA_NS0ID_HISTORYDATA 656 // DataType
|
||||
#define UA_NS0ID_HISTORYEVENT 659 // DataType
|
||||
#define UA_NS0ID_HISTORYREADREQUEST 662 // DataType
|
||||
#define UA_NS0ID_HISTORYREADRESPONSE 665 // DataType
|
||||
#define UA_NS0ID_WRITEVALUE 668 // DataType
|
||||
#define UA_NS0ID_WRITEREQUEST 671 // DataType
|
||||
#define UA_NS0ID_WRITERESPONSE 674 // DataType
|
||||
#define UA_NS0ID_HISTORYUPDATEDETAILS 677 // DataType
|
||||
#define UA_NS0ID_UPDATEDATADETAILS 680 // DataType
|
||||
#define UA_NS0ID_UPDATEEVENTDETAILS 683 // DataType
|
||||
#define UA_NS0ID_DELETERAWMODIFIEDDETAILS 686 // DataType
|
||||
#define UA_NS0ID_DELETEATTIMEDETAILS 689 // DataType
|
||||
#define UA_NS0ID_DELETEEVENTDETAILS 692 // DataType
|
||||
#define UA_NS0ID_HISTORYUPDATERESULT 695 // DataType
|
||||
#define UA_NS0ID_HISTORYUPDATEREQUEST 698 // DataType
|
||||
#define UA_NS0ID_HISTORYUPDATERESPONSE 701 // DataType
|
||||
#define UA_NS0ID_CALLMETHODREQUEST 704 // DataType
|
||||
#define UA_NS0ID_CALLMETHODRESULT 707 // DataType
|
||||
#define UA_NS0ID_CALLREQUEST 710 // DataType
|
||||
#define UA_NS0ID_CALLRESPONSE 713 // DataType
|
||||
#define UA_NS0ID_MONITORINGMODE 716 // DataType
|
||||
#define UA_NS0ID_DATACHANGETRIGGER 717 // DataType
|
||||
#define UA_NS0ID_DEADBANDTYPE 718 // DataType
|
||||
#define UA_NS0ID_MONITORINGFILTER 719 // DataType
|
||||
#define UA_NS0ID_DATACHANGEFILTER 722 // DataType
|
||||
#define UA_NS0ID_EVENTFILTER 725 // DataType
|
||||
#define UA_NS0ID_AGGREGATEFILTER 728 // DataType
|
||||
#define UA_NS0ID_MONITORINGFILTERRESULT 731 // DataType
|
||||
#define UA_NS0ID_EVENTFILTERRESULT 734 // DataType
|
||||
#define UA_NS0ID_AGGREGATEFILTERRESULT 737 // DataType
|
||||
#define UA_NS0ID_MONITORINGPARAMETERS 740 // DataType
|
||||
#define UA_NS0ID_MONITOREDITEMCREATEREQUEST 743 // DataType
|
||||
#define UA_NS0ID_MONITOREDITEMCREATERESULT 746 // DataType
|
||||
#define UA_NS0ID_CREATEMONITOREDITEMSREQUEST 749 // DataType
|
||||
#define UA_NS0ID_CREATEMONITOREDITEMSRESPONSE 752 // DataType
|
||||
#define UA_NS0ID_MONITOREDITEMMODIFYREQUEST 755 // DataType
|
||||
#define UA_NS0ID_MONITOREDITEMMODIFYRESULT 758 // DataType
|
||||
#define UA_NS0ID_MODIFYMONITOREDITEMSREQUEST 761 // DataType
|
||||
#define UA_NS0ID_MODIFYMONITOREDITEMSRESPONSE 764 // DataType
|
||||
#define UA_NS0ID_SETMONITORINGMODEREQUEST 767 // DataType
|
||||
#define UA_NS0ID_SETMONITORINGMODERESPONSE 770 // DataType
|
||||
#define UA_NS0ID_SETTRIGGERINGREQUEST 773 // DataType
|
||||
#define UA_NS0ID_SETTRIGGERINGRESPONSE 776 // DataType
|
||||
#define UA_NS0ID_DELETEMONITOREDITEMSREQUEST 779 // DataType
|
||||
#define UA_NS0ID_DELETEMONITOREDITEMSRESPONSE 782 // DataType
|
||||
#define UA_NS0ID_CREATESUBSCRIPTIONREQUEST 785 // DataType
|
||||
#define UA_NS0ID_CREATESUBSCRIPTIONRESPONSE 788 // DataType
|
||||
#define UA_NS0ID_MODIFYSUBSCRIPTIONREQUEST 791 // DataType
|
||||
#define UA_NS0ID_MODIFYSUBSCRIPTIONRESPONSE 794 // DataType
|
||||
#define UA_NS0ID_SETPUBLISHINGMODEREQUEST 797 // DataType
|
||||
#define UA_NS0ID_SETPUBLISHINGMODERESPONSE 800 // DataType
|
||||
#define UA_NS0ID_NOTIFICATIONMESSAGE 803 // DataType
|
||||
#define UA_NS0ID_MONITOREDITEMNOTIFICATION 806 // DataType
|
||||
#define UA_NS0ID_DATACHANGENOTIFICATION 809 // DataType
|
||||
#define UA_NS0ID_STATUSCHANGENOTIFICATION 818 // DataType
|
||||
#define UA_NS0ID_SUBSCRIPTIONACKNOWLEDGEMENT 821 // DataType
|
||||
#define UA_NS0ID_PUBLISHREQUEST 824 // DataType
|
||||
#define UA_NS0ID_PUBLISHRESPONSE 827 // DataType
|
||||
#define UA_NS0ID_REPUBLISHREQUEST 830 // DataType
|
||||
#define UA_NS0ID_REPUBLISHRESPONSE 833 // DataType
|
||||
#define UA_NS0ID_TRANSFERRESULT 836 // DataType
|
||||
#define UA_NS0ID_TRANSFERSUBSCRIPTIONSREQUEST 839 // DataType
|
||||
#define UA_NS0ID_TRANSFERSUBSCRIPTIONSRESPONSE 842 // DataType
|
||||
#define UA_NS0ID_DELETESUBSCRIPTIONSREQUEST 845 // DataType
|
||||
#define UA_NS0ID_DELETESUBSCRIPTIONSRESPONSE 848 // DataType
|
||||
#define UA_NS0ID_REDUNDANCYSUPPORT 851 // DataType
|
||||
#define UA_NS0ID_SERVERSTATE 852 // DataType
|
||||
#define UA_NS0ID_REDUNDANTSERVERDATATYPE 853 // DataType
|
||||
#define UA_NS0ID_SAMPLINGINTERVALDIAGNOSTICSDATATYPE 856 // DataType
|
||||
#define UA_NS0ID_SERVERDIAGNOSTICSSUMMARYDATATYPE 859 // DataType
|
||||
#define UA_NS0ID_SERVERSTATUSDATATYPE 862 // DataType
|
||||
#define UA_NS0ID_SESSIONDIAGNOSTICSDATATYPE 865 // DataType
|
||||
#define UA_NS0ID_SESSIONSECURITYDIAGNOSTICSDATATYPE 868 // DataType
|
||||
#define UA_NS0ID_SERVICECOUNTERDATATYPE 871 // DataType
|
||||
#define UA_NS0ID_SUBSCRIPTIONDIAGNOSTICSDATATYPE 874 // DataType
|
||||
#define UA_NS0ID_MODELCHANGESTRUCTUREDATATYPE 877 // DataType
|
||||
#define UA_NS0ID_RANGE 884 // DataType
|
||||
#define UA_NS0ID_EUINFORMATION 887 // DataType
|
||||
#define UA_NS0ID_EXCEPTIONDEVIATIONFORMAT 890 // DataType
|
||||
#define UA_NS0ID_ANNOTATION 891 // DataType
|
||||
#define UA_NS0ID_PROGRAMDIAGNOSTICDATATYPE 894 // DataType
|
||||
#define UA_NS0ID_SEMANTICCHANGESTRUCTUREDATATYPE 897 // DataType
|
||||
#define UA_NS0ID_EVENTNOTIFICATIONLIST 914 // DataType
|
||||
#define UA_NS0ID_EVENTFIELDLIST 917 // DataType
|
||||
#define UA_NS0ID_HISTORYEVENTFIELDLIST 920 // DataType
|
||||
#define UA_NS0ID_HISTORYUPDATEEVENTRESULT 929 // DataType
|
||||
#define UA_NS0ID_ISSUEDIDENTITYTOKEN 938 // DataType
|
||||
#define UA_NS0ID_NOTIFICATIONDATA 945 // DataType
|
||||
#define UA_NS0ID_AGGREGATECONFIGURATION 948 // DataType
|
||||
#define UA_NS0ID_IMAGEBMP 2000 // DataType
|
||||
#define UA_NS0ID_IMAGEGIF 2001 // DataType
|
||||
#define UA_NS0ID_IMAGEJPG 2002 // DataType
|
||||
#define UA_NS0ID_IMAGEPNG 2003 // DataType
|
||||
#define UA_NS0ID_SERVERTYPE 2004 // ObjectType
|
||||
#define UA_NS0ID_SERVERCAPABILITIESTYPE 2013 // ObjectType
|
||||
#define UA_NS0ID_SERVERDIAGNOSTICSTYPE 2020 // ObjectType
|
||||
#define UA_NS0ID_SESSIONSDIAGNOSTICSSUMMARYTYPE 2026 // ObjectType
|
||||
#define UA_NS0ID_SESSIONDIAGNOSTICSOBJECTTYPE 2029 // ObjectType
|
||||
#define UA_NS0ID_VENDORSERVERINFOTYPE 2033 // ObjectType
|
||||
#define UA_NS0ID_SERVERREDUNDANCYTYPE 2034 // ObjectType
|
||||
#define UA_NS0ID_TRANSPARENTREDUNDANCYTYPE 2036 // ObjectType
|
||||
#define UA_NS0ID_NONTRANSPARENTREDUNDANCYTYPE 2039 // ObjectType
|
||||
#define UA_NS0ID_BASEEVENTTYPE 2041 // ObjectType
|
||||
#define UA_NS0ID_AUDITEVENTTYPE 2052 // ObjectType
|
||||
#define UA_NS0ID_AUDITSECURITYEVENTTYPE 2058 // ObjectType
|
||||
#define UA_NS0ID_AUDITCHANNELEVENTTYPE 2059 // ObjectType
|
||||
#define UA_NS0ID_AUDITOPENSECURECHANNELEVENTTYPE 2060 // ObjectType
|
||||
#define UA_NS0ID_AUDITSESSIONEVENTTYPE 2069 // ObjectType
|
||||
#define UA_NS0ID_AUDITCREATESESSIONEVENTTYPE 2071 // ObjectType
|
||||
#define UA_NS0ID_AUDITACTIVATESESSIONEVENTTYPE 2075 // ObjectType
|
||||
#define UA_NS0ID_AUDITCANCELEVENTTYPE 2078 // ObjectType
|
||||
#define UA_NS0ID_AUDITCERTIFICATEEVENTTYPE 2080 // ObjectType
|
||||
#define UA_NS0ID_AUDITCERTIFICATEDATAMISMATCHEVENTTYPE 2082 // ObjectType
|
||||
#define UA_NS0ID_AUDITCERTIFICATEEXPIREDEVENTTYPE 2085 // ObjectType
|
||||
#define UA_NS0ID_AUDITCERTIFICATEINVALIDEVENTTYPE 2086 // ObjectType
|
||||
#define UA_NS0ID_AUDITCERTIFICATEUNTRUSTEDEVENTTYPE 2087 // ObjectType
|
||||
#define UA_NS0ID_AUDITCERTIFICATEREVOKEDEVENTTYPE 2088 // ObjectType
|
||||
#define UA_NS0ID_AUDITCERTIFICATEMISMATCHEVENTTYPE 2089 // ObjectType
|
||||
#define UA_NS0ID_AUDITNODEMANAGEMENTEVENTTYPE 2090 // ObjectType
|
||||
#define UA_NS0ID_AUDITADDNODESEVENTTYPE 2091 // ObjectType
|
||||
#define UA_NS0ID_AUDITDELETENODESEVENTTYPE 2093 // ObjectType
|
||||
#define UA_NS0ID_AUDITADDREFERENCESEVENTTYPE 2095 // ObjectType
|
||||
#define UA_NS0ID_AUDITDELETEREFERENCESEVENTTYPE 2097 // ObjectType
|
||||
#define UA_NS0ID_AUDITUPDATEEVENTTYPE 2099 // ObjectType
|
||||
#define UA_NS0ID_AUDITWRITEUPDATEEVENTTYPE 2100 // ObjectType
|
||||
#define UA_NS0ID_AUDITHISTORYUPDATEEVENTTYPE 2104 // ObjectType
|
||||
#define UA_NS0ID_AUDITUPDATEMETHODEVENTTYPE 2127 // ObjectType
|
||||
#define UA_NS0ID_SYSTEMEVENTTYPE 2130 // ObjectType
|
||||
#define UA_NS0ID_DEVICEFAILUREEVENTTYPE 2131 // ObjectType
|
||||
#define UA_NS0ID_BASEMODELCHANGEEVENTTYPE 2132 // ObjectType
|
||||
#define UA_NS0ID_GENERALMODELCHANGEEVENTTYPE 2133 // ObjectType
|
||||
#define UA_NS0ID_SERVERVENDORCAPABILITYTYPE 2137 // VariableType
|
||||
#define UA_NS0ID_SERVERSTATUSTYPE 2138 // VariableType
|
||||
#define UA_NS0ID_SERVERDIAGNOSTICSSUMMARYTYPE 2150 // VariableType
|
||||
#define UA_NS0ID_SAMPLINGINTERVALDIAGNOSTICSARRAYTYPE 2164 // VariableType
|
||||
#define UA_NS0ID_SAMPLINGINTERVALDIAGNOSTICSTYPE 2165 // VariableType
|
||||
#define UA_NS0ID_SUBSCRIPTIONDIAGNOSTICSARRAYTYPE 2171 // VariableType
|
||||
#define UA_NS0ID_SUBSCRIPTIONDIAGNOSTICSTYPE 2172 // VariableType
|
||||
#define UA_NS0ID_SESSIONDIAGNOSTICSARRAYTYPE 2196 // VariableType
|
||||
#define UA_NS0ID_SESSIONDIAGNOSTICSVARIABLETYPE 2197 // VariableType
|
||||
#define UA_NS0ID_SESSIONSECURITYDIAGNOSTICSARRAYTYPE 2243 // VariableType
|
||||
#define UA_NS0ID_SESSIONSECURITYDIAGNOSTICSTYPE 2244 // VariableType
|
||||
#define UA_NS0ID_SERVER 2253 // Object
|
||||
#define UA_NS0ID_SERVER_SERVERARRAY 2254 // Variable
|
||||
#define UA_NS0ID_SERVER_NAMESPACEARRAY 2255 // Variable
|
||||
#define UA_NS0ID_SERVER_SERVERSTATUS 2256 // Variable
|
||||
#define UA_NS0ID_SERVER_SERVERSTATUS_STARTTIME 2257 // Variable
|
||||
#define UA_NS0ID_SERVER_SERVERSTATUS_CURRENTTIME 2258 // Variable
|
||||
#define UA_NS0ID_SERVER_SERVERSTATUS_STATE 2259 // Variable
|
||||
#define UA_NS0ID_SERVER_SERVERSTATUS_BUILDINFO 2260 // Variable
|
||||
#define UA_NS0ID_SERVER_SERVERSTATUS_BUILDINFO_PRODUCTNAME 2261 // Variable
|
||||
#define UA_NS0ID_SERVER_SERVERSTATUS_BUILDINFO_PRODUCTURI 2262 // Variable
|
||||
#define UA_NS0ID_SERVER_SERVERSTATUS_BUILDINFO_MANUFACTURERNAME 2263 // Variable
|
||||
#define UA_NS0ID_SERVER_SERVERSTATUS_BUILDINFO_SOFTWAREVERSION 2264 // Variable
|
||||
#define UA_NS0ID_SERVER_SERVERSTATUS_BUILDINFO_BUILDNUMBER 2265 // Variable
|
||||
#define UA_NS0ID_SERVER_SERVERSTATUS_BUILDINFO_BUILDDATE 2266 // Variable
|
||||
#define UA_NS0ID_SERVER_SERVICELEVEL 2267 // Variable
|
||||
#define UA_NS0ID_SERVER_SERVERCAPABILITIES 2268 // Object
|
||||
#define UA_NS0ID_SERVER_SERVERCAPABILITIES_SERVERPROFILEARRAY 2269 // Variable
|
||||
#define UA_NS0ID_SERVER_SERVERCAPABILITIES_LOCALEIDARRAY 2271 // Variable
|
||||
#define UA_NS0ID_SERVER_SERVERCAPABILITIES_MINSUPPORTEDSAMPLERATE 2272 // Variable
|
||||
#define UA_NS0ID_SERVER_SERVERDIAGNOSTICS 2274 // Object
|
||||
#define UA_NS0ID_SERVER_SERVERDIAGNOSTICS_SERVERDIAGNOSTICSSUMMARY 2275 // Variable
|
||||
#define UA_NS0ID_SERVER_SERVERDIAGNOSTICS_SERVERDIAGNOSTICSSUMMARY_SERVERVIEWCOUNT 2276 // Variable
|
||||
#define UA_NS0ID_SERVER_SERVERDIAGNOSTICS_SERVERDIAGNOSTICSSUMMARY_CURRENTSESSIONCOUNT 2277 // Variable
|
||||
#define UA_NS0ID_SERVER_SERVERDIAGNOSTICS_SERVERDIAGNOSTICSSUMMARY_CUMULATEDSESSIONCOUNT 2278 // Variable
|
||||
#define UA_NS0ID_SERVER_SERVERDIAGNOSTICS_SERVERDIAGNOSTICSSUMMARY_SECURITYREJECTEDSESSIONCOUNT 2279 // Variable
|
||||
#define UA_NS0ID_SERVER_SERVERDIAGNOSTICS_SERVERDIAGNOSTICSSUMMARY_SESSIONTIMEOUTCOUNT 2281 // Variable
|
||||
#define UA_NS0ID_SERVER_SERVERDIAGNOSTICS_SERVERDIAGNOSTICSSUMMARY_SESSIONABORTCOUNT 2282 // Variable
|
||||
#define UA_NS0ID_SERVER_SERVERDIAGNOSTICS_SERVERDIAGNOSTICSSUMMARY_PUBLISHINGINTERVALCOUNT 2284 // Variable
|
||||
#define UA_NS0ID_SERVER_SERVERDIAGNOSTICS_SERVERDIAGNOSTICSSUMMARY_CURRENTSUBSCRIPTIONCOUNT 2285 // Variable
|
||||
#define UA_NS0ID_SERVER_SERVERDIAGNOSTICS_SERVERDIAGNOSTICSSUMMARY_CUMULATEDSUBSCRIPTIONCOUNT 2286 // Variable
|
||||
#define UA_NS0ID_SERVER_SERVERDIAGNOSTICS_SERVERDIAGNOSTICSSUMMARY_SECURITYREJECTEDREQUESTSCOUNT 2287 // Variable
|
||||
#define UA_NS0ID_SERVER_SERVERDIAGNOSTICS_SERVERDIAGNOSTICSSUMMARY_REJECTEDREQUESTSCOUNT 2288 // Variable
|
||||
#define UA_NS0ID_SERVER_SERVERDIAGNOSTICS_SAMPLINGINTERVALDIAGNOSTICSARRAY 2289 // Variable
|
||||
#define UA_NS0ID_SERVER_SERVERDIAGNOSTICS_SUBSCRIPTIONDIAGNOSTICSARRAY 2290 // Variable
|
||||
#define UA_NS0ID_SERVER_SERVERDIAGNOSTICS_ENABLEDFLAG 2294 // Variable
|
||||
#define UA_NS0ID_SERVER_VENDORSERVERINFO 2295 // Object
|
||||
#define UA_NS0ID_SERVER_SERVERREDUNDANCY 2296 // Object
|
||||
#define UA_NS0ID_STATEMACHINETYPE 2299 // ObjectType
|
||||
#define UA_NS0ID_STATETYPE 2307 // ObjectType
|
||||
#define UA_NS0ID_INITIALSTATETYPE 2309 // ObjectType
|
||||
#define UA_NS0ID_TRANSITIONTYPE 2310 // ObjectType
|
||||
#define UA_NS0ID_TRANSITIONEVENTTYPE 2311 // ObjectType
|
||||
#define UA_NS0ID_AUDITUPDATESTATEEVENTTYPE 2315 // ObjectType
|
||||
#define UA_NS0ID_HISTORICALDATACONFIGURATIONTYPE 2318 // ObjectType
|
||||
#define UA_NS0ID_HISTORYSERVERCAPABILITIESTYPE 2330 // ObjectType
|
||||
#define UA_NS0ID_AGGREGATEFUNCTIONTYPE 2340 // ObjectType
|
||||
#define UA_NS0ID_AGGREGATEFUNCTION_INTERPOLATIVE 2341 // Object
|
||||
#define UA_NS0ID_AGGREGATEFUNCTION_AVERAGE 2342 // Object
|
||||
#define UA_NS0ID_AGGREGATEFUNCTION_TIMEAVERAGE 2343 // Object
|
||||
#define UA_NS0ID_AGGREGATEFUNCTION_TOTAL 2344 // Object
|
||||
#define UA_NS0ID_AGGREGATEFUNCTION_MINIMUM 2346 // Object
|
||||
#define UA_NS0ID_AGGREGATEFUNCTION_MAXIMUM 2347 // Object
|
||||
#define UA_NS0ID_AGGREGATEFUNCTION_MINIMUMACTUALTIME 2348 // Object
|
||||
#define UA_NS0ID_AGGREGATEFUNCTION_MAXIMUMACTUALTIME 2349 // Object
|
||||
#define UA_NS0ID_AGGREGATEFUNCTION_RANGE 2350 // Object
|
||||
#define UA_NS0ID_AGGREGATEFUNCTION_ANNOTATIONCOUNT 2351 // Object
|
||||
#define UA_NS0ID_AGGREGATEFUNCTION_COUNT 2352 // Object
|
||||
#define UA_NS0ID_AGGREGATEFUNCTION_NUMBEROFTRANSITIONS 2355 // Object
|
||||
#define UA_NS0ID_AGGREGATEFUNCTION_START 2357 // Object
|
||||
#define UA_NS0ID_AGGREGATEFUNCTION_END 2358 // Object
|
||||
#define UA_NS0ID_AGGREGATEFUNCTION_DELTA 2359 // Object
|
||||
#define UA_NS0ID_AGGREGATEFUNCTION_DURATIONGOOD 2360 // Object
|
||||
#define UA_NS0ID_AGGREGATEFUNCTION_DURATIONBAD 2361 // Object
|
||||
#define UA_NS0ID_AGGREGATEFUNCTION_PERCENTGOOD 2362 // Object
|
||||
#define UA_NS0ID_AGGREGATEFUNCTION_PERCENTBAD 2363 // Object
|
||||
#define UA_NS0ID_AGGREGATEFUNCTION_WORSTQUALITY 2364 // Object
|
||||
#define UA_NS0ID_DATAITEMTYPE 2365 // VariableType
|
||||
#define UA_NS0ID_ANALOGITEMTYPE 2368 // VariableType
|
||||
#define UA_NS0ID_DISCRETEITEMTYPE 2372 // VariableType
|
||||
#define UA_NS0ID_TWOSTATEDISCRETETYPE 2373 // VariableType
|
||||
#define UA_NS0ID_MULTISTATEDISCRETETYPE 2376 // VariableType
|
||||
#define UA_NS0ID_PROGRAMTRANSITIONEVENTTYPE 2378 // ObjectType
|
||||
#define UA_NS0ID_PROGRAMDIAGNOSTICTYPE 2380 // VariableType
|
||||
#define UA_NS0ID_PROGRAMSTATEMACHINETYPE 2391 // ObjectType
|
||||
#define UA_NS0ID_SERVER_SERVERCAPABILITIES_MAXBROWSECONTINUATIONPOINTS 2735 // Variable
|
||||
#define UA_NS0ID_SERVER_SERVERCAPABILITIES_MAXQUERYCONTINUATIONPOINTS 2736 // Variable
|
||||
#define UA_NS0ID_SERVER_SERVERCAPABILITIES_MAXHISTORYCONTINUATIONPOINTS 2737 // Variable
|
||||
#define UA_NS0ID_SEMANTICCHANGEEVENTTYPE 2738 // ObjectType
|
||||
#define UA_NS0ID_AUDITURLMISMATCHEVENTTYPE 2748 // ObjectType
|
||||
#define UA_NS0ID_STATEVARIABLETYPE 2755 // VariableType
|
||||
#define UA_NS0ID_FINITESTATEVARIABLETYPE 2760 // VariableType
|
||||
#define UA_NS0ID_TRANSITIONVARIABLETYPE 2762 // VariableType
|
||||
#define UA_NS0ID_FINITETRANSITIONVARIABLETYPE 2767 // VariableType
|
||||
#define UA_NS0ID_FINITESTATEMACHINETYPE 2771 // ObjectType
|
||||
#define UA_NS0ID_CONDITIONTYPE 2782 // ObjectType
|
||||
#define UA_NS0ID_REFRESHSTARTEVENTTYPE 2787 // ObjectType
|
||||
#define UA_NS0ID_REFRESHENDEVENTTYPE 2788 // ObjectType
|
||||
#define UA_NS0ID_REFRESHREQUIREDEVENTTYPE 2789 // ObjectType
|
||||
#define UA_NS0ID_AUDITCONDITIONEVENTTYPE 2790 // ObjectType
|
||||
#define UA_NS0ID_AUDITCONDITIONENABLEEVENTTYPE 2803 // ObjectType
|
||||
#define UA_NS0ID_AUDITCONDITIONCOMMENTEVENTTYPE 2829 // ObjectType
|
||||
#define UA_NS0ID_DIALOGCONDITIONTYPE 2830 // ObjectType
|
||||
#define UA_NS0ID_ACKNOWLEDGEABLECONDITIONTYPE 2881 // ObjectType
|
||||
#define UA_NS0ID_ALARMCONDITIONTYPE 2915 // ObjectType
|
||||
#define UA_NS0ID_SHELVEDSTATEMACHINETYPE 2929 // ObjectType
|
||||
#define UA_NS0ID_LIMITALARMTYPE 2955 // ObjectType
|
||||
#define UA_NS0ID_SERVER_SERVERSTATUS_SECONDSTILLSHUTDOWN 2992 // Variable
|
||||
#define UA_NS0ID_SERVER_SERVERSTATUS_SHUTDOWNREASON 2993 // Variable
|
||||
#define UA_NS0ID_SERVER_AUDITING 2994 // Variable
|
||||
#define UA_NS0ID_SERVER_SERVERCAPABILITIES_MODELLINGRULES 2996 // Object
|
||||
#define UA_NS0ID_SERVER_SERVERCAPABILITIES_AGGREGATEFUNCTIONS 2997 // Object
|
||||
#define UA_NS0ID_AUDITHISTORYEVENTUPDATEEVENTTYPE 2999 // ObjectType
|
||||
#define UA_NS0ID_AUDITHISTORYVALUEUPDATEEVENTTYPE 3006 // ObjectType
|
||||
#define UA_NS0ID_AUDITHISTORYDELETEEVENTTYPE 3012 // ObjectType
|
||||
#define UA_NS0ID_AUDITHISTORYRAWMODIFYDELETEEVENTTYPE 3014 // ObjectType
|
||||
#define UA_NS0ID_AUDITHISTORYATTIMEDELETEEVENTTYPE 3019 // ObjectType
|
||||
#define UA_NS0ID_AUDITHISTORYEVENTDELETEEVENTTYPE 3022 // ObjectType
|
||||
#define UA_NS0ID_EVENTQUEUEOVERFLOWEVENTTYPE 3035 // ObjectType
|
||||
#define UA_NS0ID_EVENTTYPESFOLDER 3048 // Object
|
||||
#define UA_NS0ID_BUILDINFOTYPE 3051 // VariableType
|
||||
#define UA_NS0ID_DEFAULTBINARY 3062 // Object
|
||||
#define UA_NS0ID_DEFAULTXML 3063 // Object
|
||||
#define UA_NS0ID_ALWAYSGENERATESEVENT 3065 // ReferenceType
|
||||
#define UA_NS0ID_ICON 3067 // Variable
|
||||
#define UA_NS0ID_NODEVERSION 3068 // Variable
|
||||
#define UA_NS0ID_LOCALTIME 3069 // Variable
|
||||
#define UA_NS0ID_ALLOWNULLS 3070 // Variable
|
||||
#define UA_NS0ID_ENUMVALUES 3071 // Variable
|
||||
#define UA_NS0ID_INPUTARGUMENTS 3072 // Variable
|
||||
#define UA_NS0ID_OUTPUTARGUMENTS 3073 // Variable
|
||||
#define UA_NS0ID_SERVER_SERVERCAPABILITIES_SOFTWARECERTIFICATES 3704 // Variable
|
||||
#define UA_NS0ID_SERVER_SERVERDIAGNOSTICS_SERVERDIAGNOSTICSSUMMARY_REJECTEDSESSIONCOUNT 3705 // Variable
|
||||
#define UA_NS0ID_SERVER_SERVERDIAGNOSTICS_SESSIONSDIAGNOSTICSSUMMARY 3706 // Object
|
||||
#define UA_NS0ID_SERVER_SERVERDIAGNOSTICS_SESSIONSDIAGNOSTICSSUMMARY_SESSIONDIAGNOSTICSARRAY 3707 // Variable
|
||||
#define UA_NS0ID_SERVER_SERVERDIAGNOSTICS_SESSIONSDIAGNOSTICSSUMMARY_SESSIONSECURITYDIAGNOSTICSARRAY 3708 // Variable
|
||||
#define UA_NS0ID_SERVER_SERVERREDUNDANCY_REDUNDANCYSUPPORT 3709 // Variable
|
||||
#define UA_NS0ID_PROGRAMTRANSITIONAUDITEVENTTYPE 3806 // ObjectType
|
||||
#define UA_NS0ID_ADDCOMMENTMETHODTYPE 3863 // Method
|
||||
#define UA_NS0ID_TIMEDSHELVEMETHODTYPE 6102 // Method
|
||||
#define UA_NS0ID_ENUMVALUETYPE 7594 // DataType
|
||||
#define UA_NS0ID_MESSAGESECURITYMODE_ENUMSTRINGS 7595 // Variable
|
||||
#define UA_NS0ID_COMPLIANCELEVEL_ENUMSTRINGS 7599 // Variable
|
||||
#define UA_NS0ID_BROWSEDIRECTION_ENUMSTRINGS 7603 // Variable
|
||||
#define UA_NS0ID_FILTEROPERATOR_ENUMSTRINGS 7605 // Variable
|
||||
#define UA_NS0ID_TIMESTAMPSTORETURN_ENUMSTRINGS 7606 // Variable
|
||||
#define UA_NS0ID_MONITORINGMODE_ENUMSTRINGS 7608 // Variable
|
||||
#define UA_NS0ID_DATACHANGETRIGGER_ENUMSTRINGS 7609 // Variable
|
||||
#define UA_NS0ID_REDUNDANCYSUPPORT_ENUMSTRINGS 7611 // Variable
|
||||
#define UA_NS0ID_SERVERSTATE_ENUMSTRINGS 7612 // Variable
|
||||
#define UA_NS0ID_EXCEPTIONDEVIATIONFORMAT_ENUMSTRINGS 7614 // Variable
|
||||
#define UA_NS0ID_TIMEZONEDATATYPE 8912 // DataType
|
||||
#define UA_NS0ID_LOCKTYPE 8921 // ObjectType
|
||||
#define UA_NS0ID_SERVERLOCK 8924 // Object
|
||||
#define UA_NS0ID_SERVERLOCK_LOCK 8925 // Method
|
||||
#define UA_NS0ID_SERVERLOCK_UNLOCK 8926 // Method
|
||||
#define UA_NS0ID_AUDITCONDITIONRESPONDEVENTTYPE 8927 // ObjectType
|
||||
#define UA_NS0ID_AUDITCONDITIONACKNOWLEDGEEVENTTYPE 8944 // ObjectType
|
||||
#define UA_NS0ID_AUDITCONDITIONCONFIRMEVENTTYPE 8961 // ObjectType
|
||||
#define UA_NS0ID_TWOSTATEVARIABLETYPE 8995 // VariableType
|
||||
#define UA_NS0ID_CONDITIONVARIABLETYPE 9002 // VariableType
|
||||
#define UA_NS0ID_HASTRUESUBSTATE 9004 // ReferenceType
|
||||
#define UA_NS0ID_HASFALSESUBSTATE 9005 // ReferenceType
|
||||
#define UA_NS0ID_HASCONDITION 9006 // ReferenceType
|
||||
#define UA_NS0ID_CONDITIONREFRESHMETHODTYPE 9007 // Method
|
||||
#define UA_NS0ID_DIALOGRESPONSEMETHODTYPE 9031 // Method
|
||||
#define UA_NS0ID_EXCLUSIVELIMITSTATEMACHINETYPE 9318 // ObjectType
|
||||
#define UA_NS0ID_EXCLUSIVELIMITALARMTYPE 9341 // ObjectType
|
||||
#define UA_NS0ID_EXCLUSIVELEVELALARMTYPE 9482 // ObjectType
|
||||
#define UA_NS0ID_EXCLUSIVERATEOFCHANGEALARMTYPE 9623 // ObjectType
|
||||
#define UA_NS0ID_EXCLUSIVEDEVIATIONALARMTYPE 9764 // ObjectType
|
||||
#define UA_NS0ID_NONEXCLUSIVELIMITALARMTYPE 9906 // ObjectType
|
||||
#define UA_NS0ID_NONEXCLUSIVELEVELALARMTYPE 10060 // ObjectType
|
||||
#define UA_NS0ID_NONEXCLUSIVERATEOFCHANGEALARMTYPE 10214 // ObjectType
|
||||
#define UA_NS0ID_NONEXCLUSIVEDEVIATIONALARMTYPE 10368 // ObjectType
|
||||
#define UA_NS0ID_DISCRETEALARMTYPE 10523 // ObjectType
|
||||
#define UA_NS0ID_OFFNORMALALARMTYPE 10637 // ObjectType
|
||||
#define UA_NS0ID_TRIPALARMTYPE 10751 // ObjectType
|
||||
#define UA_NS0ID_AUDITCONDITIONSHELVINGEVENTTYPE 11093 // ObjectType
|
||||
#define UA_NS0ID_BASECONDITIONCLASSTYPE 11163 // ObjectType
|
||||
#define UA_NS0ID_PROCESSCONDITIONCLASSTYPE 11164 // ObjectType
|
||||
#define UA_NS0ID_MAINTENANCECONDITIONCLASSTYPE 11165 // ObjectType
|
||||
#define UA_NS0ID_SYSTEMCONDITIONCLASSTYPE 11166 // ObjectType
|
||||
#define UA_NS0ID_AGGREGATECONFIGURATIONTYPE 11187 // ObjectType
|
||||
#define UA_NS0ID_HISTORYSERVERCAPABILITIES 11192 // Object
|
||||
#define UA_NS0ID_HISTORYSERVERCAPABILITIES_ACCESSHISTORYDATACAPABILITY 11193 // Variable
|
||||
#define UA_NS0ID_HISTORYSERVERCAPABILITIES_INSERTDATACAPABILITY 11196 // Variable
|
||||
#define UA_NS0ID_HISTORYSERVERCAPABILITIES_REPLACEDATACAPABILITY 11197 // Variable
|
||||
#define UA_NS0ID_HISTORYSERVERCAPABILITIES_UPDATEDATACAPABILITY 11198 // Variable
|
||||
#define UA_NS0ID_HISTORYSERVERCAPABILITIES_DELETERAWCAPABILITY 11199 // Variable
|
||||
#define UA_NS0ID_HISTORYSERVERCAPABILITIES_DELETEATTIMECAPABILITY 11200 // Variable
|
||||
#define UA_NS0ID_HISTORYSERVERCAPABILITIES_AGGREGATEFUNCTIONS 11201 // Object
|
||||
#define UA_NS0ID_HACONFIGURATION 11202 // Object
|
||||
#define UA_NS0ID_HACONFIGURATION_AGGREGATECONFIGURATION 11203 // Object
|
||||
#define UA_NS0ID_HACONFIGURATION_AGGREGATECONFIGURATION_TREATUNCERTAINASBAD 11204 // Variable
|
||||
#define UA_NS0ID_HACONFIGURATION_AGGREGATECONFIGURATION_PERCENTDATABAD 11205 // Variable
|
||||
#define UA_NS0ID_HACONFIGURATION_AGGREGATECONFIGURATION_PERCENTDATAGOOD 11206 // Variable
|
||||
#define UA_NS0ID_HACONFIGURATION_AGGREGATECONFIGURATION_USESLOPEDEXTRAPOLATION 11207 // Variable
|
||||
#define UA_NS0ID_HACONFIGURATION_STEPPED 11208 // Variable
|
||||
#define UA_NS0ID_HACONFIGURATION_DEFINITION 11209 // Variable
|
||||
#define UA_NS0ID_HACONFIGURATION_MAXTIMEINTERVAL 11210 // Variable
|
||||
#define UA_NS0ID_HACONFIGURATION_MINTIMEINTERVAL 11211 // Variable
|
||||
#define UA_NS0ID_HACONFIGURATION_EXCEPTIONDEVIATION 11212 // Variable
|
||||
#define UA_NS0ID_HACONFIGURATION_EXCEPTIONDEVIATIONFORMAT 11213 // Variable
|
||||
#define UA_NS0ID_ANNOTATIONS 11214 // Variable
|
||||
#define UA_NS0ID_HISTORICALEVENTFILTER 11215 // Variable
|
||||
#define UA_NS0ID_MODIFICATIONINFO 11216 // DataType
|
||||
#define UA_NS0ID_HISTORYMODIFIEDDATA 11217 // DataType
|
||||
#define UA_NS0ID_HISTORYUPDATETYPE 11234 // DataType
|
||||
#define UA_NS0ID_MULTISTATEVALUEDISCRETETYPE 11238 // VariableType
|
||||
#define UA_NS0ID_HISTORYSERVERCAPABILITIES_ACCESSHISTORYEVENTSCAPABILITY 11242 // Variable
|
||||
#define UA_NS0ID_HISTORYSERVERCAPABILITIES_MAXRETURNDATAVALUES 11273 // Variable
|
||||
#define UA_NS0ID_HISTORYSERVERCAPABILITIES_MAXRETURNEVENTVALUES 11274 // Variable
|
||||
#define UA_NS0ID_HISTORYSERVERCAPABILITIES_INSERTANNOTATIONCAPABILITY 11275 // Variable
|
||||
#define UA_NS0ID_HISTORYSERVERCAPABILITIES_INSERTEVENTCAPABILITY 11281 // Variable
|
||||
#define UA_NS0ID_HISTORYSERVERCAPABILITIES_REPLACEEVENTCAPABILITY 11282 // Variable
|
||||
#define UA_NS0ID_HISTORYSERVERCAPABILITIES_UPDATEEVENTCAPABILITY 11283 // Variable
|
||||
#define UA_NS0ID_AGGREGATEFUNCTION_TIMEAVERAGE2 11285 // Object
|
||||
#define UA_NS0ID_AGGREGATEFUNCTION_MINIMUM2 11286 // Object
|
||||
#define UA_NS0ID_AGGREGATEFUNCTION_MAXIMUM2 11287 // Object
|
||||
#define UA_NS0ID_AGGREGATEFUNCTION_RANGE2 11288 // Object
|
||||
#define UA_NS0ID_AGGREGATEFUNCTION_WORSTQUALITY2 11292 // Object
|
||||
#define UA_NS0ID_PERFORMUPDATETYPE 11293 // DataType
|
||||
#define UA_NS0ID_UPDATESTRUCTUREDATADETAILS 11295 // DataType
|
||||
#define UA_NS0ID_AGGREGATEFUNCTION_TOTAL2 11304 // Object
|
||||
#define UA_NS0ID_AGGREGATEFUNCTION_MINIMUMACTUALTIME2 11305 // Object
|
||||
#define UA_NS0ID_AGGREGATEFUNCTION_MAXIMUMACTUALTIME2 11306 // Object
|
||||
#define UA_NS0ID_AGGREGATEFUNCTION_DURATIONINSTATEZERO 11307 // Object
|
||||
#define UA_NS0ID_AGGREGATEFUNCTION_DURATIONINSTATENONZERO 11308 // Object
|
||||
#define UA_NS0ID_SERVER_SERVERREDUNDANCY_CURRENTSERVERID 11312 // Variable
|
||||
#define UA_NS0ID_SERVER_SERVERREDUNDANCY_REDUNDANTSERVERARRAY 11313 // Variable
|
||||
#define UA_NS0ID_SERVER_SERVERREDUNDANCY_SERVERURIARRAY 11314 // Variable
|
||||
#define UA_NS0ID_AGGREGATEFUNCTION_STANDARDDEVIATIONSAMPLE 11426 // Object
|
||||
#define UA_NS0ID_AGGREGATEFUNCTION_STANDARDDEVIATIONPOPULATION 11427 // Object
|
||||
#define UA_NS0ID_AGGREGATEFUNCTION_VARIANCESAMPLE 11428 // Object
|
||||
#define UA_NS0ID_AGGREGATEFUNCTION_VARIANCEPOPULATION 11429 // Object
|
||||
#define UA_NS0ID_ENUMSTRINGS 11432 // Variable
|
||||
#define UA_NS0ID_VALUEASTEXT 11433 // Variable
|
||||
#define UA_NS0ID_PROGRESSEVENTTYPE 11436 // ObjectType
|
||||
#define UA_NS0ID_SYSTEMSTATUSCHANGEEVENTTYPE 11446 // ObjectType
|
||||
#define UA_NS0ID_OPTIONSETTYPE 11487 // VariableType
|
||||
#define UA_NS0ID_SERVER_GETMONITOREDITEMS 11492 // Method
|
||||
#define UA_NS0ID_SERVER_GETMONITOREDITEMS_INPUTARGUMENTS 11493 // Variable
|
||||
#define UA_NS0ID_SERVER_GETMONITOREDITEMS_OUTPUTARGUMENTS 11494 // Variable
|
||||
#define UA_NS0ID_GETMONITOREDITEMSMETHODTYPE 11495 // Method
|
||||
#define UA_NS0ID_MAXSTRINGLENGTH 11498 // Variable
|
||||
#define UA_NS0ID_HISTORYSERVERCAPABILITIES_DELETEEVENTCAPABILITY 11502 // Variable
|
||||
#define UA_NS0ID_HACONFIGURATION_STARTOFARCHIVE 11503 // Variable
|
||||
#define UA_NS0ID_HACONFIGURATION_STARTOFONLINEARCHIVE 11504 // Variable
|
||||
#define UA_NS0ID_AGGREGATEFUNCTION_STARTBOUND 11505 // Object
|
||||
#define UA_NS0ID_AGGREGATEFUNCTION_ENDBOUND 11506 // Object
|
||||
#define UA_NS0ID_AGGREGATEFUNCTION_DELTABOUNDS 11507 // Object
|
||||
#define UA_NS0ID_MODELLINGRULE_OPTIONALPLACEHOLDER 11508 // Object
|
||||
#define UA_NS0ID_MODELLINGRULE_OPTIONALPLACEHOLDER_NAMINGRULE 11509 // Variable
|
||||
#define UA_NS0ID_MODELLINGRULE_MANDATORYPLACEHOLDER 11510 // Object
|
||||
#define UA_NS0ID_MODELLINGRULE_MANDATORYPLACEHOLDER_NAMINGRULE 11511 // Variable
|
||||
#define UA_NS0ID_MAXARRAYLENGTH 11512 // Variable
|
||||
#define UA_NS0ID_ENGINEERINGUNITS 11513 // Variable
|
||||
#define UA_NS0ID_OPERATIONLIMITSTYPE 11564 // ObjectType
|
||||
#define UA_NS0ID_FILETYPE 11575 // ObjectType
|
||||
#define UA_NS0ID_ADDRESSSPACEFILETYPE 11595 // ObjectType
|
||||
#define UA_NS0ID_NAMESPACEMETADATATYPE 11616 // ObjectType
|
||||
#define UA_NS0ID_NAMESPACESTYPE 11645 // ObjectType
|
||||
#define UA_NS0ID_SERVER_SERVERCAPABILITIES_MAXARRAYLENGTH 11702 // Variable
|
||||
#define UA_NS0ID_SERVER_SERVERCAPABILITIES_MAXSTRINGLENGTH 11703 // Variable
|
||||
#define UA_NS0ID_SERVER_SERVERCAPABILITIES_OPERATIONLIMITS 11704 // Object
|
||||
#define UA_NS0ID_SERVER_SERVERCAPABILITIES_OPERATIONLIMITS_MAXNODESPERREAD 11705 // Variable
|
||||
#define UA_NS0ID_SERVER_SERVERCAPABILITIES_OPERATIONLIMITS_MAXNODESPERWRITE 11707 // Variable
|
||||
#define UA_NS0ID_SERVER_SERVERCAPABILITIES_OPERATIONLIMITS_MAXNODESPERMETHODCALL 11709 // Variable
|
||||
#define UA_NS0ID_SERVER_SERVERCAPABILITIES_OPERATIONLIMITS_MAXNODESPERBROWSE 11710 // Variable
|
||||
#define UA_NS0ID_SERVER_SERVERCAPABILITIES_OPERATIONLIMITS_MAXNODESPERREGISTERNODES 11711 // Variable
|
||||
#define UA_NS0ID_SERVER_SERVERCAPABILITIES_OPERATIONLIMITS_MAXNODESPERTRANSLATEBROWSEPATHSTONODEIDS 11712 // Variable
|
||||
#define UA_NS0ID_SERVER_SERVERCAPABILITIES_OPERATIONLIMITS_MAXNODESPERNODEMANAGEMENT 11713 // Variable
|
||||
#define UA_NS0ID_SERVER_SERVERCAPABILITIES_OPERATIONLIMITS_MAXMONITOREDITEMSPERCALL 11714 // Variable
|
||||
#define UA_NS0ID_SERVER_NAMESPACES 11715 // Object
|
||||
#define UA_NS0ID_SERVER_NAMESPACES_ADDRESSSPACEFILE 11716 // Object
|
||||
#define UA_NS0ID_SERVER_NAMESPACES_ADDRESSSPACEFILE_SIZE 11717 // Variable
|
||||
#define UA_NS0ID_SERVER_NAMESPACES_ADDRESSSPACEFILE_WRITEABLE 11718 // Variable
|
||||
#define UA_NS0ID_SERVER_NAMESPACES_ADDRESSSPACEFILE_USERWRITEABLE 11719 // Variable
|
||||
#define UA_NS0ID_SERVER_NAMESPACES_ADDRESSSPACEFILE_OPENCOUNT 11720 // Variable
|
||||
#define UA_NS0ID_SERVER_NAMESPACES_ADDRESSSPACEFILE_OPEN 11721 // Method
|
||||
#define UA_NS0ID_SERVER_NAMESPACES_ADDRESSSPACEFILE_OPEN_INPUTARGUMENTS 11722 // Variable
|
||||
#define UA_NS0ID_SERVER_NAMESPACES_ADDRESSSPACEFILE_OPEN_OUTPUTARGUMENTS 11723 // Variable
|
||||
#define UA_NS0ID_SERVER_NAMESPACES_ADDRESSSPACEFILE_CLOSE 11724 // Method
|
||||
#define UA_NS0ID_SERVER_NAMESPACES_ADDRESSSPACEFILE_CLOSE_INPUTARGUMENTS 11725 // Variable
|
||||
#define UA_NS0ID_SERVER_NAMESPACES_ADDRESSSPACEFILE_READ 11726 // Method
|
||||
#define UA_NS0ID_SERVER_NAMESPACES_ADDRESSSPACEFILE_READ_INPUTARGUMENTS 11727 // Variable
|
||||
#define UA_NS0ID_SERVER_NAMESPACES_ADDRESSSPACEFILE_READ_OUTPUTARGUMENTS 11728 // Variable
|
||||
#define UA_NS0ID_SERVER_NAMESPACES_ADDRESSSPACEFILE_WRITE 11729 // Method
|
||||
#define UA_NS0ID_SERVER_NAMESPACES_ADDRESSSPACEFILE_WRITE_INPUTARGUMENTS 11730 // Variable
|
||||
#define UA_NS0ID_SERVER_NAMESPACES_ADDRESSSPACEFILE_GETPOSITION 11731 // Method
|
||||
#define UA_NS0ID_SERVER_NAMESPACES_ADDRESSSPACEFILE_GETPOSITION_INPUTARGUMENTS 11732 // Variable
|
||||
#define UA_NS0ID_SERVER_NAMESPACES_ADDRESSSPACEFILE_GETPOSITION_OUTPUTARGUMENTS 11733 // Variable
|
||||
#define UA_NS0ID_SERVER_NAMESPACES_ADDRESSSPACEFILE_SETPOSITION 11734 // Method
|
||||
#define UA_NS0ID_SERVER_NAMESPACES_ADDRESSSPACEFILE_SETPOSITION_INPUTARGUMENTS 11735 // Variable
|
||||
#define UA_NS0ID_SERVER_NAMESPACES_ADDRESSSPACEFILE_EXPORTNAMESPACE 11736 // Method
|
||||
#define UA_NS0ID_BITFIELDMASKDATATYPE 11737 // DataType
|
||||
#define UA_NS0ID_OPENMETHODTYPE 11738 // Method
|
||||
#define UA_NS0ID_CLOSEMETHODTYPE 11741 // Method
|
||||
#define UA_NS0ID_READMETHODTYPE 11743 // Method
|
||||
#define UA_NS0ID_WRITEMETHODTYPE 11746 // Method
|
||||
#define UA_NS0ID_GETPOSITIONMETHODTYPE 11748 // Method
|
||||
#define UA_NS0ID_SETPOSITIONMETHODTYPE 11751 // Method
|
||||
#define UA_NS0ID_SYSTEMOFFNORMALALARMTYPE 11753 // ObjectType
|
||||
#define UA_NS0ID_AUDITPROGRAMTRANSITIONEVENTTYPE 11856 // ObjectType
|
||||
#define UA_NS0ID_HACONFIGURATION_AGGREGATEFUNCTIONS 11877 // Object
|
||||
#define UA_NS0ID_NODECLASS_ENUMVALUES 11878 // Variable
|
||||
#define UA_NS0ID_INSTANCENODE 11879 // DataType
|
||||
#define UA_NS0ID_TYPENODE 11880 // DataType
|
||||
#define UA_NS0ID_NODEATTRIBUTESMASK_ENUMVALUES 11881 // Variable
|
||||
#define UA_NS0ID_ATTRIBUTEWRITEMASK_ENUMVALUES 11882 // Variable
|
||||
#define UA_NS0ID_BROWSERESULTMASK_ENUMVALUES 11883 // Variable
|
||||
#define UA_NS0ID_OPENFILEMODE 11939 // DataType
|
||||
#define UA_NS0ID_OPENFILEMODE_ENUMVALUES 11940 // Variable
|
||||
#define UA_NS0ID_MODELCHANGESTRUCTUREVERBMASK 11941 // DataType
|
||||
#define UA_NS0ID_MODELCHANGESTRUCTUREVERBMASK_ENUMVALUES 11942 // Variable
|
||||
#define UA_NS0ID_ENDPOINTURLLISTDATATYPE 11943 // DataType
|
||||
#define UA_NS0ID_NETWORKGROUPDATATYPE 11944 // DataType
|
||||
#define UA_NS0ID_NONTRANSPARENTNETWORKREDUNDANCYTYPE 11945 // ObjectType
|
||||
#define UA_NS0ID_ARRAYITEMTYPE 12021 // VariableType
|
||||
#define UA_NS0ID_YARRAYITEMTYPE 12029 // VariableType
|
||||
#define UA_NS0ID_XYARRAYITEMTYPE 12038 // VariableType
|
||||
#define UA_NS0ID_IMAGEITEMTYPE 12047 // VariableType
|
||||
#define UA_NS0ID_CUBEITEMTYPE 12057 // VariableType
|
||||
#define UA_NS0ID_NDIMENSIONARRAYITEMTYPE 12068 // VariableType
|
||||
#define UA_NS0ID_AXISSCALEENUMERATION 12077 // DataType
|
||||
#define UA_NS0ID_AXISSCALEENUMERATION_ENUMSTRINGS 12078 // Variable
|
||||
#define UA_NS0ID_AXISINFORMATION 12079 // DataType
|
||||
#define UA_NS0ID_XVTYPE 12080 // DataType
|
||||
#define UA_NS0ID_SERVER_SERVERCAPABILITIES_OPERATIONLIMITS_MAXNODESPERHISTORYREADDATA 12165 // Variable
|
||||
#define UA_NS0ID_SERVER_SERVERCAPABILITIES_OPERATIONLIMITS_MAXNODESPERHISTORYREADEVENTS 12166 // Variable
|
||||
#define UA_NS0ID_SERVER_SERVERCAPABILITIES_OPERATIONLIMITS_MAXNODESPERHISTORYUPDATEDATA 12167 // Variable
|
||||
#define UA_NS0ID_SERVER_SERVERCAPABILITIES_OPERATIONLIMITS_MAXNODESPERHISTORYUPDATEEVENTS 12168 // Variable
|
||||
#define UA_NS0ID_VIEWVERSION 12170 // Variable
|
||||
#define UA_NS0ID_COMPLEXNUMBERTYPE 12171 // DataType
|
||||
#define UA_NS0ID_DOUBLECOMPLEXNUMBERTYPE 12172 // DataType
|
||||
#define UA_NS0ID_HASMODELPARENT 50 // ReferenceType
|
||||
|
||||
#endif /* UA_NODEIDS_H_ */
|
64
include/ua_securechannel.h
Normal file
64
include/ua_securechannel.h
Normal file
@ -0,0 +1,64 @@
|
||||
#ifndef UA_SECURECHANNEL_H_
|
||||
#define UA_SECURECHANNEL_H_
|
||||
|
||||
#include "queue.h"
|
||||
#include "ua_types.h"
|
||||
#include "ua_transport_generated.h"
|
||||
#include "ua_connection_internal.h"
|
||||
|
||||
struct UA_Session;
|
||||
typedef struct UA_Session UA_Session;
|
||||
|
||||
struct SessionEntry {
|
||||
LIST_ENTRY(SessionEntry) pointers;
|
||||
UA_Session *session; // Just a pointer. The session is held in the session manager or the client
|
||||
};
|
||||
|
||||
/* For chunked requests */
|
||||
struct ChunkEntry {
|
||||
LIST_ENTRY(ChunkEntry) pointers;
|
||||
UA_UInt32 requestId;
|
||||
UA_Boolean invalid_message;
|
||||
UA_ByteString bytes;
|
||||
};
|
||||
|
||||
/* For chunked responses */
|
||||
typedef struct {
|
||||
UA_SecureChannel *channel;
|
||||
UA_UInt32 requestId;
|
||||
UA_UInt32 messageType;
|
||||
UA_UInt16 chunksSoFar;
|
||||
size_t messageSizeSoFar;
|
||||
UA_Boolean final;
|
||||
UA_Boolean abort;
|
||||
} UA_ChunkInfo;
|
||||
|
||||
struct UA_SecureChannel {
|
||||
UA_MessageSecurityMode securityMode;
|
||||
UA_ChannelSecurityToken securityToken; // the channelId is contained in the securityToken
|
||||
UA_ChannelSecurityToken nextSecurityToken; // the channelId is contained in the securityToken
|
||||
UA_AsymmetricAlgorithmSecurityHeader clientAsymAlgSettings;
|
||||
UA_AsymmetricAlgorithmSecurityHeader serverAsymAlgSettings;
|
||||
UA_ByteString clientNonce;
|
||||
UA_ByteString serverNonce;
|
||||
UA_UInt32 sequenceNumber;
|
||||
UA_Connection *connection;
|
||||
LIST_HEAD(session_pointerlist, SessionEntry) sessions;
|
||||
LIST_HEAD(chunk_pointerlist, ChunkEntry) chunks;
|
||||
};
|
||||
|
||||
void UA_SecureChannel_init(UA_SecureChannel *channel);
|
||||
void UA_SecureChannel_deleteMembersCleanup(UA_SecureChannel *channel);
|
||||
|
||||
UA_StatusCode UA_SecureChannel_generateNonce(UA_ByteString *nonce);
|
||||
|
||||
void UA_SecureChannel_attachSession(UA_SecureChannel *channel, UA_Session *session);
|
||||
void UA_SecureChannel_detachSession(UA_SecureChannel *channel, UA_Session *session);
|
||||
UA_Session * UA_SecureChannel_getSession(UA_SecureChannel *channel, UA_NodeId *token);
|
||||
|
||||
UA_StatusCode UA_SecureChannel_sendBinaryMessage(UA_SecureChannel *channel, UA_UInt32 requestId,
|
||||
const void *content, const UA_DataType *contentType);
|
||||
|
||||
void UA_SecureChannel_revolveTokens(UA_SecureChannel *channel);
|
||||
|
||||
#endif /* UA_SECURECHANNEL_H_ */
|
681
include/ua_server.h
Normal file
681
include/ua_server.h
Normal file
@ -0,0 +1,681 @@
|
||||
/*
|
||||
* Copyright (C) 2014 the contributors as stated in the AUTHORS file
|
||||
*
|
||||
* This file is part of open62541. open62541 is free software: you can
|
||||
* redistribute it and/or modify it under the terms of the GNU Lesser General
|
||||
* Public License, version 3 (as published by the Free Software Foundation) with
|
||||
* a static linking exception as stated in the LICENSE file provided with
|
||||
* open62541.
|
||||
*
|
||||
* open62541 is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
* A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*/
|
||||
|
||||
#ifndef UA_SERVER_H_
|
||||
#define UA_SERVER_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "ua_config.h"
|
||||
#include "ua_types.h"
|
||||
#include "ua_types_generated.h"
|
||||
#include "ua_nodeids.h"
|
||||
#include "ua_log.h"
|
||||
#include "ua_job.h"
|
||||
#include "ua_connection.h"
|
||||
|
||||
/**
|
||||
* Server
|
||||
* ======
|
||||
*
|
||||
* Network Layer
|
||||
* -------------
|
||||
* Interface to the binary network layers. The functions in the network layer
|
||||
* are never called in parallel but only sequentially from the server's main
|
||||
* loop. So the network layer does not need to be thread-safe. */
|
||||
struct UA_ServerNetworkLayer;
|
||||
typedef struct UA_ServerNetworkLayer UA_ServerNetworkLayer;
|
||||
|
||||
struct UA_ServerNetworkLayer {
|
||||
void *handle; // pointer to internal data
|
||||
UA_String discoveryUrl;
|
||||
|
||||
/* Starts listening on the the networklayer.
|
||||
*
|
||||
* @param nl The network layer
|
||||
* @param logger The logger
|
||||
* @return Returns UA_STATUSCODE_GOOD or an error code. */
|
||||
UA_StatusCode (*start)(UA_ServerNetworkLayer *nl, UA_Logger logger);
|
||||
|
||||
/* Gets called from the main server loop and returns the jobs (accumulated
|
||||
* messages and close events) for dispatch.
|
||||
*
|
||||
* @param nl The network layer
|
||||
* @param jobs When the returned integer is >0, *jobs points to an array of UA_Job of the
|
||||
* returned size.
|
||||
* @param timeout The timeout during which an event must arrive in microseconds
|
||||
* @return The size of the jobs array. If the result is negative, an error has occurred. */
|
||||
size_t (*getJobs)(UA_ServerNetworkLayer *nl, UA_Job **jobs, UA_UInt16 timeout);
|
||||
|
||||
/* Closes the network connection and returns all the jobs that need to be
|
||||
* finished before the network layer can be safely deleted.
|
||||
*
|
||||
* @param nl The network layer
|
||||
* @param jobs When the returned integer is >0, jobs points to an array of UA_Job of the
|
||||
* returned size.
|
||||
* @return The size of the jobs array. If the result is negative, an error has occurred. */
|
||||
size_t (*stop)(UA_ServerNetworkLayer *nl, UA_Job **jobs);
|
||||
|
||||
/** Deletes the network content. Call only after stopping. */
|
||||
void (*deleteMembers)(UA_ServerNetworkLayer *nl);
|
||||
};
|
||||
|
||||
/**
|
||||
* Server Configuration
|
||||
* --------------------
|
||||
* The following structure is passed to a new server for configuration. */
|
||||
typedef struct {
|
||||
UA_String username;
|
||||
UA_String password;
|
||||
} UA_UsernamePasswordLogin;
|
||||
|
||||
typedef struct {
|
||||
UA_UInt32 min;
|
||||
UA_UInt32 max;
|
||||
} UA_UInt32Range;
|
||||
|
||||
typedef struct {
|
||||
UA_Double min;
|
||||
UA_Double max;
|
||||
} UA_DoubleRange;
|
||||
|
||||
typedef struct {
|
||||
UA_UInt16 nThreads; // only if multithreading is enabled
|
||||
UA_Logger logger;
|
||||
|
||||
UA_BuildInfo buildInfo;
|
||||
UA_ApplicationDescription applicationDescription;
|
||||
UA_ByteString serverCertificate;
|
||||
|
||||
/* Networking */
|
||||
size_t networkLayersSize;
|
||||
UA_ServerNetworkLayer *networkLayers;
|
||||
|
||||
/* Login */
|
||||
UA_Boolean enableAnonymousLogin;
|
||||
UA_Boolean enableUsernamePasswordLogin;
|
||||
size_t usernamePasswordLoginsSize;
|
||||
UA_UsernamePasswordLogin* usernamePasswordLogins;
|
||||
|
||||
/* Limits for subscription settings */
|
||||
UA_DoubleRange publishingIntervalLimits;
|
||||
UA_UInt32Range lifeTimeCountLimits;
|
||||
UA_UInt32Range keepAliveCountLimits;
|
||||
UA_UInt32 maxNotificationsPerPublish;
|
||||
|
||||
/* Limits for monitoreditem settings */
|
||||
UA_DoubleRange samplingIntervalLimits;
|
||||
UA_UInt32Range queueSizeLimits;
|
||||
} UA_ServerConfig;
|
||||
|
||||
/**
|
||||
* Server Lifecycle
|
||||
* ---------------- */
|
||||
UA_Server UA_EXPORT * UA_Server_new(const UA_ServerConfig config);
|
||||
void UA_EXPORT UA_Server_delete(UA_Server *server);
|
||||
|
||||
/* Runs the main loop of the server. In each iteration, this calls into the
|
||||
* networklayers to see if jobs have arrived and checks if repeated jobs need to
|
||||
* be triggered.
|
||||
*
|
||||
* @param server The server object.
|
||||
* @param running The loop is run as long as *running is true. Otherwise, the server shuts down.
|
||||
* @return Returns the statuscode of the UA_Server_run_shutdown method */
|
||||
UA_StatusCode UA_EXPORT UA_Server_run(UA_Server *server, volatile UA_Boolean *running);
|
||||
|
||||
/* The prologue part of UA_Server_run (no need to use if you call UA_Server_run) */
|
||||
UA_StatusCode UA_EXPORT UA_Server_run_startup(UA_Server *server);
|
||||
|
||||
/* Executes a single iteration of the server's main loop.
|
||||
*
|
||||
* @param server The server object.
|
||||
* @param waitInternal Should we wait for messages in the networklayer?
|
||||
* Otherwise, the timouts for the networklayers are set to zero.
|
||||
* The default max wait time is 50millisec.
|
||||
* @return Returns how long we can wait until the next scheduled job (in millisec) */
|
||||
UA_UInt16 UA_EXPORT UA_Server_run_iterate(UA_Server *server, UA_Boolean waitInternal);
|
||||
|
||||
/* The epilogue part of UA_Server_run (no need to use if you call UA_Server_run) */
|
||||
UA_StatusCode UA_EXPORT UA_Server_run_shutdown(UA_Server *server);
|
||||
|
||||
/**
|
||||
* Modify a running server
|
||||
* ----------------------- */
|
||||
/* Add a job for cyclic repetition to the server.
|
||||
*
|
||||
* @param server The server object.
|
||||
* @param job The job that shall be added.
|
||||
* @param interval The job shall be repeatedly executed with the given interval
|
||||
* (in ms). The interval must be larger than 5ms. The first execution
|
||||
* occurs at now() + interval at the latest.
|
||||
* @param jobId Set to the guid of the repeated job. This can be used to cancel
|
||||
* the job later on. If the pointer is null, the guid is not set.
|
||||
* @return Upon success, UA_STATUSCODE_GOOD is returned. An error code otherwise. */
|
||||
UA_StatusCode UA_EXPORT UA_Server_addRepeatedJob(UA_Server *server, UA_Job job,
|
||||
UA_UInt32 interval, UA_Guid *jobId);
|
||||
|
||||
/* Remove repeated job. The entry will be removed asynchronously during the next
|
||||
* iteration of the server main loop.
|
||||
*
|
||||
* @param server The server object.
|
||||
* @param jobId The id of the job that shall be removed.
|
||||
* @return Upon sucess, UA_STATUSCODE_GOOD is returned. An error code otherwise. */
|
||||
UA_StatusCode UA_EXPORT UA_Server_removeRepeatedJob(UA_Server *server, UA_Guid jobId);
|
||||
|
||||
/* Add a new namespace to the server. Returns the index of the new namespace */
|
||||
UA_UInt16 UA_EXPORT UA_Server_addNamespace(UA_Server *server, const char* name);
|
||||
|
||||
/**
|
||||
* Node Management
|
||||
* ---------------
|
||||
*
|
||||
* Callback Mechanisms
|
||||
* ^^^^^^^^^^^^^^^^^^^
|
||||
* There are four mechanisms for callbacks from the node-based information model
|
||||
* into userspace:
|
||||
*
|
||||
* - Datasources for variable nodes, where the variable content is managed
|
||||
* externally
|
||||
* - Value-callbacks for variable nodes, where userspace is notified when a
|
||||
* read/write occurs
|
||||
* - Object lifecycle management, where a user-defined constructor and
|
||||
* destructor is added to an object type
|
||||
* - Method callbacks, where a user-defined method is exposed in the information
|
||||
* model
|
||||
*
|
||||
* Data Source Callback
|
||||
* ~~~~~~~~~~~~~~~~~~~~
|
||||
* Datasources are the interface to local data providers. It is expected that
|
||||
* the read and release callbacks are implemented. The write callback can be set
|
||||
* to a null-pointer. */
|
||||
typedef struct {
|
||||
void *handle; /* A custom pointer to reuse the same datasource functions for
|
||||
multiple sources */
|
||||
/* Copies the data from the source into the provided value.
|
||||
*
|
||||
* @param handle An optional pointer to user-defined data for the specific data source
|
||||
* @param nodeid Id of the read node
|
||||
* @param includeSourceTimeStamp If true, then the datasource is expected to set the source
|
||||
* timestamp in the returned value
|
||||
* @param range If not null, then the datasource shall return only a
|
||||
* selection of the (nonscalar) data. Set
|
||||
* UA_STATUSCODE_BADINDEXRANGEINVALID in the value if this does not
|
||||
* apply.
|
||||
* @param value The (non-null) DataValue that is returned to the client. The
|
||||
* data source sets the read data, the result status and optionally a
|
||||
* sourcetimestamp.
|
||||
* @return Returns a status code for logging. Error codes intended for the
|
||||
* original caller are set in the value. If an error is returned,
|
||||
* then no releasing of the value is done. */
|
||||
UA_StatusCode (*read)(void *handle, const UA_NodeId nodeid,
|
||||
UA_Boolean includeSourceTimeStamp, const UA_NumericRange *range,
|
||||
UA_DataValue *value);
|
||||
|
||||
/* Write into a data source. The write member of UA_DataSource can be empty
|
||||
* if the operation is unsupported.
|
||||
*
|
||||
* @param handle An optional pointer to user-defined data for the specific data source
|
||||
* @param nodeid Id of the node being written to
|
||||
* @param data The data to be written into the data source
|
||||
* @param range An optional data range. If the data source is scalar or does
|
||||
* not support writing of ranges, then an error code is returned.
|
||||
* @return Returns a status code that is returned to the user
|
||||
*/
|
||||
UA_StatusCode (*write)(void *handle, const UA_NodeId nodeid,
|
||||
const UA_Variant *data, const UA_NumericRange *range);
|
||||
} UA_DataSource;
|
||||
|
||||
UA_StatusCode UA_EXPORT
|
||||
UA_Server_setVariableNode_dataSource(UA_Server *server, const UA_NodeId nodeId,
|
||||
const UA_DataSource dataSource);
|
||||
|
||||
/**
|
||||
* Value Callback
|
||||
* ~~~~~~~~~~~~~~
|
||||
* Value Callbacks can be attached to variable and variable type nodes. If
|
||||
* not-null, they are called before reading and after writing respectively. */
|
||||
typedef struct {
|
||||
void *handle;
|
||||
void (*onRead)(void *handle, const UA_NodeId nodeid,
|
||||
const UA_Variant *data, const UA_NumericRange *range);
|
||||
void (*onWrite)(void *handle, const UA_NodeId nodeid,
|
||||
const UA_Variant *data, const UA_NumericRange *range);
|
||||
} UA_ValueCallback;
|
||||
|
||||
UA_StatusCode UA_EXPORT
|
||||
UA_Server_setVariableNode_valueCallback(UA_Server *server, const UA_NodeId nodeId,
|
||||
const UA_ValueCallback callback);
|
||||
|
||||
/**
|
||||
* Object Lifecycle Management Callbacks
|
||||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
* Lifecycle management adds constructor and destructor callbacks to
|
||||
* object types. */
|
||||
typedef struct {
|
||||
/* Returns the instance handle that is then attached to the node */
|
||||
void * (*constructor)(const UA_NodeId instance);
|
||||
void (*destructor)(const UA_NodeId instance, void *instanceHandle);
|
||||
} UA_ObjectLifecycleManagement;
|
||||
|
||||
UA_StatusCode UA_EXPORT
|
||||
UA_Server_setObjectTypeNode_lifecycleManagement(UA_Server *server, UA_NodeId nodeId,
|
||||
UA_ObjectLifecycleManagement olm);
|
||||
|
||||
/**
|
||||
* Method Callbacks
|
||||
* ~~~~~~~~~~~~~~~~ */
|
||||
typedef UA_StatusCode (*UA_MethodCallback)(void *methodHandle, const UA_NodeId objectId,
|
||||
size_t inputSize, const UA_Variant *input,
|
||||
size_t outputSize, UA_Variant *output);
|
||||
|
||||
#ifdef UA_ENABLE_METHODCALLS
|
||||
UA_StatusCode UA_EXPORT
|
||||
UA_Server_setMethodNode_callback(UA_Server *server, const UA_NodeId methodNodeId,
|
||||
UA_MethodCallback method, void *handle);
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Node Addition and Deletion
|
||||
* ^^^^^^^^^^^^^^^^^^^^^^^^^ */
|
||||
UA_StatusCode UA_EXPORT
|
||||
UA_Server_deleteNode(UA_Server *server, const UA_NodeId nodeId, UA_Boolean deleteReferences);
|
||||
|
||||
/**
|
||||
* The instantiation callback is used to track the addition of new nodes. It is
|
||||
* also called for all sub-nodes contained in an object or variable type node
|
||||
* that is instantiated.
|
||||
*/
|
||||
typedef struct UA_InstantiationCallback_s {
|
||||
UA_StatusCode (*method)(UA_NodeId objectId, UA_NodeId definitionId, void *handle);
|
||||
void *handle;
|
||||
} UA_InstantiationCallback;
|
||||
|
||||
/* Don't use this function. There are typed versions as inline functions. */
|
||||
UA_StatusCode UA_EXPORT
|
||||
__UA_Server_addNode(UA_Server *server, const UA_NodeClass nodeClass,
|
||||
const UA_NodeId requestedNewNodeId, const UA_NodeId parentNodeId,
|
||||
const UA_NodeId referenceTypeId, const UA_QualifiedName browseName,
|
||||
const UA_NodeId typeDefinition, const UA_NodeAttributes *attr,
|
||||
const UA_DataType *attributeType,
|
||||
UA_InstantiationCallback *instantiationCallback, UA_NodeId *outNewNodeId);
|
||||
|
||||
static UA_INLINE UA_StatusCode
|
||||
UA_Server_addVariableNode(UA_Server *server, const UA_NodeId requestedNewNodeId,
|
||||
const UA_NodeId parentNodeId, const UA_NodeId referenceTypeId,
|
||||
const UA_QualifiedName browseName, const UA_NodeId typeDefinition,
|
||||
const UA_VariableAttributes attr,
|
||||
UA_InstantiationCallback *instantiationCallback,
|
||||
UA_NodeId *outNewNodeId) {
|
||||
return __UA_Server_addNode(server, UA_NODECLASS_VARIABLE, requestedNewNodeId, parentNodeId,
|
||||
referenceTypeId, browseName, typeDefinition,
|
||||
(const UA_NodeAttributes*)&attr,
|
||||
&UA_TYPES[UA_TYPES_VARIABLEATTRIBUTES],
|
||||
instantiationCallback, outNewNodeId); }
|
||||
|
||||
static UA_INLINE UA_StatusCode
|
||||
UA_Server_addVariableTypeNode(UA_Server *server, const UA_NodeId requestedNewNodeId,
|
||||
const UA_NodeId parentNodeId, const UA_NodeId referenceTypeId,
|
||||
const UA_QualifiedName browseName,
|
||||
const UA_VariableTypeAttributes attr,
|
||||
UA_InstantiationCallback *instantiationCallback,
|
||||
UA_NodeId *outNewNodeId) {
|
||||
return __UA_Server_addNode(server, UA_NODECLASS_VARIABLETYPE, requestedNewNodeId,
|
||||
parentNodeId, referenceTypeId, browseName, UA_NODEID_NULL,
|
||||
(const UA_NodeAttributes*)&attr,
|
||||
&UA_TYPES[UA_TYPES_VARIABLETYPEATTRIBUTES],
|
||||
instantiationCallback, outNewNodeId); }
|
||||
|
||||
static UA_INLINE UA_StatusCode
|
||||
UA_Server_addObjectNode(UA_Server *server, const UA_NodeId requestedNewNodeId,
|
||||
const UA_NodeId parentNodeId, const UA_NodeId referenceTypeId,
|
||||
const UA_QualifiedName browseName, const UA_NodeId typeDefinition,
|
||||
const UA_ObjectAttributes attr,
|
||||
UA_InstantiationCallback *instantiationCallback,
|
||||
UA_NodeId *outNewNodeId) {
|
||||
return __UA_Server_addNode(server, UA_NODECLASS_OBJECT, requestedNewNodeId, parentNodeId,
|
||||
referenceTypeId, browseName, typeDefinition,
|
||||
(const UA_NodeAttributes*)&attr,
|
||||
&UA_TYPES[UA_TYPES_OBJECTATTRIBUTES],
|
||||
instantiationCallback, outNewNodeId); }
|
||||
|
||||
static UA_INLINE UA_StatusCode
|
||||
UA_Server_addObjectTypeNode(UA_Server *server, const UA_NodeId requestedNewNodeId,
|
||||
const UA_NodeId parentNodeId, const UA_NodeId referenceTypeId,
|
||||
const UA_QualifiedName browseName,
|
||||
const UA_ObjectTypeAttributes attr,
|
||||
UA_InstantiationCallback *instantiationCallback,
|
||||
UA_NodeId *outNewNodeId) {
|
||||
return __UA_Server_addNode(server, UA_NODECLASS_OBJECTTYPE, requestedNewNodeId,
|
||||
parentNodeId, referenceTypeId, browseName, UA_NODEID_NULL,
|
||||
(const UA_NodeAttributes*)&attr,
|
||||
&UA_TYPES[UA_TYPES_OBJECTTYPEATTRIBUTES],
|
||||
instantiationCallback, outNewNodeId); }
|
||||
|
||||
static UA_INLINE UA_StatusCode
|
||||
UA_Server_addViewNode(UA_Server *server, const UA_NodeId requestedNewNodeId,
|
||||
const UA_NodeId parentNodeId, const UA_NodeId referenceTypeId,
|
||||
const UA_QualifiedName browseName, const UA_ViewAttributes attr,
|
||||
UA_InstantiationCallback *instantiationCallback,
|
||||
UA_NodeId *outNewNodeId) {
|
||||
return __UA_Server_addNode(server, UA_NODECLASS_VIEW, requestedNewNodeId, parentNodeId,
|
||||
referenceTypeId, browseName, UA_NODEID_NULL,
|
||||
(const UA_NodeAttributes*)&attr,
|
||||
&UA_TYPES[UA_TYPES_VIEWATTRIBUTES],
|
||||
instantiationCallback, outNewNodeId); }
|
||||
|
||||
static UA_INLINE UA_StatusCode
|
||||
UA_Server_addReferenceTypeNode(UA_Server *server, const UA_NodeId requestedNewNodeId,
|
||||
const UA_NodeId parentNodeId, const UA_NodeId referenceTypeId,
|
||||
const UA_QualifiedName browseName,
|
||||
const UA_ReferenceTypeAttributes attr,
|
||||
UA_InstantiationCallback *instantiationCallback,
|
||||
UA_NodeId *outNewNodeId) {
|
||||
return __UA_Server_addNode(server, UA_NODECLASS_REFERENCETYPE, requestedNewNodeId,
|
||||
parentNodeId, referenceTypeId, browseName, UA_NODEID_NULL,
|
||||
(const UA_NodeAttributes*)&attr,
|
||||
&UA_TYPES[UA_TYPES_REFERENCETYPEATTRIBUTES],
|
||||
instantiationCallback, outNewNodeId); }
|
||||
|
||||
static UA_INLINE UA_StatusCode
|
||||
UA_Server_addDataTypeNode(UA_Server *server, const UA_NodeId requestedNewNodeId,
|
||||
const UA_NodeId parentNodeId, const UA_NodeId referenceTypeId,
|
||||
const UA_QualifiedName browseName, const UA_DataTypeAttributes attr,
|
||||
UA_InstantiationCallback *instantiationCallback,
|
||||
UA_NodeId *outNewNodeId) {
|
||||
return __UA_Server_addNode(server, UA_NODECLASS_DATATYPE, requestedNewNodeId, parentNodeId,
|
||||
referenceTypeId, browseName, UA_NODEID_NULL,
|
||||
(const UA_NodeAttributes*)&attr,
|
||||
&UA_TYPES[UA_TYPES_DATATYPEATTRIBUTES],
|
||||
instantiationCallback, outNewNodeId); }
|
||||
|
||||
UA_StatusCode UA_EXPORT
|
||||
UA_Server_addDataSourceVariableNode(UA_Server *server, const UA_NodeId requestedNewNodeId,
|
||||
const UA_NodeId parentNodeId,
|
||||
const UA_NodeId referenceTypeId,
|
||||
const UA_QualifiedName browseName,
|
||||
const UA_NodeId typeDefinition,
|
||||
const UA_VariableAttributes attr,
|
||||
const UA_DataSource dataSource, UA_NodeId *outNewNodeId);
|
||||
|
||||
#ifdef UA_ENABLE_METHODCALLS
|
||||
UA_StatusCode UA_EXPORT
|
||||
UA_Server_addMethodNode(UA_Server *server, const UA_NodeId requestedNewNodeId,
|
||||
const UA_NodeId parentNodeId, const UA_NodeId referenceTypeId,
|
||||
const UA_QualifiedName browseName, const UA_MethodAttributes attr,
|
||||
UA_MethodCallback method, void *handle,
|
||||
size_t inputArgumentsSize, const UA_Argument* inputArguments,
|
||||
size_t outputArgumentsSize, const UA_Argument* outputArguments,
|
||||
UA_NodeId *outNewNodeId);
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Write Node Attributes
|
||||
* ^^^^^^^^^^^^^^^^^^^^^
|
||||
* The following node attributes cannot be written
|
||||
*
|
||||
* - NodeClass
|
||||
* - NodeId
|
||||
* - Symmetric
|
||||
* - ContainsNoLoop
|
||||
*
|
||||
* The following attributes cannot be written from the server, as there is no "user" in the server
|
||||
*
|
||||
* - UserWriteMask
|
||||
* - UserAccessLevel
|
||||
* - UserExecutable
|
||||
*
|
||||
* The following attributes are currently taken from the value variant:
|
||||
* TODO: Handle them independent from the variable, ensure that the implicit constraints hold
|
||||
*
|
||||
* - DataType
|
||||
* - ValueRank
|
||||
* - ArrayDimensions
|
||||
*
|
||||
* - Historizing is currently unsupported */
|
||||
/* Don't use this function. There are typed versions with no additional overhead. */
|
||||
UA_StatusCode UA_EXPORT
|
||||
__UA_Server_write(UA_Server *server, const UA_NodeId *nodeId,
|
||||
const UA_AttributeId attributeId,
|
||||
const UA_DataType *type, const void *value);
|
||||
|
||||
static UA_INLINE UA_StatusCode
|
||||
UA_Server_writeBrowseName(UA_Server *server, const UA_NodeId nodeId,
|
||||
const UA_QualifiedName browseName) {
|
||||
return __UA_Server_write(server, &nodeId, UA_ATTRIBUTEID_BROWSENAME,
|
||||
&UA_TYPES[UA_TYPES_QUALIFIEDNAME], &browseName); }
|
||||
|
||||
static UA_INLINE UA_StatusCode
|
||||
UA_Server_writeDisplayName(UA_Server *server, const UA_NodeId nodeId,
|
||||
const UA_LocalizedText displayName) {
|
||||
return __UA_Server_write(server, &nodeId, UA_ATTRIBUTEID_DISPLAYNAME,
|
||||
&UA_TYPES[UA_TYPES_LOCALIZEDTEXT], &displayName); }
|
||||
|
||||
static UA_INLINE UA_StatusCode
|
||||
UA_Server_writeDescription(UA_Server *server, const UA_NodeId nodeId,
|
||||
const UA_LocalizedText description) {
|
||||
return __UA_Server_write(server, &nodeId, UA_ATTRIBUTEID_DESCRIPTION,
|
||||
&UA_TYPES[UA_TYPES_LOCALIZEDTEXT], &description); }
|
||||
|
||||
static UA_INLINE UA_StatusCode
|
||||
UA_Server_writeWriteMask(UA_Server *server, const UA_NodeId nodeId,
|
||||
const UA_UInt32 writeMask) {
|
||||
return __UA_Server_write(server, &nodeId, UA_ATTRIBUTEID_WRITEMASK,
|
||||
&UA_TYPES[UA_TYPES_UINT32], &writeMask); }
|
||||
|
||||
static UA_INLINE UA_StatusCode
|
||||
UA_Server_writeIsAbstract(UA_Server *server, const UA_NodeId nodeId,
|
||||
const UA_Boolean isAbstract) {
|
||||
return __UA_Server_write(server, &nodeId, UA_ATTRIBUTEID_ISABSTRACT,
|
||||
&UA_TYPES[UA_TYPES_BOOLEAN], &isAbstract); }
|
||||
|
||||
static UA_INLINE UA_StatusCode
|
||||
UA_Server_writeInverseName(UA_Server *server, const UA_NodeId nodeId,
|
||||
const UA_LocalizedText inverseName) {
|
||||
return __UA_Server_write(server, &nodeId, UA_ATTRIBUTEID_INVERSENAME,
|
||||
&UA_TYPES[UA_TYPES_LOCALIZEDTEXT], &inverseName); }
|
||||
|
||||
static UA_INLINE UA_StatusCode
|
||||
UA_Server_writeEventNotifier(UA_Server *server, const UA_NodeId nodeId,
|
||||
const UA_Byte eventNotifier) {
|
||||
return __UA_Server_write(server, &nodeId, UA_ATTRIBUTEID_EVENTNOTIFIER,
|
||||
&UA_TYPES[UA_TYPES_BYTE], &eventNotifier); }
|
||||
|
||||
static UA_INLINE UA_StatusCode
|
||||
UA_Server_writeValue(UA_Server *server, const UA_NodeId nodeId,
|
||||
const UA_Variant value) {
|
||||
return __UA_Server_write(server, &nodeId, UA_ATTRIBUTEID_VALUE,
|
||||
&UA_TYPES[UA_TYPES_VARIANT], &value); }
|
||||
|
||||
static UA_INLINE UA_StatusCode
|
||||
UA_Server_writeAccessLevel(UA_Server *server, const UA_NodeId nodeId,
|
||||
const UA_UInt32 accessLevel) {
|
||||
return __UA_Server_write(server, &nodeId, UA_ATTRIBUTEID_ACCESSLEVEL,
|
||||
&UA_TYPES[UA_TYPES_UINT32], &accessLevel); }
|
||||
|
||||
static UA_INLINE UA_StatusCode
|
||||
UA_Server_writeMinimumSamplingInterval(UA_Server *server, const UA_NodeId nodeId,
|
||||
const UA_Double miniumSamplingInterval) {
|
||||
return __UA_Server_write(server, &nodeId, UA_ATTRIBUTEID_MINIMUMSAMPLINGINTERVAL,
|
||||
&UA_TYPES[UA_TYPES_DOUBLE], &miniumSamplingInterval); }
|
||||
|
||||
static UA_INLINE UA_StatusCode
|
||||
UA_Server_writeExecutable(UA_Server *server, const UA_NodeId nodeId,
|
||||
const UA_Boolean executable) {
|
||||
return __UA_Server_write(server, &nodeId, UA_ATTRIBUTEID_EXECUTABLE,
|
||||
&UA_TYPES[UA_TYPES_BOOLEAN], &executable); }
|
||||
|
||||
/**
|
||||
* Read Node Attributes
|
||||
* ^^^^^^^^^^^^^^^^^^^^
|
||||
* The following attributes cannot be read, since the local "admin" user always has
|
||||
* full rights.
|
||||
*
|
||||
* - UserWriteMask
|
||||
* - UserAccessLevel
|
||||
* - UserExecutable */
|
||||
/* Don't use this function. There are typed versions for every supported attribute. */
|
||||
UA_StatusCode UA_EXPORT
|
||||
__UA_Server_read(UA_Server *server, const UA_NodeId *nodeId,
|
||||
UA_AttributeId attributeId, void *v);
|
||||
|
||||
static UA_INLINE UA_StatusCode
|
||||
UA_Server_readNodeId(UA_Server *server, const UA_NodeId nodeId,
|
||||
UA_NodeId *outNodeId) {
|
||||
return __UA_Server_read(server, &nodeId, UA_ATTRIBUTEID_NODEID, outNodeId); }
|
||||
|
||||
static UA_INLINE UA_StatusCode
|
||||
UA_Server_readNodeClass(UA_Server *server, const UA_NodeId nodeId,
|
||||
UA_NodeClass *outNodeClass) {
|
||||
return __UA_Server_read(server, &nodeId, UA_ATTRIBUTEID_NODECLASS, outNodeClass); }
|
||||
|
||||
static UA_INLINE UA_StatusCode
|
||||
UA_Server_readBrowseName(UA_Server *server, const UA_NodeId nodeId,
|
||||
UA_QualifiedName *outBrowseName) {
|
||||
return __UA_Server_read(server, &nodeId, UA_ATTRIBUTEID_BROWSENAME, outBrowseName); }
|
||||
|
||||
static UA_INLINE UA_StatusCode
|
||||
UA_Server_readDisplayName(UA_Server *server, const UA_NodeId nodeId,
|
||||
UA_LocalizedText *outDisplayName) {
|
||||
return __UA_Server_read(server, &nodeId, UA_ATTRIBUTEID_DISPLAYNAME, outDisplayName); }
|
||||
|
||||
static UA_INLINE UA_StatusCode
|
||||
UA_Server_readDescription(UA_Server *server, const UA_NodeId nodeId,
|
||||
UA_LocalizedText *outDescription) {
|
||||
return __UA_Server_read(server, &nodeId, UA_ATTRIBUTEID_DESCRIPTION, outDescription); }
|
||||
|
||||
static UA_INLINE UA_StatusCode
|
||||
UA_Server_readWriteMask(UA_Server *server, const UA_NodeId nodeId,
|
||||
UA_UInt32 *outWriteMask) {
|
||||
return __UA_Server_read(server, &nodeId, UA_ATTRIBUTEID_WRITEMASK, outWriteMask); }
|
||||
|
||||
static UA_INLINE UA_StatusCode
|
||||
UA_Server_readIsAbstract(UA_Server *server, const UA_NodeId nodeId,
|
||||
UA_Boolean *outIsAbstract) {
|
||||
return __UA_Server_read(server, &nodeId, UA_ATTRIBUTEID_ISABSTRACT, outIsAbstract); }
|
||||
|
||||
static UA_INLINE UA_StatusCode
|
||||
UA_Server_readSymmetric(UA_Server *server, const UA_NodeId nodeId,
|
||||
UA_Boolean *outSymmetric) {
|
||||
return __UA_Server_read(server, &nodeId, UA_ATTRIBUTEID_SYMMETRIC, outSymmetric); }
|
||||
|
||||
static UA_INLINE UA_StatusCode
|
||||
UA_Server_readInverseName(UA_Server *server, const UA_NodeId nodeId,
|
||||
UA_LocalizedText *outInverseName) {
|
||||
return __UA_Server_read(server, &nodeId, UA_ATTRIBUTEID_INVERSENAME, outInverseName); }
|
||||
|
||||
static UA_INLINE UA_StatusCode
|
||||
UA_Server_readContainsNoLoop(UA_Server *server, const UA_NodeId nodeId,
|
||||
UA_Boolean *outContainsNoLoops) {
|
||||
return __UA_Server_read(server, &nodeId, UA_ATTRIBUTEID_CONTAINSNOLOOPS,
|
||||
outContainsNoLoops); }
|
||||
|
||||
static UA_INLINE UA_StatusCode
|
||||
UA_Server_readEventNotifier(UA_Server *server, const UA_NodeId nodeId,
|
||||
UA_Byte *outEventNotifier) {
|
||||
return __UA_Server_read(server, &nodeId, UA_ATTRIBUTEID_EVENTNOTIFIER, outEventNotifier); }
|
||||
|
||||
static UA_INLINE UA_StatusCode
|
||||
UA_Server_readValue(UA_Server *server, const UA_NodeId nodeId,
|
||||
UA_Variant *outValue) {
|
||||
return __UA_Server_read(server, &nodeId, UA_ATTRIBUTEID_VALUE, outValue); }
|
||||
|
||||
static UA_INLINE UA_StatusCode
|
||||
UA_Server_readDataType(UA_Server *server, const UA_NodeId nodeId,
|
||||
UA_NodeId *outDataType) {
|
||||
return __UA_Server_read(server, &nodeId, UA_ATTRIBUTEID_DATATYPE, outDataType); }
|
||||
|
||||
static UA_INLINE UA_StatusCode
|
||||
UA_Server_readValueRank(UA_Server *server, const UA_NodeId nodeId,
|
||||
UA_Int32 *outValueRank) {
|
||||
return __UA_Server_read(server, &nodeId, UA_ATTRIBUTEID_VALUERANK, outValueRank); }
|
||||
|
||||
/* Returns a variant with an int32 array */
|
||||
static UA_INLINE UA_StatusCode
|
||||
UA_Server_readArrayDimensions(UA_Server *server, const UA_NodeId nodeId,
|
||||
UA_Variant *outArrayDimensions) {
|
||||
return __UA_Server_read(server, &nodeId, UA_ATTRIBUTEID_ARRAYDIMENSIONS,
|
||||
outArrayDimensions); }
|
||||
|
||||
static UA_INLINE UA_StatusCode
|
||||
UA_Server_readAccessLevel(UA_Server *server, const UA_NodeId nodeId,
|
||||
UA_UInt32 *outAccessLevel) {
|
||||
return __UA_Server_read(server, &nodeId, UA_ATTRIBUTEID_ACCESSLEVEL, outAccessLevel); }
|
||||
|
||||
static UA_INLINE UA_StatusCode
|
||||
UA_Server_readMinimumSamplingInterval(UA_Server *server, const UA_NodeId nodeId,
|
||||
UA_Double *outMinimumSamplingInterval) {
|
||||
return __UA_Server_read(server, &nodeId, UA_ATTRIBUTEID_MINIMUMSAMPLINGINTERVAL,
|
||||
outMinimumSamplingInterval); }
|
||||
|
||||
static UA_INLINE UA_StatusCode
|
||||
UA_Server_readHistorizing(UA_Server *server, const UA_NodeId nodeId,
|
||||
UA_Boolean *outHistorizing) {
|
||||
return __UA_Server_read(server, &nodeId, UA_ATTRIBUTEID_HISTORIZING, outHistorizing); }
|
||||
|
||||
static UA_INLINE UA_StatusCode
|
||||
UA_Server_readExecutable(UA_Server *server, const UA_NodeId nodeId,
|
||||
UA_Boolean *outExecutable) {
|
||||
return __UA_Server_read(server, &nodeId, UA_ATTRIBUTEID_EXECUTABLE, outExecutable); }
|
||||
|
||||
/**
|
||||
* Reference Management
|
||||
* -------------------- */
|
||||
UA_StatusCode UA_EXPORT
|
||||
UA_Server_addReference(UA_Server *server, const UA_NodeId sourceId, const UA_NodeId refTypeId,
|
||||
const UA_ExpandedNodeId targetId, UA_Boolean isForward);
|
||||
|
||||
UA_StatusCode UA_EXPORT
|
||||
UA_Server_deleteReference(UA_Server *server, const UA_NodeId sourceNodeId,
|
||||
const UA_NodeId referenceTypeId, UA_Boolean isForward,
|
||||
const UA_ExpandedNodeId targetNodeId, UA_Boolean deleteBidirectional);
|
||||
|
||||
/**
|
||||
* Browsing
|
||||
* -------- */
|
||||
UA_BrowseResult UA_EXPORT
|
||||
UA_Server_browse(UA_Server *server, UA_UInt32 maxrefs, const UA_BrowseDescription *descr);
|
||||
|
||||
UA_BrowseResult UA_EXPORT
|
||||
UA_Server_browseNext(UA_Server *server, UA_Boolean releaseContinuationPoint,
|
||||
const UA_ByteString *continuationPoint);
|
||||
|
||||
#ifndef HAVE_NODEITER_CALLBACK
|
||||
#define HAVE_NODEITER_CALLBACK
|
||||
/* Iterate over all nodes referenced by parentNodeId by calling the callback
|
||||
* function for each child node (in ifdef because GCC/CLANG handle include order
|
||||
* differently) */
|
||||
typedef UA_StatusCode (*UA_NodeIteratorCallback)(UA_NodeId childId, UA_Boolean isInverse,
|
||||
UA_NodeId referenceTypeId, void *handle);
|
||||
#endif
|
||||
|
||||
UA_StatusCode UA_EXPORT
|
||||
UA_Server_forEachChildNodeCall(UA_Server *server, UA_NodeId parentNodeId,
|
||||
UA_NodeIteratorCallback callback, void *handle);
|
||||
|
||||
/**
|
||||
* Method Call
|
||||
* ----------- */
|
||||
#ifdef UA_ENABLE_METHODCALLS
|
||||
UA_CallMethodResult UA_EXPORT
|
||||
UA_Server_call(UA_Server *server, const UA_CallMethodRequest *request);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* UA_SERVER_H_ */
|
96
include/ua_server_external_ns.h
Normal file
96
include/ua_server_external_ns.h
Normal file
@ -0,0 +1,96 @@
|
||||
/*
|
||||
* Copyright (C) 2014 the contributors as stated in the AUTHORS file
|
||||
*
|
||||
* This file is part of open62541. open62541 is free software: you can
|
||||
* redistribute it and/or modify it under the terms of the GNU Lesser General
|
||||
* Public License, version 3 (as published by the Free Software Foundation) with
|
||||
* a static linking exception as stated in the LICENSE file provided with
|
||||
* open62541.
|
||||
*
|
||||
* open62541 is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
* A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*/
|
||||
|
||||
#ifndef UA_SERVER_EXTERNAL_NS_H_
|
||||
#define UA_SERVER_EXTERNAL_NS_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* An external application that manages its own data and data model. To plug in
|
||||
* outside data sources, one can use
|
||||
*
|
||||
* - VariableNodes with a data source (functions that are called for read and write access)
|
||||
* - An external nodestore that is mapped to specific namespaces
|
||||
*
|
||||
* If no external nodestore is defined for a nodeid, it is always looked up in
|
||||
* the "local" nodestore of open62541. Namespace Zero is always in the local
|
||||
* nodestore.
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
|
||||
typedef UA_Int32 (*UA_ExternalNodeStore_addNodes)
|
||||
(void *ensHandle, const UA_RequestHeader *requestHeader, UA_AddNodesItem *nodesToAdd, UA_UInt32 *indices,
|
||||
UA_UInt32 indicesSize, UA_AddNodesResult* addNodesResults, UA_DiagnosticInfo *diagnosticInfos);
|
||||
|
||||
typedef UA_Int32 (*UA_ExternalNodeStore_addReferences)
|
||||
(void *ensHandle, const UA_RequestHeader *requestHeader, UA_AddReferencesItem* referencesToAdd,
|
||||
UA_UInt32 *indices,UA_UInt32 indicesSize, UA_StatusCode *addReferencesResults,
|
||||
UA_DiagnosticInfo *diagnosticInfos);
|
||||
|
||||
typedef UA_Int32 (*UA_ExternalNodeStore_deleteNodes)
|
||||
(void *ensHandle, const UA_RequestHeader *requestHeader, UA_DeleteNodesItem *nodesToDelete, UA_UInt32 *indices,
|
||||
UA_UInt32 indicesSize, UA_StatusCode *deleteNodesResults, UA_DiagnosticInfo *diagnosticInfos);
|
||||
|
||||
typedef UA_Int32 (*UA_ExternalNodeStore_deleteReferences)
|
||||
(void *ensHandle, const UA_RequestHeader *requestHeader, UA_DeleteReferencesItem *referenceToDelete,
|
||||
UA_UInt32 *indices, UA_UInt32 indicesSize, UA_StatusCode deleteReferencesresults,
|
||||
UA_DiagnosticInfo *diagnosticInfos);
|
||||
|
||||
typedef UA_Int32 (*UA_ExternalNodeStore_readNodes)
|
||||
(void *ensHandle, const UA_RequestHeader *requestHeader, UA_ReadValueId *readValueIds, UA_UInt32 *indices,
|
||||
UA_UInt32 indicesSize,UA_DataValue *readNodesResults, UA_Boolean timeStampToReturn,
|
||||
UA_DiagnosticInfo *diagnosticInfos);
|
||||
|
||||
typedef UA_Int32 (*UA_ExternalNodeStore_writeNodes)
|
||||
(void *ensHandle, const UA_RequestHeader *requestHeader, UA_WriteValue *writeValues, UA_UInt32 *indices,
|
||||
UA_UInt32 indicesSize, UA_StatusCode *writeNodesResults, UA_DiagnosticInfo *diagnosticInfo);
|
||||
|
||||
typedef UA_Int32 (*UA_ExternalNodeStore_browseNodes)
|
||||
(void *ensHandle, const UA_RequestHeader *requestHeader, UA_BrowseDescription *browseDescriptions,
|
||||
UA_UInt32 *indices, UA_UInt32 indicesSize, UA_UInt32 requestedMaxReferencesPerNode,
|
||||
UA_BrowseResult *browseResults, UA_DiagnosticInfo *diagnosticInfos);
|
||||
|
||||
typedef UA_Int32 (*UA_ExternalNodeStore_translateBrowsePathsToNodeIds)
|
||||
(void *ensHandle, const UA_RequestHeader *requestHeader, UA_BrowsePath *browsePath, UA_UInt32 *indices,
|
||||
UA_UInt32 indicesSize, UA_BrowsePathResult *browsePathResults, UA_DiagnosticInfo *diagnosticInfos);
|
||||
|
||||
typedef UA_Int32 (*UA_ExternalNodeStore_delete)(void *ensHandle);
|
||||
|
||||
typedef struct UA_ExternalNodeStore {
|
||||
void *ensHandle;
|
||||
UA_ExternalNodeStore_addNodes addNodes;
|
||||
UA_ExternalNodeStore_deleteNodes deleteNodes;
|
||||
UA_ExternalNodeStore_writeNodes writeNodes;
|
||||
UA_ExternalNodeStore_readNodes readNodes;
|
||||
UA_ExternalNodeStore_browseNodes browseNodes;
|
||||
UA_ExternalNodeStore_translateBrowsePathsToNodeIds translateBrowsePathsToNodeIds;
|
||||
UA_ExternalNodeStore_addReferences addReferences;
|
||||
UA_ExternalNodeStore_deleteReferences deleteReferences;
|
||||
UA_ExternalNodeStore_delete destroy;
|
||||
} UA_ExternalNodeStore;
|
||||
|
||||
UA_StatusCode UA_EXPORT
|
||||
UA_Server_addExternalNamespace(UA_Server *server, const UA_String *url,
|
||||
UA_ExternalNodeStore *nodeStore, UA_UInt16 *assignedNamespaceIndex);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* UA_SERVER_EXTERNAL_NS_H_ */
|
73
include/ua_session.h
Normal file
73
include/ua_session.h
Normal file
@ -0,0 +1,73 @@
|
||||
#ifndef UA_SESSION_H_
|
||||
#define UA_SESSION_H_
|
||||
|
||||
#include "queue.h"
|
||||
#include "ua_types.h"
|
||||
#include "ua_securechannel.h"
|
||||
#include "ua_server.h"
|
||||
|
||||
#define MAXCONTINUATIONPOINTS 5
|
||||
|
||||
struct ContinuationPointEntry {
|
||||
LIST_ENTRY(ContinuationPointEntry) pointers;
|
||||
UA_ByteString identifier;
|
||||
UA_BrowseDescription browseDescription;
|
||||
UA_UInt32 continuationIndex;
|
||||
UA_UInt32 maxReferences;
|
||||
};
|
||||
|
||||
struct UA_Subscription;
|
||||
typedef struct UA_Subscription UA_Subscription;
|
||||
|
||||
typedef struct UA_PublishResponseEntry {
|
||||
SIMPLEQ_ENTRY(UA_PublishResponseEntry) listEntry;
|
||||
UA_UInt32 requestId;
|
||||
UA_PublishResponse response;
|
||||
} UA_PublishResponseEntry;
|
||||
|
||||
struct UA_Session {
|
||||
UA_ApplicationDescription clientDescription;
|
||||
UA_Boolean activated;
|
||||
UA_String sessionName;
|
||||
UA_NodeId authenticationToken;
|
||||
UA_NodeId sessionId;
|
||||
UA_UInt32 maxRequestMessageSize;
|
||||
UA_UInt32 maxResponseMessageSize;
|
||||
UA_Double timeout; // [ms]
|
||||
UA_DateTime validTill;
|
||||
UA_SecureChannel *channel;
|
||||
UA_UInt16 availableContinuationPoints;
|
||||
LIST_HEAD(ContinuationPointList, ContinuationPointEntry) continuationPoints;
|
||||
#ifdef UA_ENABLE_SUBSCRIPTIONS
|
||||
UA_UInt32 lastSubscriptionID;
|
||||
LIST_HEAD(UA_ListOfUASubscriptions, UA_Subscription) serverSubscriptions;
|
||||
SIMPLEQ_HEAD(UA_ListOfQueuedPublishResponses, UA_PublishResponseEntry) responseQueue;
|
||||
#endif
|
||||
};
|
||||
|
||||
/* Local access to the services (for startup and maintenance) uses this Session
|
||||
* with all possible access rights (Session ID: 1) */
|
||||
extern UA_Session adminSession;
|
||||
|
||||
void UA_Session_init(UA_Session *session);
|
||||
void UA_Session_deleteMembersCleanup(UA_Session *session, UA_Server *server);
|
||||
|
||||
/* If any activity on a session happens, the timeout is extended */
|
||||
void UA_Session_updateLifetime(UA_Session *session);
|
||||
|
||||
#ifdef UA_ENABLE_SUBSCRIPTIONS
|
||||
void UA_Session_addSubscription(UA_Session *session, UA_Subscription *newSubscription);
|
||||
|
||||
UA_Subscription *
|
||||
UA_Session_getSubscriptionByID(UA_Session *session, UA_UInt32 subscriptionID);
|
||||
|
||||
UA_StatusCode
|
||||
UA_Session_deleteSubscription(UA_Server *server, UA_Session *session,
|
||||
UA_UInt32 subscriptionID);
|
||||
|
||||
UA_UInt32
|
||||
UA_Session_getUniqueSubscriptionID(UA_Session *session);
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* UA_SESSION_H_ */
|
401
include/ua_transport_generated.c
Normal file
401
include/ua_transport_generated.c
Normal file
@ -0,0 +1,401 @@
|
||||
/* Generated from Opc.Ua.Types.bsd, Custom.Opc.Ua.Transport.bsd with script /home/wn/Sources/open62541-open62541-395ce48/tools/generate_datatypes.py
|
||||
* on host debianX by user wn at 2016-06-08 10:05:20 */
|
||||
|
||||
#include "stddef.h"
|
||||
#include "ua_types.h"
|
||||
#include "ua_transport_generated.h"
|
||||
|
||||
/* SecureConversationMessageAbortBody */
|
||||
static UA_DataTypeMember SecureConversationMessageAbortBody_members[2] = {
|
||||
{ .memberTypeIndex = UA_TYPES_UINT32,
|
||||
#ifdef UA_ENABLE_TYPENAMES
|
||||
.memberName = "error",
|
||||
#endif
|
||||
.namespaceZero = true,
|
||||
.padding = 0,
|
||||
.isArray = false
|
||||
},
|
||||
{ .memberTypeIndex = UA_TYPES_STRING,
|
||||
#ifdef UA_ENABLE_TYPENAMES
|
||||
.memberName = "reason",
|
||||
#endif
|
||||
.namespaceZero = true,
|
||||
.padding = offsetof(UA_SecureConversationMessageAbortBody, reason) - offsetof(UA_SecureConversationMessageAbortBody, error) - sizeof(UA_UInt32),
|
||||
.isArray = false
|
||||
},};
|
||||
|
||||
/* SecureConversationMessageFooter */
|
||||
static UA_DataTypeMember SecureConversationMessageFooter_members[2] = {
|
||||
{ .memberTypeIndex = UA_TYPES_BYTE,
|
||||
#ifdef UA_ENABLE_TYPENAMES
|
||||
.memberName = "padding",
|
||||
#endif
|
||||
.namespaceZero = true,
|
||||
.padding = 0,
|
||||
.isArray = true
|
||||
},
|
||||
{ .memberTypeIndex = UA_TYPES_BYTE,
|
||||
#ifdef UA_ENABLE_TYPENAMES
|
||||
.memberName = "signature",
|
||||
#endif
|
||||
.namespaceZero = true,
|
||||
.padding = offsetof(UA_SecureConversationMessageFooter, signature) - offsetof(UA_SecureConversationMessageFooter, padding) - sizeof(void*),
|
||||
.isArray = false
|
||||
},};
|
||||
|
||||
/* TcpHelloMessage */
|
||||
static UA_DataTypeMember TcpHelloMessage_members[6] = {
|
||||
{ .memberTypeIndex = UA_TYPES_UINT32,
|
||||
#ifdef UA_ENABLE_TYPENAMES
|
||||
.memberName = "protocolVersion",
|
||||
#endif
|
||||
.namespaceZero = true,
|
||||
.padding = 0,
|
||||
.isArray = false
|
||||
},
|
||||
{ .memberTypeIndex = UA_TYPES_UINT32,
|
||||
#ifdef UA_ENABLE_TYPENAMES
|
||||
.memberName = "receiveBufferSize",
|
||||
#endif
|
||||
.namespaceZero = true,
|
||||
.padding = offsetof(UA_TcpHelloMessage, receiveBufferSize) - offsetof(UA_TcpHelloMessage, protocolVersion) - sizeof(UA_UInt32),
|
||||
.isArray = false
|
||||
},
|
||||
{ .memberTypeIndex = UA_TYPES_UINT32,
|
||||
#ifdef UA_ENABLE_TYPENAMES
|
||||
.memberName = "sendBufferSize",
|
||||
#endif
|
||||
.namespaceZero = true,
|
||||
.padding = offsetof(UA_TcpHelloMessage, sendBufferSize) - offsetof(UA_TcpHelloMessage, receiveBufferSize) - sizeof(UA_UInt32),
|
||||
.isArray = false
|
||||
},
|
||||
{ .memberTypeIndex = UA_TYPES_UINT32,
|
||||
#ifdef UA_ENABLE_TYPENAMES
|
||||
.memberName = "maxMessageSize",
|
||||
#endif
|
||||
.namespaceZero = true,
|
||||
.padding = offsetof(UA_TcpHelloMessage, maxMessageSize) - offsetof(UA_TcpHelloMessage, sendBufferSize) - sizeof(UA_UInt32),
|
||||
.isArray = false
|
||||
},
|
||||
{ .memberTypeIndex = UA_TYPES_UINT32,
|
||||
#ifdef UA_ENABLE_TYPENAMES
|
||||
.memberName = "maxChunkCount",
|
||||
#endif
|
||||
.namespaceZero = true,
|
||||
.padding = offsetof(UA_TcpHelloMessage, maxChunkCount) - offsetof(UA_TcpHelloMessage, maxMessageSize) - sizeof(UA_UInt32),
|
||||
.isArray = false
|
||||
},
|
||||
{ .memberTypeIndex = UA_TYPES_STRING,
|
||||
#ifdef UA_ENABLE_TYPENAMES
|
||||
.memberName = "endpointUrl",
|
||||
#endif
|
||||
.namespaceZero = true,
|
||||
.padding = offsetof(UA_TcpHelloMessage, endpointUrl) - offsetof(UA_TcpHelloMessage, maxChunkCount) - sizeof(UA_UInt32),
|
||||
.isArray = false
|
||||
},};
|
||||
|
||||
/* MessageType */
|
||||
static UA_DataTypeMember MessageType_members[1] = {
|
||||
{ .memberTypeIndex = UA_TYPES_INT32,
|
||||
#ifdef UA_ENABLE_TYPENAMES
|
||||
.memberName = "",
|
||||
#endif
|
||||
.namespaceZero = true,
|
||||
.padding = 0,
|
||||
.isArray = false
|
||||
},};
|
||||
|
||||
/* AsymmetricAlgorithmSecurityHeader */
|
||||
static UA_DataTypeMember AsymmetricAlgorithmSecurityHeader_members[3] = {
|
||||
{ .memberTypeIndex = UA_TYPES_BYTESTRING,
|
||||
#ifdef UA_ENABLE_TYPENAMES
|
||||
.memberName = "securityPolicyUri",
|
||||
#endif
|
||||
.namespaceZero = true,
|
||||
.padding = 0,
|
||||
.isArray = false
|
||||
},
|
||||
{ .memberTypeIndex = UA_TYPES_BYTESTRING,
|
||||
#ifdef UA_ENABLE_TYPENAMES
|
||||
.memberName = "senderCertificate",
|
||||
#endif
|
||||
.namespaceZero = true,
|
||||
.padding = offsetof(UA_AsymmetricAlgorithmSecurityHeader, senderCertificate) - offsetof(UA_AsymmetricAlgorithmSecurityHeader, securityPolicyUri) - sizeof(UA_ByteString),
|
||||
.isArray = false
|
||||
},
|
||||
{ .memberTypeIndex = UA_TYPES_BYTESTRING,
|
||||
#ifdef UA_ENABLE_TYPENAMES
|
||||
.memberName = "receiverCertificateThumbprint",
|
||||
#endif
|
||||
.namespaceZero = true,
|
||||
.padding = offsetof(UA_AsymmetricAlgorithmSecurityHeader, receiverCertificateThumbprint) - offsetof(UA_AsymmetricAlgorithmSecurityHeader, senderCertificate) - sizeof(UA_ByteString),
|
||||
.isArray = false
|
||||
},};
|
||||
|
||||
/* TcpAcknowledgeMessage */
|
||||
static UA_DataTypeMember TcpAcknowledgeMessage_members[5] = {
|
||||
{ .memberTypeIndex = UA_TYPES_UINT32,
|
||||
#ifdef UA_ENABLE_TYPENAMES
|
||||
.memberName = "protocolVersion",
|
||||
#endif
|
||||
.namespaceZero = true,
|
||||
.padding = 0,
|
||||
.isArray = false
|
||||
},
|
||||
{ .memberTypeIndex = UA_TYPES_UINT32,
|
||||
#ifdef UA_ENABLE_TYPENAMES
|
||||
.memberName = "receiveBufferSize",
|
||||
#endif
|
||||
.namespaceZero = true,
|
||||
.padding = offsetof(UA_TcpAcknowledgeMessage, receiveBufferSize) - offsetof(UA_TcpAcknowledgeMessage, protocolVersion) - sizeof(UA_UInt32),
|
||||
.isArray = false
|
||||
},
|
||||
{ .memberTypeIndex = UA_TYPES_UINT32,
|
||||
#ifdef UA_ENABLE_TYPENAMES
|
||||
.memberName = "sendBufferSize",
|
||||
#endif
|
||||
.namespaceZero = true,
|
||||
.padding = offsetof(UA_TcpAcknowledgeMessage, sendBufferSize) - offsetof(UA_TcpAcknowledgeMessage, receiveBufferSize) - sizeof(UA_UInt32),
|
||||
.isArray = false
|
||||
},
|
||||
{ .memberTypeIndex = UA_TYPES_UINT32,
|
||||
#ifdef UA_ENABLE_TYPENAMES
|
||||
.memberName = "maxMessageSize",
|
||||
#endif
|
||||
.namespaceZero = true,
|
||||
.padding = offsetof(UA_TcpAcknowledgeMessage, maxMessageSize) - offsetof(UA_TcpAcknowledgeMessage, sendBufferSize) - sizeof(UA_UInt32),
|
||||
.isArray = false
|
||||
},
|
||||
{ .memberTypeIndex = UA_TYPES_UINT32,
|
||||
#ifdef UA_ENABLE_TYPENAMES
|
||||
.memberName = "maxChunkCount",
|
||||
#endif
|
||||
.namespaceZero = true,
|
||||
.padding = offsetof(UA_TcpAcknowledgeMessage, maxChunkCount) - offsetof(UA_TcpAcknowledgeMessage, maxMessageSize) - sizeof(UA_UInt32),
|
||||
.isArray = false
|
||||
},};
|
||||
|
||||
/* SequenceHeader */
|
||||
static UA_DataTypeMember SequenceHeader_members[2] = {
|
||||
{ .memberTypeIndex = UA_TYPES_UINT32,
|
||||
#ifdef UA_ENABLE_TYPENAMES
|
||||
.memberName = "sequenceNumber",
|
||||
#endif
|
||||
.namespaceZero = true,
|
||||
.padding = 0,
|
||||
.isArray = false
|
||||
},
|
||||
{ .memberTypeIndex = UA_TYPES_UINT32,
|
||||
#ifdef UA_ENABLE_TYPENAMES
|
||||
.memberName = "requestId",
|
||||
#endif
|
||||
.namespaceZero = true,
|
||||
.padding = offsetof(UA_SequenceHeader, requestId) - offsetof(UA_SequenceHeader, sequenceNumber) - sizeof(UA_UInt32),
|
||||
.isArray = false
|
||||
},};
|
||||
|
||||
/* TcpMessageHeader */
|
||||
static UA_DataTypeMember TcpMessageHeader_members[2] = {
|
||||
{ .memberTypeIndex = UA_TYPES_UINT32,
|
||||
#ifdef UA_ENABLE_TYPENAMES
|
||||
.memberName = "messageTypeAndChunkType",
|
||||
#endif
|
||||
.namespaceZero = true,
|
||||
.padding = 0,
|
||||
.isArray = false
|
||||
},
|
||||
{ .memberTypeIndex = UA_TYPES_UINT32,
|
||||
#ifdef UA_ENABLE_TYPENAMES
|
||||
.memberName = "messageSize",
|
||||
#endif
|
||||
.namespaceZero = true,
|
||||
.padding = offsetof(UA_TcpMessageHeader, messageSize) - offsetof(UA_TcpMessageHeader, messageTypeAndChunkType) - sizeof(UA_UInt32),
|
||||
.isArray = false
|
||||
},};
|
||||
|
||||
/* ChunkType */
|
||||
static UA_DataTypeMember ChunkType_members[1] = {
|
||||
{ .memberTypeIndex = UA_TYPES_INT32,
|
||||
#ifdef UA_ENABLE_TYPENAMES
|
||||
.memberName = "",
|
||||
#endif
|
||||
.namespaceZero = true,
|
||||
.padding = 0,
|
||||
.isArray = false
|
||||
},};
|
||||
|
||||
/* SymmetricAlgorithmSecurityHeader */
|
||||
static UA_DataTypeMember SymmetricAlgorithmSecurityHeader_members[1] = {
|
||||
{ .memberTypeIndex = UA_TYPES_UINT32,
|
||||
#ifdef UA_ENABLE_TYPENAMES
|
||||
.memberName = "tokenId",
|
||||
#endif
|
||||
.namespaceZero = true,
|
||||
.padding = 0,
|
||||
.isArray = false
|
||||
},};
|
||||
|
||||
/* SecureConversationMessageHeader */
|
||||
static UA_DataTypeMember SecureConversationMessageHeader_members[2] = {
|
||||
{ .memberTypeIndex = UA_TRANSPORT_TCPMESSAGEHEADER,
|
||||
#ifdef UA_ENABLE_TYPENAMES
|
||||
.memberName = "messageHeader",
|
||||
#endif
|
||||
.namespaceZero = false,
|
||||
.padding = 0,
|
||||
.isArray = false
|
||||
},
|
||||
{ .memberTypeIndex = UA_TYPES_UINT32,
|
||||
#ifdef UA_ENABLE_TYPENAMES
|
||||
.memberName = "secureChannelId",
|
||||
#endif
|
||||
.namespaceZero = true,
|
||||
.padding = offsetof(UA_SecureConversationMessageHeader, secureChannelId) - offsetof(UA_SecureConversationMessageHeader, messageHeader) - sizeof(UA_TcpMessageHeader),
|
||||
.isArray = false
|
||||
},};
|
||||
const UA_DataType UA_TRANSPORT[UA_TRANSPORT_COUNT] = {
|
||||
|
||||
/* SecureConversationMessageAbortBody */
|
||||
{ .typeId = {.namespaceIndex = 0, .identifierType = UA_NODEIDTYPE_NUMERIC, .identifier.numeric = 0},
|
||||
.typeIndex = UA_TRANSPORT_SECURECONVERSATIONMESSAGEABORTBODY,
|
||||
#ifdef UA_ENABLE_TYPENAMES
|
||||
.typeName = "SecureConversationMessageAbortBody",
|
||||
#endif
|
||||
.memSize = sizeof(UA_SecureConversationMessageAbortBody),
|
||||
.builtin = false,
|
||||
.fixedSize = false,
|
||||
.overlayable = false,
|
||||
.membersSize = 2,
|
||||
.members = SecureConversationMessageAbortBody_members },
|
||||
|
||||
/* SecureConversationMessageFooter */
|
||||
{ .typeId = {.namespaceIndex = 0, .identifierType = UA_NODEIDTYPE_NUMERIC, .identifier.numeric = 0},
|
||||
.typeIndex = UA_TRANSPORT_SECURECONVERSATIONMESSAGEFOOTER,
|
||||
#ifdef UA_ENABLE_TYPENAMES
|
||||
.typeName = "SecureConversationMessageFooter",
|
||||
#endif
|
||||
.memSize = sizeof(UA_SecureConversationMessageFooter),
|
||||
.builtin = false,
|
||||
.fixedSize = false,
|
||||
.overlayable = false,
|
||||
.membersSize = 2,
|
||||
.members = SecureConversationMessageFooter_members },
|
||||
|
||||
/* TcpHelloMessage */
|
||||
{ .typeId = {.namespaceIndex = 0, .identifierType = UA_NODEIDTYPE_NUMERIC, .identifier.numeric = 0},
|
||||
.typeIndex = UA_TRANSPORT_TCPHELLOMESSAGE,
|
||||
#ifdef UA_ENABLE_TYPENAMES
|
||||
.typeName = "TcpHelloMessage",
|
||||
#endif
|
||||
.memSize = sizeof(UA_TcpHelloMessage),
|
||||
.builtin = false,
|
||||
.fixedSize = false,
|
||||
.overlayable = false,
|
||||
.membersSize = 6,
|
||||
.members = TcpHelloMessage_members },
|
||||
|
||||
/* MessageType */
|
||||
{ .typeId = {.namespaceIndex = 0, .identifierType = UA_NODEIDTYPE_NUMERIC, .identifier.numeric = 0},
|
||||
.typeIndex = UA_TYPES_INT32,
|
||||
#ifdef UA_ENABLE_TYPENAMES
|
||||
.typeName = "MessageType",
|
||||
#endif
|
||||
.memSize = sizeof(UA_MessageType),
|
||||
.builtin = true,
|
||||
.fixedSize = true,
|
||||
.overlayable = UA_BINARY_OVERLAYABLE_INTEGER,
|
||||
.membersSize = 1,
|
||||
.members = MessageType_members },
|
||||
|
||||
/* AsymmetricAlgorithmSecurityHeader */
|
||||
{ .typeId = {.namespaceIndex = 0, .identifierType = UA_NODEIDTYPE_NUMERIC, .identifier.numeric = 0},
|
||||
.typeIndex = UA_TRANSPORT_ASYMMETRICALGORITHMSECURITYHEADER,
|
||||
#ifdef UA_ENABLE_TYPENAMES
|
||||
.typeName = "AsymmetricAlgorithmSecurityHeader",
|
||||
#endif
|
||||
.memSize = sizeof(UA_AsymmetricAlgorithmSecurityHeader),
|
||||
.builtin = false,
|
||||
.fixedSize = false,
|
||||
.overlayable = false,
|
||||
.membersSize = 3,
|
||||
.members = AsymmetricAlgorithmSecurityHeader_members },
|
||||
|
||||
/* TcpAcknowledgeMessage */
|
||||
{ .typeId = {.namespaceIndex = 0, .identifierType = UA_NODEIDTYPE_NUMERIC, .identifier.numeric = 0},
|
||||
.typeIndex = UA_TRANSPORT_TCPACKNOWLEDGEMESSAGE,
|
||||
#ifdef UA_ENABLE_TYPENAMES
|
||||
.typeName = "TcpAcknowledgeMessage",
|
||||
#endif
|
||||
.memSize = sizeof(UA_TcpAcknowledgeMessage),
|
||||
.builtin = false,
|
||||
.fixedSize = true,
|
||||
.overlayable = true && UA_BINARY_OVERLAYABLE_INTEGER && UA_BINARY_OVERLAYABLE_INTEGER && offsetof(UA_TcpAcknowledgeMessage, receiveBufferSize) == (offsetof(UA_TcpAcknowledgeMessage, protocolVersion) + sizeof(UA_UInt32)) && UA_BINARY_OVERLAYABLE_INTEGER && offsetof(UA_TcpAcknowledgeMessage, sendBufferSize) == (offsetof(UA_TcpAcknowledgeMessage, receiveBufferSize) + sizeof(UA_UInt32)) && UA_BINARY_OVERLAYABLE_INTEGER && offsetof(UA_TcpAcknowledgeMessage, maxMessageSize) == (offsetof(UA_TcpAcknowledgeMessage, sendBufferSize) + sizeof(UA_UInt32)) && UA_BINARY_OVERLAYABLE_INTEGER && offsetof(UA_TcpAcknowledgeMessage, maxChunkCount) == (offsetof(UA_TcpAcknowledgeMessage, maxMessageSize) + sizeof(UA_UInt32)),
|
||||
.membersSize = 5,
|
||||
.members = TcpAcknowledgeMessage_members },
|
||||
|
||||
/* SequenceHeader */
|
||||
{ .typeId = {.namespaceIndex = 0, .identifierType = UA_NODEIDTYPE_NUMERIC, .identifier.numeric = 0},
|
||||
.typeIndex = UA_TRANSPORT_SEQUENCEHEADER,
|
||||
#ifdef UA_ENABLE_TYPENAMES
|
||||
.typeName = "SequenceHeader",
|
||||
#endif
|
||||
.memSize = sizeof(UA_SequenceHeader),
|
||||
.builtin = false,
|
||||
.fixedSize = true,
|
||||
.overlayable = true && UA_BINARY_OVERLAYABLE_INTEGER && UA_BINARY_OVERLAYABLE_INTEGER && offsetof(UA_SequenceHeader, requestId) == (offsetof(UA_SequenceHeader, sequenceNumber) + sizeof(UA_UInt32)),
|
||||
.membersSize = 2,
|
||||
.members = SequenceHeader_members },
|
||||
|
||||
/* TcpMessageHeader */
|
||||
{ .typeId = {.namespaceIndex = 0, .identifierType = UA_NODEIDTYPE_NUMERIC, .identifier.numeric = 0},
|
||||
.typeIndex = UA_TRANSPORT_TCPMESSAGEHEADER,
|
||||
#ifdef UA_ENABLE_TYPENAMES
|
||||
.typeName = "TcpMessageHeader",
|
||||
#endif
|
||||
.memSize = sizeof(UA_TcpMessageHeader),
|
||||
.builtin = false,
|
||||
.fixedSize = true,
|
||||
.overlayable = true && UA_BINARY_OVERLAYABLE_INTEGER && UA_BINARY_OVERLAYABLE_INTEGER && offsetof(UA_TcpMessageHeader, messageSize) == (offsetof(UA_TcpMessageHeader, messageTypeAndChunkType) + sizeof(UA_UInt32)),
|
||||
.membersSize = 2,
|
||||
.members = TcpMessageHeader_members },
|
||||
|
||||
/* ChunkType */
|
||||
{ .typeId = {.namespaceIndex = 0, .identifierType = UA_NODEIDTYPE_NUMERIC, .identifier.numeric = 0},
|
||||
.typeIndex = UA_TYPES_INT32,
|
||||
#ifdef UA_ENABLE_TYPENAMES
|
||||
.typeName = "ChunkType",
|
||||
#endif
|
||||
.memSize = sizeof(UA_ChunkType),
|
||||
.builtin = true,
|
||||
.fixedSize = true,
|
||||
.overlayable = UA_BINARY_OVERLAYABLE_INTEGER,
|
||||
.membersSize = 1,
|
||||
.members = ChunkType_members },
|
||||
|
||||
/* SymmetricAlgorithmSecurityHeader */
|
||||
{ .typeId = {.namespaceIndex = 0, .identifierType = UA_NODEIDTYPE_NUMERIC, .identifier.numeric = 0},
|
||||
.typeIndex = UA_TRANSPORT_SYMMETRICALGORITHMSECURITYHEADER,
|
||||
#ifdef UA_ENABLE_TYPENAMES
|
||||
.typeName = "SymmetricAlgorithmSecurityHeader",
|
||||
#endif
|
||||
.memSize = sizeof(UA_SymmetricAlgorithmSecurityHeader),
|
||||
.builtin = false,
|
||||
.fixedSize = true,
|
||||
.overlayable = true && UA_BINARY_OVERLAYABLE_INTEGER,
|
||||
.membersSize = 1,
|
||||
.members = SymmetricAlgorithmSecurityHeader_members },
|
||||
|
||||
/* SecureConversationMessageHeader */
|
||||
{ .typeId = {.namespaceIndex = 0, .identifierType = UA_NODEIDTYPE_NUMERIC, .identifier.numeric = 0},
|
||||
.typeIndex = UA_TRANSPORT_SECURECONVERSATIONMESSAGEHEADER,
|
||||
#ifdef UA_ENABLE_TYPENAMES
|
||||
.typeName = "SecureConversationMessageHeader",
|
||||
#endif
|
||||
.memSize = sizeof(UA_SecureConversationMessageHeader),
|
||||
.builtin = false,
|
||||
.fixedSize = true,
|
||||
.overlayable = true && true && UA_BINARY_OVERLAYABLE_INTEGER && UA_BINARY_OVERLAYABLE_INTEGER && offsetof(UA_TcpMessageHeader, messageSize) == (offsetof(UA_TcpMessageHeader, messageTypeAndChunkType) + sizeof(UA_UInt32)) && UA_BINARY_OVERLAYABLE_INTEGER && offsetof(UA_SecureConversationMessageHeader, secureChannelId) == (offsetof(UA_SecureConversationMessageHeader, messageHeader) + sizeof(UA_TcpMessageHeader)),
|
||||
.membersSize = 2,
|
||||
.members = SecureConversationMessageHeader_members },
|
||||
};
|
||||
|
218
include/ua_transport_generated.h
Normal file
218
include/ua_transport_generated.h
Normal file
@ -0,0 +1,218 @@
|
||||
/* Generated from Opc.Ua.Types.bsd, Custom.Opc.Ua.Transport.bsd with script /home/wn/Sources/open62541-open62541-395ce48/tools/generate_datatypes.py
|
||||
* on host debianX by user wn at 2016-06-08 10:05:20 */
|
||||
|
||||
#ifndef UA_TRANSPORT_GENERATED_H_
|
||||
#define UA_TRANSPORT_GENERATED_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "ua_types.h"
|
||||
#ifdef UA_INTERNAL
|
||||
#include "ua_types_encoding_binary.h"
|
||||
#endif
|
||||
#include "ua_types_generated.h"
|
||||
|
||||
|
||||
/**
|
||||
* Additional Data Type Definitions
|
||||
* ================================
|
||||
*/
|
||||
|
||||
#define UA_TRANSPORT_COUNT 11
|
||||
extern UA_EXPORT const UA_DataType UA_TRANSPORT[UA_TRANSPORT_COUNT];
|
||||
|
||||
/**
|
||||
* SecureConversationMessageAbortBody
|
||||
* ----------------------------------
|
||||
* Secure Conversation Message Abort Body */
|
||||
typedef struct {
|
||||
UA_UInt32 error;
|
||||
UA_String reason;
|
||||
} UA_SecureConversationMessageAbortBody;
|
||||
|
||||
#define UA_TRANSPORT_SECURECONVERSATIONMESSAGEABORTBODY 0
|
||||
static UA_INLINE void UA_SecureConversationMessageAbortBody_init(UA_SecureConversationMessageAbortBody *p) { memset(p, 0, sizeof(UA_SecureConversationMessageAbortBody)); }
|
||||
static UA_INLINE UA_SecureConversationMessageAbortBody * UA_SecureConversationMessageAbortBody_new(void) { return (UA_SecureConversationMessageAbortBody*) UA_new(&UA_TRANSPORT[UA_TRANSPORT_SECURECONVERSATIONMESSAGEABORTBODY]); }
|
||||
static UA_INLINE UA_StatusCode UA_SecureConversationMessageAbortBody_copy(const UA_SecureConversationMessageAbortBody *src, UA_SecureConversationMessageAbortBody *dst) { return UA_copy(src, dst, &UA_TRANSPORT[UA_TRANSPORT_SECURECONVERSATIONMESSAGEABORTBODY]); }
|
||||
static UA_INLINE void UA_SecureConversationMessageAbortBody_deleteMembers(UA_SecureConversationMessageAbortBody *p) { UA_deleteMembers(p, &UA_TRANSPORT[UA_TRANSPORT_SECURECONVERSATIONMESSAGEABORTBODY]); }
|
||||
static UA_INLINE void UA_SecureConversationMessageAbortBody_delete(UA_SecureConversationMessageAbortBody *p) { UA_delete(p, &UA_TRANSPORT[UA_TRANSPORT_SECURECONVERSATIONMESSAGEABORTBODY]); }
|
||||
|
||||
/**
|
||||
* SecureConversationMessageFooter
|
||||
* -------------------------------
|
||||
* Secure Conversation Message Footer */
|
||||
typedef struct {
|
||||
size_t paddingSize;
|
||||
UA_Byte *padding;
|
||||
UA_Byte signature;
|
||||
} UA_SecureConversationMessageFooter;
|
||||
|
||||
#define UA_TRANSPORT_SECURECONVERSATIONMESSAGEFOOTER 1
|
||||
static UA_INLINE void UA_SecureConversationMessageFooter_init(UA_SecureConversationMessageFooter *p) { memset(p, 0, sizeof(UA_SecureConversationMessageFooter)); }
|
||||
static UA_INLINE UA_SecureConversationMessageFooter * UA_SecureConversationMessageFooter_new(void) { return (UA_SecureConversationMessageFooter*) UA_new(&UA_TRANSPORT[UA_TRANSPORT_SECURECONVERSATIONMESSAGEFOOTER]); }
|
||||
static UA_INLINE UA_StatusCode UA_SecureConversationMessageFooter_copy(const UA_SecureConversationMessageFooter *src, UA_SecureConversationMessageFooter *dst) { return UA_copy(src, dst, &UA_TRANSPORT[UA_TRANSPORT_SECURECONVERSATIONMESSAGEFOOTER]); }
|
||||
static UA_INLINE void UA_SecureConversationMessageFooter_deleteMembers(UA_SecureConversationMessageFooter *p) { UA_deleteMembers(p, &UA_TRANSPORT[UA_TRANSPORT_SECURECONVERSATIONMESSAGEFOOTER]); }
|
||||
static UA_INLINE void UA_SecureConversationMessageFooter_delete(UA_SecureConversationMessageFooter *p) { UA_delete(p, &UA_TRANSPORT[UA_TRANSPORT_SECURECONVERSATIONMESSAGEFOOTER]); }
|
||||
|
||||
/**
|
||||
* TcpHelloMessage
|
||||
* ---------------
|
||||
* Hello Message */
|
||||
typedef struct {
|
||||
UA_UInt32 protocolVersion;
|
||||
UA_UInt32 receiveBufferSize;
|
||||
UA_UInt32 sendBufferSize;
|
||||
UA_UInt32 maxMessageSize;
|
||||
UA_UInt32 maxChunkCount;
|
||||
UA_String endpointUrl;
|
||||
} UA_TcpHelloMessage;
|
||||
|
||||
#define UA_TRANSPORT_TCPHELLOMESSAGE 2
|
||||
static UA_INLINE void UA_TcpHelloMessage_init(UA_TcpHelloMessage *p) { memset(p, 0, sizeof(UA_TcpHelloMessage)); }
|
||||
static UA_INLINE UA_TcpHelloMessage * UA_TcpHelloMessage_new(void) { return (UA_TcpHelloMessage*) UA_new(&UA_TRANSPORT[UA_TRANSPORT_TCPHELLOMESSAGE]); }
|
||||
static UA_INLINE UA_StatusCode UA_TcpHelloMessage_copy(const UA_TcpHelloMessage *src, UA_TcpHelloMessage *dst) { return UA_copy(src, dst, &UA_TRANSPORT[UA_TRANSPORT_TCPHELLOMESSAGE]); }
|
||||
static UA_INLINE void UA_TcpHelloMessage_deleteMembers(UA_TcpHelloMessage *p) { UA_deleteMembers(p, &UA_TRANSPORT[UA_TRANSPORT_TCPHELLOMESSAGE]); }
|
||||
static UA_INLINE void UA_TcpHelloMessage_delete(UA_TcpHelloMessage *p) { UA_delete(p, &UA_TRANSPORT[UA_TRANSPORT_TCPHELLOMESSAGE]); }
|
||||
|
||||
/**
|
||||
* MessageType
|
||||
* -----------
|
||||
* Message Type and whether the message contains an intermediate chunk */
|
||||
typedef enum {
|
||||
UA_MESSAGETYPE_ACK = 0x4B4341,
|
||||
UA_MESSAGETYPE_HEL = 0x4C4548,
|
||||
UA_MESSAGETYPE_MSG = 0x47534D,
|
||||
UA_MESSAGETYPE_OPN = 0x4E504F,
|
||||
UA_MESSAGETYPE_CLO = 0x4F4C43
|
||||
} UA_MessageType;
|
||||
|
||||
#define UA_TRANSPORT_MESSAGETYPE 3
|
||||
static UA_INLINE void UA_MessageType_init(UA_MessageType *p) { memset(p, 0, sizeof(UA_MessageType)); }
|
||||
static UA_INLINE UA_MessageType * UA_MessageType_new(void) { return (UA_MessageType*) UA_new(&UA_TRANSPORT[UA_TRANSPORT_MESSAGETYPE]); }
|
||||
static UA_INLINE UA_StatusCode UA_MessageType_copy(const UA_MessageType *src, UA_MessageType *dst) { *dst = *src; return UA_STATUSCODE_GOOD; }
|
||||
static UA_INLINE void UA_MessageType_deleteMembers(UA_MessageType *p) { }
|
||||
static UA_INLINE void UA_MessageType_delete(UA_MessageType *p) { UA_delete(p, &UA_TRANSPORT[UA_TRANSPORT_MESSAGETYPE]); }
|
||||
|
||||
/**
|
||||
* AsymmetricAlgorithmSecurityHeader
|
||||
* ---------------------------------
|
||||
* Security Header */
|
||||
typedef struct {
|
||||
UA_ByteString securityPolicyUri;
|
||||
UA_ByteString senderCertificate;
|
||||
UA_ByteString receiverCertificateThumbprint;
|
||||
} UA_AsymmetricAlgorithmSecurityHeader;
|
||||
|
||||
#define UA_TRANSPORT_ASYMMETRICALGORITHMSECURITYHEADER 4
|
||||
static UA_INLINE void UA_AsymmetricAlgorithmSecurityHeader_init(UA_AsymmetricAlgorithmSecurityHeader *p) { memset(p, 0, sizeof(UA_AsymmetricAlgorithmSecurityHeader)); }
|
||||
static UA_INLINE UA_AsymmetricAlgorithmSecurityHeader * UA_AsymmetricAlgorithmSecurityHeader_new(void) { return (UA_AsymmetricAlgorithmSecurityHeader*) UA_new(&UA_TRANSPORT[UA_TRANSPORT_ASYMMETRICALGORITHMSECURITYHEADER]); }
|
||||
static UA_INLINE UA_StatusCode UA_AsymmetricAlgorithmSecurityHeader_copy(const UA_AsymmetricAlgorithmSecurityHeader *src, UA_AsymmetricAlgorithmSecurityHeader *dst) { return UA_copy(src, dst, &UA_TRANSPORT[UA_TRANSPORT_ASYMMETRICALGORITHMSECURITYHEADER]); }
|
||||
static UA_INLINE void UA_AsymmetricAlgorithmSecurityHeader_deleteMembers(UA_AsymmetricAlgorithmSecurityHeader *p) { UA_deleteMembers(p, &UA_TRANSPORT[UA_TRANSPORT_ASYMMETRICALGORITHMSECURITYHEADER]); }
|
||||
static UA_INLINE void UA_AsymmetricAlgorithmSecurityHeader_delete(UA_AsymmetricAlgorithmSecurityHeader *p) { UA_delete(p, &UA_TRANSPORT[UA_TRANSPORT_ASYMMETRICALGORITHMSECURITYHEADER]); }
|
||||
|
||||
/**
|
||||
* TcpAcknowledgeMessage
|
||||
* ---------------------
|
||||
* Acknowledge Message */
|
||||
typedef struct {
|
||||
UA_UInt32 protocolVersion;
|
||||
UA_UInt32 receiveBufferSize;
|
||||
UA_UInt32 sendBufferSize;
|
||||
UA_UInt32 maxMessageSize;
|
||||
UA_UInt32 maxChunkCount;
|
||||
} UA_TcpAcknowledgeMessage;
|
||||
|
||||
#define UA_TRANSPORT_TCPACKNOWLEDGEMESSAGE 5
|
||||
static UA_INLINE void UA_TcpAcknowledgeMessage_init(UA_TcpAcknowledgeMessage *p) { memset(p, 0, sizeof(UA_TcpAcknowledgeMessage)); }
|
||||
static UA_INLINE UA_TcpAcknowledgeMessage * UA_TcpAcknowledgeMessage_new(void) { return (UA_TcpAcknowledgeMessage*) UA_new(&UA_TRANSPORT[UA_TRANSPORT_TCPACKNOWLEDGEMESSAGE]); }
|
||||
static UA_INLINE UA_StatusCode UA_TcpAcknowledgeMessage_copy(const UA_TcpAcknowledgeMessage *src, UA_TcpAcknowledgeMessage *dst) { *dst = *src; return UA_STATUSCODE_GOOD; }
|
||||
static UA_INLINE void UA_TcpAcknowledgeMessage_deleteMembers(UA_TcpAcknowledgeMessage *p) { }
|
||||
static UA_INLINE void UA_TcpAcknowledgeMessage_delete(UA_TcpAcknowledgeMessage *p) { UA_delete(p, &UA_TRANSPORT[UA_TRANSPORT_TCPACKNOWLEDGEMESSAGE]); }
|
||||
|
||||
/**
|
||||
* SequenceHeader
|
||||
* --------------
|
||||
* Secure Layer Sequence Header */
|
||||
typedef struct {
|
||||
UA_UInt32 sequenceNumber;
|
||||
UA_UInt32 requestId;
|
||||
} UA_SequenceHeader;
|
||||
|
||||
#define UA_TRANSPORT_SEQUENCEHEADER 6
|
||||
static UA_INLINE void UA_SequenceHeader_init(UA_SequenceHeader *p) { memset(p, 0, sizeof(UA_SequenceHeader)); }
|
||||
static UA_INLINE UA_SequenceHeader * UA_SequenceHeader_new(void) { return (UA_SequenceHeader*) UA_new(&UA_TRANSPORT[UA_TRANSPORT_SEQUENCEHEADER]); }
|
||||
static UA_INLINE UA_StatusCode UA_SequenceHeader_copy(const UA_SequenceHeader *src, UA_SequenceHeader *dst) { *dst = *src; return UA_STATUSCODE_GOOD; }
|
||||
static UA_INLINE void UA_SequenceHeader_deleteMembers(UA_SequenceHeader *p) { }
|
||||
static UA_INLINE void UA_SequenceHeader_delete(UA_SequenceHeader *p) { UA_delete(p, &UA_TRANSPORT[UA_TRANSPORT_SEQUENCEHEADER]); }
|
||||
|
||||
/**
|
||||
* TcpMessageHeader
|
||||
* ----------------
|
||||
* TCP Header */
|
||||
typedef struct {
|
||||
UA_UInt32 messageTypeAndChunkType;
|
||||
UA_UInt32 messageSize;
|
||||
} UA_TcpMessageHeader;
|
||||
|
||||
#define UA_TRANSPORT_TCPMESSAGEHEADER 7
|
||||
static UA_INLINE void UA_TcpMessageHeader_init(UA_TcpMessageHeader *p) { memset(p, 0, sizeof(UA_TcpMessageHeader)); }
|
||||
static UA_INLINE UA_TcpMessageHeader * UA_TcpMessageHeader_new(void) { return (UA_TcpMessageHeader*) UA_new(&UA_TRANSPORT[UA_TRANSPORT_TCPMESSAGEHEADER]); }
|
||||
static UA_INLINE UA_StatusCode UA_TcpMessageHeader_copy(const UA_TcpMessageHeader *src, UA_TcpMessageHeader *dst) { *dst = *src; return UA_STATUSCODE_GOOD; }
|
||||
static UA_INLINE void UA_TcpMessageHeader_deleteMembers(UA_TcpMessageHeader *p) { }
|
||||
static UA_INLINE void UA_TcpMessageHeader_delete(UA_TcpMessageHeader *p) { UA_delete(p, &UA_TRANSPORT[UA_TRANSPORT_TCPMESSAGEHEADER]); }
|
||||
|
||||
/**
|
||||
* ChunkType
|
||||
* ---------
|
||||
* Type of the chunk */
|
||||
typedef enum {
|
||||
UA_CHUNKTYPE_FINAL = 0x46000000,
|
||||
UA_CHUNKTYPE_INTERMEDIATE = 0x43000000,
|
||||
UA_CHUNKTYPE_ABORT = 0x41000000
|
||||
} UA_ChunkType;
|
||||
|
||||
#define UA_TRANSPORT_CHUNKTYPE 8
|
||||
static UA_INLINE void UA_ChunkType_init(UA_ChunkType *p) { memset(p, 0, sizeof(UA_ChunkType)); }
|
||||
static UA_INLINE UA_ChunkType * UA_ChunkType_new(void) { return (UA_ChunkType*) UA_new(&UA_TRANSPORT[UA_TRANSPORT_CHUNKTYPE]); }
|
||||
static UA_INLINE UA_StatusCode UA_ChunkType_copy(const UA_ChunkType *src, UA_ChunkType *dst) { *dst = *src; return UA_STATUSCODE_GOOD; }
|
||||
static UA_INLINE void UA_ChunkType_deleteMembers(UA_ChunkType *p) { }
|
||||
static UA_INLINE void UA_ChunkType_delete(UA_ChunkType *p) { UA_delete(p, &UA_TRANSPORT[UA_TRANSPORT_CHUNKTYPE]); }
|
||||
|
||||
/**
|
||||
* SymmetricAlgorithmSecurityHeader
|
||||
* --------------------------------
|
||||
* Secure Layer Symmetric Algorithm Header */
|
||||
typedef struct {
|
||||
UA_UInt32 tokenId;
|
||||
} UA_SymmetricAlgorithmSecurityHeader;
|
||||
|
||||
#define UA_TRANSPORT_SYMMETRICALGORITHMSECURITYHEADER 9
|
||||
static UA_INLINE void UA_SymmetricAlgorithmSecurityHeader_init(UA_SymmetricAlgorithmSecurityHeader *p) { memset(p, 0, sizeof(UA_SymmetricAlgorithmSecurityHeader)); }
|
||||
static UA_INLINE UA_SymmetricAlgorithmSecurityHeader * UA_SymmetricAlgorithmSecurityHeader_new(void) { return (UA_SymmetricAlgorithmSecurityHeader*) UA_new(&UA_TRANSPORT[UA_TRANSPORT_SYMMETRICALGORITHMSECURITYHEADER]); }
|
||||
static UA_INLINE UA_StatusCode UA_SymmetricAlgorithmSecurityHeader_copy(const UA_SymmetricAlgorithmSecurityHeader *src, UA_SymmetricAlgorithmSecurityHeader *dst) { *dst = *src; return UA_STATUSCODE_GOOD; }
|
||||
static UA_INLINE void UA_SymmetricAlgorithmSecurityHeader_deleteMembers(UA_SymmetricAlgorithmSecurityHeader *p) { }
|
||||
static UA_INLINE void UA_SymmetricAlgorithmSecurityHeader_delete(UA_SymmetricAlgorithmSecurityHeader *p) { UA_delete(p, &UA_TRANSPORT[UA_TRANSPORT_SYMMETRICALGORITHMSECURITYHEADER]); }
|
||||
|
||||
/**
|
||||
* SecureConversationMessageHeader
|
||||
* -------------------------------
|
||||
* Secure Layer Sequence Header */
|
||||
typedef struct {
|
||||
UA_TcpMessageHeader messageHeader;
|
||||
UA_UInt32 secureChannelId;
|
||||
} UA_SecureConversationMessageHeader;
|
||||
|
||||
#define UA_TRANSPORT_SECURECONVERSATIONMESSAGEHEADER 10
|
||||
static UA_INLINE void UA_SecureConversationMessageHeader_init(UA_SecureConversationMessageHeader *p) { memset(p, 0, sizeof(UA_SecureConversationMessageHeader)); }
|
||||
static UA_INLINE UA_SecureConversationMessageHeader * UA_SecureConversationMessageHeader_new(void) { return (UA_SecureConversationMessageHeader*) UA_new(&UA_TRANSPORT[UA_TRANSPORT_SECURECONVERSATIONMESSAGEHEADER]); }
|
||||
static UA_INLINE UA_StatusCode UA_SecureConversationMessageHeader_copy(const UA_SecureConversationMessageHeader *src, UA_SecureConversationMessageHeader *dst) { *dst = *src; return UA_STATUSCODE_GOOD; }
|
||||
static UA_INLINE void UA_SecureConversationMessageHeader_deleteMembers(UA_SecureConversationMessageHeader *p) { }
|
||||
static UA_INLINE void UA_SecureConversationMessageHeader_delete(UA_SecureConversationMessageHeader *p) { UA_delete(p, &UA_TRANSPORT[UA_TRANSPORT_SECURECONVERSATIONMESSAGEHEADER]); }
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif /* UA_TRANSPORT_GENERATED_H_ */
|
49
include/ua_transport_generated_encoding_binary.h
Normal file
49
include/ua_transport_generated_encoding_binary.h
Normal file
@ -0,0 +1,49 @@
|
||||
/* Generated from Opc.Ua.Types.bsd, Custom.Opc.Ua.Transport.bsd with script /home/wn/Sources/open62541-open62541-395ce48/tools/generate_datatypes.py
|
||||
* on host debianX by user wn at 2016-06-08 10:05:20 */
|
||||
|
||||
#include "ua_types_encoding_binary.h"
|
||||
#include "ua_transport_generated.h"
|
||||
|
||||
/* SecureConversationMessageAbortBody */
|
||||
static UA_INLINE UA_StatusCode UA_SecureConversationMessageAbortBody_encodeBinary(const UA_SecureConversationMessageAbortBody *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TRANSPORT[UA_TRANSPORT_SECURECONVERSATIONMESSAGEABORTBODY], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_SecureConversationMessageAbortBody_decodeBinary(const UA_ByteString *src, size_t *offset, UA_SecureConversationMessageAbortBody *dst) { return UA_decodeBinary(src, offset, dst, &UA_TRANSPORT[UA_TRANSPORT_SECURECONVERSATIONMESSAGEABORTBODY]); }
|
||||
|
||||
/* SecureConversationMessageFooter */
|
||||
static UA_INLINE UA_StatusCode UA_SecureConversationMessageFooter_encodeBinary(const UA_SecureConversationMessageFooter *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TRANSPORT[UA_TRANSPORT_SECURECONVERSATIONMESSAGEFOOTER], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_SecureConversationMessageFooter_decodeBinary(const UA_ByteString *src, size_t *offset, UA_SecureConversationMessageFooter *dst) { return UA_decodeBinary(src, offset, dst, &UA_TRANSPORT[UA_TRANSPORT_SECURECONVERSATIONMESSAGEFOOTER]); }
|
||||
|
||||
/* TcpHelloMessage */
|
||||
static UA_INLINE UA_StatusCode UA_TcpHelloMessage_encodeBinary(const UA_TcpHelloMessage *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TRANSPORT[UA_TRANSPORT_TCPHELLOMESSAGE], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_TcpHelloMessage_decodeBinary(const UA_ByteString *src, size_t *offset, UA_TcpHelloMessage *dst) { return UA_decodeBinary(src, offset, dst, &UA_TRANSPORT[UA_TRANSPORT_TCPHELLOMESSAGE]); }
|
||||
|
||||
/* MessageType */
|
||||
static UA_INLINE UA_StatusCode UA_MessageType_encodeBinary(const UA_MessageType *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TRANSPORT[UA_TRANSPORT_MESSAGETYPE], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_MessageType_decodeBinary(const UA_ByteString *src, size_t *offset, UA_MessageType *dst) { return UA_decodeBinary(src, offset, dst, &UA_TRANSPORT[UA_TRANSPORT_MESSAGETYPE]); }
|
||||
|
||||
/* AsymmetricAlgorithmSecurityHeader */
|
||||
static UA_INLINE UA_StatusCode UA_AsymmetricAlgorithmSecurityHeader_encodeBinary(const UA_AsymmetricAlgorithmSecurityHeader *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TRANSPORT[UA_TRANSPORT_ASYMMETRICALGORITHMSECURITYHEADER], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_AsymmetricAlgorithmSecurityHeader_decodeBinary(const UA_ByteString *src, size_t *offset, UA_AsymmetricAlgorithmSecurityHeader *dst) { return UA_decodeBinary(src, offset, dst, &UA_TRANSPORT[UA_TRANSPORT_ASYMMETRICALGORITHMSECURITYHEADER]); }
|
||||
|
||||
/* TcpAcknowledgeMessage */
|
||||
static UA_INLINE UA_StatusCode UA_TcpAcknowledgeMessage_encodeBinary(const UA_TcpAcknowledgeMessage *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TRANSPORT[UA_TRANSPORT_TCPACKNOWLEDGEMESSAGE], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_TcpAcknowledgeMessage_decodeBinary(const UA_ByteString *src, size_t *offset, UA_TcpAcknowledgeMessage *dst) { return UA_decodeBinary(src, offset, dst, &UA_TRANSPORT[UA_TRANSPORT_TCPACKNOWLEDGEMESSAGE]); }
|
||||
|
||||
/* SequenceHeader */
|
||||
static UA_INLINE UA_StatusCode UA_SequenceHeader_encodeBinary(const UA_SequenceHeader *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TRANSPORT[UA_TRANSPORT_SEQUENCEHEADER], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_SequenceHeader_decodeBinary(const UA_ByteString *src, size_t *offset, UA_SequenceHeader *dst) { return UA_decodeBinary(src, offset, dst, &UA_TRANSPORT[UA_TRANSPORT_SEQUENCEHEADER]); }
|
||||
|
||||
/* TcpMessageHeader */
|
||||
static UA_INLINE UA_StatusCode UA_TcpMessageHeader_encodeBinary(const UA_TcpMessageHeader *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TRANSPORT[UA_TRANSPORT_TCPMESSAGEHEADER], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_TcpMessageHeader_decodeBinary(const UA_ByteString *src, size_t *offset, UA_TcpMessageHeader *dst) { return UA_decodeBinary(src, offset, dst, &UA_TRANSPORT[UA_TRANSPORT_TCPMESSAGEHEADER]); }
|
||||
|
||||
/* ChunkType */
|
||||
static UA_INLINE UA_StatusCode UA_ChunkType_encodeBinary(const UA_ChunkType *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TRANSPORT[UA_TRANSPORT_CHUNKTYPE], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_ChunkType_decodeBinary(const UA_ByteString *src, size_t *offset, UA_ChunkType *dst) { return UA_decodeBinary(src, offset, dst, &UA_TRANSPORT[UA_TRANSPORT_CHUNKTYPE]); }
|
||||
|
||||
/* SymmetricAlgorithmSecurityHeader */
|
||||
static UA_INLINE UA_StatusCode UA_SymmetricAlgorithmSecurityHeader_encodeBinary(const UA_SymmetricAlgorithmSecurityHeader *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TRANSPORT[UA_TRANSPORT_SYMMETRICALGORITHMSECURITYHEADER], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_SymmetricAlgorithmSecurityHeader_decodeBinary(const UA_ByteString *src, size_t *offset, UA_SymmetricAlgorithmSecurityHeader *dst) { return UA_decodeBinary(src, offset, dst, &UA_TRANSPORT[UA_TRANSPORT_SYMMETRICALGORITHMSECURITYHEADER]); }
|
||||
|
||||
/* SecureConversationMessageHeader */
|
||||
static UA_INLINE UA_StatusCode UA_SecureConversationMessageHeader_encodeBinary(const UA_SecureConversationMessageHeader *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TRANSPORT[UA_TRANSPORT_SECURECONVERSATIONMESSAGEHEADER], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_SecureConversationMessageHeader_decodeBinary(const UA_ByteString *src, size_t *offset, UA_SecureConversationMessageHeader *dst) { return UA_decodeBinary(src, offset, dst, &UA_TRANSPORT[UA_TRANSPORT_SECURECONVERSATIONMESSAGEHEADER]); }
|
771
include/ua_types.h
Normal file
771
include/ua_types.h
Normal file
@ -0,0 +1,771 @@
|
||||
/*
|
||||
* Copyright (C) 2013-2015 the contributors as stated in the AUTHORS file
|
||||
*
|
||||
* This file is part of open62541. open62541 is free software: you can
|
||||
* redistribute it and/or modify it under the terms of the GNU Lesser General
|
||||
* Public License, version 3 (as published by the Free Software Foundation) with
|
||||
* a static linking exception as stated in the LICENSE file provided with
|
||||
* open62541.
|
||||
*
|
||||
* open62541 is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
* A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*/
|
||||
|
||||
#ifndef UA_TYPES_H_
|
||||
#define UA_TYPES_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <stdbool.h>
|
||||
#include "ua_config.h"
|
||||
#include "ua_constants.h"
|
||||
|
||||
/**
|
||||
* Data Types
|
||||
* ==========
|
||||
*
|
||||
* In open62541, all data types share the same basic API for creation, copying
|
||||
* and deletion. The header ua_types.h defines the builtin types. In addition,
|
||||
* we auto-generate ua_types_generated.h with additional types as well as the
|
||||
* following function definitions for all (builtin and generated) data types
|
||||
* ``T``.
|
||||
*
|
||||
* ``void T_init(T *ptr)``
|
||||
* Initialize the data type. This is synonymous with zeroing out the memory,
|
||||
* i.e. ``memset(dataptr, 0, sizeof(T))``.
|
||||
* ``T* T_new()``
|
||||
* Allocate and return the memory for the data type. The memory is already initialized.
|
||||
* ``UA_StatusCode T_copy(const T *src, T *dst)``
|
||||
* Copy the content of the data type. Returns ``UA_STATUSCODE_GOOD`` or
|
||||
* ``UA_STATUSCODE_BADOUTOFMEMORY``.
|
||||
* ``void T_deleteMembers(T *ptr)``
|
||||
* Delete the dynamically allocated content of the data type, but not the data type itself.
|
||||
* ``void T_delete(T *ptr)``
|
||||
* Delete the content of the data type and the memory for the data type itself.
|
||||
*
|
||||
* OPC UA defines 25 builtin data types. All other data types are combinations
|
||||
* of the 25 builtin data types. */
|
||||
|
||||
#define UA_BUILTIN_TYPES_COUNT 25U
|
||||
|
||||
/**
|
||||
* Builtin Types Part 1
|
||||
* --------------------
|
||||
*
|
||||
* Boolean
|
||||
* ^^^^^^^
|
||||
* A two-state logical value (true or false). */
|
||||
typedef bool UA_Boolean;
|
||||
#define UA_TRUE true
|
||||
#define UA_FALSE false
|
||||
|
||||
/**
|
||||
* SByte
|
||||
* ^^^^^
|
||||
* An integer value between -128 and 127. */
|
||||
typedef int8_t UA_SByte;
|
||||
#define UA_SBYTE_MAX 127
|
||||
#define UA_SBYTE_MIN (-128)
|
||||
|
||||
/**
|
||||
* Byte
|
||||
* ^^^^
|
||||
* An integer value between 0 and 256. */
|
||||
typedef uint8_t UA_Byte;
|
||||
#define UA_BYTE_MAX 256
|
||||
#define UA_BYTE_MIN 0
|
||||
|
||||
/**
|
||||
* Int16
|
||||
* ^^^^^
|
||||
* An integer value between -32 768 and 32 767. */
|
||||
typedef int16_t UA_Int16;
|
||||
#define UA_INT16_MAX 32767
|
||||
#define UA_INT16_MIN (-32768)
|
||||
|
||||
/**
|
||||
* UInt16
|
||||
* ^^^^^^
|
||||
* An integer value between 0 and 65 535. */
|
||||
typedef uint16_t UA_UInt16;
|
||||
#define UA_UINT16_MAX 65535
|
||||
#define UA_UINT16_MIN 0
|
||||
|
||||
/**
|
||||
* Int32
|
||||
* ^^^^^
|
||||
* An integer value between -2 147 483 648 and 2 147 483 647. */
|
||||
typedef int32_t UA_Int32;
|
||||
#define UA_INT32_MAX 2147483647
|
||||
#define UA_INT32_MIN (-2147483648)
|
||||
|
||||
/**
|
||||
* UInt32
|
||||
* ^^^^^^
|
||||
* An integer value between 0 and 4 294 967 295. */
|
||||
typedef uint32_t UA_UInt32;
|
||||
#define UA_UINT32_MAX 4294967295
|
||||
#define UA_UINT32_MIN 0
|
||||
|
||||
/**
|
||||
* Int64
|
||||
* ^^^^^
|
||||
* An integer value between -10 223 372 036 854 775 808 and 9 223 372 036 854 775 807. */
|
||||
typedef int64_t UA_Int64;
|
||||
#define UA_INT64_MAX (int64_t)9223372036854775807
|
||||
#define UA_INT64_MIN ((int64_t)-9223372036854775808)
|
||||
|
||||
/**
|
||||
* UInt64
|
||||
* ^^^^^^
|
||||
* An integer value between 0 and 18 446 744 073 709 551 615. */
|
||||
typedef uint64_t UA_UInt64;
|
||||
#define UA_UINT64_MAX (int64_t)18446744073709551615
|
||||
#define UA_UINT64_MIN (int64_t)0
|
||||
|
||||
/**
|
||||
* Float
|
||||
* ^^^^^
|
||||
* An IEEE single precision (32 bit) floating point value. */
|
||||
typedef float UA_Float;
|
||||
|
||||
/**
|
||||
* Double
|
||||
* ^^^^^^
|
||||
* An IEEE double precision (64 bit) floating point value. */
|
||||
typedef double UA_Double;
|
||||
|
||||
/**
|
||||
* .. _statuscode:
|
||||
*
|
||||
* StatusCode
|
||||
* ^^^^^^^^^^
|
||||
* A numeric identifier for a error or condition that is associated with a value or an
|
||||
* operation. See the section :ref:`statuscodes` for the meaning of a specific code. */
|
||||
typedef uint32_t UA_StatusCode;
|
||||
|
||||
/**
|
||||
* Array handling
|
||||
* --------------
|
||||
* In OPC UA, arrays can have a length of zero or more with the usual meaning.
|
||||
* In addition, arrays can be undefined. Then, they don't even have a length. In
|
||||
* the binary encoding, this is indicated by an array of length -1.
|
||||
*
|
||||
* In open62541 however, we use ``size_t`` for array lengths. An undefined array
|
||||
* has length 0 and the data pointer is NULL. An array of length 0 also has
|
||||
* length 0 but points to a sentinel memory address. */
|
||||
#define UA_EMPTY_ARRAY_SENTINEL ((void*)0x01)
|
||||
|
||||
/** Forward Declaration of UA_DataType. See Section `Generic Type Handling`_
|
||||
for details. */
|
||||
struct UA_DataType;
|
||||
typedef struct UA_DataType UA_DataType;
|
||||
|
||||
/** The following functions are used for handling arrays of any data type. */
|
||||
|
||||
/* Allocates and initializes an array of variables of a specific type
|
||||
*
|
||||
* @param size The requested array length
|
||||
* @param type The datatype description
|
||||
* @return Returns the memory location of the variable or (void*)0 if no memory
|
||||
could be allocated */
|
||||
void UA_EXPORT * UA_Array_new(size_t size, const UA_DataType *type) UA_FUNC_ATTR_MALLOC;
|
||||
|
||||
/* Allocates and copies an array
|
||||
*
|
||||
* @param src The memory location of the source array
|
||||
* @param size The size of the array
|
||||
* @param dst The location of the pointer to the new array
|
||||
* @param type The datatype of the array members
|
||||
* @return Returns UA_STATUSCODE_GOOD or UA_STATUSCODE_BADOUTOFMEMORY */
|
||||
UA_StatusCode UA_EXPORT UA_Array_copy(const void *src, size_t size, void **dst, const UA_DataType *type) UA_FUNC_ATTR_WARN_UNUSED_RESULT;
|
||||
|
||||
/* Deletes an array.
|
||||
*
|
||||
* @param p The memory location of the array
|
||||
* @param size The size of the array
|
||||
* @param type The datatype of the array members */
|
||||
void UA_EXPORT UA_Array_delete(void *p, size_t size, const UA_DataType *type);
|
||||
|
||||
/**
|
||||
* Builtin Types, Part 2
|
||||
* ---------------------
|
||||
*
|
||||
* String
|
||||
* ^^^^^^
|
||||
* A sequence of Unicode characters. Strings are just an array of UA_Byte. */
|
||||
typedef struct {
|
||||
size_t length; /* The length of the string */
|
||||
UA_Byte *data; /* The content (not null-terminated) */
|
||||
} UA_String;
|
||||
|
||||
/* Copies the content on the heap. Returns a null-string when alloc fails */
|
||||
UA_String UA_EXPORT UA_String_fromChars(char const src[]) UA_FUNC_ATTR_WARN_UNUSED_RESULT;
|
||||
|
||||
UA_Boolean UA_EXPORT UA_String_equal(const UA_String *s1, const UA_String *s2);
|
||||
|
||||
UA_EXPORT extern const UA_String UA_STRING_NULL;
|
||||
|
||||
/**
|
||||
* ``UA_STRING`` returns a string pointing to the preallocated char-array.
|
||||
* ``UA_STRING_ALLOC`` is shorthand for ``UA_String_fromChars`` and makes a copy
|
||||
* of the char-array. */
|
||||
static UA_INLINE UA_String
|
||||
UA_STRING(char *chars) {
|
||||
UA_String str; str.length = strlen(chars);
|
||||
str.data = (UA_Byte*)chars; return str;
|
||||
}
|
||||
|
||||
#define UA_STRING_ALLOC(CHARS) UA_String_fromChars(CHARS)
|
||||
|
||||
/**
|
||||
* DateTime
|
||||
* ^^^^^^^^
|
||||
* An instance in time. A DateTime value is encoded as a 64-bit signed integer
|
||||
* which represents the number of 100 nanosecond intervals since January 1, 1601
|
||||
* (UTC). */
|
||||
typedef int64_t UA_DateTime;
|
||||
|
||||
/* Multiply to convert units for time difference computations */
|
||||
#define UA_USEC_TO_DATETIME 10LL
|
||||
#define UA_MSEC_TO_DATETIME (UA_USEC_TO_DATETIME * 1000LL)
|
||||
#define UA_SEC_TO_DATETIME (UA_MSEC_TO_DATETIME * 1000LL)
|
||||
|
||||
/* Datetime of 1 Jan 1970 00:00 UTC */
|
||||
#define UA_DATETIME_UNIX_EPOCH (11644473600LL * UA_SEC_TO_DATETIME)
|
||||
|
||||
/* The current time */
|
||||
UA_DateTime UA_EXPORT UA_DateTime_now(void);
|
||||
|
||||
/* CPU clock invariant to system time changes. Use only for time diffs, not current time */
|
||||
UA_DateTime UA_EXPORT UA_DateTime_nowMonotonic(void);
|
||||
|
||||
typedef struct UA_DateTimeStruct {
|
||||
UA_UInt16 nanoSec;
|
||||
UA_UInt16 microSec;
|
||||
UA_UInt16 milliSec;
|
||||
UA_UInt16 sec;
|
||||
UA_UInt16 min;
|
||||
UA_UInt16 hour;
|
||||
UA_UInt16 day;
|
||||
UA_UInt16 month;
|
||||
UA_UInt16 year;
|
||||
} UA_DateTimeStruct;
|
||||
|
||||
UA_DateTimeStruct UA_EXPORT UA_DateTime_toStruct(UA_DateTime t);
|
||||
|
||||
UA_String UA_EXPORT UA_DateTime_toString(UA_DateTime t);
|
||||
|
||||
/**
|
||||
* Guid
|
||||
* ^^^^
|
||||
* A 16 byte value that can be used as a globally unique identifier. */
|
||||
typedef struct {
|
||||
UA_UInt32 data1;
|
||||
UA_UInt16 data2;
|
||||
UA_UInt16 data3;
|
||||
UA_Byte data4[8];
|
||||
} UA_Guid;
|
||||
|
||||
UA_Boolean UA_EXPORT UA_Guid_equal(const UA_Guid *g1, const UA_Guid *g2);
|
||||
|
||||
/**
|
||||
* ByteString
|
||||
* ^^^^^^^^^^
|
||||
* A sequence of octets. */
|
||||
typedef UA_String UA_ByteString;
|
||||
|
||||
static UA_INLINE UA_Boolean
|
||||
UA_ByteString_equal(const UA_ByteString *string1, const UA_ByteString *string2) {
|
||||
return UA_String_equal((const UA_String*)string1, (const UA_String*)string2); }
|
||||
|
||||
/* Allocates memory of size length for the bytestring. The content is not set to zero. */
|
||||
UA_StatusCode UA_EXPORT UA_ByteString_allocBuffer(UA_ByteString *bs, size_t length);
|
||||
|
||||
UA_EXPORT extern const UA_ByteString UA_BYTESTRING_NULL;
|
||||
|
||||
static UA_INLINE UA_ByteString
|
||||
UA_BYTESTRING(char *chars) {
|
||||
UA_ByteString str; str.length = strlen(chars);
|
||||
str.data = (UA_Byte*)chars; return str;
|
||||
}
|
||||
|
||||
static UA_INLINE UA_ByteString
|
||||
UA_BYTESTRING_ALLOC(const char *chars) {
|
||||
UA_String str = UA_String_fromChars(chars); UA_ByteString bstr;
|
||||
bstr.length = str.length; bstr.data = str.data; return bstr;
|
||||
}
|
||||
|
||||
/**
|
||||
* XmlElement
|
||||
* ^^^^^^^^^^
|
||||
* An XML element. */
|
||||
typedef UA_String UA_XmlElement;
|
||||
|
||||
/**
|
||||
* NodeId
|
||||
* ^^^^^^
|
||||
* An identifier for a node in the address space of an OPC UA Server. */
|
||||
enum UA_NodeIdType {
|
||||
UA_NODEIDTYPE_NUMERIC = 0, /* In the binary encoding, this can also become 1 or 2
|
||||
(2byte and 4byte encoding of small numeric nodeids) */
|
||||
UA_NODEIDTYPE_STRING = 3,
|
||||
UA_NODEIDTYPE_GUID = 4,
|
||||
UA_NODEIDTYPE_BYTESTRING = 5
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
UA_UInt16 namespaceIndex;
|
||||
enum UA_NodeIdType identifierType;
|
||||
union {
|
||||
UA_UInt32 numeric;
|
||||
UA_String string;
|
||||
UA_Guid guid;
|
||||
UA_ByteString byteString;
|
||||
} identifier;
|
||||
} UA_NodeId;
|
||||
|
||||
UA_EXPORT extern const UA_NodeId UA_NODEID_NULL;
|
||||
|
||||
static UA_INLINE UA_Boolean
|
||||
UA_NodeId_isNull(const UA_NodeId *p) {
|
||||
return (p->namespaceIndex == 0 &&
|
||||
p->identifierType == UA_NODEIDTYPE_NUMERIC &&
|
||||
p->identifier.numeric == 0);
|
||||
}
|
||||
|
||||
UA_Boolean UA_EXPORT UA_NodeId_equal(const UA_NodeId *n1, const UA_NodeId *n2);
|
||||
|
||||
/** The following functions are shorthand for creating NodeIds. */
|
||||
static UA_INLINE UA_NodeId
|
||||
UA_NODEID_NUMERIC(UA_UInt16 nsIndex, UA_UInt32 identifier) {
|
||||
UA_NodeId id; id.namespaceIndex = nsIndex;
|
||||
id.identifierType = UA_NODEIDTYPE_NUMERIC;
|
||||
id.identifier.numeric = identifier; return id;
|
||||
}
|
||||
|
||||
static UA_INLINE UA_NodeId
|
||||
UA_NODEID_STRING(UA_UInt16 nsIndex, char *chars) {
|
||||
UA_NodeId id; id.namespaceIndex = nsIndex;
|
||||
id.identifierType = UA_NODEIDTYPE_STRING;
|
||||
id.identifier.string = UA_STRING(chars); return id;
|
||||
}
|
||||
|
||||
static UA_INLINE UA_NodeId
|
||||
UA_NODEID_STRING_ALLOC(UA_UInt16 nsIndex, const char *chars) {
|
||||
UA_NodeId id; id.namespaceIndex = nsIndex;
|
||||
id.identifierType = UA_NODEIDTYPE_STRING;
|
||||
id.identifier.string = UA_STRING_ALLOC(chars); return id;
|
||||
}
|
||||
|
||||
static UA_INLINE UA_NodeId
|
||||
UA_NODEID_GUID(UA_UInt16 nsIndex, UA_Guid guid) {
|
||||
UA_NodeId id; id.namespaceIndex = nsIndex;
|
||||
id.identifierType = UA_NODEIDTYPE_GUID;
|
||||
id.identifier.guid = guid; return id;
|
||||
}
|
||||
|
||||
static UA_INLINE UA_NodeId
|
||||
UA_NODEID_BYTESTRING(UA_UInt16 nsIndex, char *chars) {
|
||||
UA_NodeId id; id.namespaceIndex = nsIndex;
|
||||
id.identifierType = UA_NODEIDTYPE_BYTESTRING;
|
||||
id.identifier.byteString = UA_BYTESTRING(chars); return id;
|
||||
}
|
||||
|
||||
static UA_INLINE UA_NodeId
|
||||
UA_NODEID_BYTESTRING_ALLOC(UA_UInt16 nsIndex, const char *chars) {
|
||||
UA_NodeId id; id.namespaceIndex = nsIndex;
|
||||
id.identifierType = UA_NODEIDTYPE_BYTESTRING;
|
||||
id.identifier.byteString = UA_BYTESTRING_ALLOC(chars); return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* ExpandedNodeId
|
||||
* ^^^^^^^^^^^^^^
|
||||
* A NodeId that allows the namespace URI to be specified instead of an index. */
|
||||
typedef struct {
|
||||
UA_NodeId nodeId;
|
||||
UA_String namespaceUri;
|
||||
UA_UInt32 serverIndex;
|
||||
} UA_ExpandedNodeId;
|
||||
|
||||
/** The following functions are shorthand for creating ExpandedNodeIds. */
|
||||
static UA_INLINE UA_ExpandedNodeId
|
||||
UA_EXPANDEDNODEID_NUMERIC(UA_UInt16 nsIndex, UA_UInt32 identifier) {
|
||||
UA_ExpandedNodeId id; id.nodeId = UA_NODEID_NUMERIC(nsIndex, identifier);
|
||||
id.serverIndex = 0; id.namespaceUri = UA_STRING_NULL; return id;
|
||||
}
|
||||
|
||||
static UA_INLINE UA_ExpandedNodeId
|
||||
UA_EXPANDEDNODEID_STRING(UA_UInt16 nsIndex, char *chars) {
|
||||
UA_ExpandedNodeId id; id.nodeId = UA_NODEID_STRING(nsIndex, chars);
|
||||
id.serverIndex = 0; id.namespaceUri = UA_STRING_NULL; return id;
|
||||
}
|
||||
|
||||
static UA_INLINE UA_ExpandedNodeId
|
||||
UA_EXPANDEDNODEID_STRING_ALLOC(UA_UInt16 nsIndex, const char *chars) {
|
||||
UA_ExpandedNodeId id; id.nodeId = UA_NODEID_STRING_ALLOC(nsIndex, chars);
|
||||
id.serverIndex = 0; id.namespaceUri = UA_STRING_NULL; return id;
|
||||
}
|
||||
|
||||
static UA_INLINE UA_ExpandedNodeId
|
||||
UA_EXPANDEDNODEID_STRING_GUID(UA_UInt16 nsIndex, UA_Guid guid) {
|
||||
UA_ExpandedNodeId id; id.nodeId = UA_NODEID_GUID(nsIndex, guid);
|
||||
id.serverIndex = 0; id.namespaceUri = UA_STRING_NULL; return id;
|
||||
}
|
||||
|
||||
static UA_INLINE UA_ExpandedNodeId
|
||||
UA_EXPANDEDNODEID_BYTESTRING(UA_UInt16 nsIndex, char *chars) {
|
||||
UA_ExpandedNodeId id; id.nodeId = UA_NODEID_BYTESTRING(nsIndex, chars);
|
||||
id.serverIndex = 0; id.namespaceUri = UA_STRING_NULL; return id;
|
||||
}
|
||||
|
||||
static UA_INLINE UA_ExpandedNodeId
|
||||
UA_EXPANDEDNODEID_BYTESTRING_ALLOC(UA_UInt16 nsIndex, const char *chars) {
|
||||
UA_ExpandedNodeId id; id.nodeId = UA_NODEID_BYTESTRING_ALLOC(nsIndex, chars);
|
||||
id.serverIndex = 0; id.namespaceUri = UA_STRING_NULL; return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* QualifiedName
|
||||
* ^^^^^^^^^^^^^
|
||||
* A name qualified by a namespace. */
|
||||
typedef struct {
|
||||
UA_UInt16 namespaceIndex;
|
||||
UA_String name;
|
||||
} UA_QualifiedName;
|
||||
|
||||
static UA_INLINE UA_QualifiedName
|
||||
UA_QUALIFIEDNAME(UA_UInt16 nsIndex, char *chars) {
|
||||
UA_QualifiedName qn; qn.namespaceIndex = nsIndex;
|
||||
qn.name = UA_STRING(chars); return qn;
|
||||
}
|
||||
|
||||
static UA_INLINE UA_QualifiedName
|
||||
UA_QUALIFIEDNAME_ALLOC(UA_UInt16 nsIndex, const char *chars) {
|
||||
UA_QualifiedName qn; qn.namespaceIndex = nsIndex;
|
||||
qn.name = UA_STRING_ALLOC(chars); return qn;
|
||||
}
|
||||
|
||||
/**
|
||||
* LocalizedText
|
||||
* ^^^^^^^^^^^^^
|
||||
* Human readable text with an optional locale identifier. */
|
||||
typedef struct {
|
||||
UA_String locale;
|
||||
UA_String text;
|
||||
} UA_LocalizedText;
|
||||
|
||||
static UA_INLINE UA_LocalizedText
|
||||
UA_LOCALIZEDTEXT(char *locale, char *text) {
|
||||
UA_LocalizedText lt; lt.locale = UA_STRING(locale);
|
||||
lt.text = UA_STRING(text); return lt;
|
||||
}
|
||||
|
||||
static UA_INLINE UA_LocalizedText
|
||||
UA_LOCALIZEDTEXT_ALLOC(const char *locale, const char *text) {
|
||||
UA_LocalizedText lt; lt.locale = UA_STRING_ALLOC(locale);
|
||||
lt.text = UA_STRING_ALLOC(text); return lt;
|
||||
}
|
||||
|
||||
/**
|
||||
* ExtensionObject
|
||||
* ^^^^^^^^^^^^^^^
|
||||
* ExtensionObjects may contain scalars of any data type. Even those that are
|
||||
* unknown to the receiver. See the Section `Generic Type Handling`_ on how
|
||||
* types are described. An ExtensionObject always contains the NodeId of the
|
||||
* Data Type. If the data cannot be decoded, we keep the encoded string and the
|
||||
* NodeId. */
|
||||
typedef struct {
|
||||
enum {
|
||||
UA_EXTENSIONOBJECT_ENCODED_NOBODY = 0,
|
||||
UA_EXTENSIONOBJECT_ENCODED_BYTESTRING = 1,
|
||||
UA_EXTENSIONOBJECT_ENCODED_XML = 2,
|
||||
UA_EXTENSIONOBJECT_DECODED = 3,
|
||||
UA_EXTENSIONOBJECT_DECODED_NODELETE = 4 /* Don't delete the decoded content
|
||||
at the lifecycle end */
|
||||
} encoding;
|
||||
union {
|
||||
struct {
|
||||
UA_NodeId typeId; /* The nodeid of the datatype */
|
||||
UA_ByteString body; /* The bytestring of the encoded data */
|
||||
} encoded;
|
||||
struct {
|
||||
const UA_DataType *type;
|
||||
void *data;
|
||||
} decoded;
|
||||
} content;
|
||||
} UA_ExtensionObject;
|
||||
|
||||
/**
|
||||
* Variant
|
||||
* ^^^^^^^
|
||||
* Variants may contain data of any type. See the Section `Generic Type
|
||||
* Handling`_ on how types are described. If the data is not of one of the 25
|
||||
* builtin types, it will be encoded as an `ExtensionObject`_ on the wire. (The
|
||||
* standard says that a variant is a union of the built-in types. open62541
|
||||
* generalizes this to any data type by transparently de- and encoding
|
||||
* ExtensionObjects in the background. If the decoding fails, the variant
|
||||
* contains the original ExtensionObject.)
|
||||
*
|
||||
* Variants can contain a single scalar or an array. For details on the handling
|
||||
* of arrays, see the Section `Array Handling`_. Array variants can have an
|
||||
* additional dimensionality (matrix, 3-tensor, ...) defined in an array of
|
||||
* dimension sizes. Higher rank dimensions are serialized first.
|
||||
*
|
||||
* The differentiation between variants containing a scalar, an array or no data
|
||||
* is as follows:
|
||||
*
|
||||
* - arrayLength == 0 && data == NULL: no existing data
|
||||
* - arrayLength == 0 && data == UA_EMPTY_ARRAY_SENTINEL: array of length 0
|
||||
* - arrayLength == 0 && data > UA_EMPTY_ARRAY_SENTINEL: scalar value
|
||||
* - arrayLength > 0: array of the given length */
|
||||
typedef struct {
|
||||
const UA_DataType *type; /* The data type description */
|
||||
enum {
|
||||
UA_VARIANT_DATA, /* The data has the same lifecycle as the variant */
|
||||
UA_VARIANT_DATA_NODELETE, /* The data is "borrowed" by the variant and shall not be
|
||||
deleted at the end of the variant's lifecycle. */
|
||||
} storageType;
|
||||
size_t arrayLength; // The number of elements in the data array
|
||||
void *data; // Points to the scalar or array data
|
||||
size_t arrayDimensionsSize; // The number of dimensions the data-array has
|
||||
UA_Int32 *arrayDimensions; // The length of each dimension of the data-array
|
||||
} UA_Variant;
|
||||
|
||||
/* Returns true if the variant contains a scalar value. Note that empty variants contain
|
||||
* an array of length -1 (undefined).
|
||||
*
|
||||
* @param v The variant
|
||||
* @return Does the variant contain a scalar value. */
|
||||
static UA_INLINE UA_Boolean
|
||||
UA_Variant_isScalar(const UA_Variant *v) {
|
||||
return (v->arrayLength == 0 && v->data > UA_EMPTY_ARRAY_SENTINEL);
|
||||
}
|
||||
|
||||
/* Set the variant to a scalar value that already resides in memory. The value takes on
|
||||
* the lifecycle of the variant and is deleted with it.
|
||||
*
|
||||
* @param v The variant
|
||||
* @param p A pointer to the value data
|
||||
* @param type The datatype of the value in question */
|
||||
void UA_EXPORT UA_Variant_setScalar(UA_Variant *v, void * UA_RESTRICT p, const UA_DataType *type);
|
||||
|
||||
/* Set the variant to a scalar value that is copied from an existing variable.
|
||||
* @param v The variant
|
||||
* @param p A pointer to the value data
|
||||
* @param type The datatype of the value
|
||||
* @return Indicates whether the operation succeeded or returns an error code */
|
||||
UA_StatusCode UA_EXPORT UA_Variant_setScalarCopy(UA_Variant *v, const void *p, const UA_DataType *type);
|
||||
|
||||
/* Set the variant to an array that already resides in memory. The array takes on the
|
||||
* lifecycle of the variant and is deleted with it.
|
||||
*
|
||||
* @param v The variant
|
||||
* @param array A pointer to the array data
|
||||
* @param arraySize The size of the array
|
||||
* @param type The datatype of the array */
|
||||
void UA_EXPORT
|
||||
UA_Variant_setArray(UA_Variant *v, void * UA_RESTRICT array,
|
||||
size_t arraySize, const UA_DataType *type);
|
||||
|
||||
/* Set the variant to an array that is copied from an existing array.
|
||||
*
|
||||
* @param v The variant
|
||||
* @param array A pointer to the array data
|
||||
* @param arraySize The size of the array
|
||||
* @param type The datatype of the array
|
||||
* @return Indicates whether the operation succeeded or returns an error code */
|
||||
UA_StatusCode UA_EXPORT
|
||||
UA_Variant_setArrayCopy(UA_Variant *v, const void *array,
|
||||
size_t arraySize, const UA_DataType *type);
|
||||
|
||||
/**
|
||||
* NumericRanges are used to indicate subsets of a (multidimensional) variant
|
||||
* array. NumericRange has no official type structure in the standard. On the
|
||||
* wire, it only exists as an encoded string, such as "1:2,0:3,5". The colon
|
||||
* separates min/max index and the comma separates dimensions. A single value
|
||||
* indicates a range with a single element (min==max). */
|
||||
typedef struct {
|
||||
size_t dimensionsSize;
|
||||
struct UA_NumericRangeDimension {
|
||||
UA_UInt32 min;
|
||||
UA_UInt32 max;
|
||||
} *dimensions;
|
||||
} UA_NumericRange;
|
||||
|
||||
/* Copy the variant, but use only a subset of the (multidimensional) array into a variant.
|
||||
* Returns an error code if the variant is not an array or if the indicated range does not
|
||||
* fit.
|
||||
*
|
||||
* @param src The source variant
|
||||
* @param dst The target variant
|
||||
* @param range The range of the copied data
|
||||
* @return Returns UA_STATUSCODE_GOOD or an error code */
|
||||
UA_StatusCode UA_EXPORT
|
||||
UA_Variant_copyRange(const UA_Variant *src, UA_Variant *dst, const UA_NumericRange range);
|
||||
|
||||
/* Insert a range of data into an existing variant. The data array can't be reused afterwards if it
|
||||
* contains types without a fixed size (e.g. strings) since the members are moved into the variant
|
||||
* and take on its lifecycle.
|
||||
*
|
||||
* @param v The variant
|
||||
* @param dataArray The data array. The type must match the variant
|
||||
* @param dataArraySize The length of the data array. This is checked to match the range size.
|
||||
* @param range The range of where the new data is inserted
|
||||
* @return Returns UA_STATUSCODE_GOOD or an error code */
|
||||
UA_StatusCode UA_EXPORT
|
||||
UA_Variant_setRange(UA_Variant *v, void * UA_RESTRICT array,
|
||||
size_t arraySize, const UA_NumericRange range);
|
||||
|
||||
/* Deep-copy a range of data into an existing variant.
|
||||
*
|
||||
* @param v The variant
|
||||
* @param dataArray The data array. The type must match the variant
|
||||
* @param dataArraySize The length of the data array. This is checked to match the range size.
|
||||
* @param range The range of where the new data is inserted
|
||||
* @return Returns UA_STATUSCODE_GOOD or an error code */
|
||||
UA_StatusCode UA_EXPORT
|
||||
UA_Variant_setRangeCopy(UA_Variant *v, const void *array,
|
||||
size_t arraySize, const UA_NumericRange range);
|
||||
|
||||
/**
|
||||
* DataValue
|
||||
* ^^^^^^^^^
|
||||
* A data value with an associated status code and timestamps. */
|
||||
typedef struct {
|
||||
UA_Boolean hasValue : 1;
|
||||
UA_Boolean hasStatus : 1;
|
||||
UA_Boolean hasSourceTimestamp : 1;
|
||||
UA_Boolean hasServerTimestamp : 1;
|
||||
UA_Boolean hasSourcePicoseconds : 1;
|
||||
UA_Boolean hasServerPicoseconds : 1;
|
||||
UA_Variant value;
|
||||
UA_StatusCode status;
|
||||
UA_DateTime sourceTimestamp;
|
||||
UA_UInt16 sourcePicoseconds;
|
||||
UA_DateTime serverTimestamp;
|
||||
UA_UInt16 serverPicoseconds;
|
||||
} UA_DataValue;
|
||||
|
||||
/**
|
||||
* DiagnosticInfo
|
||||
* ^^^^^^^^^^^^^^
|
||||
* A structure that contains detailed error and diagnostic information
|
||||
* associated with a StatusCode. */
|
||||
typedef struct UA_DiagnosticInfo {
|
||||
UA_Boolean hasSymbolicId : 1;
|
||||
UA_Boolean hasNamespaceUri : 1;
|
||||
UA_Boolean hasLocalizedText : 1;
|
||||
UA_Boolean hasLocale : 1;
|
||||
UA_Boolean hasAdditionalInfo : 1;
|
||||
UA_Boolean hasInnerStatusCode : 1;
|
||||
UA_Boolean hasInnerDiagnosticInfo : 1;
|
||||
UA_Int32 symbolicId;
|
||||
UA_Int32 namespaceUri;
|
||||
UA_Int32 localizedText;
|
||||
UA_Int32 locale;
|
||||
UA_String additionalInfo;
|
||||
UA_StatusCode innerStatusCode;
|
||||
struct UA_DiagnosticInfo *innerDiagnosticInfo;
|
||||
} UA_DiagnosticInfo;
|
||||
|
||||
/**
|
||||
* Generic Type Handling
|
||||
* ---------------------
|
||||
* The builtin types can be combined to data structures. All information about a
|
||||
* (structured) data type is stored in a ``UA_DataType``. The array ``UA_TYPES``
|
||||
* contains the description of all standard-defined types and is used for
|
||||
* handling of generic types. */
|
||||
typedef struct {
|
||||
#ifdef UA_ENABLE_TYPENAMES
|
||||
const char *memberName;
|
||||
#endif
|
||||
UA_UInt16 memberTypeIndex; /* Index of the member in the array of data types */
|
||||
UA_Byte padding; /* How much padding is there before this member element?
|
||||
For arrays this is the padding before the size_t
|
||||
lenght member. (No padding between size_t and the
|
||||
following ptr.) */
|
||||
UA_Boolean namespaceZero : 1; /* The type of the member is defined in namespace zero.
|
||||
In this implementation, types from custom namespace
|
||||
may contain members from the same namespace or ns0
|
||||
only.*/
|
||||
UA_Boolean isArray : 1; /* The member is an array */
|
||||
} UA_DataTypeMember;
|
||||
|
||||
struct UA_DataType {
|
||||
#ifdef UA_ENABLE_TYPENAMES
|
||||
const char *typeName;
|
||||
#endif
|
||||
UA_NodeId typeId; /* The nodeid of the type */
|
||||
UA_UInt16 memSize; /* Size of the struct in memory */
|
||||
UA_UInt16 typeIndex; /* Index of the type in the datatypetable */
|
||||
UA_Byte membersSize; /* How many members does the type have? */
|
||||
UA_Boolean builtin : 1; /* The type is "builtin" and has dedicated de- and
|
||||
encoding functions */
|
||||
UA_Boolean fixedSize : 1; /* The type (and its members) contains no pointers */
|
||||
UA_Boolean overlayable : 1; /* The type has the identical memory layout in
|
||||
memory and on the binary stream. */
|
||||
UA_DataTypeMember *members;
|
||||
};
|
||||
|
||||
/** The following functions are used for generic handling of data types. */
|
||||
|
||||
/* Allocates and initializes a variable of type dataType
|
||||
*
|
||||
* @param type The datatype description
|
||||
* @return Returns the memory location of the variable or (void*)0 if no memory is available */
|
||||
void UA_EXPORT * UA_new(const UA_DataType *type) UA_FUNC_ATTR_MALLOC;
|
||||
|
||||
/* Initializes a variable to default values
|
||||
*
|
||||
* @param p The memory location of the variable
|
||||
* @param type The datatype description */
|
||||
static UA_INLINE void
|
||||
UA_init(void *p, const UA_DataType *type) {
|
||||
memset(p, 0, type->memSize);
|
||||
}
|
||||
|
||||
/* Copies the content of two variables. If copying fails (e.g. because no memory was
|
||||
* available for an array), then dst is emptied and initialized to prevent memory leaks.
|
||||
*
|
||||
* @param src The memory location of the source variable
|
||||
* @param dst The memory location of the destination variable
|
||||
* @param type The datatype description
|
||||
* @return Indicates whether the operation succeeded or returns an error code */
|
||||
UA_StatusCode UA_EXPORT UA_copy(const void *src, void *dst, const UA_DataType *type);
|
||||
|
||||
/* Deletes the dynamically allocated content of a variable (e.g. resets all arrays to
|
||||
* undefined arrays). Afterwards, the variable can be safely deleted without causing
|
||||
* memory leaks. But the variable is not initialized and may contain old data that is not
|
||||
* memory-relevant.
|
||||
*
|
||||
* @param p The memory location of the variable
|
||||
* @param type The datatype description of the variable */
|
||||
void UA_EXPORT UA_deleteMembers(void *p, const UA_DataType *type);
|
||||
|
||||
/* Frees a variable and all of its content.
|
||||
*
|
||||
* @param p The memory location of the variable
|
||||
* @param type The datatype description of the variable */
|
||||
void UA_EXPORT UA_delete(void *p, const UA_DataType *type);
|
||||
|
||||
/**
|
||||
* Random Number Generator
|
||||
* -----------------------
|
||||
* If UA_ENABLE_MULTITHREADING is defined, then the seed is stored in thread local
|
||||
* storage. The seed is initialized for every thread in the server/client. */
|
||||
void UA_EXPORT UA_random_seed(UA_UInt64 seed);
|
||||
UA_UInt32 UA_EXPORT UA_UInt32_random(void); /* do not use for cryptographic entropy */
|
||||
UA_Guid UA_EXPORT UA_Guid_random(void); /* do not use for cryptographic entropy */
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif /* UA_TYPES_H_ */
|
19
include/ua_types_encoding_binary.h
Normal file
19
include/ua_types_encoding_binary.h
Normal file
@ -0,0 +1,19 @@
|
||||
#ifndef UA_TYPES_ENCODING_BINARY_H_
|
||||
#define UA_TYPES_ENCODING_BINARY_H_
|
||||
|
||||
#include "ua_types.h"
|
||||
|
||||
typedef UA_StatusCode (*UA_exchangeEncodeBuffer)(void *handle, UA_ByteString *buf, size_t offset);
|
||||
|
||||
UA_StatusCode
|
||||
UA_encodeBinary(const void *src, const UA_DataType *type,
|
||||
UA_exchangeEncodeBuffer exchangeBufferCallback, void *exchangeBufferCallbackHandle,
|
||||
UA_ByteString *dst, size_t *offset) UA_FUNC_ATTR_WARN_UNUSED_RESULT;
|
||||
|
||||
UA_StatusCode
|
||||
UA_decodeBinary(const UA_ByteString *src, size_t *offset, void *dst,
|
||||
const UA_DataType *type) UA_FUNC_ATTR_WARN_UNUSED_RESULT;
|
||||
|
||||
size_t UA_calcSizeBinary(void *p, const UA_DataType *type);
|
||||
|
||||
#endif /* UA_TYPES_ENCODING_BINARY_H_ */
|
6489
include/ua_types_generated.c
Normal file
6489
include/ua_types_generated.c
Normal file
File diff suppressed because it is too large
Load Diff
2820
include/ua_types_generated.h
Normal file
2820
include/ua_types_generated.h
Normal file
File diff suppressed because it is too large
Load Diff
637
include/ua_types_generated_encoding_binary.h
Normal file
637
include/ua_types_generated_encoding_binary.h
Normal file
@ -0,0 +1,637 @@
|
||||
/* Generated from Opc.Ua.Types.bsd with script /home/wn/Sources/open62541-open62541-395ce48/tools/generate_datatypes.py
|
||||
* on host debianX by user wn at 2016-06-08 10:05:20 */
|
||||
|
||||
#include "ua_types_encoding_binary.h"
|
||||
#include "ua_types_generated.h"
|
||||
|
||||
/* Boolean */
|
||||
static UA_INLINE UA_StatusCode UA_Boolean_encodeBinary(const UA_Boolean *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_BOOLEAN], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_Boolean_decodeBinary(const UA_ByteString *src, size_t *offset, UA_Boolean *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_BOOLEAN]); }
|
||||
|
||||
/* SByte */
|
||||
static UA_INLINE UA_StatusCode UA_SByte_encodeBinary(const UA_SByte *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_SBYTE], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_SByte_decodeBinary(const UA_ByteString *src, size_t *offset, UA_SByte *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_SBYTE]); }
|
||||
|
||||
/* Byte */
|
||||
static UA_INLINE UA_StatusCode UA_Byte_encodeBinary(const UA_Byte *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_BYTE], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_Byte_decodeBinary(const UA_ByteString *src, size_t *offset, UA_Byte *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_BYTE]); }
|
||||
|
||||
/* Int16 */
|
||||
static UA_INLINE UA_StatusCode UA_Int16_encodeBinary(const UA_Int16 *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_INT16], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_Int16_decodeBinary(const UA_ByteString *src, size_t *offset, UA_Int16 *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_INT16]); }
|
||||
|
||||
/* UInt16 */
|
||||
static UA_INLINE UA_StatusCode UA_UInt16_encodeBinary(const UA_UInt16 *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_UINT16], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_UInt16_decodeBinary(const UA_ByteString *src, size_t *offset, UA_UInt16 *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_UINT16]); }
|
||||
|
||||
/* Int32 */
|
||||
static UA_INLINE UA_StatusCode UA_Int32_encodeBinary(const UA_Int32 *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_INT32], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_Int32_decodeBinary(const UA_ByteString *src, size_t *offset, UA_Int32 *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_INT32]); }
|
||||
|
||||
/* UInt32 */
|
||||
static UA_INLINE UA_StatusCode UA_UInt32_encodeBinary(const UA_UInt32 *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_UINT32], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_UInt32_decodeBinary(const UA_ByteString *src, size_t *offset, UA_UInt32 *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_UINT32]); }
|
||||
|
||||
/* Int64 */
|
||||
static UA_INLINE UA_StatusCode UA_Int64_encodeBinary(const UA_Int64 *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_INT64], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_Int64_decodeBinary(const UA_ByteString *src, size_t *offset, UA_Int64 *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_INT64]); }
|
||||
|
||||
/* UInt64 */
|
||||
static UA_INLINE UA_StatusCode UA_UInt64_encodeBinary(const UA_UInt64 *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_UINT64], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_UInt64_decodeBinary(const UA_ByteString *src, size_t *offset, UA_UInt64 *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_UINT64]); }
|
||||
|
||||
/* Float */
|
||||
static UA_INLINE UA_StatusCode UA_Float_encodeBinary(const UA_Float *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_FLOAT], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_Float_decodeBinary(const UA_ByteString *src, size_t *offset, UA_Float *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_FLOAT]); }
|
||||
|
||||
/* Double */
|
||||
static UA_INLINE UA_StatusCode UA_Double_encodeBinary(const UA_Double *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_DOUBLE], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_Double_decodeBinary(const UA_ByteString *src, size_t *offset, UA_Double *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_DOUBLE]); }
|
||||
|
||||
/* String */
|
||||
static UA_INLINE UA_StatusCode UA_String_encodeBinary(const UA_String *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_STRING], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_String_decodeBinary(const UA_ByteString *src, size_t *offset, UA_String *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_STRING]); }
|
||||
|
||||
/* DateTime */
|
||||
static UA_INLINE UA_StatusCode UA_DateTime_encodeBinary(const UA_DateTime *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_DATETIME], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_DateTime_decodeBinary(const UA_ByteString *src, size_t *offset, UA_DateTime *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_DATETIME]); }
|
||||
|
||||
/* Guid */
|
||||
static UA_INLINE UA_StatusCode UA_Guid_encodeBinary(const UA_Guid *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_GUID], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_Guid_decodeBinary(const UA_ByteString *src, size_t *offset, UA_Guid *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_GUID]); }
|
||||
|
||||
/* ByteString */
|
||||
static UA_INLINE UA_StatusCode UA_ByteString_encodeBinary(const UA_ByteString *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_BYTESTRING], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_ByteString_decodeBinary(const UA_ByteString *src, size_t *offset, UA_ByteString *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_BYTESTRING]); }
|
||||
|
||||
/* XmlElement */
|
||||
static UA_INLINE UA_StatusCode UA_XmlElement_encodeBinary(const UA_XmlElement *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_XMLELEMENT], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_XmlElement_decodeBinary(const UA_ByteString *src, size_t *offset, UA_XmlElement *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_XMLELEMENT]); }
|
||||
|
||||
/* NodeId */
|
||||
static UA_INLINE UA_StatusCode UA_NodeId_encodeBinary(const UA_NodeId *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_NODEID], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_NodeId_decodeBinary(const UA_ByteString *src, size_t *offset, UA_NodeId *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_NODEID]); }
|
||||
|
||||
/* ExpandedNodeId */
|
||||
static UA_INLINE UA_StatusCode UA_ExpandedNodeId_encodeBinary(const UA_ExpandedNodeId *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_EXPANDEDNODEID], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_ExpandedNodeId_decodeBinary(const UA_ByteString *src, size_t *offset, UA_ExpandedNodeId *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_EXPANDEDNODEID]); }
|
||||
|
||||
/* StatusCode */
|
||||
static UA_INLINE UA_StatusCode UA_StatusCode_encodeBinary(const UA_StatusCode *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_STATUSCODE], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_StatusCode_decodeBinary(const UA_ByteString *src, size_t *offset, UA_StatusCode *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_STATUSCODE]); }
|
||||
|
||||
/* QualifiedName */
|
||||
static UA_INLINE UA_StatusCode UA_QualifiedName_encodeBinary(const UA_QualifiedName *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_QUALIFIEDNAME], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_QualifiedName_decodeBinary(const UA_ByteString *src, size_t *offset, UA_QualifiedName *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_QUALIFIEDNAME]); }
|
||||
|
||||
/* LocalizedText */
|
||||
static UA_INLINE UA_StatusCode UA_LocalizedText_encodeBinary(const UA_LocalizedText *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_LOCALIZEDTEXT], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_LocalizedText_decodeBinary(const UA_ByteString *src, size_t *offset, UA_LocalizedText *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_LOCALIZEDTEXT]); }
|
||||
|
||||
/* ExtensionObject */
|
||||
static UA_INLINE UA_StatusCode UA_ExtensionObject_encodeBinary(const UA_ExtensionObject *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_EXTENSIONOBJECT], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_ExtensionObject_decodeBinary(const UA_ByteString *src, size_t *offset, UA_ExtensionObject *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_EXTENSIONOBJECT]); }
|
||||
|
||||
/* DataValue */
|
||||
static UA_INLINE UA_StatusCode UA_DataValue_encodeBinary(const UA_DataValue *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_DATAVALUE], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_DataValue_decodeBinary(const UA_ByteString *src, size_t *offset, UA_DataValue *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_DATAVALUE]); }
|
||||
|
||||
/* Variant */
|
||||
static UA_INLINE UA_StatusCode UA_Variant_encodeBinary(const UA_Variant *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_VARIANT], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_Variant_decodeBinary(const UA_ByteString *src, size_t *offset, UA_Variant *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_VARIANT]); }
|
||||
|
||||
/* DiagnosticInfo */
|
||||
static UA_INLINE UA_StatusCode UA_DiagnosticInfo_encodeBinary(const UA_DiagnosticInfo *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_DIAGNOSTICINFO], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_DiagnosticInfo_decodeBinary(const UA_ByteString *src, size_t *offset, UA_DiagnosticInfo *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_DIAGNOSTICINFO]); }
|
||||
|
||||
/* SignedSoftwareCertificate */
|
||||
static UA_INLINE UA_StatusCode UA_SignedSoftwareCertificate_encodeBinary(const UA_SignedSoftwareCertificate *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_SIGNEDSOFTWARECERTIFICATE], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_SignedSoftwareCertificate_decodeBinary(const UA_ByteString *src, size_t *offset, UA_SignedSoftwareCertificate *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_SIGNEDSOFTWARECERTIFICATE]); }
|
||||
|
||||
/* BrowsePathTarget */
|
||||
static UA_INLINE UA_StatusCode UA_BrowsePathTarget_encodeBinary(const UA_BrowsePathTarget *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_BROWSEPATHTARGET], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_BrowsePathTarget_decodeBinary(const UA_ByteString *src, size_t *offset, UA_BrowsePathTarget *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_BROWSEPATHTARGET]); }
|
||||
|
||||
/* ViewAttributes */
|
||||
static UA_INLINE UA_StatusCode UA_ViewAttributes_encodeBinary(const UA_ViewAttributes *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_VIEWATTRIBUTES], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_ViewAttributes_decodeBinary(const UA_ByteString *src, size_t *offset, UA_ViewAttributes *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_VIEWATTRIBUTES]); }
|
||||
|
||||
/* BrowseResultMask */
|
||||
static UA_INLINE UA_StatusCode UA_BrowseResultMask_encodeBinary(const UA_BrowseResultMask *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_BROWSERESULTMASK], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_BrowseResultMask_decodeBinary(const UA_ByteString *src, size_t *offset, UA_BrowseResultMask *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_BROWSERESULTMASK]); }
|
||||
|
||||
/* RequestHeader */
|
||||
static UA_INLINE UA_StatusCode UA_RequestHeader_encodeBinary(const UA_RequestHeader *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_REQUESTHEADER], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_RequestHeader_decodeBinary(const UA_ByteString *src, size_t *offset, UA_RequestHeader *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_REQUESTHEADER]); }
|
||||
|
||||
/* MonitoredItemModifyResult */
|
||||
static UA_INLINE UA_StatusCode UA_MonitoredItemModifyResult_encodeBinary(const UA_MonitoredItemModifyResult *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_MONITOREDITEMMODIFYRESULT], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_MonitoredItemModifyResult_decodeBinary(const UA_ByteString *src, size_t *offset, UA_MonitoredItemModifyResult *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_MONITOREDITEMMODIFYRESULT]); }
|
||||
|
||||
/* ViewDescription */
|
||||
static UA_INLINE UA_StatusCode UA_ViewDescription_encodeBinary(const UA_ViewDescription *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_VIEWDESCRIPTION], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_ViewDescription_decodeBinary(const UA_ByteString *src, size_t *offset, UA_ViewDescription *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_VIEWDESCRIPTION]); }
|
||||
|
||||
/* CloseSecureChannelRequest */
|
||||
static UA_INLINE UA_StatusCode UA_CloseSecureChannelRequest_encodeBinary(const UA_CloseSecureChannelRequest *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_CLOSESECURECHANNELREQUEST], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_CloseSecureChannelRequest_decodeBinary(const UA_ByteString *src, size_t *offset, UA_CloseSecureChannelRequest *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_CLOSESECURECHANNELREQUEST]); }
|
||||
|
||||
/* AddNodesResult */
|
||||
static UA_INLINE UA_StatusCode UA_AddNodesResult_encodeBinary(const UA_AddNodesResult *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_ADDNODESRESULT], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_AddNodesResult_decodeBinary(const UA_ByteString *src, size_t *offset, UA_AddNodesResult *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_ADDNODESRESULT]); }
|
||||
|
||||
/* VariableAttributes */
|
||||
static UA_INLINE UA_StatusCode UA_VariableAttributes_encodeBinary(const UA_VariableAttributes *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_VARIABLEATTRIBUTES], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_VariableAttributes_decodeBinary(const UA_ByteString *src, size_t *offset, UA_VariableAttributes *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_VARIABLEATTRIBUTES]); }
|
||||
|
||||
/* NotificationMessage */
|
||||
static UA_INLINE UA_StatusCode UA_NotificationMessage_encodeBinary(const UA_NotificationMessage *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_NOTIFICATIONMESSAGE], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_NotificationMessage_decodeBinary(const UA_ByteString *src, size_t *offset, UA_NotificationMessage *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_NOTIFICATIONMESSAGE]); }
|
||||
|
||||
/* NodeAttributesMask */
|
||||
static UA_INLINE UA_StatusCode UA_NodeAttributesMask_encodeBinary(const UA_NodeAttributesMask *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_NODEATTRIBUTESMASK], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_NodeAttributesMask_decodeBinary(const UA_ByteString *src, size_t *offset, UA_NodeAttributesMask *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_NODEATTRIBUTESMASK]); }
|
||||
|
||||
/* MonitoringMode */
|
||||
static UA_INLINE UA_StatusCode UA_MonitoringMode_encodeBinary(const UA_MonitoringMode *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_MONITORINGMODE], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_MonitoringMode_decodeBinary(const UA_ByteString *src, size_t *offset, UA_MonitoringMode *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_MONITORINGMODE]); }
|
||||
|
||||
/* CallMethodResult */
|
||||
static UA_INLINE UA_StatusCode UA_CallMethodResult_encodeBinary(const UA_CallMethodResult *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_CALLMETHODRESULT], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_CallMethodResult_decodeBinary(const UA_ByteString *src, size_t *offset, UA_CallMethodResult *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_CALLMETHODRESULT]); }
|
||||
|
||||
/* ParsingResult */
|
||||
static UA_INLINE UA_StatusCode UA_ParsingResult_encodeBinary(const UA_ParsingResult *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_PARSINGRESULT], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_ParsingResult_decodeBinary(const UA_ByteString *src, size_t *offset, UA_ParsingResult *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_PARSINGRESULT]); }
|
||||
|
||||
/* RelativePathElement */
|
||||
static UA_INLINE UA_StatusCode UA_RelativePathElement_encodeBinary(const UA_RelativePathElement *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_RELATIVEPATHELEMENT], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_RelativePathElement_decodeBinary(const UA_ByteString *src, size_t *offset, UA_RelativePathElement *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_RELATIVEPATHELEMENT]); }
|
||||
|
||||
/* BrowseDirection */
|
||||
static UA_INLINE UA_StatusCode UA_BrowseDirection_encodeBinary(const UA_BrowseDirection *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_BROWSEDIRECTION], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_BrowseDirection_decodeBinary(const UA_ByteString *src, size_t *offset, UA_BrowseDirection *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_BROWSEDIRECTION]); }
|
||||
|
||||
/* CallMethodRequest */
|
||||
static UA_INLINE UA_StatusCode UA_CallMethodRequest_encodeBinary(const UA_CallMethodRequest *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_CALLMETHODREQUEST], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_CallMethodRequest_decodeBinary(const UA_ByteString *src, size_t *offset, UA_CallMethodRequest *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_CALLMETHODREQUEST]); }
|
||||
|
||||
/* ServerState */
|
||||
static UA_INLINE UA_StatusCode UA_ServerState_encodeBinary(const UA_ServerState *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_SERVERSTATE], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_ServerState_decodeBinary(const UA_ByteString *src, size_t *offset, UA_ServerState *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_SERVERSTATE]); }
|
||||
|
||||
/* UnregisterNodesRequest */
|
||||
static UA_INLINE UA_StatusCode UA_UnregisterNodesRequest_encodeBinary(const UA_UnregisterNodesRequest *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_UNREGISTERNODESREQUEST], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_UnregisterNodesRequest_decodeBinary(const UA_ByteString *src, size_t *offset, UA_UnregisterNodesRequest *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_UNREGISTERNODESREQUEST]); }
|
||||
|
||||
/* ContentFilterElementResult */
|
||||
static UA_INLINE UA_StatusCode UA_ContentFilterElementResult_encodeBinary(const UA_ContentFilterElementResult *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_CONTENTFILTERELEMENTRESULT], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_ContentFilterElementResult_decodeBinary(const UA_ByteString *src, size_t *offset, UA_ContentFilterElementResult *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_CONTENTFILTERELEMENTRESULT]); }
|
||||
|
||||
/* QueryDataSet */
|
||||
static UA_INLINE UA_StatusCode UA_QueryDataSet_encodeBinary(const UA_QueryDataSet *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_QUERYDATASET], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_QueryDataSet_decodeBinary(const UA_ByteString *src, size_t *offset, UA_QueryDataSet *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_QUERYDATASET]); }
|
||||
|
||||
/* SetPublishingModeRequest */
|
||||
static UA_INLINE UA_StatusCode UA_SetPublishingModeRequest_encodeBinary(const UA_SetPublishingModeRequest *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_SETPUBLISHINGMODEREQUEST], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_SetPublishingModeRequest_decodeBinary(const UA_ByteString *src, size_t *offset, UA_SetPublishingModeRequest *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_SETPUBLISHINGMODEREQUEST]); }
|
||||
|
||||
/* TimestampsToReturn */
|
||||
static UA_INLINE UA_StatusCode UA_TimestampsToReturn_encodeBinary(const UA_TimestampsToReturn *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_TIMESTAMPSTORETURN], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_TimestampsToReturn_decodeBinary(const UA_ByteString *src, size_t *offset, UA_TimestampsToReturn *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_TIMESTAMPSTORETURN]); }
|
||||
|
||||
/* CallRequest */
|
||||
static UA_INLINE UA_StatusCode UA_CallRequest_encodeBinary(const UA_CallRequest *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_CALLREQUEST], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_CallRequest_decodeBinary(const UA_ByteString *src, size_t *offset, UA_CallRequest *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_CALLREQUEST]); }
|
||||
|
||||
/* MethodAttributes */
|
||||
static UA_INLINE UA_StatusCode UA_MethodAttributes_encodeBinary(const UA_MethodAttributes *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_METHODATTRIBUTES], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_MethodAttributes_decodeBinary(const UA_ByteString *src, size_t *offset, UA_MethodAttributes *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_METHODATTRIBUTES]); }
|
||||
|
||||
/* DeleteReferencesItem */
|
||||
static UA_INLINE UA_StatusCode UA_DeleteReferencesItem_encodeBinary(const UA_DeleteReferencesItem *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_DELETEREFERENCESITEM], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_DeleteReferencesItem_decodeBinary(const UA_ByteString *src, size_t *offset, UA_DeleteReferencesItem *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_DELETEREFERENCESITEM]); }
|
||||
|
||||
/* WriteValue */
|
||||
static UA_INLINE UA_StatusCode UA_WriteValue_encodeBinary(const UA_WriteValue *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_WRITEVALUE], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_WriteValue_decodeBinary(const UA_ByteString *src, size_t *offset, UA_WriteValue *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_WRITEVALUE]); }
|
||||
|
||||
/* MonitoredItemCreateResult */
|
||||
static UA_INLINE UA_StatusCode UA_MonitoredItemCreateResult_encodeBinary(const UA_MonitoredItemCreateResult *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_MONITOREDITEMCREATERESULT], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_MonitoredItemCreateResult_decodeBinary(const UA_ByteString *src, size_t *offset, UA_MonitoredItemCreateResult *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_MONITOREDITEMCREATERESULT]); }
|
||||
|
||||
/* MessageSecurityMode */
|
||||
static UA_INLINE UA_StatusCode UA_MessageSecurityMode_encodeBinary(const UA_MessageSecurityMode *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_MESSAGESECURITYMODE], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_MessageSecurityMode_decodeBinary(const UA_ByteString *src, size_t *offset, UA_MessageSecurityMode *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_MESSAGESECURITYMODE]); }
|
||||
|
||||
/* MonitoringParameters */
|
||||
static UA_INLINE UA_StatusCode UA_MonitoringParameters_encodeBinary(const UA_MonitoringParameters *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_MONITORINGPARAMETERS], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_MonitoringParameters_decodeBinary(const UA_ByteString *src, size_t *offset, UA_MonitoringParameters *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_MONITORINGPARAMETERS]); }
|
||||
|
||||
/* SignatureData */
|
||||
static UA_INLINE UA_StatusCode UA_SignatureData_encodeBinary(const UA_SignatureData *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_SIGNATUREDATA], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_SignatureData_decodeBinary(const UA_ByteString *src, size_t *offset, UA_SignatureData *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_SIGNATUREDATA]); }
|
||||
|
||||
/* ReferenceNode */
|
||||
static UA_INLINE UA_StatusCode UA_ReferenceNode_encodeBinary(const UA_ReferenceNode *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_REFERENCENODE], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_ReferenceNode_decodeBinary(const UA_ByteString *src, size_t *offset, UA_ReferenceNode *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_REFERENCENODE]); }
|
||||
|
||||
/* Argument */
|
||||
static UA_INLINE UA_StatusCode UA_Argument_encodeBinary(const UA_Argument *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_ARGUMENT], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_Argument_decodeBinary(const UA_ByteString *src, size_t *offset, UA_Argument *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_ARGUMENT]); }
|
||||
|
||||
/* UserIdentityToken */
|
||||
static UA_INLINE UA_StatusCode UA_UserIdentityToken_encodeBinary(const UA_UserIdentityToken *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_USERIDENTITYTOKEN], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_UserIdentityToken_decodeBinary(const UA_ByteString *src, size_t *offset, UA_UserIdentityToken *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_USERIDENTITYTOKEN]); }
|
||||
|
||||
/* ObjectTypeAttributes */
|
||||
static UA_INLINE UA_StatusCode UA_ObjectTypeAttributes_encodeBinary(const UA_ObjectTypeAttributes *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_OBJECTTYPEATTRIBUTES], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_ObjectTypeAttributes_decodeBinary(const UA_ByteString *src, size_t *offset, UA_ObjectTypeAttributes *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_OBJECTTYPEATTRIBUTES]); }
|
||||
|
||||
/* SecurityTokenRequestType */
|
||||
static UA_INLINE UA_StatusCode UA_SecurityTokenRequestType_encodeBinary(const UA_SecurityTokenRequestType *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_SECURITYTOKENREQUESTTYPE], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_SecurityTokenRequestType_decodeBinary(const UA_ByteString *src, size_t *offset, UA_SecurityTokenRequestType *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_SECURITYTOKENREQUESTTYPE]); }
|
||||
|
||||
/* BuildInfo */
|
||||
static UA_INLINE UA_StatusCode UA_BuildInfo_encodeBinary(const UA_BuildInfo *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_BUILDINFO], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_BuildInfo_decodeBinary(const UA_ByteString *src, size_t *offset, UA_BuildInfo *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_BUILDINFO]); }
|
||||
|
||||
/* NodeClass */
|
||||
static UA_INLINE UA_StatusCode UA_NodeClass_encodeBinary(const UA_NodeClass *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_NODECLASS], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_NodeClass_decodeBinary(const UA_ByteString *src, size_t *offset, UA_NodeClass *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_NODECLASS]); }
|
||||
|
||||
/* ChannelSecurityToken */
|
||||
static UA_INLINE UA_StatusCode UA_ChannelSecurityToken_encodeBinary(const UA_ChannelSecurityToken *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_CHANNELSECURITYTOKEN], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_ChannelSecurityToken_decodeBinary(const UA_ByteString *src, size_t *offset, UA_ChannelSecurityToken *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_CHANNELSECURITYTOKEN]); }
|
||||
|
||||
/* MonitoredItemNotification */
|
||||
static UA_INLINE UA_StatusCode UA_MonitoredItemNotification_encodeBinary(const UA_MonitoredItemNotification *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_MONITOREDITEMNOTIFICATION], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_MonitoredItemNotification_decodeBinary(const UA_ByteString *src, size_t *offset, UA_MonitoredItemNotification *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_MONITOREDITEMNOTIFICATION]); }
|
||||
|
||||
/* DeleteNodesItem */
|
||||
static UA_INLINE UA_StatusCode UA_DeleteNodesItem_encodeBinary(const UA_DeleteNodesItem *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_DELETENODESITEM], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_DeleteNodesItem_decodeBinary(const UA_ByteString *src, size_t *offset, UA_DeleteNodesItem *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_DELETENODESITEM]); }
|
||||
|
||||
/* SubscriptionAcknowledgement */
|
||||
static UA_INLINE UA_StatusCode UA_SubscriptionAcknowledgement_encodeBinary(const UA_SubscriptionAcknowledgement *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_SUBSCRIPTIONACKNOWLEDGEMENT], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_SubscriptionAcknowledgement_decodeBinary(const UA_ByteString *src, size_t *offset, UA_SubscriptionAcknowledgement *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_SUBSCRIPTIONACKNOWLEDGEMENT]); }
|
||||
|
||||
/* ReadValueId */
|
||||
static UA_INLINE UA_StatusCode UA_ReadValueId_encodeBinary(const UA_ReadValueId *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_READVALUEID], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_ReadValueId_decodeBinary(const UA_ByteString *src, size_t *offset, UA_ReadValueId *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_READVALUEID]); }
|
||||
|
||||
/* AnonymousIdentityToken */
|
||||
static UA_INLINE UA_StatusCode UA_AnonymousIdentityToken_encodeBinary(const UA_AnonymousIdentityToken *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_ANONYMOUSIDENTITYTOKEN], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_AnonymousIdentityToken_decodeBinary(const UA_ByteString *src, size_t *offset, UA_AnonymousIdentityToken *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_ANONYMOUSIDENTITYTOKEN]); }
|
||||
|
||||
/* DataTypeAttributes */
|
||||
static UA_INLINE UA_StatusCode UA_DataTypeAttributes_encodeBinary(const UA_DataTypeAttributes *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_DATATYPEATTRIBUTES], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_DataTypeAttributes_decodeBinary(const UA_ByteString *src, size_t *offset, UA_DataTypeAttributes *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_DATATYPEATTRIBUTES]); }
|
||||
|
||||
/* ResponseHeader */
|
||||
static UA_INLINE UA_StatusCode UA_ResponseHeader_encodeBinary(const UA_ResponseHeader *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_RESPONSEHEADER], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_ResponseHeader_decodeBinary(const UA_ByteString *src, size_t *offset, UA_ResponseHeader *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_RESPONSEHEADER]); }
|
||||
|
||||
/* DeleteSubscriptionsRequest */
|
||||
static UA_INLINE UA_StatusCode UA_DeleteSubscriptionsRequest_encodeBinary(const UA_DeleteSubscriptionsRequest *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_DELETESUBSCRIPTIONSREQUEST], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_DeleteSubscriptionsRequest_decodeBinary(const UA_ByteString *src, size_t *offset, UA_DeleteSubscriptionsRequest *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_DELETESUBSCRIPTIONSREQUEST]); }
|
||||
|
||||
/* DataChangeNotification */
|
||||
static UA_INLINE UA_StatusCode UA_DataChangeNotification_encodeBinary(const UA_DataChangeNotification *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_DATACHANGENOTIFICATION], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_DataChangeNotification_decodeBinary(const UA_ByteString *src, size_t *offset, UA_DataChangeNotification *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_DATACHANGENOTIFICATION]); }
|
||||
|
||||
/* DeleteMonitoredItemsResponse */
|
||||
static UA_INLINE UA_StatusCode UA_DeleteMonitoredItemsResponse_encodeBinary(const UA_DeleteMonitoredItemsResponse *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_DELETEMONITOREDITEMSRESPONSE], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_DeleteMonitoredItemsResponse_decodeBinary(const UA_ByteString *src, size_t *offset, UA_DeleteMonitoredItemsResponse *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_DELETEMONITOREDITEMSRESPONSE]); }
|
||||
|
||||
/* RelativePath */
|
||||
static UA_INLINE UA_StatusCode UA_RelativePath_encodeBinary(const UA_RelativePath *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_RELATIVEPATH], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_RelativePath_decodeBinary(const UA_ByteString *src, size_t *offset, UA_RelativePath *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_RELATIVEPATH]); }
|
||||
|
||||
/* RegisterNodesRequest */
|
||||
static UA_INLINE UA_StatusCode UA_RegisterNodesRequest_encodeBinary(const UA_RegisterNodesRequest *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_REGISTERNODESREQUEST], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_RegisterNodesRequest_decodeBinary(const UA_ByteString *src, size_t *offset, UA_RegisterNodesRequest *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_REGISTERNODESREQUEST]); }
|
||||
|
||||
/* DeleteNodesRequest */
|
||||
static UA_INLINE UA_StatusCode UA_DeleteNodesRequest_encodeBinary(const UA_DeleteNodesRequest *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_DELETENODESREQUEST], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_DeleteNodesRequest_decodeBinary(const UA_ByteString *src, size_t *offset, UA_DeleteNodesRequest *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_DELETENODESREQUEST]); }
|
||||
|
||||
/* PublishResponse */
|
||||
static UA_INLINE UA_StatusCode UA_PublishResponse_encodeBinary(const UA_PublishResponse *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_PUBLISHRESPONSE], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_PublishResponse_decodeBinary(const UA_ByteString *src, size_t *offset, UA_PublishResponse *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_PUBLISHRESPONSE]); }
|
||||
|
||||
/* MonitoredItemModifyRequest */
|
||||
static UA_INLINE UA_StatusCode UA_MonitoredItemModifyRequest_encodeBinary(const UA_MonitoredItemModifyRequest *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_MONITOREDITEMMODIFYREQUEST], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_MonitoredItemModifyRequest_decodeBinary(const UA_ByteString *src, size_t *offset, UA_MonitoredItemModifyRequest *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_MONITOREDITEMMODIFYREQUEST]); }
|
||||
|
||||
/* UserNameIdentityToken */
|
||||
static UA_INLINE UA_StatusCode UA_UserNameIdentityToken_encodeBinary(const UA_UserNameIdentityToken *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_USERNAMEIDENTITYTOKEN], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_UserNameIdentityToken_decodeBinary(const UA_ByteString *src, size_t *offset, UA_UserNameIdentityToken *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_USERNAMEIDENTITYTOKEN]); }
|
||||
|
||||
/* IdType */
|
||||
static UA_INLINE UA_StatusCode UA_IdType_encodeBinary(const UA_IdType *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_IDTYPE], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_IdType_decodeBinary(const UA_ByteString *src, size_t *offset, UA_IdType *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_IDTYPE]); }
|
||||
|
||||
/* UserTokenType */
|
||||
static UA_INLINE UA_StatusCode UA_UserTokenType_encodeBinary(const UA_UserTokenType *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_USERTOKENTYPE], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_UserTokenType_decodeBinary(const UA_ByteString *src, size_t *offset, UA_UserTokenType *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_USERTOKENTYPE]); }
|
||||
|
||||
/* NodeAttributes */
|
||||
static UA_INLINE UA_StatusCode UA_NodeAttributes_encodeBinary(const UA_NodeAttributes *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_NODEATTRIBUTES], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_NodeAttributes_decodeBinary(const UA_ByteString *src, size_t *offset, UA_NodeAttributes *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_NODEATTRIBUTES]); }
|
||||
|
||||
/* ActivateSessionRequest */
|
||||
static UA_INLINE UA_StatusCode UA_ActivateSessionRequest_encodeBinary(const UA_ActivateSessionRequest *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_ACTIVATESESSIONREQUEST], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_ActivateSessionRequest_decodeBinary(const UA_ByteString *src, size_t *offset, UA_ActivateSessionRequest *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_ACTIVATESESSIONREQUEST]); }
|
||||
|
||||
/* OpenSecureChannelResponse */
|
||||
static UA_INLINE UA_StatusCode UA_OpenSecureChannelResponse_encodeBinary(const UA_OpenSecureChannelResponse *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_OPENSECURECHANNELRESPONSE], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_OpenSecureChannelResponse_decodeBinary(const UA_ByteString *src, size_t *offset, UA_OpenSecureChannelResponse *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_OPENSECURECHANNELRESPONSE]); }
|
||||
|
||||
/* ApplicationType */
|
||||
static UA_INLINE UA_StatusCode UA_ApplicationType_encodeBinary(const UA_ApplicationType *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_APPLICATIONTYPE], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_ApplicationType_decodeBinary(const UA_ByteString *src, size_t *offset, UA_ApplicationType *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_APPLICATIONTYPE]); }
|
||||
|
||||
/* QueryNextResponse */
|
||||
static UA_INLINE UA_StatusCode UA_QueryNextResponse_encodeBinary(const UA_QueryNextResponse *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_QUERYNEXTRESPONSE], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_QueryNextResponse_decodeBinary(const UA_ByteString *src, size_t *offset, UA_QueryNextResponse *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_QUERYNEXTRESPONSE]); }
|
||||
|
||||
/* ActivateSessionResponse */
|
||||
static UA_INLINE UA_StatusCode UA_ActivateSessionResponse_encodeBinary(const UA_ActivateSessionResponse *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_ACTIVATESESSIONRESPONSE], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_ActivateSessionResponse_decodeBinary(const UA_ByteString *src, size_t *offset, UA_ActivateSessionResponse *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_ACTIVATESESSIONRESPONSE]); }
|
||||
|
||||
/* FilterOperator */
|
||||
static UA_INLINE UA_StatusCode UA_FilterOperator_encodeBinary(const UA_FilterOperator *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_FILTEROPERATOR], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_FilterOperator_decodeBinary(const UA_ByteString *src, size_t *offset, UA_FilterOperator *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_FILTEROPERATOR]); }
|
||||
|
||||
/* QueryNextRequest */
|
||||
static UA_INLINE UA_StatusCode UA_QueryNextRequest_encodeBinary(const UA_QueryNextRequest *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_QUERYNEXTREQUEST], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_QueryNextRequest_decodeBinary(const UA_ByteString *src, size_t *offset, UA_QueryNextRequest *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_QUERYNEXTREQUEST]); }
|
||||
|
||||
/* BrowseNextRequest */
|
||||
static UA_INLINE UA_StatusCode UA_BrowseNextRequest_encodeBinary(const UA_BrowseNextRequest *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_BROWSENEXTREQUEST], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_BrowseNextRequest_decodeBinary(const UA_ByteString *src, size_t *offset, UA_BrowseNextRequest *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_BROWSENEXTREQUEST]); }
|
||||
|
||||
/* CreateSubscriptionRequest */
|
||||
static UA_INLINE UA_StatusCode UA_CreateSubscriptionRequest_encodeBinary(const UA_CreateSubscriptionRequest *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_CREATESUBSCRIPTIONREQUEST], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_CreateSubscriptionRequest_decodeBinary(const UA_ByteString *src, size_t *offset, UA_CreateSubscriptionRequest *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_CREATESUBSCRIPTIONREQUEST]); }
|
||||
|
||||
/* VariableTypeAttributes */
|
||||
static UA_INLINE UA_StatusCode UA_VariableTypeAttributes_encodeBinary(const UA_VariableTypeAttributes *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_VARIABLETYPEATTRIBUTES], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_VariableTypeAttributes_decodeBinary(const UA_ByteString *src, size_t *offset, UA_VariableTypeAttributes *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_VARIABLETYPEATTRIBUTES]); }
|
||||
|
||||
/* BrowsePathResult */
|
||||
static UA_INLINE UA_StatusCode UA_BrowsePathResult_encodeBinary(const UA_BrowsePathResult *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_BROWSEPATHRESULT], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_BrowsePathResult_decodeBinary(const UA_ByteString *src, size_t *offset, UA_BrowsePathResult *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_BROWSEPATHRESULT]); }
|
||||
|
||||
/* ModifySubscriptionResponse */
|
||||
static UA_INLINE UA_StatusCode UA_ModifySubscriptionResponse_encodeBinary(const UA_ModifySubscriptionResponse *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_MODIFYSUBSCRIPTIONRESPONSE], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_ModifySubscriptionResponse_decodeBinary(const UA_ByteString *src, size_t *offset, UA_ModifySubscriptionResponse *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_MODIFYSUBSCRIPTIONRESPONSE]); }
|
||||
|
||||
/* RegisterNodesResponse */
|
||||
static UA_INLINE UA_StatusCode UA_RegisterNodesResponse_encodeBinary(const UA_RegisterNodesResponse *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_REGISTERNODESRESPONSE], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_RegisterNodesResponse_decodeBinary(const UA_ByteString *src, size_t *offset, UA_RegisterNodesResponse *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_REGISTERNODESRESPONSE]); }
|
||||
|
||||
/* CloseSessionRequest */
|
||||
static UA_INLINE UA_StatusCode UA_CloseSessionRequest_encodeBinary(const UA_CloseSessionRequest *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_CLOSESESSIONREQUEST], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_CloseSessionRequest_decodeBinary(const UA_ByteString *src, size_t *offset, UA_CloseSessionRequest *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_CLOSESESSIONREQUEST]); }
|
||||
|
||||
/* ModifySubscriptionRequest */
|
||||
static UA_INLINE UA_StatusCode UA_ModifySubscriptionRequest_encodeBinary(const UA_ModifySubscriptionRequest *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_MODIFYSUBSCRIPTIONREQUEST], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_ModifySubscriptionRequest_decodeBinary(const UA_ByteString *src, size_t *offset, UA_ModifySubscriptionRequest *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_MODIFYSUBSCRIPTIONREQUEST]); }
|
||||
|
||||
/* UserTokenPolicy */
|
||||
static UA_INLINE UA_StatusCode UA_UserTokenPolicy_encodeBinary(const UA_UserTokenPolicy *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_USERTOKENPOLICY], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_UserTokenPolicy_decodeBinary(const UA_ByteString *src, size_t *offset, UA_UserTokenPolicy *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_USERTOKENPOLICY]); }
|
||||
|
||||
/* DeleteMonitoredItemsRequest */
|
||||
static UA_INLINE UA_StatusCode UA_DeleteMonitoredItemsRequest_encodeBinary(const UA_DeleteMonitoredItemsRequest *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_DELETEMONITOREDITEMSREQUEST], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_DeleteMonitoredItemsRequest_decodeBinary(const UA_ByteString *src, size_t *offset, UA_DeleteMonitoredItemsRequest *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_DELETEMONITOREDITEMSREQUEST]); }
|
||||
|
||||
/* ReferenceTypeAttributes */
|
||||
static UA_INLINE UA_StatusCode UA_ReferenceTypeAttributes_encodeBinary(const UA_ReferenceTypeAttributes *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_REFERENCETYPEATTRIBUTES], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_ReferenceTypeAttributes_decodeBinary(const UA_ByteString *src, size_t *offset, UA_ReferenceTypeAttributes *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_REFERENCETYPEATTRIBUTES]); }
|
||||
|
||||
/* BrowsePath */
|
||||
static UA_INLINE UA_StatusCode UA_BrowsePath_encodeBinary(const UA_BrowsePath *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_BROWSEPATH], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_BrowsePath_decodeBinary(const UA_ByteString *src, size_t *offset, UA_BrowsePath *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_BROWSEPATH]); }
|
||||
|
||||
/* UnregisterNodesResponse */
|
||||
static UA_INLINE UA_StatusCode UA_UnregisterNodesResponse_encodeBinary(const UA_UnregisterNodesResponse *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_UNREGISTERNODESRESPONSE], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_UnregisterNodesResponse_decodeBinary(const UA_ByteString *src, size_t *offset, UA_UnregisterNodesResponse *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_UNREGISTERNODESRESPONSE]); }
|
||||
|
||||
/* WriteRequest */
|
||||
static UA_INLINE UA_StatusCode UA_WriteRequest_encodeBinary(const UA_WriteRequest *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_WRITEREQUEST], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_WriteRequest_decodeBinary(const UA_ByteString *src, size_t *offset, UA_WriteRequest *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_WRITEREQUEST]); }
|
||||
|
||||
/* ObjectAttributes */
|
||||
static UA_INLINE UA_StatusCode UA_ObjectAttributes_encodeBinary(const UA_ObjectAttributes *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_OBJECTATTRIBUTES], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_ObjectAttributes_decodeBinary(const UA_ByteString *src, size_t *offset, UA_ObjectAttributes *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_OBJECTATTRIBUTES]); }
|
||||
|
||||
/* BrowseDescription */
|
||||
static UA_INLINE UA_StatusCode UA_BrowseDescription_encodeBinary(const UA_BrowseDescription *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_BROWSEDESCRIPTION], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_BrowseDescription_decodeBinary(const UA_ByteString *src, size_t *offset, UA_BrowseDescription *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_BROWSEDESCRIPTION]); }
|
||||
|
||||
/* RepublishRequest */
|
||||
static UA_INLINE UA_StatusCode UA_RepublishRequest_encodeBinary(const UA_RepublishRequest *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_REPUBLISHREQUEST], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_RepublishRequest_decodeBinary(const UA_ByteString *src, size_t *offset, UA_RepublishRequest *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_REPUBLISHREQUEST]); }
|
||||
|
||||
/* GetEndpointsRequest */
|
||||
static UA_INLINE UA_StatusCode UA_GetEndpointsRequest_encodeBinary(const UA_GetEndpointsRequest *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_GETENDPOINTSREQUEST], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_GetEndpointsRequest_decodeBinary(const UA_ByteString *src, size_t *offset, UA_GetEndpointsRequest *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_GETENDPOINTSREQUEST]); }
|
||||
|
||||
/* PublishRequest */
|
||||
static UA_INLINE UA_StatusCode UA_PublishRequest_encodeBinary(const UA_PublishRequest *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_PUBLISHREQUEST], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_PublishRequest_decodeBinary(const UA_ByteString *src, size_t *offset, UA_PublishRequest *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_PUBLISHREQUEST]); }
|
||||
|
||||
/* AddNodesResponse */
|
||||
static UA_INLINE UA_StatusCode UA_AddNodesResponse_encodeBinary(const UA_AddNodesResponse *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_ADDNODESRESPONSE], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_AddNodesResponse_decodeBinary(const UA_ByteString *src, size_t *offset, UA_AddNodesResponse *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_ADDNODESRESPONSE]); }
|
||||
|
||||
/* CloseSecureChannelResponse */
|
||||
static UA_INLINE UA_StatusCode UA_CloseSecureChannelResponse_encodeBinary(const UA_CloseSecureChannelResponse *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_CLOSESECURECHANNELRESPONSE], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_CloseSecureChannelResponse_decodeBinary(const UA_ByteString *src, size_t *offset, UA_CloseSecureChannelResponse *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_CLOSESECURECHANNELRESPONSE]); }
|
||||
|
||||
/* ModifyMonitoredItemsRequest */
|
||||
static UA_INLINE UA_StatusCode UA_ModifyMonitoredItemsRequest_encodeBinary(const UA_ModifyMonitoredItemsRequest *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_MODIFYMONITOREDITEMSREQUEST], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_ModifyMonitoredItemsRequest_decodeBinary(const UA_ByteString *src, size_t *offset, UA_ModifyMonitoredItemsRequest *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_MODIFYMONITOREDITEMSREQUEST]); }
|
||||
|
||||
/* FindServersRequest */
|
||||
static UA_INLINE UA_StatusCode UA_FindServersRequest_encodeBinary(const UA_FindServersRequest *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_FINDSERVERSREQUEST], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_FindServersRequest_decodeBinary(const UA_ByteString *src, size_t *offset, UA_FindServersRequest *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_FINDSERVERSREQUEST]); }
|
||||
|
||||
/* ReferenceDescription */
|
||||
static UA_INLINE UA_StatusCode UA_ReferenceDescription_encodeBinary(const UA_ReferenceDescription *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_REFERENCEDESCRIPTION], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_ReferenceDescription_decodeBinary(const UA_ByteString *src, size_t *offset, UA_ReferenceDescription *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_REFERENCEDESCRIPTION]); }
|
||||
|
||||
/* SetPublishingModeResponse */
|
||||
static UA_INLINE UA_StatusCode UA_SetPublishingModeResponse_encodeBinary(const UA_SetPublishingModeResponse *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_SETPUBLISHINGMODERESPONSE], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_SetPublishingModeResponse_decodeBinary(const UA_ByteString *src, size_t *offset, UA_SetPublishingModeResponse *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_SETPUBLISHINGMODERESPONSE]); }
|
||||
|
||||
/* ContentFilterResult */
|
||||
static UA_INLINE UA_StatusCode UA_ContentFilterResult_encodeBinary(const UA_ContentFilterResult *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_CONTENTFILTERRESULT], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_ContentFilterResult_decodeBinary(const UA_ByteString *src, size_t *offset, UA_ContentFilterResult *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_CONTENTFILTERRESULT]); }
|
||||
|
||||
/* AddReferencesItem */
|
||||
static UA_INLINE UA_StatusCode UA_AddReferencesItem_encodeBinary(const UA_AddReferencesItem *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_ADDREFERENCESITEM], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_AddReferencesItem_decodeBinary(const UA_ByteString *src, size_t *offset, UA_AddReferencesItem *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_ADDREFERENCESITEM]); }
|
||||
|
||||
/* QueryDataDescription */
|
||||
static UA_INLINE UA_StatusCode UA_QueryDataDescription_encodeBinary(const UA_QueryDataDescription *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_QUERYDATADESCRIPTION], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_QueryDataDescription_decodeBinary(const UA_ByteString *src, size_t *offset, UA_QueryDataDescription *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_QUERYDATADESCRIPTION]); }
|
||||
|
||||
/* CreateSubscriptionResponse */
|
||||
static UA_INLINE UA_StatusCode UA_CreateSubscriptionResponse_encodeBinary(const UA_CreateSubscriptionResponse *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_CREATESUBSCRIPTIONRESPONSE], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_CreateSubscriptionResponse_decodeBinary(const UA_ByteString *src, size_t *offset, UA_CreateSubscriptionResponse *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_CREATESUBSCRIPTIONRESPONSE]); }
|
||||
|
||||
/* DeleteSubscriptionsResponse */
|
||||
static UA_INLINE UA_StatusCode UA_DeleteSubscriptionsResponse_encodeBinary(const UA_DeleteSubscriptionsResponse *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_DELETESUBSCRIPTIONSRESPONSE], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_DeleteSubscriptionsResponse_decodeBinary(const UA_ByteString *src, size_t *offset, UA_DeleteSubscriptionsResponse *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_DELETESUBSCRIPTIONSRESPONSE]); }
|
||||
|
||||
/* WriteResponse */
|
||||
static UA_INLINE UA_StatusCode UA_WriteResponse_encodeBinary(const UA_WriteResponse *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_WRITERESPONSE], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_WriteResponse_decodeBinary(const UA_ByteString *src, size_t *offset, UA_WriteResponse *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_WRITERESPONSE]); }
|
||||
|
||||
/* DeleteReferencesResponse */
|
||||
static UA_INLINE UA_StatusCode UA_DeleteReferencesResponse_encodeBinary(const UA_DeleteReferencesResponse *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_DELETEREFERENCESRESPONSE], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_DeleteReferencesResponse_decodeBinary(const UA_ByteString *src, size_t *offset, UA_DeleteReferencesResponse *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_DELETEREFERENCESRESPONSE]); }
|
||||
|
||||
/* CreateMonitoredItemsResponse */
|
||||
static UA_INLINE UA_StatusCode UA_CreateMonitoredItemsResponse_encodeBinary(const UA_CreateMonitoredItemsResponse *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_CREATEMONITOREDITEMSRESPONSE], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_CreateMonitoredItemsResponse_decodeBinary(const UA_ByteString *src, size_t *offset, UA_CreateMonitoredItemsResponse *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_CREATEMONITOREDITEMSRESPONSE]); }
|
||||
|
||||
/* CallResponse */
|
||||
static UA_INLINE UA_StatusCode UA_CallResponse_encodeBinary(const UA_CallResponse *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_CALLRESPONSE], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_CallResponse_decodeBinary(const UA_ByteString *src, size_t *offset, UA_CallResponse *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_CALLRESPONSE]); }
|
||||
|
||||
/* DeleteNodesResponse */
|
||||
static UA_INLINE UA_StatusCode UA_DeleteNodesResponse_encodeBinary(const UA_DeleteNodesResponse *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_DELETENODESRESPONSE], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_DeleteNodesResponse_decodeBinary(const UA_ByteString *src, size_t *offset, UA_DeleteNodesResponse *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_DELETENODESRESPONSE]); }
|
||||
|
||||
/* RepublishResponse */
|
||||
static UA_INLINE UA_StatusCode UA_RepublishResponse_encodeBinary(const UA_RepublishResponse *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_REPUBLISHRESPONSE], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_RepublishResponse_decodeBinary(const UA_ByteString *src, size_t *offset, UA_RepublishResponse *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_REPUBLISHRESPONSE]); }
|
||||
|
||||
/* MonitoredItemCreateRequest */
|
||||
static UA_INLINE UA_StatusCode UA_MonitoredItemCreateRequest_encodeBinary(const UA_MonitoredItemCreateRequest *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_MONITOREDITEMCREATEREQUEST], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_MonitoredItemCreateRequest_decodeBinary(const UA_ByteString *src, size_t *offset, UA_MonitoredItemCreateRequest *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_MONITOREDITEMCREATEREQUEST]); }
|
||||
|
||||
/* DeleteReferencesRequest */
|
||||
static UA_INLINE UA_StatusCode UA_DeleteReferencesRequest_encodeBinary(const UA_DeleteReferencesRequest *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_DELETEREFERENCESREQUEST], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_DeleteReferencesRequest_decodeBinary(const UA_ByteString *src, size_t *offset, UA_DeleteReferencesRequest *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_DELETEREFERENCESREQUEST]); }
|
||||
|
||||
/* ModifyMonitoredItemsResponse */
|
||||
static UA_INLINE UA_StatusCode UA_ModifyMonitoredItemsResponse_encodeBinary(const UA_ModifyMonitoredItemsResponse *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_MODIFYMONITOREDITEMSRESPONSE], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_ModifyMonitoredItemsResponse_decodeBinary(const UA_ByteString *src, size_t *offset, UA_ModifyMonitoredItemsResponse *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_MODIFYMONITOREDITEMSRESPONSE]); }
|
||||
|
||||
/* ReadResponse */
|
||||
static UA_INLINE UA_StatusCode UA_ReadResponse_encodeBinary(const UA_ReadResponse *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_READRESPONSE], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_ReadResponse_decodeBinary(const UA_ByteString *src, size_t *offset, UA_ReadResponse *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_READRESPONSE]); }
|
||||
|
||||
/* AddReferencesRequest */
|
||||
static UA_INLINE UA_StatusCode UA_AddReferencesRequest_encodeBinary(const UA_AddReferencesRequest *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_ADDREFERENCESREQUEST], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_AddReferencesRequest_decodeBinary(const UA_ByteString *src, size_t *offset, UA_AddReferencesRequest *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_ADDREFERENCESREQUEST]); }
|
||||
|
||||
/* ReadRequest */
|
||||
static UA_INLINE UA_StatusCode UA_ReadRequest_encodeBinary(const UA_ReadRequest *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_READREQUEST], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_ReadRequest_decodeBinary(const UA_ByteString *src, size_t *offset, UA_ReadRequest *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_READREQUEST]); }
|
||||
|
||||
/* OpenSecureChannelRequest */
|
||||
static UA_INLINE UA_StatusCode UA_OpenSecureChannelRequest_encodeBinary(const UA_OpenSecureChannelRequest *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_OPENSECURECHANNELREQUEST], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_OpenSecureChannelRequest_decodeBinary(const UA_ByteString *src, size_t *offset, UA_OpenSecureChannelRequest *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_OPENSECURECHANNELREQUEST]); }
|
||||
|
||||
/* AddNodesItem */
|
||||
static UA_INLINE UA_StatusCode UA_AddNodesItem_encodeBinary(const UA_AddNodesItem *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_ADDNODESITEM], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_AddNodesItem_decodeBinary(const UA_ByteString *src, size_t *offset, UA_AddNodesItem *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_ADDNODESITEM]); }
|
||||
|
||||
/* ApplicationDescription */
|
||||
static UA_INLINE UA_StatusCode UA_ApplicationDescription_encodeBinary(const UA_ApplicationDescription *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_APPLICATIONDESCRIPTION], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_ApplicationDescription_decodeBinary(const UA_ByteString *src, size_t *offset, UA_ApplicationDescription *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_APPLICATIONDESCRIPTION]); }
|
||||
|
||||
/* NodeTypeDescription */
|
||||
static UA_INLINE UA_StatusCode UA_NodeTypeDescription_encodeBinary(const UA_NodeTypeDescription *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_NODETYPEDESCRIPTION], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_NodeTypeDescription_decodeBinary(const UA_ByteString *src, size_t *offset, UA_NodeTypeDescription *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_NODETYPEDESCRIPTION]); }
|
||||
|
||||
/* FindServersResponse */
|
||||
static UA_INLINE UA_StatusCode UA_FindServersResponse_encodeBinary(const UA_FindServersResponse *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_FINDSERVERSRESPONSE], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_FindServersResponse_decodeBinary(const UA_ByteString *src, size_t *offset, UA_FindServersResponse *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_FINDSERVERSRESPONSE]); }
|
||||
|
||||
/* ServerStatusDataType */
|
||||
static UA_INLINE UA_StatusCode UA_ServerStatusDataType_encodeBinary(const UA_ServerStatusDataType *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_SERVERSTATUSDATATYPE], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_ServerStatusDataType_decodeBinary(const UA_ByteString *src, size_t *offset, UA_ServerStatusDataType *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_SERVERSTATUSDATATYPE]); }
|
||||
|
||||
/* AddReferencesResponse */
|
||||
static UA_INLINE UA_StatusCode UA_AddReferencesResponse_encodeBinary(const UA_AddReferencesResponse *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_ADDREFERENCESRESPONSE], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_AddReferencesResponse_decodeBinary(const UA_ByteString *src, size_t *offset, UA_AddReferencesResponse *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_ADDREFERENCESRESPONSE]); }
|
||||
|
||||
/* TranslateBrowsePathsToNodeIdsResponse */
|
||||
static UA_INLINE UA_StatusCode UA_TranslateBrowsePathsToNodeIdsResponse_encodeBinary(const UA_TranslateBrowsePathsToNodeIdsResponse *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_TRANSLATEBROWSEPATHSTONODEIDSRESPONSE], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_TranslateBrowsePathsToNodeIdsResponse_decodeBinary(const UA_ByteString *src, size_t *offset, UA_TranslateBrowsePathsToNodeIdsResponse *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_TRANSLATEBROWSEPATHSTONODEIDSRESPONSE]); }
|
||||
|
||||
/* ContentFilterElement */
|
||||
static UA_INLINE UA_StatusCode UA_ContentFilterElement_encodeBinary(const UA_ContentFilterElement *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_CONTENTFILTERELEMENT], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_ContentFilterElement_decodeBinary(const UA_ByteString *src, size_t *offset, UA_ContentFilterElement *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_CONTENTFILTERELEMENT]); }
|
||||
|
||||
/* TranslateBrowsePathsToNodeIdsRequest */
|
||||
static UA_INLINE UA_StatusCode UA_TranslateBrowsePathsToNodeIdsRequest_encodeBinary(const UA_TranslateBrowsePathsToNodeIdsRequest *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_TRANSLATEBROWSEPATHSTONODEIDSREQUEST], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_TranslateBrowsePathsToNodeIdsRequest_decodeBinary(const UA_ByteString *src, size_t *offset, UA_TranslateBrowsePathsToNodeIdsRequest *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_TRANSLATEBROWSEPATHSTONODEIDSREQUEST]); }
|
||||
|
||||
/* CloseSessionResponse */
|
||||
static UA_INLINE UA_StatusCode UA_CloseSessionResponse_encodeBinary(const UA_CloseSessionResponse *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_CLOSESESSIONRESPONSE], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_CloseSessionResponse_decodeBinary(const UA_ByteString *src, size_t *offset, UA_CloseSessionResponse *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_CLOSESESSIONRESPONSE]); }
|
||||
|
||||
/* ServiceFault */
|
||||
static UA_INLINE UA_StatusCode UA_ServiceFault_encodeBinary(const UA_ServiceFault *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_SERVICEFAULT], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_ServiceFault_decodeBinary(const UA_ByteString *src, size_t *offset, UA_ServiceFault *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_SERVICEFAULT]); }
|
||||
|
||||
/* CreateMonitoredItemsRequest */
|
||||
static UA_INLINE UA_StatusCode UA_CreateMonitoredItemsRequest_encodeBinary(const UA_CreateMonitoredItemsRequest *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_CREATEMONITOREDITEMSREQUEST], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_CreateMonitoredItemsRequest_decodeBinary(const UA_ByteString *src, size_t *offset, UA_CreateMonitoredItemsRequest *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_CREATEMONITOREDITEMSREQUEST]); }
|
||||
|
||||
/* ContentFilter */
|
||||
static UA_INLINE UA_StatusCode UA_ContentFilter_encodeBinary(const UA_ContentFilter *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_CONTENTFILTER], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_ContentFilter_decodeBinary(const UA_ByteString *src, size_t *offset, UA_ContentFilter *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_CONTENTFILTER]); }
|
||||
|
||||
/* QueryFirstResponse */
|
||||
static UA_INLINE UA_StatusCode UA_QueryFirstResponse_encodeBinary(const UA_QueryFirstResponse *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_QUERYFIRSTRESPONSE], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_QueryFirstResponse_decodeBinary(const UA_ByteString *src, size_t *offset, UA_QueryFirstResponse *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_QUERYFIRSTRESPONSE]); }
|
||||
|
||||
/* AddNodesRequest */
|
||||
static UA_INLINE UA_StatusCode UA_AddNodesRequest_encodeBinary(const UA_AddNodesRequest *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_ADDNODESREQUEST], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_AddNodesRequest_decodeBinary(const UA_ByteString *src, size_t *offset, UA_AddNodesRequest *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_ADDNODESREQUEST]); }
|
||||
|
||||
/* BrowseRequest */
|
||||
static UA_INLINE UA_StatusCode UA_BrowseRequest_encodeBinary(const UA_BrowseRequest *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_BROWSEREQUEST], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_BrowseRequest_decodeBinary(const UA_ByteString *src, size_t *offset, UA_BrowseRequest *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_BROWSEREQUEST]); }
|
||||
|
||||
/* BrowseResult */
|
||||
static UA_INLINE UA_StatusCode UA_BrowseResult_encodeBinary(const UA_BrowseResult *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_BROWSERESULT], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_BrowseResult_decodeBinary(const UA_ByteString *src, size_t *offset, UA_BrowseResult *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_BROWSERESULT]); }
|
||||
|
||||
/* CreateSessionRequest */
|
||||
static UA_INLINE UA_StatusCode UA_CreateSessionRequest_encodeBinary(const UA_CreateSessionRequest *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_CREATESESSIONREQUEST], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_CreateSessionRequest_decodeBinary(const UA_ByteString *src, size_t *offset, UA_CreateSessionRequest *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_CREATESESSIONREQUEST]); }
|
||||
|
||||
/* EndpointDescription */
|
||||
static UA_INLINE UA_StatusCode UA_EndpointDescription_encodeBinary(const UA_EndpointDescription *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_ENDPOINTDESCRIPTION], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_EndpointDescription_decodeBinary(const UA_ByteString *src, size_t *offset, UA_EndpointDescription *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_ENDPOINTDESCRIPTION]); }
|
||||
|
||||
/* GetEndpointsResponse */
|
||||
static UA_INLINE UA_StatusCode UA_GetEndpointsResponse_encodeBinary(const UA_GetEndpointsResponse *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_GETENDPOINTSRESPONSE], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_GetEndpointsResponse_decodeBinary(const UA_ByteString *src, size_t *offset, UA_GetEndpointsResponse *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_GETENDPOINTSRESPONSE]); }
|
||||
|
||||
/* BrowseNextResponse */
|
||||
static UA_INLINE UA_StatusCode UA_BrowseNextResponse_encodeBinary(const UA_BrowseNextResponse *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_BROWSENEXTRESPONSE], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_BrowseNextResponse_decodeBinary(const UA_ByteString *src, size_t *offset, UA_BrowseNextResponse *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_BROWSENEXTRESPONSE]); }
|
||||
|
||||
/* BrowseResponse */
|
||||
static UA_INLINE UA_StatusCode UA_BrowseResponse_encodeBinary(const UA_BrowseResponse *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_BROWSERESPONSE], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_BrowseResponse_decodeBinary(const UA_ByteString *src, size_t *offset, UA_BrowseResponse *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_BROWSERESPONSE]); }
|
||||
|
||||
/* CreateSessionResponse */
|
||||
static UA_INLINE UA_StatusCode UA_CreateSessionResponse_encodeBinary(const UA_CreateSessionResponse *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_CREATESESSIONRESPONSE], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_CreateSessionResponse_decodeBinary(const UA_ByteString *src, size_t *offset, UA_CreateSessionResponse *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_CREATESESSIONRESPONSE]); }
|
||||
|
||||
/* QueryFirstRequest */
|
||||
static UA_INLINE UA_StatusCode UA_QueryFirstRequest_encodeBinary(const UA_QueryFirstRequest *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_QUERYFIRSTREQUEST], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_QueryFirstRequest_decodeBinary(const UA_ByteString *src, size_t *offset, UA_QueryFirstRequest *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_QUERYFIRSTREQUEST]); }
|
122
include/ua_util.h
Normal file
122
include/ua_util.h
Normal file
@ -0,0 +1,122 @@
|
||||
#ifndef UA_UTIL_H_
|
||||
#define UA_UTIL_H_
|
||||
|
||||
#include "ua_config.h"
|
||||
|
||||
#include <assert.h>
|
||||
#define UA_assert(ignore) assert(ignore)
|
||||
|
||||
/*********************/
|
||||
/* Memory Management */
|
||||
/*********************/
|
||||
|
||||
/* Replace the macros with functions for custom allocators if necessary */
|
||||
#include <stdlib.h> // malloc, free
|
||||
#ifdef _WIN32
|
||||
# include <malloc.h>
|
||||
#endif
|
||||
|
||||
#ifndef UA_free
|
||||
# define UA_free(ptr) free(ptr)
|
||||
#endif
|
||||
#ifndef UA_malloc
|
||||
# define UA_malloc(size) malloc(size)
|
||||
#endif
|
||||
#ifndef UA_calloc
|
||||
# define UA_calloc(num, size) calloc(num, size)
|
||||
#endif
|
||||
#ifndef UA_realloc
|
||||
# define UA_realloc(ptr, size) realloc(ptr, size)
|
||||
#endif
|
||||
|
||||
#ifndef NO_ALLOCA
|
||||
# ifdef __GNUC__
|
||||
# define UA_alloca(size) __builtin_alloca (size)
|
||||
# elif defined(_WIN32)
|
||||
# define UA_alloca(SIZE) _alloca(SIZE)
|
||||
# else
|
||||
# include <alloca.h>
|
||||
# define UA_alloca(SIZE) alloca(SIZE)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#define container_of(ptr, type, member) \
|
||||
(type *)((uintptr_t)ptr - offsetof(type,member))
|
||||
|
||||
/************************/
|
||||
/* Thread Local Storage */
|
||||
/************************/
|
||||
|
||||
#ifdef UA_ENABLE_MULTITHREADING
|
||||
# ifdef __GNUC__
|
||||
# define UA_THREAD_LOCAL __thread
|
||||
# elif defined(_MSC_VER)
|
||||
# define UA_THREAD_LOCAL __declspec(thread)
|
||||
# else
|
||||
# error No thread local storage keyword defined for this compiler
|
||||
# endif
|
||||
#else
|
||||
# define UA_THREAD_LOCAL
|
||||
#endif
|
||||
|
||||
/********************/
|
||||
/* System Libraries */
|
||||
/********************/
|
||||
|
||||
#ifdef _WIN32
|
||||
# include <winsock2.h> //needed for amalgamation
|
||||
# include <windows.h>
|
||||
# undef SLIST_ENTRY
|
||||
#endif
|
||||
|
||||
#include <time.h>
|
||||
#if defined(_WIN32) && !defined(__MINGW32__)
|
||||
int gettimeofday(struct timeval *tp, struct timezone *tzp);
|
||||
#else
|
||||
# include <sys/time.h>
|
||||
#endif
|
||||
|
||||
#if defined(__APPLE__) || defined(__MACH__)
|
||||
#include <mach/clock.h>
|
||||
#include <mach/mach.h>
|
||||
#endif
|
||||
|
||||
/*************************/
|
||||
/* External Dependencies */
|
||||
/*************************/
|
||||
|
||||
#include "queue.h"
|
||||
|
||||
#ifdef UA_ENABLE_MULTITHREADING
|
||||
# define _LGPL_SOURCE
|
||||
# include <urcu.h>
|
||||
# include <urcu/wfcqueue.h>
|
||||
# include <urcu/uatomic.h>
|
||||
# include <urcu/rculfhash.h>
|
||||
# include <urcu/lfstack.h>
|
||||
# ifdef NDEBUG
|
||||
# define UA_RCU_LOCK() rcu_read_lock()
|
||||
# define UA_RCU_UNLOCK() rcu_read_unlock()
|
||||
# define UA_ASSERT_RCU_LOCKED()
|
||||
# define UA_ASSERT_RCU_UNLOCKED()
|
||||
# else
|
||||
extern UA_THREAD_LOCAL bool rcu_locked;
|
||||
# define UA_ASSERT_RCU_LOCKED() assert(rcu_locked)
|
||||
# define UA_ASSERT_RCU_UNLOCKED() assert(!rcu_locked)
|
||||
# define UA_RCU_LOCK() do { \
|
||||
UA_ASSERT_RCU_UNLOCKED(); \
|
||||
rcu_locked = true; \
|
||||
rcu_read_lock(); } while(0)
|
||||
# define UA_RCU_UNLOCK() do { \
|
||||
UA_ASSERT_RCU_LOCKED(); \
|
||||
rcu_locked = false; \
|
||||
rcu_read_lock(); } while(0)
|
||||
# endif
|
||||
#else
|
||||
# define UA_RCU_LOCK()
|
||||
# define UA_RCU_UNLOCK()
|
||||
# define UA_ASSERT_RCU_LOCKED()
|
||||
# define UA_ASSERT_RCU_UNLOCKED()
|
||||
#endif
|
||||
|
||||
#endif /* UA_UTIL_H_ */
|
BIN
lib/libopen62541-static.a
Normal file
BIN
lib/libopen62541-static.a
Normal file
Binary file not shown.
@ -2,8 +2,11 @@
|
||||
#include <signal.h>
|
||||
#include <time.h>
|
||||
|
||||
#include "open62541.h"
|
||||
|
||||
#include <ua_types.h>
|
||||
#include <ua_server.h>
|
||||
#include <logger_stdout.h>
|
||||
#include <networklayer_tcp.h>
|
||||
#include <ua_config_standard.h>
|
||||
|
||||
|
||||
UA_Logger logger = Logger_Stdout;
|
||||
@ -76,3 +79,4 @@ int main(void) {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
46
myTestModelServer.c
Normal file
46
myTestModelServer.c
Normal file
@ -0,0 +1,46 @@
|
||||
/*
|
||||
* This work is licensed under a Creative Commons CCZero 1.0 Universal License.
|
||||
* See http://creativecommons.org/publicdomain/zero/1.0/ for more information.
|
||||
*/
|
||||
|
||||
#include <signal.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <ua_types.h>
|
||||
#include <ua_server.h>
|
||||
#include <logger_stdout.h>
|
||||
#include <networklayer_tcp.h>
|
||||
#include <ua_config_standard.h>
|
||||
|
||||
|
||||
#include "TestModel.h"
|
||||
|
||||
UA_Logger logger = Logger_Stdout;
|
||||
UA_Boolean running = true;
|
||||
|
||||
static void stopHandler(int sign) {
|
||||
UA_LOG_INFO(logger, UA_LOGCATEGORY_SERVER, "received ctrl-c");
|
||||
running = false;
|
||||
}
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
signal(SIGINT, stopHandler); /* catches ctrl-c */
|
||||
|
||||
/* initialize the server */
|
||||
UA_ServerConfig config = UA_ServerConfig_standard;
|
||||
UA_ServerNetworkLayer nl = UA_ServerNetworkLayerTCP(UA_ConnectionConfig_standard, 16664);
|
||||
config.networkLayers = &nl;
|
||||
config.networkLayersSize = 1;
|
||||
UA_Server *server = UA_Server_new(config);
|
||||
|
||||
/* create nodes from nodeset */
|
||||
TestModel(server);
|
||||
|
||||
/* start server */
|
||||
UA_StatusCode retval = UA_Server_run(server, &running); //UA_blocks until running=false
|
||||
|
||||
/* ctrl-c received -> clean up */
|
||||
UA_Server_delete(server);
|
||||
nl.deleteMembers(&nl);
|
||||
return (int)retval;
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
/* THIS IS A SINGLE-FILE DISTRIBUTION CONCATENATED FROM THE OPEN62541 SOURCES
|
||||
* visit http://open62541.org/ for information about this software
|
||||
* Git-Revision: v0.2.0-RC1-6-g0ca2068
|
||||
* Git-Revision: unknown--git-commit-id-unknown
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -29,7 +29,7 @@
|
||||
|
||||
#include "open62541.h"
|
||||
|
||||
/*********************************** amalgamated original file "/home/wn/src/open62541/deps/queue.h" ***********************************/
|
||||
/*********************************** amalgamated original file "/home/wn/Sources/open62541-open62541-395ce48/deps/queue.h" ***********************************/
|
||||
|
||||
/* $OpenBSD: queue.h,v 1.38 2013/07/03 15:05:21 fgsch Exp $ */
|
||||
/* $NetBSD: queue.h,v 1.11 1996/05/16 05:17:14 mycroft Exp $ */
|
||||
@ -680,7 +680,7 @@ struct { \
|
||||
|
||||
#endif /* !_SYS_QUEUE_H_ */
|
||||
|
||||
/*********************************** amalgamated original file "/home/wn/src/open62541/deps/pcg_basic.h" ***********************************/
|
||||
/*********************************** amalgamated original file "/home/wn/Sources/open62541-open62541-395ce48/deps/pcg_basic.h" ***********************************/
|
||||
|
||||
/*
|
||||
* PCG Random Number Generation for C.
|
||||
@ -758,7 +758,7 @@ uint32_t pcg32_boundedrand_r(pcg32_random_t* rng, uint32_t bound);
|
||||
#endif
|
||||
|
||||
|
||||
/*********************************** amalgamated original file "/home/wn/src/open62541/deps/libc_time.h" ***********************************/
|
||||
/*********************************** amalgamated original file "/home/wn/Sources/open62541-open62541-395ce48/deps/libc_time.h" ***********************************/
|
||||
|
||||
|
||||
#include <limits.h>
|
||||
@ -766,7 +766,7 @@ uint32_t pcg32_boundedrand_r(pcg32_random_t* rng, uint32_t bound);
|
||||
int __secs_to_tm(long long t, struct tm *tm);
|
||||
|
||||
|
||||
/*********************************** amalgamated original file "/home/wn/src/open62541/src/ua_util.h" ***********************************/
|
||||
/*********************************** amalgamated original file "/home/wn/Sources/open62541-open62541-395ce48/src/ua_util.h" ***********************************/
|
||||
|
||||
|
||||
|
||||
@ -886,7 +886,7 @@ int gettimeofday(struct timeval *tp, struct timezone *tzp);
|
||||
#endif
|
||||
|
||||
|
||||
/*********************************** amalgamated original file "/home/wn/src/open62541/src/ua_types_encoding_binary.h" ***********************************/
|
||||
/*********************************** amalgamated original file "/home/wn/Sources/open62541-open62541-395ce48/src/ua_types_encoding_binary.h" ***********************************/
|
||||
|
||||
|
||||
|
||||
@ -904,10 +904,10 @@ UA_decodeBinary(const UA_ByteString *src, size_t *offset, void *dst,
|
||||
size_t UA_calcSizeBinary(void *p, const UA_DataType *type);
|
||||
|
||||
|
||||
/*********************************** amalgamated original file "/home/wn/src/open62541/build/src_generated/ua_types_generated_encoding_binary.h" ***********************************/
|
||||
/*********************************** amalgamated original file "/home/wn/Sources/open62541-open62541-395ce48/build/src_generated/ua_types_generated_encoding_binary.h" ***********************************/
|
||||
|
||||
/* Generated from Opc.Ua.Types.bsd with script /home/wn/src/open62541/tools/generate_datatypes.py
|
||||
* on host extern2 by user wn at 2016-05-24 10:41:27 */
|
||||
/* Generated from Opc.Ua.Types.bsd with script /home/wn/Sources/open62541-open62541-395ce48/tools/generate_datatypes.py
|
||||
* on host debianX by user wn at 2016-06-07 04:48:38 */
|
||||
|
||||
|
||||
/* Boolean */
|
||||
@ -1542,10 +1542,10 @@ static UA_INLINE UA_StatusCode UA_CreateSessionResponse_decodeBinary(const UA_By
|
||||
static UA_INLINE UA_StatusCode UA_QueryFirstRequest_encodeBinary(const UA_QueryFirstRequest *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TYPES[UA_TYPES_QUERYFIRSTREQUEST], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_QueryFirstRequest_decodeBinary(const UA_ByteString *src, size_t *offset, UA_QueryFirstRequest *dst) { return UA_decodeBinary(src, offset, dst, &UA_TYPES[UA_TYPES_QUERYFIRSTREQUEST]); }
|
||||
|
||||
/*********************************** amalgamated original file "/home/wn/src/open62541/build/src_generated/ua_transport_generated.h" ***********************************/
|
||||
/*********************************** amalgamated original file "/home/wn/Sources/open62541-open62541-395ce48/build/src_generated/ua_transport_generated.h" ***********************************/
|
||||
|
||||
/* Generated from Opc.Ua.Types.bsd, Custom.Opc.Ua.Transport.bsd with script /home/wn/src/open62541/tools/generate_datatypes.py
|
||||
* on host extern2 by user wn at 2016-05-24 10:41:27 */
|
||||
/* Generated from Opc.Ua.Types.bsd, Custom.Opc.Ua.Transport.bsd with script /home/wn/Sources/open62541-open62541-395ce48/tools/generate_datatypes.py
|
||||
* on host debianX by user wn at 2016-06-07 04:48:38 */
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
@ -1757,10 +1757,10 @@ static UA_INLINE void UA_SecureConversationMessageHeader_delete(UA_SecureConvers
|
||||
#endif
|
||||
|
||||
|
||||
/*********************************** amalgamated original file "/home/wn/src/open62541/build/src_generated/ua_transport_generated_encoding_binary.h" ***********************************/
|
||||
/*********************************** amalgamated original file "/home/wn/Sources/open62541-open62541-395ce48/build/src_generated/ua_transport_generated_encoding_binary.h" ***********************************/
|
||||
|
||||
/* Generated from Opc.Ua.Types.bsd, Custom.Opc.Ua.Transport.bsd with script /home/wn/src/open62541/tools/generate_datatypes.py
|
||||
* on host extern2 by user wn at 2016-05-24 10:41:27 */
|
||||
/* Generated from Opc.Ua.Types.bsd, Custom.Opc.Ua.Transport.bsd with script /home/wn/Sources/open62541-open62541-395ce48/tools/generate_datatypes.py
|
||||
* on host debianX by user wn at 2016-06-07 04:48:38 */
|
||||
|
||||
|
||||
/* SecureConversationMessageAbortBody */
|
||||
@ -1807,7 +1807,7 @@ static UA_INLINE UA_StatusCode UA_SymmetricAlgorithmSecurityHeader_decodeBinary(
|
||||
static UA_INLINE UA_StatusCode UA_SecureConversationMessageHeader_encodeBinary(const UA_SecureConversationMessageHeader *src, UA_ByteString *dst, size_t *offset) { return UA_encodeBinary(src, &UA_TRANSPORT[UA_TRANSPORT_SECURECONVERSATIONMESSAGEHEADER], NULL, NULL, dst, offset); }
|
||||
static UA_INLINE UA_StatusCode UA_SecureConversationMessageHeader_decodeBinary(const UA_ByteString *src, size_t *offset, UA_SecureConversationMessageHeader *dst) { return UA_decodeBinary(src, offset, dst, &UA_TRANSPORT[UA_TRANSPORT_SECURECONVERSATIONMESSAGEHEADER]); }
|
||||
|
||||
/*********************************** amalgamated original file "/home/wn/src/open62541/src/ua_connection_internal.h" ***********************************/
|
||||
/*********************************** amalgamated original file "/home/wn/Sources/open62541-open62541-395ce48/src/ua_connection_internal.h" ***********************************/
|
||||
|
||||
|
||||
|
||||
@ -1837,7 +1837,7 @@ void UA_EXPORT UA_Connection_detachSecureChannel(UA_Connection *connection);
|
||||
void UA_EXPORT UA_Connection_attachSecureChannel(UA_Connection *connection, UA_SecureChannel *channel);
|
||||
|
||||
|
||||
/*********************************** amalgamated original file "/home/wn/src/open62541/src/ua_securechannel.h" ***********************************/
|
||||
/*********************************** amalgamated original file "/home/wn/Sources/open62541-open62541-395ce48/src/ua_securechannel.h" ***********************************/
|
||||
|
||||
|
||||
|
||||
@ -1897,7 +1897,7 @@ UA_StatusCode UA_SecureChannel_sendBinaryMessage(UA_SecureChannel *channel, UA_U
|
||||
void UA_SecureChannel_revolveTokens(UA_SecureChannel *channel);
|
||||
|
||||
|
||||
/*********************************** amalgamated original file "/home/wn/src/open62541/src/server/ua_nodes.h" ***********************************/
|
||||
/*********************************** amalgamated original file "/home/wn/Sources/open62541-open62541-395ce48/src/server/ua_nodes.h" ***********************************/
|
||||
|
||||
|
||||
|
||||
@ -2039,7 +2039,7 @@ typedef struct {
|
||||
} UA_DataTypeNode;
|
||||
|
||||
|
||||
/*********************************** amalgamated original file "/home/wn/src/open62541/src/ua_session.h" ***********************************/
|
||||
/*********************************** amalgamated original file "/home/wn/Sources/open62541-open62541-395ce48/src/ua_session.h" ***********************************/
|
||||
|
||||
|
||||
|
||||
@ -2108,7 +2108,7 @@ UA_Session_getUniqueSubscriptionID(UA_Session *session);
|
||||
|
||||
|
||||
|
||||
/*********************************** amalgamated original file "/home/wn/src/open62541/src/server/ua_subscription.h" ***********************************/
|
||||
/*********************************** amalgamated original file "/home/wn/Sources/open62541-open62541-395ce48/src/server/ua_subscription.h" ***********************************/
|
||||
|
||||
|
||||
|
||||
@ -2221,7 +2221,7 @@ UA_Subscription_getMonitoredItem(UA_Subscription *sub, UA_UInt32 monitoredItemID
|
||||
void UA_Subscription_publishCallback(UA_Server *server, UA_Subscription *sub);
|
||||
|
||||
|
||||
/*********************************** amalgamated original file "/home/wn/src/open62541/src/server/ua_nodestore.h" ***********************************/
|
||||
/*********************************** amalgamated original file "/home/wn/Sources/open62541-open62541-395ce48/src/server/ua_nodestore.h" ***********************************/
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
@ -2307,7 +2307,7 @@ void UA_NodeStore_iterate(UA_NodeStore *ns, UA_NodeStore_nodeVisitor visitor);
|
||||
#endif
|
||||
|
||||
|
||||
/*********************************** amalgamated original file "/home/wn/src/open62541/src/server/ua_session_manager.h" ***********************************/
|
||||
/*********************************** amalgamated original file "/home/wn/Sources/open62541-open62541-395ce48/src/server/ua_session_manager.h" ***********************************/
|
||||
|
||||
|
||||
|
||||
@ -2344,7 +2344,7 @@ UA_Session *
|
||||
UA_SessionManager_getSession(UA_SessionManager *sessionManager, const UA_NodeId *token);
|
||||
|
||||
|
||||
/*********************************** amalgamated original file "/home/wn/src/open62541/src/server/ua_securechannel_manager.h" ***********************************/
|
||||
/*********************************** amalgamated original file "/home/wn/Sources/open62541-open62541-395ce48/src/server/ua_securechannel_manager.h" ***********************************/
|
||||
|
||||
|
||||
|
||||
@ -2391,7 +2391,7 @@ UA_StatusCode
|
||||
UA_SecureChannelManager_close(UA_SecureChannelManager *cm, UA_UInt32 channelId);
|
||||
|
||||
|
||||
/*********************************** amalgamated original file "/home/wn/src/open62541/src/server/ua_server_internal.h" ***********************************/
|
||||
/*********************************** amalgamated original file "/home/wn/Sources/open62541-open62541-395ce48/src/server/ua_server_internal.h" ***********************************/
|
||||
|
||||
|
||||
|
||||
@ -2477,7 +2477,7 @@ UA_StatusCode parse_numericrange(const UA_String *str, UA_NumericRange *range);
|
||||
#endif
|
||||
|
||||
|
||||
/*********************************** amalgamated original file "/home/wn/src/open62541/src/server/ua_services.h" ***********************************/
|
||||
/*********************************** amalgamated original file "/home/wn/Sources/open62541-open62541-395ce48/src/server/ua_services.h" ***********************************/
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
@ -2810,7 +2810,7 @@ void Service_DeleteSubscriptions(UA_Server *server, UA_Session *session,
|
||||
#endif
|
||||
|
||||
|
||||
/*********************************** amalgamated original file "/home/wn/src/open62541/src/client/ua_client_internal.h" ***********************************/
|
||||
/*********************************** amalgamated original file "/home/wn/Sources/open62541-open62541-395ce48/src/client/ua_client_internal.h" ***********************************/
|
||||
|
||||
|
||||
|
||||
@ -2894,7 +2894,7 @@ struct UA_Client {
|
||||
};
|
||||
|
||||
|
||||
/*********************************** amalgamated original file "/home/wn/src/open62541/src/server/ua_nodestore_hash.inc" ***********************************/
|
||||
/*********************************** amalgamated original file "/home/wn/Sources/open62541-open62541-395ce48/src/server/ua_nodestore_hash.inc" ***********************************/
|
||||
|
||||
typedef UA_UInt32 hash_t;
|
||||
|
||||
@ -2977,7 +2977,7 @@ static hash_t hash(const UA_NodeId *n) {
|
||||
}
|
||||
|
||||
|
||||
/*********************************** amalgamated original file "/home/wn/src/open62541/src/ua_types.c" ***********************************/
|
||||
/*********************************** amalgamated original file "/home/wn/Sources/open62541-open62541-395ce48/src/ua_types.c" ***********************************/
|
||||
|
||||
|
||||
|
||||
@ -3831,7 +3831,7 @@ void UA_Array_delete(void *p, size_t size, const UA_DataType *type) {
|
||||
UA_free((void*)((uintptr_t)p & ~(uintptr_t)UA_EMPTY_ARRAY_SENTINEL));
|
||||
}
|
||||
|
||||
/*********************************** amalgamated original file "/home/wn/src/open62541/src/ua_types_encoding_binary.c" ***********************************/
|
||||
/*********************************** amalgamated original file "/home/wn/Sources/open62541-open62541-395ce48/src/ua_types_encoding_binary.c" ***********************************/
|
||||
|
||||
|
||||
/* We give pointers to the current position and the last position in the buffer
|
||||
@ -5303,10 +5303,10 @@ size_t UA_calcSizeBinary(void *p, const UA_DataType *type) {
|
||||
return s;
|
||||
}
|
||||
|
||||
/*********************************** amalgamated original file "/home/wn/src/open62541/build/src_generated/ua_types_generated.c" ***********************************/
|
||||
/*********************************** amalgamated original file "/home/wn/Sources/open62541-open62541-395ce48/build/src_generated/ua_types_generated.c" ***********************************/
|
||||
|
||||
/* Generated from Opc.Ua.Types.bsd with script /home/wn/src/open62541/tools/generate_datatypes.py
|
||||
* on host extern2 by user wn at 2016-05-24 10:41:27 */
|
||||
/* Generated from Opc.Ua.Types.bsd with script /home/wn/Sources/open62541-open62541-395ce48/tools/generate_datatypes.py
|
||||
* on host debianX by user wn at 2016-06-07 04:48:38 */
|
||||
|
||||
|
||||
/* Boolean */
|
||||
@ -11792,10 +11792,10 @@ const UA_DataType UA_TYPES[UA_TYPES_COUNT] = {
|
||||
};
|
||||
|
||||
|
||||
/*********************************** amalgamated original file "/home/wn/src/open62541/build/src_generated/ua_transport_generated.c" ***********************************/
|
||||
/*********************************** amalgamated original file "/home/wn/Sources/open62541-open62541-395ce48/build/src_generated/ua_transport_generated.c" ***********************************/
|
||||
|
||||
/* Generated from Opc.Ua.Types.bsd, Custom.Opc.Ua.Transport.bsd with script /home/wn/src/open62541/tools/generate_datatypes.py
|
||||
* on host extern2 by user wn at 2016-05-24 10:41:27 */
|
||||
/* Generated from Opc.Ua.Types.bsd, Custom.Opc.Ua.Transport.bsd with script /home/wn/Sources/open62541-open62541-395ce48/tools/generate_datatypes.py
|
||||
* on host debianX by user wn at 2016-06-07 04:48:38 */
|
||||
|
||||
|
||||
/* SecureConversationMessageAbortBody */
|
||||
@ -12193,7 +12193,7 @@ const UA_DataType UA_TRANSPORT[UA_TRANSPORT_COUNT] = {
|
||||
};
|
||||
|
||||
|
||||
/*********************************** amalgamated original file "/home/wn/src/open62541/src/ua_connection.c" ***********************************/
|
||||
/*********************************** amalgamated original file "/home/wn/Sources/open62541-open62541-395ce48/src/ua_connection.c" ***********************************/
|
||||
|
||||
|
||||
// max message size is 64k
|
||||
@ -12359,7 +12359,7 @@ void UA_Connection_attachSecureChannel(UA_Connection *connection, UA_SecureChann
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
/*********************************** amalgamated original file "/home/wn/src/open62541/src/ua_securechannel.c" ***********************************/
|
||||
/*********************************** amalgamated original file "/home/wn/Sources/open62541-open62541-395ce48/src/ua_securechannel.c" ***********************************/
|
||||
|
||||
|
||||
#define UA_SECURE_MESSAGE_HEADER_LENGTH 24
|
||||
@ -12607,7 +12607,7 @@ UA_SecureChannel_sendBinaryMessage(UA_SecureChannel *channel, UA_UInt32 requestI
|
||||
return UA_SecureChannel_sendChunk(&ci, &message, messagePos);
|
||||
}
|
||||
|
||||
/*********************************** amalgamated original file "/home/wn/src/open62541/src/ua_session.c" ***********************************/
|
||||
/*********************************** amalgamated original file "/home/wn/Sources/open62541-open62541-395ce48/src/ua_session.c" ***********************************/
|
||||
|
||||
#ifdef UA_ENABLE_SUBSCRIPTIONS
|
||||
#endif
|
||||
@ -12714,7 +12714,7 @@ UA_UInt32 UA_Session_getUniqueSubscriptionID(UA_Session *session) {
|
||||
|
||||
#endif
|
||||
|
||||
/*********************************** amalgamated original file "/home/wn/src/open62541/src/server/ua_server.c" ***********************************/
|
||||
/*********************************** amalgamated original file "/home/wn/Sources/open62541-open62541-395ce48/src/server/ua_server.c" ***********************************/
|
||||
|
||||
|
||||
#ifdef UA_ENABLE_GENERATE_NAMESPACE0
|
||||
@ -13514,19 +13514,6 @@ UA_Server * UA_Server_new(const UA_ServerConfig config) {
|
||||
UA_NS0ID_BASEVARIABLETYPE, false);
|
||||
addVariableTypeNode_subtype(server, "PropertyType", UA_NS0ID_PROPERTYTYPE,
|
||||
UA_NS0ID_BASEVARIABLETYPE, false);
|
||||
|
||||
|
||||
//Event types folder below is needed by CTT
|
||||
/***************/
|
||||
/* Event Types */
|
||||
/***************/
|
||||
|
||||
UA_ObjectNode *eventtypes = UA_NodeStore_newObjectNode();
|
||||
copyNames((UA_Node*)eventtypes, "EventTypes");
|
||||
eventtypes->nodeId.identifier.numeric = UA_NS0ID_EVENTTYPESFOLDER;
|
||||
addNodeInternal(server, (UA_Node*)eventtypes, UA_NODEID_NUMERIC(0, UA_NS0ID_TYPESFOLDER), nodeIdOrganizes);
|
||||
addReferenceInternal(server, UA_NODEID_NUMERIC(0, UA_NS0ID_EVENTTYPESFOLDER), nodeIdHasTypeDefinition,
|
||||
UA_EXPANDEDNODEID_NUMERIC(0, UA_NS0ID_FOLDERTYPE), true);
|
||||
#endif
|
||||
|
||||
#ifdef UA_ENABLE_GENERATE_NAMESPACE0
|
||||
@ -13973,7 +13960,7 @@ UA_CallMethodResult UA_Server_call(UA_Server *server, const UA_CallMethodRequest
|
||||
}
|
||||
#endif
|
||||
|
||||
/*********************************** amalgamated original file "/home/wn/src/open62541/src/server/ua_server_binary.c" ***********************************/
|
||||
/*********************************** amalgamated original file "/home/wn/Sources/open62541-open62541-395ce48/src/server/ua_server_binary.c" ***********************************/
|
||||
|
||||
|
||||
/** Max size of messages that are allocated on the stack */
|
||||
@ -14638,7 +14625,7 @@ void UA_Server_processBinaryMessage(UA_Server *server, UA_Connection *connection
|
||||
} while(msg->length > pos);
|
||||
}
|
||||
|
||||
/*********************************** amalgamated original file "/home/wn/src/open62541/src/server/ua_nodes.c" ***********************************/
|
||||
/*********************************** amalgamated original file "/home/wn/Sources/open62541-open62541-395ce48/src/server/ua_nodes.c" ***********************************/
|
||||
|
||||
|
||||
void UA_Node_deleteMembersAnyNodeClass(UA_Node *node) {
|
||||
@ -14815,7 +14802,7 @@ UA_StatusCode UA_Node_copyAnyNodeClass(const UA_Node *src, UA_Node *dst) {
|
||||
return retval;
|
||||
}
|
||||
|
||||
/*********************************** amalgamated original file "/home/wn/src/open62541/src/server/ua_server_worker.c" ***********************************/
|
||||
/*********************************** amalgamated original file "/home/wn/Sources/open62541-open62541-395ce48/src/server/ua_server_worker.c" ***********************************/
|
||||
|
||||
|
||||
/**
|
||||
@ -15528,7 +15515,7 @@ UA_StatusCode UA_Server_run(UA_Server *server, volatile UA_Boolean *running) {
|
||||
return UA_Server_run_shutdown(server);
|
||||
}
|
||||
|
||||
/*********************************** amalgamated original file "/home/wn/src/open62541/src/server/ua_securechannel_manager.c" ***********************************/
|
||||
/*********************************** amalgamated original file "/home/wn/Sources/open62541-open62541-395ce48/src/server/ua_securechannel_manager.c" ***********************************/
|
||||
|
||||
|
||||
UA_StatusCode
|
||||
@ -15686,7 +15673,7 @@ UA_StatusCode UA_SecureChannelManager_close(UA_SecureChannelManager *cm, UA_UInt
|
||||
return UA_STATUSCODE_BADINTERNALERROR;
|
||||
}
|
||||
|
||||
/*********************************** amalgamated original file "/home/wn/src/open62541/src/server/ua_session_manager.c" ***********************************/
|
||||
/*********************************** amalgamated original file "/home/wn/Sources/open62541-open62541-395ce48/src/server/ua_session_manager.c" ***********************************/
|
||||
|
||||
|
||||
UA_StatusCode
|
||||
@ -15800,7 +15787,7 @@ UA_SessionManager_removeSession(UA_SessionManager *sm, const UA_NodeId *token) {
|
||||
return UA_STATUSCODE_GOOD;
|
||||
}
|
||||
|
||||
/*********************************** amalgamated original file "/home/wn/src/open62541/src/server/ua_services_discovery.c" ***********************************/
|
||||
/*********************************** amalgamated original file "/home/wn/Sources/open62541-open62541-395ce48/src/server/ua_services_discovery.c" ***********************************/
|
||||
|
||||
|
||||
void Service_FindServers(UA_Server *server, UA_Session *session,
|
||||
@ -15911,7 +15898,7 @@ void Service_GetEndpoints(UA_Server *server, UA_Session *session, const UA_GetEn
|
||||
response->endpointsSize = relevant_count;
|
||||
}
|
||||
|
||||
/*********************************** amalgamated original file "/home/wn/src/open62541/src/server/ua_services_securechannel.c" ***********************************/
|
||||
/*********************************** amalgamated original file "/home/wn/Sources/open62541-open62541-395ce48/src/server/ua_services_securechannel.c" ***********************************/
|
||||
|
||||
|
||||
void Service_OpenSecureChannel(UA_Server *server, UA_Connection *connection,
|
||||
@ -15950,7 +15937,7 @@ void Service_CloseSecureChannel(UA_Server *server, UA_UInt32 channelId) {
|
||||
UA_SecureChannelManager_close(&server->secureChannelManager, channelId);
|
||||
}
|
||||
|
||||
/*********************************** amalgamated original file "/home/wn/src/open62541/src/server/ua_services_session.c" ***********************************/
|
||||
/*********************************** amalgamated original file "/home/wn/Sources/open62541-open62541-395ce48/src/server/ua_services_session.c" ***********************************/
|
||||
|
||||
|
||||
void Service_CreateSession(UA_Server *server, UA_Session *session, const UA_CreateSessionRequest *request,
|
||||
@ -16107,7 +16094,7 @@ Service_CloseSession(UA_Server *server, UA_Session *session, const UA_CloseSessi
|
||||
UA_SessionManager_removeSession(&server->sessionManager, &session->authenticationToken);
|
||||
}
|
||||
|
||||
/*********************************** amalgamated original file "/home/wn/src/open62541/src/server/ua_services_attribute.c" ***********************************/
|
||||
/*********************************** amalgamated original file "/home/wn/Sources/open62541-open62541-395ce48/src/server/ua_services_attribute.c" ***********************************/
|
||||
|
||||
|
||||
/******************/
|
||||
@ -16851,7 +16838,7 @@ void Service_Write(UA_Server *server, UA_Session *session, const UA_WriteRequest
|
||||
}
|
||||
}
|
||||
|
||||
/*********************************** amalgamated original file "/home/wn/src/open62541/src/server/ua_services_nodemanagement.c" ***********************************/
|
||||
/*********************************** amalgamated original file "/home/wn/Sources/open62541-open62541-395ce48/src/server/ua_services_nodemanagement.c" ***********************************/
|
||||
|
||||
|
||||
/************/
|
||||
@ -17608,7 +17595,7 @@ addOneWayReference(UA_Server *server, UA_Session *session, UA_Node *node, const
|
||||
node->referencesSize = i+1;
|
||||
else
|
||||
UA_ReferenceNode_deleteMembers(&new_refs[i]);
|
||||
return retval;
|
||||
return retval;
|
||||
}
|
||||
|
||||
UA_StatusCode
|
||||
@ -17827,7 +17814,7 @@ Service_DeleteReferences(UA_Server *server, UA_Session *session, const UA_Delete
|
||||
Service_DeleteReferences_single(server, session, &request->referencesToDelete[i]);
|
||||
}
|
||||
|
||||
/*********************************** amalgamated original file "/home/wn/src/open62541/src/server/ua_services_view.c" ***********************************/
|
||||
/*********************************** amalgamated original file "/home/wn/Sources/open62541-open62541-395ce48/src/server/ua_services_view.c" ***********************************/
|
||||
|
||||
|
||||
static UA_StatusCode
|
||||
@ -18478,7 +18465,7 @@ void Service_UnregisterNodes(UA_Server *server, UA_Session *session, const UA_Un
|
||||
response->responseHeader.serviceResult = UA_STATUSCODE_BADNOTHINGTODO;
|
||||
}
|
||||
|
||||
/*********************************** amalgamated original file "/home/wn/src/open62541/src/client/ua_client.c" ***********************************/
|
||||
/*********************************** amalgamated original file "/home/wn/Sources/open62541-open62541-395ce48/src/client/ua_client.c" ***********************************/
|
||||
|
||||
|
||||
/*********************/
|
||||
@ -19210,7 +19197,7 @@ void __UA_Client_Service(UA_Client *client, const void *r, const UA_DataType *re
|
||||
"Received a response of type %i", responseId.identifier.numeric);
|
||||
}
|
||||
|
||||
/*********************************** amalgamated original file "/home/wn/src/open62541/src/client/ua_client_highlevel.c" ***********************************/
|
||||
/*********************************** amalgamated original file "/home/wn/Sources/open62541-open62541-395ce48/src/client/ua_client_highlevel.c" ***********************************/
|
||||
|
||||
|
||||
UA_StatusCode
|
||||
@ -19603,7 +19590,7 @@ UA_Client_readArrayDimensionsAttribute(UA_Client *client, const UA_NodeId nodeId
|
||||
|
||||
}
|
||||
|
||||
/*********************************** amalgamated original file "/home/wn/src/open62541/src/server/ua_nodestore.c" ***********************************/
|
||||
/*********************************** amalgamated original file "/home/wn/Sources/open62541-open62541-395ce48/src/server/ua_nodestore.c" ***********************************/
|
||||
|
||||
|
||||
#ifndef UA_ENABLE_MULTITHREADING /* conditional compilation */
|
||||
@ -19897,7 +19884,7 @@ void UA_NodeStore_iterate(UA_NodeStore *ns, UA_NodeStore_nodeVisitor visitor) {
|
||||
|
||||
#endif /* UA_ENABLE_MULTITHREADING */
|
||||
|
||||
/*********************************** amalgamated original file "/home/wn/src/open62541/src/server/ua_nodestore_concurrent.c" ***********************************/
|
||||
/*********************************** amalgamated original file "/home/wn/Sources/open62541-open62541-395ce48/src/server/ua_nodestore_concurrent.c" ***********************************/
|
||||
|
||||
|
||||
#ifdef UA_ENABLE_MULTITHREADING /* conditional compilation */
|
||||
@ -20125,7 +20112,7 @@ void UA_NodeStore_iterate(UA_NodeStore *ns, UA_NodeStore_nodeVisitor visitor) {
|
||||
|
||||
#endif /* UA_ENABLE_MULTITHREADING */
|
||||
|
||||
/*********************************** amalgamated original file "/home/wn/src/open62541/src/server/ua_services_call.c" ***********************************/
|
||||
/*********************************** amalgamated original file "/home/wn/Sources/open62541-open62541-395ce48/src/server/ua_services_call.c" ***********************************/
|
||||
|
||||
|
||||
#ifdef UA_ENABLE_METHODCALLS /* conditional compilation */
|
||||
@ -20336,7 +20323,7 @@ void Service_Call(UA_Server *server, UA_Session *session, const UA_CallRequest *
|
||||
|
||||
#endif /* UA_ENABLE_METHODCALLS */
|
||||
|
||||
/*********************************** amalgamated original file "/home/wn/src/open62541/src/server/ua_subscription.c" ***********************************/
|
||||
/*********************************** amalgamated original file "/home/wn/Sources/open62541-open62541-395ce48/src/server/ua_subscription.c" ***********************************/
|
||||
|
||||
|
||||
#ifdef UA_ENABLE_SUBSCRIPTIONS /* conditional compilation */
|
||||
@ -20709,7 +20696,7 @@ UA_StatusCode Subscription_unregisterPublishJob(UA_Server *server, UA_Subscripti
|
||||
|
||||
#endif /* UA_ENABLE_SUBSCRIPTIONS */
|
||||
|
||||
/*********************************** amalgamated original file "/home/wn/src/open62541/src/server/ua_services_subscription.c" ***********************************/
|
||||
/*********************************** amalgamated original file "/home/wn/Sources/open62541-open62541-395ce48/src/server/ua_services_subscription.c" ***********************************/
|
||||
|
||||
|
||||
#ifdef UA_ENABLE_SUBSCRIPTIONS /* conditional compilation */
|
||||
@ -21099,7 +21086,7 @@ void Service_Republish(UA_Server *server, UA_Session *session, const UA_Republis
|
||||
|
||||
#endif /* UA_ENABLE_SUBSCRIPTIONS */
|
||||
|
||||
/*********************************** amalgamated original file "/home/wn/src/open62541/src/client/ua_client_highlevel_subscriptions.c" ***********************************/
|
||||
/*********************************** amalgamated original file "/home/wn/Sources/open62541-open62541-395ce48/src/client/ua_client_highlevel_subscriptions.c" ***********************************/
|
||||
|
||||
|
||||
#ifdef UA_ENABLE_SUBSCRIPTIONS /* conditional compilation */
|
||||
@ -21401,7 +21388,7 @@ UA_StatusCode UA_Client_Subscriptions_manuallySendPublishRequest(UA_Client *clie
|
||||
|
||||
#endif /* UA_ENABLE_SUBSCRIPTIONS */
|
||||
|
||||
/*********************************** amalgamated original file "/home/wn/src/open62541/plugins/networklayer_tcp.c" ***********************************/
|
||||
/*********************************** amalgamated original file "/home/wn/Sources/open62541-open62541-395ce48/plugins/networklayer_tcp.c" ***********************************/
|
||||
|
||||
/*
|
||||
* This work is licensed under a Creative Commons CCZero 1.0 Universal License.
|
||||
@ -22040,7 +22027,7 @@ UA_ClientConnectionTCP(UA_ConnectionConfig localConf, const char *endpointUrl, U
|
||||
return connection;
|
||||
}
|
||||
|
||||
/*********************************** amalgamated original file "/home/wn/src/open62541/plugins/logger_stdout.c" ***********************************/
|
||||
/*********************************** amalgamated original file "/home/wn/Sources/open62541-open62541-395ce48/plugins/logger_stdout.c" ***********************************/
|
||||
|
||||
/*
|
||||
* This work is licensed under a Creative Commons CCZero 1.0 Universal License.
|
||||
@ -22073,7 +22060,7 @@ void Logger_Stdout(UA_LogLevel level, UA_LogCategory category, const char *msg,
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
/*********************************** amalgamated original file "/home/wn/src/open62541/plugins/ua_config_standard.c" ***********************************/
|
||||
/*********************************** amalgamated original file "/home/wn/Sources/open62541-open62541-395ce48/plugins/ua_config_standard.c" ***********************************/
|
||||
|
||||
|
||||
#define MANUFACTURER_NAME "open62541.org"
|
||||
@ -22141,7 +22128,7 @@ const UA_EXPORT UA_ClientConfig UA_ClientConfig_standard = {
|
||||
.connectionFunc = UA_ClientConnectionTCP
|
||||
};
|
||||
|
||||
/*********************************** amalgamated original file "/home/wn/src/open62541/deps/libc_time.c" ***********************************/
|
||||
/*********************************** amalgamated original file "/home/wn/Sources/open62541-open62541-395ce48/deps/libc_time.c" ***********************************/
|
||||
|
||||
/*
|
||||
* Originally released by the musl project (http://www.musl-libc.org/) under the
|
||||
@ -22228,7 +22215,7 @@ int __secs_to_tm(long long t, struct tm *tm)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*********************************** amalgamated original file "/home/wn/src/open62541/deps/pcg_basic.c" ***********************************/
|
||||
/*********************************** amalgamated original file "/home/wn/Sources/open62541-open62541-395ce48/deps/pcg_basic.c" ***********************************/
|
||||
|
||||
/*
|
||||
* PCG Random Number Generation for C.
|
@ -1,6 +1,6 @@
|
||||
/* THIS IS A SINGLE-FILE DISTRIBUTION CONCATENATED FROM THE OPEN62541 SOURCES
|
||||
* visit http://open62541.org/ for information about this software
|
||||
* Git-Revision: v0.2.0-RC1-6-g0ca2068
|
||||
* Git-Revision: unknown--git-commit-id-unknown
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -27,7 +27,7 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
/*********************************** amalgamated original file "/home/wn/src/open62541/build/src_generated/ua_config.h" ***********************************/
|
||||
/*********************************** amalgamated original file "/home/wn/Sources/open62541-open62541-395ce48/build/src_generated/ua_config.h" ***********************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2013-2015 the contributors as stated in the AUTHORS file
|
||||
@ -228,7 +228,7 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
/*********************************** amalgamated original file "/home/wn/src/open62541/include/ua_constants.h" ***********************************/
|
||||
/*********************************** amalgamated original file "/home/wn/Sources/open62541-open62541-395ce48/include/ua_constants.h" ***********************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2013-2015 the contributors as stated in the AUTHORS file
|
||||
@ -296,35 +296,6 @@ typedef enum {
|
||||
#define UA_ACCESSLEVELMASK_HISTORYWRITE 0x08
|
||||
#define UA_ACCESSLEVELMASK_SEMANTICCHANGE 0x10
|
||||
|
||||
/** Write Masks
|
||||
* -----------
|
||||
* The write mask and user write mask is given by the following constants that are
|
||||
* XORed for the overall write mask.
|
||||
* Part 3: 5.2.7 Table 2
|
||||
*/
|
||||
#define UA_WRITEMASK_ACCESSLEVEL 1<<0
|
||||
#define UA_WRITEMASK_ARRRAYDIMENSIONS 1<<1
|
||||
#define UA_WRITEMASK_BROWSENAME 1<<2
|
||||
#define UA_WRITEMASK_CONTAINSNOLOOPS 1<<3
|
||||
#define UA_WRITEMASK_DATATYPE 1<<4
|
||||
#define UA_WRITEMASK_DESCRIPTION 1<<5
|
||||
#define UA_WRITEMASK_DISPLAYNAME 1<<6
|
||||
#define UA_WRITEMASK_EVENTNOTIFIER 1<<7
|
||||
#define UA_WRITEMASK_EXECUTABLE 1<<8
|
||||
#define UA_WRITEMASK_HISTORIZING 1<<9
|
||||
#define UA_WRITEMASK_INVERSENAME 1<<10
|
||||
#define UA_WRITEMASK_ISABSTRACT 1<<11
|
||||
#define UA_WRITEMASK_MINIMUMSAMPLINGINTERVAL 1<<12
|
||||
#define UA_WRITEMASK_NODECLASS 1<<13
|
||||
#define UA_WRITEMASK_NODEID 1<<14
|
||||
#define UA_WRITEMASK_SYMMETRIC 1<<15
|
||||
#define UA_WRITEMASK_USERACCESSLEVEL 1<<16
|
||||
#define UA_WRITEMASK_USEREXECUTABLE 1<<17
|
||||
#define UA_WRITEMASK_USERWRITEMASK 1<<18
|
||||
#define UA_WRITEMASK_VALUERANK 1<<19
|
||||
#define UA_WRITEMASK_WRITEMASK 1<<20
|
||||
#define UA_WRITEMASK_VALUEFORVARIABLETYPE 1<<21
|
||||
|
||||
/**
|
||||
* Encoding Offsets
|
||||
* ----------------
|
||||
@ -565,7 +536,7 @@ typedef enum {
|
||||
#endif
|
||||
|
||||
|
||||
/*********************************** amalgamated original file "/home/wn/src/open62541/include/ua_types.h" ***********************************/
|
||||
/*********************************** amalgamated original file "/home/wn/Sources/open62541-open62541-395ce48/include/ua_types.h" ***********************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2013-2015 the contributors as stated in the AUTHORS file
|
||||
@ -1334,13 +1305,13 @@ UA_Guid UA_EXPORT UA_Guid_random(void); /* do not use for cryptographic entropy
|
||||
#endif
|
||||
|
||||
|
||||
/*********************************** amalgamated original file "/home/wn/src/open62541/build/src_generated/ua_nodeids.h" ***********************************/
|
||||
/*********************************** amalgamated original file "/home/wn/Sources/open62541-open62541-395ce48/build/src_generated/ua_nodeids.h" ***********************************/
|
||||
|
||||
/**********************************************************
|
||||
* /home/wn/src/open62541/build/src_generated/ua_nodeids.hgen -- do not modify
|
||||
* /home/wn/Sources/open62541-open62541-395ce48/build/src_generated/ua_nodeids.hgen -- do not modify
|
||||
**********************************************************
|
||||
* Generated from /home/wn/src/open62541/tools/schema/NodeIds.csv with script /home/wn/src/open62541/tools/generate_nodeids.py
|
||||
* on host extern2 by user wn at 2016-05-24 10:41:27
|
||||
* Generated from /home/wn/Sources/open62541-open62541-395ce48/tools/schema/NodeIds.csv with script /home/wn/Sources/open62541-open62541-395ce48/tools/generate_nodeids.py
|
||||
* on host debianX by user wn at 2016-06-07 04:48:38
|
||||
**********************************************************/
|
||||
|
||||
|
||||
@ -2037,10 +2008,10 @@ UA_Guid UA_EXPORT UA_Guid_random(void); /* do not use for cryptographic entropy
|
||||
#define UA_NS0ID_HASMODELPARENT 50 // ReferenceType
|
||||
|
||||
|
||||
/*********************************** amalgamated original file "/home/wn/src/open62541/build/src_generated/ua_types_generated.h" ***********************************/
|
||||
/*********************************** amalgamated original file "/home/wn/Sources/open62541-open62541-395ce48/build/src_generated/ua_types_generated.h" ***********************************/
|
||||
|
||||
/* Generated from Opc.Ua.Types.bsd with script /home/wn/src/open62541/tools/generate_datatypes.py
|
||||
* on host extern2 by user wn at 2016-05-24 10:41:27 */
|
||||
/* Generated from Opc.Ua.Types.bsd with script /home/wn/Sources/open62541-open62541-395ce48/tools/generate_datatypes.py
|
||||
* on host debianX by user wn at 2016-06-07 04:48:38 */
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
@ -4855,7 +4826,7 @@ static UA_INLINE void UA_QueryFirstRequest_delete(UA_QueryFirstRequest *p) { UA_
|
||||
#endif
|
||||
|
||||
|
||||
/*********************************** amalgamated original file "/home/wn/src/open62541/include/ua_connection.h" ***********************************/
|
||||
/*********************************** amalgamated original file "/home/wn/Sources/open62541-open62541-395ce48/include/ua_connection.h" ***********************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2014-2016 the contributors as stated in the AUTHORS file
|
||||
@ -4977,7 +4948,7 @@ void UA_EXPORT UA_Connection_deleteMembers(UA_Connection *connection);
|
||||
#endif
|
||||
|
||||
|
||||
/*********************************** amalgamated original file "/home/wn/src/open62541/include/ua_job.h" ***********************************/
|
||||
/*********************************** amalgamated original file "/home/wn/Sources/open62541-open62541-395ce48/include/ua_job.h" ***********************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2014 the contributors as stated in the AUTHORS file
|
||||
@ -5033,7 +5004,7 @@ typedef struct {
|
||||
#endif
|
||||
|
||||
|
||||
/*********************************** amalgamated original file "/home/wn/src/open62541/include/ua_log.h" ***********************************/
|
||||
/*********************************** amalgamated original file "/home/wn/Sources/open62541-open62541-395ce48/include/ua_log.h" ***********************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2014-2016 the contributors as stated in the AUTHORS file
|
||||
@ -5141,7 +5112,7 @@ typedef void (*UA_Logger)(UA_LogLevel level, UA_LogCategory category, const char
|
||||
#endif
|
||||
|
||||
|
||||
/*********************************** amalgamated original file "/home/wn/src/open62541/include/ua_server.h" ***********************************/
|
||||
/*********************************** amalgamated original file "/home/wn/Sources/open62541-open62541-395ce48/include/ua_server.h" ***********************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2014 the contributors as stated in the AUTHORS file
|
||||
@ -5815,7 +5786,7 @@ UA_Server_call(UA_Server *server, const UA_CallMethodRequest *request);
|
||||
#endif
|
||||
|
||||
|
||||
/*********************************** amalgamated original file "/home/wn/src/open62541/include/ua_server_external_ns.h" ***********************************/
|
||||
/*********************************** amalgamated original file "/home/wn/Sources/open62541-open62541-395ce48/include/ua_server_external_ns.h" ***********************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2014 the contributors as stated in the AUTHORS file
|
||||
@ -5911,7 +5882,7 @@ UA_Server_addExternalNamespace(UA_Server *server, const UA_String *url,
|
||||
#endif
|
||||
|
||||
|
||||
/*********************************** amalgamated original file "/home/wn/src/open62541/include/ua_client.h" ***********************************/
|
||||
/*********************************** amalgamated original file "/home/wn/Sources/open62541-open62541-395ce48/include/ua_client.h" ***********************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2014 the contributors as stated in the AUTHORS file
|
||||
@ -6211,7 +6182,7 @@ UA_Client_Service_publish(UA_Client *client, const UA_PublishRequest request) {
|
||||
#endif
|
||||
|
||||
|
||||
/*********************************** amalgamated original file "/home/wn/src/open62541/include/ua_client_highlevel.h" ***********************************/
|
||||
/*********************************** amalgamated original file "/home/wn/Sources/open62541-open62541-395ce48/include/ua_client_highlevel.h" ***********************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2014-2016 the contributors as stated in the AUTHORS file
|
||||
@ -6572,7 +6543,7 @@ UA_Client_Subscriptions_remove(UA_Client *client, UA_UInt32 subscriptionId);
|
||||
|
||||
UA_StatusCode UA_EXPORT UA_Client_Subscriptions_manuallySendPublishRequest(UA_Client *client);
|
||||
|
||||
typedef void (*UA_MonitoredItemHandlingFunction) (UA_UInt32 monId, UA_DataValue *value, void *context);
|
||||
typedef void (*UA_MonitoredItemHandlingFunction) (UA_UInt32 handle, UA_DataValue *value, void *context);
|
||||
|
||||
UA_StatusCode UA_EXPORT
|
||||
UA_Client_Subscriptions_addMonitoredItem(UA_Client *client, UA_UInt32 subscriptionId,
|
||||
@ -6616,7 +6587,7 @@ UA_Client_forEachChildNodeCall(UA_Client *client, UA_NodeId parentNodeId,
|
||||
#endif
|
||||
|
||||
|
||||
/*********************************** amalgamated original file "/home/wn/src/open62541/plugins/networklayer_tcp.h" ***********************************/
|
||||
/*********************************** amalgamated original file "/home/wn/Sources/open62541-open62541-395ce48/plugins/networklayer_tcp.h" ***********************************/
|
||||
|
||||
/*
|
||||
* This work is licensed under a Creative Commons CCZero 1.0 Universal License.
|
||||
@ -6640,7 +6611,7 @@ UA_ClientConnectionTCP(UA_ConnectionConfig conf, const char *endpointUrl, UA_Log
|
||||
#endif
|
||||
|
||||
|
||||
/*********************************** amalgamated original file "/home/wn/src/open62541/plugins/logger_stdout.h" ***********************************/
|
||||
/*********************************** amalgamated original file "/home/wn/Sources/open62541-open62541-395ce48/plugins/logger_stdout.h" ***********************************/
|
||||
|
||||
/*
|
||||
* This work is licensed under a Creative Commons CCZero 1.0 Universal License.
|
||||
@ -6660,7 +6631,7 @@ UA_EXPORT void Logger_Stdout(UA_LogLevel level, UA_LogCategory category, const c
|
||||
#endif
|
||||
|
||||
|
||||
/*********************************** amalgamated original file "/home/wn/src/open62541/plugins/ua_config_standard.h" ***********************************/
|
||||
/*********************************** amalgamated original file "/home/wn/Sources/open62541-open62541-395ce48/plugins/ua_config_standard.h" ***********************************/
|
||||
|
||||
/*
|
||||
* This work is licensed under a Creative Commons CCZero 1.0 Universal License.
|
@ -2,7 +2,11 @@
|
||||
#include <signal.h>
|
||||
#include <time.h>
|
||||
|
||||
#include "open62541.h"
|
||||
#include <ua_types.h>
|
||||
#include <ua_server.h>
|
||||
#include <logger_stdout.h>
|
||||
#include <networklayer_tcp.h>
|
||||
#include <ua_config_standard.h>
|
||||
|
||||
// bla
|
||||
|
||||
|
@ -6,7 +6,11 @@
|
||||
#include <signal.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "open62541.h"
|
||||
#include <ua_types.h>
|
||||
#include <ua_server.h>
|
||||
#include <logger_stdout.h>
|
||||
#include <networklayer_tcp.h>
|
||||
#include <ua_config_standard.h>
|
||||
|
||||
UA_Boolean running = true;
|
||||
UA_Logger logger = Logger_Stdout;
|
||||
|
Loading…
x
Reference in New Issue
Block a user