Coder Social home page Coder Social logo

l-acoustics / avdecc Goto Github PK

View Code? Open in Web Editor NEW
88.0 20.0 21.0 4.07 MB

A set of open source libraries for controlling AVB entities using the AVDECC (IEEE 1722.1) protocol compliant to Avnu Milan Specifications

License: GNU Lesser General Public License v3.0

CMake 0.90% Shell 0.13% C++ 90.91% Batchfile 0.01% Objective-C++ 2.41% C 5.64%
avb avdecc cplusplus audio-streaming proaudio ieee1722-1 ethernet milan avnu

avdecc's People

Contributors

andrew-elder avatar christophe-calmejane avatar cyril-perrin avatar fharmuth avatar florob avatar gekro avatar i-n-g-o avatar iniato avatar romansavrulin 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  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

avdecc's Issues

Change the writeDeviceMemory API so it takes an OperationID

An AddressAccess write operation should support to be aborted by the user.
There is currently no link between a StartUploadMemoryObjectOperation and a writeDeviceMemory (in order to write to a device, you have to StartOperation).

So at the controller layer level, adding an OperationID (returned by a StartUploadMemoryObjectOperation) to the writeDeviceMemory API will allow it to track when abortOperation() is called, and automatically stop sending AA TLVs.

Detect Milan configurations, not entity

Milan compatibility is per configuration, not per device.
So the controller has to first query Entity descriptor to get configuration counts, then query for Milan compatibility (and store the information per configuration)

Rename la::avdecc::entity::model::VendorEntityModel to la::avdecc::entity::model::EntityModelID

This type was incorrectly named that way, but should just be as specified in IEEE1722.1

Also remove makeVendorEntityModel and splitVendorEntityModel from the library.

Change UniqueIdentifier to be a helper class instead of a simple type and remove getNullIdentifier() and getUninitializedIdentifier().
Add operator bool() (effectivemlly calling old isValidUniqueIdentifier method) to the class
Add static methods getNullIdentifier and getUninitializedIdentifier to the class
Add member method returning the VendorID from the uniqueID

Warning: This will break almost all existing code (unit tests, examples, ... will have to be tested)

Support for ADP from multiple interfaces

For each Entity, store a Entity info struct per interface index (from ADP message).

  • Add a notification for each time the info in the struct changes (identify, available index, flags).
  • Add a notification for each time a Entity info struct is added or removed

The EntityID and EntityModelID must be the same on all interfaces (add a warning for that).

Possible bug in protocolAemPayloads

Many serialization APIs from protocolAemPayloads.hpp/cpp are using AemAecpdu::MaximumPayloadLength as the maximum size for the serialization buffer.

But what happens when ALLOW_BIG_AEM_PAYLOADS is set??
Shouldn't we have a new constexpr (MaximumSerializationBufferLength) that takes either MaximumPayloadLength or MaximumBigPayloadLength?

Add an unit test that checks that, and possibly fix the issue, if there is one!

Implement Get/SetAssociationID commands

  • In la_avdecc
  • in la_avdecc_controller
  • with all notifications (beware the value is stored in the ADP info struct in the controller)
  • No need to manually get the value when using AEMCache since it's an EntityWide value that can be found in ADP

Prevent ACMP storm

The library should limit the number of ACMP messages it sends at the same time:

  • Have a limit of ACMP inflight message per entity (just like AECP)
  • Have a limit of how fast it sends ACMP messages

Initialize Acquire/Lock state during enumeration

By sending an Acquire command with RELEASE flag (so it won't change the current acquired state of the entity, except if we were the acquiring controller, which doesn't matter anyway because we got interrupted in the middle of our operation if the device if getting online again)

macOS native crash

When an AECP enumeration response arrives at the same time as an ACMP enumeration response, a crash might occur when using macOS native Protocol Interface (because the handling of those messages is done in 2 separate threads, which is not the case with pcap)

onEntityOffline event improvement

If possible, give the reason for the EntityOffline event:

  • Received a DEPARTING message
  • Timed out

For the Controller library, we can even improve the possibility with "Simulated Offline"

Improve controller AEM cache

Slightly improve controller's AEM cache introduce in (#6) so that if one descriptor dynamic information retrieval is not supported by the entity, get the corresponding descriptor instead of switching to full enumeration (most devices don't support GetMemoryObjectLength)

Add counters for the controller itself

Add counters, like the descriptor counters, for the controller entity itself, to serve as debug purpose.
Like "Received unsol", "toxic unit detected", "unsol lost" ....

Improve controller query scheduler

See ControllerImpl::queryInformation pragma message.
Leaving the code like this might cause crashes.
Implement a proper scheduler in a single thread.

Support for aemxml files

la_avdecc should be able to load and parse aemxml files to generate the corresponding AEM tree.

Possible loss of dynamic state tracking

For a device having 2 AVB_INTERFACEs, only one being plugged to the same network than the controller at a given time.
Quickly unplugging this interface, then plugging the other one to the network will cause the controller to detect the new interface, but due to the timeout delay before the original one is discarded, we might have lost some unsolicited (like LINK_UP/LINK_DOWN for example) and possibly other dynamic state.

In this case the controller should detect that the original interface has been unplugged and simulate an offline/online.
An improvement should be to check the time between when the new interface was discovered and when the original one timed out. If that time is greater than the valid_time, no need to reenumerate.

64 bits compilation error

gen_cmake.sh should use "Visual Studio 15 2017 Win64" instead of "Visual Studio 14 2015 Win64" generator for 64 bits.

Properly handle NOT_AUTHENTICATED status

READ_DESCRIPTOR for example can return this status code.
Descriptor information should be optional (in case we don't want the controller to enumerate the full model, or in case it's protected by authentication).

Unsolicited notification loss detection

Implement the unsolicited notification loss algorithm (only for Milan devices):

  • For a first version, call a deregisterUnsolicitedNotification
  • In the deregisterUnsolicitedNotificationResult handler, don't forget to call updateUnsolicitedNotificationsSubscription()

Forward protocol errors to the controller

Forward all detected protocol/unpacking errors up to the controller (all the messages logged when such an error occurs), so the controller library can flag the device as either not fully IEEE compliant or misbehaving.

[macOS] ControllerEntity is not receiving ControllerAvailable commands

When la::avdecc::entity::ControllerEntity acquired an entity and another controller is trying to acquire, the library do not receive the ControllerAvailable message when using macOSNative ProtocolInterface (fine using pcap).
This causes the other controller to successfully acquire the entity.

Handle the case where ACMP Disconnect fails with a "not connected" error

If the connection state is out of sync (for example, where sending an ACMP disconnect that times out, but was actually correctly processed by the talker and the listener), subsequent tentative to disconnect will cause an error status "Not connected". In this case, update the connection state.

This was supposed to be handled, but it looks like it's not always the case.

Add a new "Milan" Layer to the Logger

Add a new layer than would receive all the warnings for non-milan compatible devices.
The layer should receive the entityID and the Milan Clause involved (a string).

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.