Skip to content

Commit

Permalink
refactor(test): Add alternative URL for IPv6 multicast subscriber test
Browse files Browse the repository at this point in the history
  • Loading branch information
jpfr committed Dec 25, 2023
1 parent 2d8239b commit d85b390
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/pubsub/check_pubsub_subscribe.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
#include "ua_pubsub.h"
#include "ua_server_internal.h"

#define MULTICAST_URL "opc.udp://224.0.0.22:4801/"
//#define MULTICAST_URL "opc.udp://[ff01::100]:4801/"

#define UA_SUBSCRIBER_PORT 4801 /* Port for Subscriber*/
#define PUBLISH_INTERVAL 5 /* Publish interval*/
#define PUBLISHER_ID 2234 /* Publisher Id*/
Expand Down Expand Up @@ -105,8 +108,7 @@ static void setup(void) {
UA_PubSubConnectionConfig connectionConfig;
memset(&connectionConfig, 0, sizeof(UA_PubSubConnectionConfig));
connectionConfig.name = UA_STRING("UADP Test Connection");
UA_NetworkAddressUrlDataType networkAddressUrl =
{UA_STRING_NULL, UA_STRING("opc.udp://224.0.0.22:4801/")};
UA_NetworkAddressUrlDataType networkAddressUrl = {UA_STRING_NULL, UA_STRING(MULTICAST_URL)};
UA_Variant_setScalar(&connectionConfig.address, &networkAddressUrl,
&UA_TYPES[UA_TYPES_NETWORKADDRESSURLDATATYPE]);
connectionConfig.transportProfileUri =
Expand Down

0 comments on commit d85b390

Please sign in to comment.