Giter Site home page Giter Site logo

audioscience / avdecc-lib Goto Github PK

View Code? Open in Web Editor NEW
78.0 78.0 45.0 3.39 MB

Simple C++ library for implementing IEEE1722.1 (AVB Device Enumeration, Discovery and Control)

License: MIT License

C++ 96.53% C 1.48% Shell 0.22% CMake 0.31% Objective-C 0.04% Objective-C++ 1.41%

avdecc-lib's People

Contributors

ahogen avatar asi-build avatar asitom avatar dbrignoli avatar denniszhuo avatar gspreeth avatar jdkoftinoff avatar jdowlingrh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

avdecc-lib's Issues

Suggestion: Export entity AEM to XML

This would put an actual use to the statements made by Jeff Koftinoff in some of his presentations about being able to work with XML files as complete AEMs for a given device/endpoint. I don't have access to the IEEE 1722.1 standard, so I have no idea what this XML is supposed to look like.

Having an export_aem ENTITY [int::index] [string::output_file] type command in avdecccmdline would allow a user to grab the entire entity's AEM and put it in an XML file. This XML file could then be inspected manually or used in other programs/utilities.

Currently, being stuck with various commands and queries is fine for quick visual checks of AEM values, but doesn't work well when you want to actually do something externally with that information.

fix "unused" parameter warnings

