Merge pull request #14 from cedricboudinet/master
Interface as an argument for sv_publisher_example
This commit is contained in:
commit
dcbc3de0de
1 changed files with 10 additions and 1 deletions
|
@ -20,7 +20,16 @@ void sigint_handler(int signalId)
|
|||
int
|
||||
main(int argc, char** argv)
|
||||
{
|
||||
SampledValuesPublisher svPublisher = SampledValuesPublisher_create("eth0");
|
||||
char* interface;
|
||||
|
||||
if (argc > 1)
|
||||
interface = argv[1];
|
||||
else
|
||||
interface = "eth0";
|
||||
|
||||
printf("Using interface %s\n", interface);
|
||||
|
||||
SampledValuesPublisher svPublisher = SampledValuesPublisher_create(interface);
|
||||
|
||||
SV_ASDU asdu1 = SampledValuesPublisher_addASDU(svPublisher, "svpub1", NULL, 1);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue