S2OPC OPCUA Toolkit
Loading...
Searching...
No Matches
sopc_pubsub_helpers.h
Go to the documentation of this file.
1/*
2 * Licensed to Systerel under one or more contributor license
3 * agreements. See the NOTICE file distributed with this work
4 * for additional information regarding copyright ownership.
5 * Systerel licenses this file to you under the Apache
6 * License, Version 2.0 (the "License"); you may not use this
7 * file except in compliance with the License. You may obtain
8 * a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing,
13 * software distributed under the License is distributed on an
14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 * KIND, either express or implied. See the License for the
16 * specific language governing permissions and limitations
17 * under the License.
18 */
19
20#ifndef SOPC_PUBSUB_HELPERS_H_
21#define SOPC_PUBSUB_HELPERS_H_
22
23#include <stdbool.h>
24
25#include "sopc_builtintypes.h"
26#include "sopc_pubsub_conf.h"
27#include "sopc_udp_sockets.h"
28
29/*
30 * Parse a multicast address and return an address info to be used to send data on a
31 * socket.
32 *
33 * Limitation: IP are limited to IPv4 for now (detection function missing)
34 *
35 * \param address Cstring address with format opc.udp://<IP>:<PORT>
36 * \param[out] multicastAddr the multicast address. Must be cleared by caller with ::SOPC_Socket_AddrInfoDelete
37 * after use.
38 *
39 * \return true in case of success, false otherwise
40 */
41bool SOPC_PubSubHelpers_ParseAddressUDP(const char* address, SOPC_Socket_AddressInfo** multicastAddr);
42
57 const SOPC_Variant* variant,
58 bool* out_isBad);
59
69 const SOPC_Variant* variant);
70
71// TODO: to be defined in S2OPC
72// Note: only suitable for TCP / UDP / MQTT prefixes
74 const char* uri,
75 size_t* hostnameLength,
76 size_t* portIdx,
77 size_t* portLength);
78
79#endif /* SOPC_PUBSUB_HELPERS_H_ */
struct SOPC_FieldMetaData SOPC_FieldMetaData
Definition sopc_pubsub_conf.h:38
bool SOPC_PubSubHelpers_ParseAddressUDP(const char *address, SOPC_Socket_AddressInfo **multicastAddr)
bool SOPC_PubSubHelpers_IsCompatibleVariant(const SOPC_FieldMetaData *fieldMetaData, const SOPC_Variant *variant, bool *out_isBad)
bool SOPC_Helper_URI_ParseUri_WithPrefix(const char *prefix, const char *uri, size_t *hostnameLength, size_t *portIdx, size_t *portLength)
bool SOPC_PubSubHelpers_IsPreencodeCompatibleVariant(const SOPC_FieldMetaData *fieldMetaData, const SOPC_Variant *variant)
Check if variant is compatible (value type and value rank) with field meta data in case of preencoded...
A platform independent API to use sockets.
Socket addressing information for listening or connecting operation type.
Definition p_sopc_sockets.h:46
This structure provides variant encapsulation.
Definition sopc_builtintypes.h:374