1> descriptor_base_imp.cpp
1>D:\asi\sw\avdecc-lib\controller\lib\src\descriptor_base_imp.cpp(134): warning C4100: 'acquire_entity_flag' : unreferenced formal parameter
1>D:\asi\sw\avdecc-lib\controller\lib\src\descriptor_base_imp.cpp(134): warning C4100: 'notification_id' : unreferenced formal parameter
1>D:\asi\sw\avdecc-lib\controller\lib\src\descriptor_base_imp.cpp(140): warning C4100: 'status' : unreferenced formal parameter
1>D:\asi\sw\avdecc-lib\controller\lib\src\descriptor_base_imp.cpp(140): warning C4100: 'frame_len' : unreferenced formal parameter
1>D:\asi\sw\avdecc-lib\controller\lib\src\descriptor_base_imp.cpp(140): warning C4100: 'frame' : unreferenced formal parameter
1>D:\asi\sw\avdecc-lib\controller\lib\src\descriptor_base_imp.cpp(140): warning C4100: 'notification_id' : unreferenced formal parameter
1>D:\asi\sw\avdecc-lib\controller\lib\src\descriptor_base_imp.cpp(222): warning C4100: 'lock_entity_flag' : unreferenced formal parameter
1>D:\asi\sw\avdecc-lib\controller\lib\src\descriptor_base_imp.cpp(222): warning C4100: 'notification_id' : unreferenced formal parameter
1>D:\asi\sw\avdecc-lib\controller\lib\src\descriptor_base_imp.cpp(229): warning C4100: 'status' : unreferenced formal parameter
1>D:\asi\sw\avdecc-lib\controller\lib\src\descriptor_base_imp.cpp(229): warning C4100: 'frame_len' : unreferenced formal parameter
1>D:\asi\sw\avdecc-lib\controller\lib\src\descriptor_base_imp.cpp(229): warning C4100: 'frame' : unreferenced formal parameter
1>D:\asi\sw\avdecc-lib\controller\lib\src\descriptor_base_imp.cpp(229): warning C4100: 'notification_id' : unreferenced formal parameter
1>D:\asi\sw\avdecc-lib\controller\lib\src\descriptor_base_imp.cpp(312): warning C4100: 'notification_id' : unreferenced formal parameter
1>D:\asi\sw\avdecc-lib\controller\lib\src\descriptor_base_imp.cpp(320): warning C4100: 'status' : unreferenced formal parameter
1>D:\asi\sw\avdecc-lib\controller\lib\src\descriptor_base_imp.cpp(320): warning C4100: 'frame_len' : unreferenced formal parameter
1>D:\asi\sw\avdecc-lib\controller\lib\src\descriptor_base_imp.cpp(320): warning C4100: 'frame' : unreferenced formal parameter
1>D:\asi\sw\avdecc-lib\controller\lib\src\descriptor_base_imp.cpp(320): warning C4100: 'notification_id' : unreferenced formal parameter
1> end_station_imp.cpp
1>D:\asi\sw\avdecc-lib\controller\lib\src\end_station_imp.cpp(689): warning C4244: 'argument' : conversion from 'int' to 'uint16_t', possible loss of data
1>D:\asi\sw\avdecc-lib\controller\lib\src\end_station_imp.cpp(1538): warning C4244: 'argument' : conversion from 'unsigned int' to 'uint16_t', possible loss of data
1>D:\asi\sw\avdecc-lib\controller\lib\src\end_station_imp.cpp(1551): warning C4244: '=' : conversion from 'unsigned int' to 'uint16_t', possible loss of data
1>D:\asi\sw\avdecc-lib\controller\lib\src\end_station_imp.cpp(1762): warning C4100: 'status' : unreferenced formal parameter
1>D:\asi\sw\avdecc-lib\controller\lib\src\end_station_imp.cpp(1908): warning C4244: 'argument' : conversion from 'uint32_t' to 'uint16_t', possible loss of data
1> entity_descriptor_imp.cpp
1> entity_descriptor_response_imp.cpp
1> external_port_input_descriptor_imp.cpp
1> external_port_input_descriptor_response_imp.cpp
1> external_port_output_descriptor_imp.cpp
1> external_port_output_descriptor_response_imp.cpp
1> jack_input_descriptor_imp.cpp
1> jack_input_descriptor_response_imp.cpp
1> jack_output_descriptor_imp.cpp
1> jack_output_descriptor_response_imp.cpp
1> locale_descriptor_imp.cpp
1> locale_descriptor_response_imp.cpp
1> log.cpp
1>D:\asi\sw\avdecc-lib\controller\lib\src\log.cpp(37): warning C4100: 'time_stamp_ms' : unreferenced formal parameter
1>D:\asi\sw\avdecc-lib\controller\lib\src\log.cpp(37): warning C4100: 'log_msg' : unreferenced formal parameter
1>D:\asi\sw\avdecc-lib\controller\lib\src\log.cpp(37): warning C4100: 'log_level' : unreferenced formal parameter
1>D:\asi\sw\avdecc-lib\controller\lib\src\log.cpp(37): warning C4100: 'log_user_obj' : unreferenced formal parameter
1> memory_object_descriptor_imp.cpp
1> memory_object_descriptor_response_imp.cpp
1> log_imp.cpp
1>D:\asi\sw\avdecc-lib\controller\lib\src\msvc\log_imp.cpp(75): warning C4127: conditional expression is constant
1> net_interface_imp.cpp
1>D:\asi\sw\avdecc-lib\controller\lib\src\msvc\net_interface_imp.cpp(166): warning C4996: 'inet_addr': Use inet_pton() or InetPton() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings
1> C:\Program Files (x86)\Windows Kits\8.1\Include\um\winsock2.h(1850) : see declaration of 'inet_addr'
1> notification_imp.cpp
1>D:\asi\sw\avdecc-lib\controller\lib\src\msvc\notification_imp.cpp(74): warning C4127: conditional expression is constant
1> Generating Code...
1> Compiling...
1> system_layer2_multithreaded_callback.cpp
1>D:\asi\sw\avdecc-lib\controller\lib\src\msvc\system_layer2_multithreaded_callback.cpp(59): warning C4100: 'type' : unreferenced formal parameter
1> system_message_queue.cpp
1> notification.cpp
1>D:\asi\sw\avdecc-lib\controller\lib\src\notification.cpp(37): warning C4100: 'notification_id' : unreferenced formal parameter
1>D:\asi\sw\avdecc-lib\controller\lib\src\notification.cpp(37): warning C4100: 'status' : unreferenced formal parameter
1>D:\asi\sw\avdecc-lib\controller\lib\src\notification.cpp(37): warning C4100: 'desc_index' : unreferenced formal parameter
1>D:\asi\sw\avdecc-lib\controller\lib\src\notification.cpp(37): warning C4100: 'desc_type' : unreferenced formal parameter
1>D:\asi\sw\avdecc-lib\controller\lib\src\notification.cpp(36): warning C4100: 'cmd_type' : unreferenced formal parameter
1>D:\asi\sw\avdecc-lib\controller\lib\src\notification.cpp(36): warning C4100: 'entity_id' : unreferenced formal parameter
1>D:\asi\sw\avdecc-lib\controller\lib\src\notification.cpp(36): warning C4100: 'notification_type' : unreferenced formal parameter
1>D:\asi\sw\avdecc-lib\controller\lib\src\notification.cpp(36): warning C4100: 'notification_user_obj' : unreferenced formal parameter
1> response_frame.cpp
1> stream_input_counters_response_imp.cpp
1> stream_input_descriptor_imp.cpp
1>D:\asi\sw\avdecc-lib\controller\lib\src\stream_input_descriptor_imp.cpp(242): warning C4100: 'new_stream_info_field' : unreferenced formal parameter
1>D:\asi\sw\avdecc-lib\controller\lib\src\stream_input_descriptor_imp.cpp(242): warning C4100: 'notification_id' : unreferenced formal parameter
1>D:\asi\sw\avdecc-lib\controller\lib\src\stream_input_descriptor_imp.cpp(249): warning C4100: 'status' : unreferenced formal parameter
1>D:\asi\sw\avdecc-lib\controller\lib\src\stream_input_descriptor_imp.cpp(249): warning C4100: 'frame_len' : unreferenced formal parameter
1>D:\asi\sw\avdecc-lib\controller\lib\src\stream_input_descriptor_imp.cpp(249): warning C4100: 'frame' : unreferenced formal parameter
1>D:\asi\sw\avdecc-lib\controller\lib\src\stream_input_descriptor_imp.cpp(249): warning C4100: 'notification_id' : unreferenced formal parameter
1> stream_input_descriptor_response_imp.cpp

