diff options
author | Srinath Arunachalam <Srinath.Arunachalam@harman.com> | 2015-07-14 15:04:08 -0600 |
---|---|---|
committer | Srinath Arunachalam <Srinath.Arunachalam@harman.com> | 2015-08-19 15:54:08 -0600 |
commit | bae8ac670fa9a44337bf784e44ec758f3e4d2438 (patch) | |
tree | 9a5f03ad9cd702ed8d30264a135fa7a6899954ea /examples/simple_talker | |
parent | 3a0b454d05b77c42d3d47ed2074d8ad7b3774930 (diff) | |
download | Open-AVB-bae8ac670fa9a44337bf784e44ec758f3e4d2438.tar.gz |
Added thread monitor to monitor mrp daemon and get the class id, priority and VLAN id instead of using hardcoded values.
Diffstat (limited to 'examples/simple_talker')
-rw-r--r-- | examples/simple_talker/simple_talker.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/examples/simple_talker/simple_talker.c b/examples/simple_talker/simple_talker.c index 573af26e..74fe0316 100644 --- a/examples/simple_talker/simple_talker.c +++ b/examples/simple_talker/simple_talker.c @@ -479,6 +479,7 @@ int main(int argc, char *argv[]) uint8_t dest_addr[6]; size_t packet_size; + for (;;) { c = getopt(argc, argv, "hi:t:"); if (c < 0) @@ -489,8 +490,7 @@ int main(int argc, char *argv[]) break; case 'i': if (interface) { - printf - ("only one interface per daemon is supported\n"); + printf("only one interface per daemon is supported\n"); usage(); } interface = strdup(optarg); @@ -578,10 +578,17 @@ int main(int argc, char *argv[]) /* * should use mrp_get_domain() but this is a simplification */ - domain_a_valid = 1; + /*domain_a_valid = 1; domain_class_a_id = MSRP_SR_CLASS_A; domain_class_a_priority = MSRP_SR_CLASS_A_PRIO; - domain_class_a_vid = 2; + domain_class_a_vid = 2;*/ + + //Using mrp_get_domain() - Srinath + rc = mrp_get_domain(&domain_class_a_id, &domain_class_a_priority, &domain_class_a_vid,&domain_class_b_id, &domain_class_b_priority, &domain_class_b_vid); + if (rc) { + printf("failed calling msp_get_domain()\n"); + return EXIT_FAILURE; + } printf("detected domain Class A PRIO=%d VID=%04x...\n", domain_class_a_priority, domain_class_a_vid); |