Hi,
1) Setup secondary hub with probe_config_set (if you have one)
my $PDS = pdsCreate();
pdsPut_PCH($PDS, "/controller/secondary_domain", $Domain);
pdsPut_PCH($PDS, "/controller/secondary_hub", $Hubname);
pdsPut_PCH($PDS, "/controller/secondary_hubrobotname", $HubRobotname);
pdsPut_PCH($PDS, "/controller/temporary_hub_broadcast", "no");
pdsPut_PCH($PDS, "/controller/secondary_hubip", $HubRobotname);
pdsPut_PCH($PDS, "/controller/secondary_hubport", "48002");
pdsPut_PCH($PDS, "/controller/secondary_hub_dns_name", "");
my $PDS_ARGS = pdsCreate();
pdsPut_PCH ($PDS_ARGS,"name","controller");
pdsPut_PDS ($PDS_ARGS,"as_pds",$PDS);
my ($RC) = nimNamedRequest("/ADDR/controller", "probe_config_set", $PDS_ARGS);
pdsDelete($PDS);
pdsDelete($PDS_ARGS);
if ($RC != NIME_OK) {
print "Failed to call the callback probe_config_set (Error $RC)\n";
return;
}
Something like this.
And trigger sethub callback
my $PDS = pdsCreate();
pdsPut_PCH ($PDS, "hubdomain", "Domain");
pdsPut_PCH ($PDS, "hubname", "Hubname");
pdsPut_PCH ($PDS, "hubip", "Hubrobotname");
pdsPut_PCH ($PDS, "hubport", "");
pdsPut_PCH ($PDS, "hub_dns_name", "Hubrobotname");
pdsPut_PCH ($PDS, "robotip_alias", "");
my ($RC) = nimNamedRequest("/ADDR/controller", "sethub", $PDS);
pdsDelete($PDS);
Think to update variables and robot addr
These API are fully documented on my Perl SDK documentation:
GitHub - UIM-Community/Perl-SDK: CA UIM - Nimsoft - Perl SDK API Documentation
Best Regards,
Thomas