avdecc interface with MRPD

As per IEEE 1722.1 and from some other sources, interaction of AVDECC with rest AVB components is somewhat understood.
However is there any component diagram/architecture to understand AVDECC and its detailed interaction with AVB components e.g. mrpd and rest.

I am also not sure whether AVDECC execution( e.g. controlling of stream) needs to have AVB switch in-between or AVDECC can control AVB stream at talker or listener end itself.

Python Bindings Location

Hi *,

I am developing a Python 1722.1 Controller. Until now I wanted to wrap avbdecc-lib with Cython. I just saw the "lib/bindings/python" entry in the Directory Layout. But where is it?
Or is this more a wish for the future?

Best Regards,
Ck

ACMP and AECP have a different post_log_msg parameter order

Sequence ID and command status (the last two parameters) are flipped:

aecp_controller_state_machine.cpp:

            log_imp_ref->post_log_msg(LOGGING_LEVEL_ERROR,
                                      "RESPONSE_RECEIVED, 0x%llx, %s, %s, %d, %d, %s",
                                      jdksavdecc_uint64_get(&id, 0),
                                      utility::aem_cmd_value_to_name(cmd_type),
                                      utility::aem_desc_value_to_name(desc_type),
                                      desc_index,
                                      jdksavdecc_aecpdu_common_get_sequence_id(frame, ETHER_HDR_SIZE),
                                      utility::aem_cmd_status_value_to_name(status));

acmp_controller_state_machine.cpp:

            log_imp_ref->post_log_msg(LOGGING_LEVEL_ERROR,
                                      "RESPONSE_RECEIVED, 0x%llx, %s, %s, %s, %s, %d",
                                      end_station_entity_id,
                                      utility::acmp_cmd_value_to_name(msg_type),
                                      "NULL",
                                      "NULL",
                                      utility::acmp_cmd_status_value_to_name(status),
                                      seq_id);

An application that parses "RESPONSE_RECEIVED" type log messages would benefit from consistency. Any objection to command status last?

view details doesn't use index correctly

cmd_line::cmd_view_details() calls cmd_line::do_view_descriptor() which doesn’t take account of the entity ID passed into the view details command. Whoops!

Windows Release mode DLL

Hi,
Thanks for all the work on this project,
I use Visual studio 2013 and can compile and run the library with command line tool just fine, also have it running fine on various linux platforms , but when I compile the dll in Release mode(or the other cmake created Release variants) I keep on getting Command Timeout messages with the tool, and this adds random garbage devices in end station list.
Anything obvious I might be missing or can try?

Edit:
The project was created with Cmake 3.1.0-rc2

Thanks.
Gideon Spreeth

testing with avdecccmdline, I210 board not visible

Hello!
Testing the avdecccmdline tool on a ubuntu system, with an I210 board installed -- I am not seeing the I210 port listed in the available interfaces. can someone advise how to fix this? I tried both the master branch and the staging branch.

The board is already working for Open-AVB talking and listening.

Thanks for any suggestions!

best,
Rama

avbutil stream configuration

Does anyone know how to overcome the limited number of stream configurations provided by the AVDECC entity controller on a Mac? For example I would like it to transmit 96 channels as 3 x 32 channel streams.

Trouble Compiling

Hello,
for my thesis I am trying to set up an AVB endpoint on a Linux system.
I have been trying to compile the library. But I keep getting an error message:

Linking CXX executable avdecccmdline
../../lib/libcontroller.so: undefined reference to jdksavdecc_frame_read' ../../lib/libcontroller.so: undefined reference tojdksavdecc_multicast_adp_acmp'
../../lib/libcontroller.so: undefined reference to jdksavdecc_frame_write' ../../lib/libcontroller.so: undefined reference tojdksavdecc_common_control_header_write'
../../lib/libcontroller.so: undefined reference to `jdksavdecc_common_control_header_read'
collect2: error: ld returned 1 exit status
make[2]: *** [controller/app/cmdline/avdecccmdline] Error 1
make[1]: *** [controller/app/cmdline/CMakeFiles/avdecccmdline.dir/all] Error 2
make: *** [all] Error 2

I am using Linux Ubuntu 14.04
Not knowing too much about prgramming I googled and found that it is most likely a linker problem.
Is this a common issue (which may very well be caused by a mistake of my own)? Does anyone know what I can do to solve this?

What I did so far:
Installed the jdksavdecc-c library. (cmake -> make -> make install) No error messages there.
Installed libpcap-dev
Installed libreadline-gplv2-dev

Then I tried cmake for the avdecc-lib. That also worked fine.
Then make the build process goes to (almost) 100% and then the above error message is thrown.

I would be incredibly grateful if anyone could help me with this.

Max

How to initialize endpoint and connect streams (I210, open-avb)

Hello,
Is there any tutorial for using the command line program to initialize the machine as an endpoint (acquire entity number, etc)? Currently I have an Ubuntu PC with an I210 PCI card, and I am trying to get it to connect to my AVB network. I have enabled the open-avb drivers, and I am running the open-avb daemons. The rest of the network consists of:
(1) Mac Mini (latest OS, AVB compatible ethernet chip)
(1) MOTU AVB interface
(1) DSP4You OEM AVB endpoint
(1) MOTU AVB Switch

When I run the command line program, I can see the Mac Mini, the Motu interface, and the endpoint when I type "view all" and "list", but the ubuntu machine does not appear. Is there an command I need to issue that allows the ubuntu machine to connect to the network?

There is another strange issue I noticed regarding the mac mini. When I type "view all", none of the parameters for the mac mini show up the way they do for the other endpoints. The streams are available though, because I can connected them to the motu interface using motu's browser based controller. Does anyone know if OS X follows the AVDECC protocol exactly? I am having problems using my mac mini with the switch, so it's possible they don't implement it the protocol properly. I just wanted to see if anyone else had issues, or has any information on the matter.

Thanks for the help!
Owen

Single bad character on first "list" cmd

Not sure if this is an error because of this code or not, but I had to ask. With two AVB endpoints on the network, I launch the avdecccmdline utility and it finds both devices. The first time I issue the list command, the first entity's "Firmware" field always has this weird character. It is not specific to the device, as I've re-run avdecc multiple times and seen it grab the other device first (thereby assigning it entity index 0 and listing it first).

If I enter the list command a second time, the character goes away and the "Firmware" field is populated with the device's name. So it's only on the first read/print that I get this weird character (see screenshot below).

character in firmware field

Anything I should try on my end? Thanks and cheers!

AECP in-progress responses in firmware upgrade should be polled rather than checked once

Firmware upgrade fails in erase step if end station is taking some time to erase its non-volatile memory:

$ upgrade upgrade.bin
Erasing image...

[NOTIFICATION] (RESPONSE_RECEIVED, 0x2297fffe80081b, START_OPERATION, ENTITY, 0, IN_PROGRESS, 0x1)

[LOG] ERROR (RESPONSE_RECEIVED, 0x2297fffe80081b, START_OPERATION, ENTITY, 0, 36, IN_PROGRESS)
Error: Erase failed.

cmd_line::cmd_firmware_upgrade does a START_OPERATION command and calls get_last_resp_status once to get status. This seems to simply wait for the first response packet to arrive and return its status field.

My XMOS end station takes about 3 seconds to erase its flash and will send IN_PROGRESS responses every 120ms and finally a SUCCESS at the end (see process_aem_cmd_start_abort_operation in https://github.com/xmos/lib_tsn/blob/master/lib_tsn/src/1722_1/avb_1722_1_aecp.c).

Also, I noticed cmd_firmware_upgrade uses hardcoded 3 for AEM_MEMORY_OBJECT_OPERATION_ERASE.

Q on developping Windows GUI app

Hello, AVDECC lib specialist,

I'm considering to develop Windows GUI apps using AVDECC Lib.
In order to do so, in my understanding, we need to develop the C++/CLI wrapper for AVDECC lib so that the library will work with .NET framework.

Before digging into detail, I would like to confirm if such tasks are already done before or not.
Also, I'm willing to hear the opinion if there is any other approach to develop the Windows GUI app.
Any feedback are really appreciated.

Kind Regards,
John Rama

How to use the console?

I wonder how to use this console. When I run the avdecccmdline, my terminal print the message like this:
root@zmx-virtual-machine:/project/VedioSyn/avdecc-lib-master/avdecc-lib# controller/app/cmdline/avdecccmdline
AVDECC Controller version: v0.6.1
1 (lo, address: <127.0.0.1>)
2 (eth0, address: <192.168.4.166>)
Enter the interface number (1-2):

My aim is to achieve video sync
But I don't know the next step I should do......

Build fails with error error: use of undeclared identifier

I just pulled the latest code and tried to build it on the mac following the instructions:
cmake .
make

I get an error
lib/controller/lib/src/audio_unit_descriptor_imp.cpp:135:9: error: use of undeclared identifier
'jdksavdecc_descriptor_audio_unit_set_current_sampling_rate'; did you mean 'jdksavdecc_descriptor_audio_set_current_sampling_rate'?

The function jdksavdecc_descriptor_audio_set_current_sampling_rate is indeed not defined.
When I change to jdksavdecc_descriptor_audio_set_current_sampling_rate I got more errors:

Users/thomas/dev/git/external/avdecc_lib/avdecc-lib/controller/lib/src/audio_unit_descriptor_response_imp.cpp:59:42: error: use of undeclared identifier
'JDKSAVDECC_DESCRIPTOR_AUDIO_UNIT_OFFSET_OBJECT_NAME'
return (uint8_t *)&buffer[position + JDKSAVDECC_DESCRIPTOR_AUDIO_UNIT_OFFSET_OBJECT_NAME];

Indeed, JDKSAVDECC_DESCRIPTOR_AUDIO_UNIT_OFFSET_OBJECT_NAME is not defined anywhere in the latest commit.

bare pointers

This comment came in to me. I'll reply here so others can see...

You are passing bare pointers around. You really should be using std::shared_ptr<> and std::weak_ptr<> to allow proper reference counting, especially between threads. A bare pointer makes it unclear who actually owns the object or takes responsibility for deleting it. shared_ptr<> declares obvious ownership of dynamic objects. A consistent problem that I have seen in other controller implementations is a bare pointer being used for an async callback but by the time the callback is called the object was deleted for some other reason. weak_ptr<> allows you to test for this case before you de-reference.

The end station object now is being accessed via different threads. What kind of things would the different threads call? those things need to be protected by a scoped lock as well.

'command line application' on linux ubuntu for AVDECC controller

Hi,

Iam trying to install 'AVDECC' on Linux ubuntu to recognize AVB endpoint connected. I was following the steps mentioned in below link to do so.
https://github.com/audioscience/avdecc-lib

I downloaded the source code for AVDECC library and was able to build it as well. But, I couldn't make out how to get the 'command line application' for interfacing the AVDECC controller.
[For windows it's mentioned the availability of the same in 'AVDECC-Lib\avdecc-
lib\controller\app\cmdline\Debug']

Will you please let me know where to get command line application on ubuntu; also let me know the steps for usage of it.

Thanks in Advance.

Regards,
Raghu

[XK-AVB-LC-SYS] Which IP Address? How to connect with switch?

Hello,

I want to build a network with two AVB Endpoints (XK-AVB-LC-SYS), a Laptop and an AVB Switch.
An avdecc library/controller (https://github.com/audioscience/avdecc-lib) is installed on my linux system.
The avdecc controller can be used over command line. For test purposes I have connected the endpoint with my laptop over Ethernet. But the endpoint doesn't show up in the list of the connected endpoints in the controller program.
Why not?
Can I ping the endpoint?
Do I have to config the Ethernet ports of the endpoint so that they work?

Don't know what is wrong...
Pls help.

Greetz
Chris

Device discovery limit

Hi,
I have run into an issue where not all avdecc devices on a network can be discovered by the controller. If more than 34 devices are online and the controller starts up you only ever see 34 of them. if you however increase the number of online devices one by one after the controller is running it seems to be fine.
It looks to be the same on different switch and device layouts as well.
Have not done in depth debugging of the controller or network traffic on this, but does anybody have an idea to what this might be related?
Thanks!

Gideon

Issues trying to read descriptor with more than one configuration

Hi, this is my first GitHub issue post, so bear with me if this hard to read. My coworker and I are developing a AVB Manager GUI in C# visual studio using the open source library. However, we have noticed an issue reading in configurations from an entity using avdecccmdline. We believe that the READ_DESCRIPTOR command sent to the Entity is only reading the first configuration. This is a problem as we have multiple configurations on our entities. I've included some WireShark captures of a successful read_descriptor command with the configuration set to 0, and also have included a unsuccessful read_descriptor command capture when the current configuration was set to 1. Also, some screencaps in the case you don't have WireShark.
image

image
The problem in this one is that the configuration in the bad read should be 1 as that is the current configuration, but it is 0 in this case. This goes to show, once again, that the program is only picking up the first configuration. This is presenting some major delay in the development of our project,

Any insight or help is appreciated.

WireSharkCaptures.zip

" AVDECC controller command line application" on linux ubuntu

Hi,

I am trying to install 'AVDECC' on Linux ubuntu to recognize AVB endpoint connected.

I downloaded the source code for AVDECC library and jdksavdecc-c git repository. I was able to build it successfully.

But, I couldn't make out how to run the 'command line application' for interfacing the AVDECC controller.

I have connected 2 PCs directly (PC <--> PC). i210 cards are inserted in both PCs.
Run avdecc commandline application on both PCs.

$ sudo ./avdecccmdline
AVDECC Controller version: v0.6.2
1 (lo, address: <127.0.0.1>)
2 (eth0, address: <10.15.1.54>)
3 (eth2, address: <192.168.1.101>)
Enter the interface number (1-3): 3

Enter "help" for a list of valid commands.
$ connect

End Station Instream Stream Format

End Station Outstream Stream Format

$

$ list

End Station | Name | Entity ID | Firmware Version | MAC

C - End Station Connected.
D - End Station Disconnected.
$

When I try to connect both PCs it is not getting connected. It is listing zero connected end stations.

Will you please help me know the steps for usage the command line application.

Do I need to provide any input arguments?
When I do help connect it is showing as below.

$ help connect

connect [s_e_s] [s_d_i] [d_e_s] [d_d_i] [f]
Connect an instream to an outstream.
Parameters:
s_e_s : the source End Station (index as int or Entity ID)
s_d_i : the source descriptor index (type int)
d_e_s : the destination End Station (index as int or Entity ID)
d_d_i : the destination descriptor index (type int)
f : the set of flags (type string)
Valid flags are class_b, fast_connect, saved_state, streaming_wait,
supports_encrypted, encrypted_pdu, and talker_failed.

connect [d_e_s] [d_d_i]
Display all the available outstreams for all End Stations that can connect with
the instreams.
Parameters:
d_e_s : the destination End Station (index as int or Entity ID)
d_d_i : the destination descriptor index (type int)

connect
Display all the available instreams for all End Stations.

$

I am not clear about the input arguments. Could you please help me on this.

Thanks in Advance.

Regards,
Ashlin

Is this library thread safe?

Is it true that it is only safe to use an instance of avdecc_lib::controller inside the notification callback? A brief review of the cmdline code shows that avdecc_lib::controller is used with no regard for what state the system thread might be changing.

For example, what happens if a reallocation occurs in end_station_vec between these two lines due to a new end station being added by the system thread?
https://github.com/audioscience/avdecc-lib/blob/8a62c29b643bcf662613d46f2ce37f17108a951c/controller/app/cmdline/src/cmd_line.cpp#L887-891

Stopping a stream from unknown source

Hi, I have a scenario where I start a stream between two devices. Now I close down the controller and remove one of the devices from the network. When running the controller again the remaining device will still report an active stream but as we do not have the other end point available the normal disconnect command cannot be used. Is there any way to force the device to remove the connection from itself or disconnect a "one sided" connection..

Thank you in advance..

AECP controller state machine assumes AEM

The method int aecp_controller_state_machine::callback(void * notification_id, uint32_t notification_flag, uint8_t * frame) assumes that the incoming message_type is either AEM_COMMAND or AEM_RESPONSE, when it can also be an ADDRESS_ACCESS_RESPONSE. In the case where it is an ADDRESS_ACCESS_RESPONSE, this method incorrectly uses the jdksavdecc_aecpdu_aem_get_* commands to get AEM specific fields from the ADDRESS_ACCESS message.

The fix is not so simple however, as in order to support notifications for ADDRESS_ACCESS commands, the method post_notification_msg() needs to change in some way since the API for post_notification_msg assumes that the message is related to an AEM descriptor and has no option to say it is related to an ADDRESS_ACCESS command.

ADP takes wrong dest_mac

Hello,

At my setup I do have 2 i210 linux PCs. AVDECC with different entity ids are running at both of end points. Audio science cmdline controller is running at one of this pc.

I am using open avb stack and I had added a logic to start and stop streaming via controller.

However in one of case where 2 streams are running parallel, each end station is talker for stream 1 and listener for stream 2 and vice versa. Same configuration for avdecc as well.

Now i wish to get STREAM Stop/Start logic to work for both of end stations. Remote station as well as host end station. Everything is fine expect:

end_station_imp.cpp:

end_station_imp::end_station_imp(const uint8_t * frame, size_t frame_len)
{
end_station_connection_status = ' ';
adp_ref = new adp(frame, frame_len);
struct jdksavdecc_eui64 entity_id;
entity_id = adp_ref->get_entity_entity_id();
end_station_entity_id = jdksavdecc_uint64_get(&entity_id, 0);
utility::convert_eui48_to_uint64(adp_ref->get_src_addr().value, end_station_mac);
end_station_init();
}

Both of end stations broadcast ENTITY_AVAILABLE. As observed remote PC always initiate 1st, causing
ENITITY 2 to have PC 2 as end_station_mac whereas it should be for PC 1.

Now once ENTITY_AVAILABLE message received for both entities, end_station_mac will not be overwritten, since it is done once only. Result even after I do select specific ENTITY ID by "select xxxx" command, Stream Start or Stop or any other AEM command goes always to remote end station and never ever to local host( where AVDECC controller and other preferred Entity is located).

How to configure and fix preferred MACs?

trouble compiling

Hello,

I try to setup an avb 1722.1 controller on a linux pc (fedora or ubuntu).
Trying to setup with git clone git://github.com/audioscience/avdecc-lib --recursive
fails, when it comes to Submodule 'jdksavdecc-c' after rsa fingerprint is accepted.
Message: fatal: Could not read from remote repository.

So I cloned it: git clone git://github.com/jdkoftinoff/jdksavdecc-c
which is working.
Then
cmake .
make
Scanning dependencies of target controller
[ 2%] Building CXX object controller/lib/CMakeFiles/controller.dir/src/clock_domain_descriptor_imp.cpp.o
In file included from /home/develop/avdecc-lib/controller/lib/src/configuration_descriptor_imp.h:34:0,
from /home/develop/avdecc-lib/controller/lib/src/entity_descriptor_imp.h:33,
from /home/develop/avdecc-lib/controller/lib/src/end_station_imp.h:33,
from /home/develop/avdecc-lib/controller/lib/src/clock_domain_descriptor_imp.cpp:35:
/home/develop/avdecc-lib/controller/lib/src/audio_unit_descriptor_imp.h:40:44: error: field ‘audio_unit_desc’ has incomplete type
struct jdksavdecc_descriptor_audio audio_unit_desc; // Structure containing the audio_unit_desc fields
^
make[2]: *** [controller/lib/CMakeFiles/controller.dir/src/clock_domain_descriptor_imp.cpp.o] Error 1
make[1]: *** [controller/lib/CMakeFiles/controller.dir/all] Error 2
make: *** [all] Error 2

What did I miss to make it work ?

Thanks
andi

avdecc-lib Compile error

error C2079: “avdecc_lib::audio_unit_descriptor_imp::audio_unit_desc”uses undefined struct“avdecc_lib::jdksavdecc_descriptor_audio”
2> audio_map_descriptor_imp.cpp

How to slove this,thanks

Cmdline -i option segfault

When I attempt to start the command line app with an -i option specified, it immediately crashes without warning.

Normal startup execution (works fine)...

$ sudo ./avdecc-lib/controller/app/cmdline/avdecccmdline

AVDECC Controller version: v0.6.2
1 (lo, address: <127.0.0.1>)
2 (enp0s3, address: <10.10.10.125>)
Enter the interface number (1-2):

Attempting to use -i option...

$ sudo ./avdecc-lib/controller/app/cmdline/avdecccmdline -i 2
// ...OR...
$ sudo ./avdecc-lib/controller/app/cmdline/avdecccmdline -i enp0s3

AVDECC Controller version: v0.6.2
Segmentation fault

Doesn't tell me why it crashed, what went wrong, nothing. Just *splat*.

How is this -i option actually supposed to be used?

System environment: 
- Linux Mint 18.1 Serena
- Linux 4.4.0-81-generic (x86_64)
- gcc/g++ 5.4.0 20160609

How to use the descriptor command to get localize name?

Hello,

I've just updated my AVDECC library for the first time in two years. The one thing I can't seem to quite understand is how to get a localized string with reference. It used to only take one parameter, but now it takes 3 (localized description, descriptor index, index). Can't quite seem to get it working. Any input/help is appreciated

(below is code in question from new library)


(descriptor_base.h)
///
/// \return The localized string reference pointing to the localized descriptor name.
///
AVDECC_CONTROLLER_LIB32_API virtual uint16_t STDCALL localized_description() = 0;

(configuration_descriptor.h)
///
/// \return The strings descriptor index and the string index for the string corresponding to a particular localized description.
///
AVDECC_CONTROLLER_LIB32_API virtual int STD
CALL get_strings_desc_string_by_reference(size_t reference, size_t &string_desc_index, size_t &string_index) = 0;


Katie

Get/Set Configuration

Hello,

I have recently updated my library, and am a bit confused because it seems as if I can't access any configuration but the first one. How would one go about switching configurations?

Thanks for any help.

cmd_line::cmd_firmware_upgrade is in the wrong place

The cmd_line::cmd_firmware_upgrade method contains the code to send a firmware upgrade to the selected entity. This code should be in the library instead of the command line tool so other clients of the library can use it

Deadlock on log error

Hey all,

Was just testing out all the AVDECC commands some more to see what's here and ran into this issue. I encountered it a while back but didn't report it at the time.

In short, after selecting my Hono 4.4m with select 0 0 0, I issue entity reboot to the cmdline utility...

[LOG] ERROR (RESPONSE_RECEIVED, 0x1cf7ffff00nnnn, REBOOT, ENTITY, 0, 240, NOT_IMPLEMENTED)

[NOTIFICATION] (RESPONSE_RECEIVED, 0x1cf7ffff00nnnn, REBOOT, ENTITY, 0, NOT_IMPLEMENTED, 0x1)

... and then everything stops. The entire command line utility stops responding to commands. So I quit it with SIGINT and then get the following backtrace from "gdb"

^C
Thread 1 "avdecccmdline" received signal SIGINT, Interrupt.
0x00007ffff6ccf827 in futex_abstimed_wait_cancelable (private=0, abstime=0x0, expected=0, futex_word=0x69a850)
    at ../sysdeps/unix/sysv/linux/futex-internal.h:205
205	../sysdeps/unix/sysv/linux/futex-internal.h: No such file or directory.
(gdb) bt
#0  0x00007ffff6ccf827 in futex_abstimed_wait_cancelable (private=0, abstime=0x0, expected=0, futex_word=0x69a850)
    at ../sysdeps/unix/sysv/linux/futex-internal.h:205
#1  do_futex_wait (sem=sem@entry=0x69a850, abstime=0x0) at sem_waitcommon.c:111
#2  0x00007ffff6ccf8d4 in __new_sem_wait_slow (sem=0x69a850, abstime=0x0) at sem_waitcommon.c:181
#3  0x00007ffff6ccf97a in __new_sem_wait (sem=<optimized out>) at sem_wait.c:29
#4  0x00007ffff7b8461e in avdecc_lib::system_layer2_multithreaded_callback::queue_tx_frame (this=0x69a490, 
    notification_id=0x1, notification_flag=1, frame=0x7fffffffd69c "", mem_buf_len=42)
    at /home/alex/git/avdecc-lib/controller/lib/src/linux/system_layer2_multithreaded_callback.cpp:164
#5  0x00007ffff7b83f7e in avdecc_lib::system_queue_tx (notification_id=0x1, notification_flag=1, 
    frame=0x7fffffffd69c "", mem_buf_len=42)
    at /home/alex/git/avdecc-lib/controller/lib/src/linux/system_layer2_multithreaded_callback.cpp:79
#6  0x00007ffff7b3d944 in avdecc_lib::descriptor_base_imp::default_send_reboot_cmd (this=0x7ffff0001100, 
    descriptor_base_imp_ref=0x7ffff0001100, notification_id=0x1)
    at /home/alex/git/avdecc-lib/controller/lib/src/descriptor_base_imp.cpp:414
#7  0x00007ffff7b6c1b5 in avdecc_lib::entity_descriptor_imp::send_reboot_cmd (this=0x7ffff0001050, 
    notification_id=0x1) at /home/alex/git/avdecc-lib/controller/lib/src/entity_descriptor_imp.cpp:150
#8  0x000000000045ac14 in cmd_line::cmd_reboot (this=0x7fffffffe250, total_matched=0, 
    args=std::vector of length 0, capacity 0)
    at /home/alex/git/avdecc-lib/controller/app/cmdline/src/cmd_line.cpp:3438
#9  0x000000000042817a in cli_command_format::run_command (this=0x6a2310, cmd_ptr=0x7fffffffe250, 
    args=std::queue wrapping: std::deque with 0 elements, done=@0x7fffffffe07d: false)
    at /home/alex/git/avdecc-lib/controller/app/cmdline/src/cli_command_format.cpp:110
#10 0x000000000046b3ea in cli_command::run_command (this=0x6a21b0, cmd_ptr=0x7fffffffe250, 
    args=std::queue wrapping: std::deque with 0 elements, done=@0x7fffffffe07d: false, prefix="entity reboot ")
    at /home/alex/git/avdecc-lib/controller/app/cmdline/src/cli_command.cpp:77
#11 0x000000000046b326 in cli_command::run_command (this=0x6a0d10, cmd_ptr=0x7fffffffe250, 
    args=std::queue wrapping: std::deque with 0 elements, done=@0x7fffffffe07d: false, prefix="entity reboot ")
    at /home/alex/git/avdecc-lib/controller/app/cmdline/src/cli_command.cpp:68
#12 0x000000000046b326 in cli_command::run_command (this=0x7fffffffe268, cmd_ptr=0x7fffffffe250, 
    args=std::queue wrapping: std::deque with 1 elements = {...}, done=@0x7fffffffe07d: false, prefix="entity ")
    at /home/alex/git/avdecc-lib/controller/app/cmdline/src/cli_command.cpp:68
#13 0x000000000042e98d in cmd_line::handle (this=0x7fffffffe250, args=std::vector of length 2, capacity 2 = {...})
    at /home/alex/git/avdecc-lib/controller/app/cmdline/src/cmd_line.cpp:141
#14 0x000000000042aa61 in main (argc=1, argv=0x7fffffffe618)
    at /home/alex/git/avdecc-lib/controller/app/cmdline/src/cmd_line_main.cpp:421

So the semaphore waiting_sem in the "linux/system_later2_multithreaded_callback.h" never seems to unlock. Not sure why, but this causes the program to freeze on this line here

can't compile

jdksavdecc-c doesn't seem to be up to date. I'm getting compile errors in linux. Need to retest in Windows... Either way, we owe JeffK a pull request.

Volume control API for jdksavdecc

In jdksavdecc lib, there is no ready provision for Volume/gain control. It is set as customized parameter.
With ieee 1722.1 reference, I had enhanced jdksavdecc lib to control volume of entity data unit.
I had tested it on i210 environment.

Attached avdecc aecp code snippet.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.