From e4d3aadc785c5f1642c4d2311edf0fc56572292c Mon Sep 17 00:00:00 2001 From: Brant Thomsen Date: Fri, 13 Jan 2017 16:46:31 -0700 Subject: AVDECC initialization fixes Version information specific to AVDECC Parses the supplied .INI files for stream information Fixes to use the specified network interface --- .../avdecc/openavb_avdecc_read_ini_pub.h | 119 +++++++++++++++++++++ 1 file changed, 119 insertions(+) create mode 100644 lib/avtp_pipeline/avdecc/openavb_avdecc_read_ini_pub.h (limited to 'lib/avtp_pipeline/avdecc/openavb_avdecc_read_ini_pub.h') diff --git a/lib/avtp_pipeline/avdecc/openavb_avdecc_read_ini_pub.h b/lib/avtp_pipeline/avdecc/openavb_avdecc_read_ini_pub.h new file mode 100644 index 00000000..93ec78a3 --- /dev/null +++ b/lib/avtp_pipeline/avdecc/openavb_avdecc_read_ini_pub.h @@ -0,0 +1,119 @@ +/************************************************************************************************************* +Copyright (c) 2012-2017, Harman International Industries, Incorporated +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS LISTED "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS LISTED BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Attributions: The inih library portion of the source code is licensed from +Brush Technology and Ben Hoyt - Copyright (c) 2009, Brush Technology and Copyright (c) 2009, Ben Hoyt. +Complete license and copyright information can be found at +https://github.com/benhoyt/inih/commit/74d2ca064fb293bc60a77b0bd068075b293cf175. +*************************************************************************************************************/ + +/* +* HEADER SUMMARY : AVDECC Read INI Public Interface +*/ + +#ifndef OPENAVB_AVDECC_READ_INI_PUB_H +#define OPENAVB_AVDECC_READ_INI_PUB_H 1 + +#include "openavb_types_pub.h" +#include "openavb_mediaq_pub.h" +//#include "openavb_map_pub.h" +//#include "openavb_intf_pub.h" +#include "openavb_avtp_time_pub.h" + +/** \file + * AVDECC Read INI Public Interface. + */ + +/// Structure containing configuration of the host +struct openavb_tl_data_cfg { + struct openavb_tl_data_cfg *next; + + /// Role of the host + avb_role_t role; + /// MAC address of destination - multicast (talker only if SRP is enabled) + cfg_mac_t dest_addr; + /// MAC address of the source + cfg_mac_t stream_addr; + /// Stream UID (has to be unique) + S32 stream_uid; + /// Maximum number of packets sent during one interval (talker only) + U32 max_interval_frames; + /// Maximum size of the frame + U32 max_frame_size; + /// Setting maximum transit time, on talker value is added to PTP Walltime, + /// on listener value is validated timestamp range + U32 max_transit_usec; + /// Maximum transmit deficit in usec - should be set to expected buffer size + /// on the listener side (talker only) + U32 max_transmit_deficit_usec; + /// Specify manual an internal latency (talker only) + U32 internal_latency; + /// Number of microseconds after which late MediaQItem will be purged as too + /// old (listener only) + U32 max_stale; + /// Number of intervals to handle at once (talker only) + U32 batch_factor; + /// Statistics reporting frequency + U32 report_seconds; + /// Start paused + bool start_paused; + /// Class in which host will operate ::SRClassIdx_t (talker only) + U8 sr_class; + /// Rank of the stream #SR_RANK_REGULAR or #SR_RANK_EMERGENCY (talker only) + U8 sr_rank; + /// Number of raw TX buffers that should be used (talker only) + U32 raw_tx_buffers; + /// Number of raw RX buffers (listener only) + U32 raw_rx_buffers; + /// Is the interface module blocking in the TX CB. + bool tx_blocking_in_intf; + /// VLAN ID + U16 vlan_id; + /// When set incoming packets will trigger a signal to the stream task to wakeup. + bool rx_signal_mode; + /// Enable fixed timestamping in interface + U32 fixed_timestamp; + /// Bit mask used for CPU pinning + U32 thread_affinity; + /// Real time priority of thread. + U32 thread_rt_priority; +}; + +typedef struct openavb_tl_data_cfg openavb_tl_data_cfg_t; + + +/** Read an ini file. + * + * Parses an input configuration file to populate configuration structures, and + * name value pairs. Only used in Operating Systems that have a file system + * + * \param fileName Pointer to configuration file name + * \param pCfg Pointer to configuration structure + * \return TRUE on success or FALSE on failure + * + * \warning Not available on all platforms + */ +bool openavbReadTlDataIniFile(const char *fileName, openavb_tl_data_cfg_t *pCfg); + +#endif // OPENAVB_AVDECC_READ_INI_PUB_H -- cgit v1.2.1 From 6b8b4140d58b8d4b6733cf992af70a719cbc3ac6 Mon Sep 17 00:00:00 2001 From: Srinath Arunachalam Date: Mon, 6 Feb 2017 18:44:43 -0700 Subject: Added descriptors for AUDIO_UNIT, STREAM_INPUT and STREAM_OUTPUT --- lib/avtp_pipeline/avdecc/openavb_avdecc_read_ini_pub.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'lib/avtp_pipeline/avdecc/openavb_avdecc_read_ini_pub.h') diff --git a/lib/avtp_pipeline/avdecc/openavb_avdecc_read_ini_pub.h b/lib/avtp_pipeline/avdecc/openavb_avdecc_read_ini_pub.h index 93ec78a3..8a5e63a0 100644 --- a/lib/avtp_pipeline/avdecc/openavb_avdecc_read_ini_pub.h +++ b/lib/avtp_pipeline/avdecc/openavb_avdecc_read_ini_pub.h @@ -41,6 +41,8 @@ https://github.com/benhoyt/inih/commit/74d2ca064fb293bc60a77b0bd068075b293cf175. //#include "openavb_intf_pub.h" #include "openavb_avtp_time_pub.h" +#define MAX_SAMPLING_RATES_COUNT 91 + /** \file * AVDECC Read INI Public Interface. */ @@ -98,6 +100,14 @@ struct openavb_tl_data_cfg { U32 thread_affinity; /// Real time priority of thread. U32 thread_rt_priority; + /// The current sample rate of this Audio Unit + U32 current_sampling_rate; + /// The number of sample rates in the sampling_rates field. + U16 sampling_rates_count; + /// An array of 4-octet sample rates supported by this Audio Unit + U32 sampling_rates[MAX_SAMPLING_RATES_COUNT]; + /// The name of the initialize function in the mapper + char map_fn[100]; }; typedef struct openavb_tl_data_cfg openavb_tl_data_cfg_t; -- cgit v1.2.1 From 765ae3e2d544af71c828415ab1f7bdeece866b71 Mon Sep 17 00:00:00 2001 From: Brant Thomsen Date: Thu, 9 Feb 2017 13:42:28 -0700 Subject: stream_uid is consistently unsigned and 16 bits in size. Changed the stream_uid references so they all treat it as an unsigned value, and not as a 32-bit value. Changes to make the .INI values read in more consistent between AVDECC and avtp_pipeline. --- lib/avtp_pipeline/avdecc/openavb_avdecc_read_ini_pub.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/avtp_pipeline/avdecc/openavb_avdecc_read_ini_pub.h') diff --git a/lib/avtp_pipeline/avdecc/openavb_avdecc_read_ini_pub.h b/lib/avtp_pipeline/avdecc/openavb_avdecc_read_ini_pub.h index 8a5e63a0..1385640a 100644 --- a/lib/avtp_pipeline/avdecc/openavb_avdecc_read_ini_pub.h +++ b/lib/avtp_pipeline/avdecc/openavb_avdecc_read_ini_pub.h @@ -58,7 +58,7 @@ struct openavb_tl_data_cfg { /// MAC address of the source cfg_mac_t stream_addr; /// Stream UID (has to be unique) - S32 stream_uid; + U16 stream_uid; /// Maximum number of packets sent during one interval (talker only) U32 max_interval_frames; /// Maximum size of the frame -- cgit v1.2.1 From 40588372bd6720fef754087a190da9fe1e3ce1ee Mon Sep 17 00:00:00 2001 From: Brant Thomsen Date: Wed, 15 Feb 2017 10:56:27 -0700 Subject: INI file parsing updates Ignore Class A and Class B for listeners, as it is not specified. Record the intf_nv_audio_rate, intf_nv_audio_bit_depth, and intf_nv_channels for reference. Use the intf_nv_audio_rate value to specify the current_sampling_rate, if not specified. Abort parsing the .INI file if an error is found. Added more error messages if issues found parsing the .INI file. --- lib/avtp_pipeline/avdecc/openavb_avdecc_read_ini_pub.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib/avtp_pipeline/avdecc/openavb_avdecc_read_ini_pub.h') diff --git a/lib/avtp_pipeline/avdecc/openavb_avdecc_read_ini_pub.h b/lib/avtp_pipeline/avdecc/openavb_avdecc_read_ini_pub.h index 1385640a..3646a514 100644 --- a/lib/avtp_pipeline/avdecc/openavb_avdecc_read_ini_pub.h +++ b/lib/avtp_pipeline/avdecc/openavb_avdecc_read_ini_pub.h @@ -106,6 +106,12 @@ struct openavb_tl_data_cfg { U16 sampling_rates_count; /// An array of 4-octet sample rates supported by this Audio Unit U32 sampling_rates[MAX_SAMPLING_RATES_COUNT]; + // intf_nv_audio_rate + U16 audioRate; + // intf_nv_audio_bit_depth + U8 audioBitDepth; + // intf_nv_channels + U8 audioChannels; /// The name of the initialize function in the mapper char map_fn[100]; }; -- cgit v1.2.1 From a06a8e1cd13fada15a2365f31cfdebdeac32f26b Mon Sep 17 00:00:00 2001 From: Brant Thomsen Date: Tue, 28 Feb 2017 13:48:43 -0700 Subject: Additional code to connect Listener and AVDECC server. Changed socketHandle refereces to avdeccMsgHandle for consistency. Client code added to Start & Stop, and return the current playing state. --- lib/avtp_pipeline/avdecc/openavb_avdecc_read_ini_pub.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lib/avtp_pipeline/avdecc/openavb_avdecc_read_ini_pub.h') diff --git a/lib/avtp_pipeline/avdecc/openavb_avdecc_read_ini_pub.h b/lib/avtp_pipeline/avdecc/openavb_avdecc_read_ini_pub.h index 3646a514..1d72ff9f 100644 --- a/lib/avtp_pipeline/avdecc/openavb_avdecc_read_ini_pub.h +++ b/lib/avtp_pipeline/avdecc/openavb_avdecc_read_ini_pub.h @@ -47,6 +47,9 @@ https://github.com/benhoyt/inih/commit/74d2ca064fb293bc60a77b0bd068075b293cf175. * AVDECC Read INI Public Interface. */ +struct _avdecc_msg_state; +typedef struct _avdecc_msg_state avdecc_msg_state_t; + /// Structure containing configuration of the host struct openavb_tl_data_cfg { struct openavb_tl_data_cfg *next; @@ -114,6 +117,10 @@ struct openavb_tl_data_cfg { U8 audioChannels; /// The name of the initialize function in the mapper char map_fn[100]; + + // Pointer to the client Talker/Listener. + // Do not free this item; it is for reference only. + const avdecc_msg_state_t * client; }; typedef struct openavb_tl_data_cfg openavb_tl_data_cfg_t; -- cgit v1.2.1 From 628a982a86f386446227faf1f5447134488c3dfe Mon Sep 17 00:00:00 2001 From: Brant Thomsen Date: Wed, 8 Mar 2017 16:04:46 -0700 Subject: Client uses .INI file name to connect to AVDECC server The client is now using a "friendly_name" that defaults to the name of the .INI file to associate with the server. This will make it easier once hard-wired information (Talker MAC, Stream ID, etc.) is removed or not specified in the .INI file. Added changes to openavbAvdeccMsgClntNotifyCurrentState() to abort failed searches earlier. --- lib/avtp_pipeline/avdecc/openavb_avdecc_read_ini_pub.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'lib/avtp_pipeline/avdecc/openavb_avdecc_read_ini_pub.h') diff --git a/lib/avtp_pipeline/avdecc/openavb_avdecc_read_ini_pub.h b/lib/avtp_pipeline/avdecc/openavb_avdecc_read_ini_pub.h index 1d72ff9f..a3ff84cb 100644 --- a/lib/avtp_pipeline/avdecc/openavb_avdecc_read_ini_pub.h +++ b/lib/avtp_pipeline/avdecc/openavb_avdecc_read_ini_pub.h @@ -50,6 +50,9 @@ https://github.com/benhoyt/inih/commit/74d2ca064fb293bc60a77b0bd068075b293cf175. struct _avdecc_msg_state; typedef struct _avdecc_msg_state avdecc_msg_state_t; +/// Maximum size of the friendly name +#define FRIENDLY_NAME_SIZE 64 + /// Structure containing configuration of the host struct openavb_tl_data_cfg { struct openavb_tl_data_cfg *next; @@ -109,12 +112,14 @@ struct openavb_tl_data_cfg { U16 sampling_rates_count; /// An array of 4-octet sample rates supported by this Audio Unit U32 sampling_rates[MAX_SAMPLING_RATES_COUNT]; - // intf_nv_audio_rate + /// intf_nv_audio_rate U16 audioRate; - // intf_nv_audio_bit_depth + /// intf_nv_audio_bit_depth U8 audioBitDepth; - // intf_nv_channels + /// intf_nv_channels U8 audioChannels; + /// Friendly name for this configuration + char friendly_name[FRIENDLY_NAME_SIZE]; /// The name of the initialize function in the mapper char map_fn[100]; -- cgit v1.2.1 From 929eebb01d72e16705d4f416aedbd22d92ea83bd Mon Sep 17 00:00:00 2001 From: Brant Thomsen Date: Thu, 6 Apr 2017 14:30:08 -0600 Subject: Added "initial_state" .ini file value to specify initial client state --- lib/avtp_pipeline/avdecc/openavb_avdecc_read_ini_pub.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/avtp_pipeline/avdecc/openavb_avdecc_read_ini_pub.h') diff --git a/lib/avtp_pipeline/avdecc/openavb_avdecc_read_ini_pub.h b/lib/avtp_pipeline/avdecc/openavb_avdecc_read_ini_pub.h index a3ff84cb..fd1d2d69 100644 --- a/lib/avtp_pipeline/avdecc/openavb_avdecc_read_ini_pub.h +++ b/lib/avtp_pipeline/avdecc/openavb_avdecc_read_ini_pub.h @@ -37,9 +37,8 @@ https://github.com/benhoyt/inih/commit/74d2ca064fb293bc60a77b0bd068075b293cf175. #include "openavb_types_pub.h" #include "openavb_mediaq_pub.h" -//#include "openavb_map_pub.h" -//#include "openavb_intf_pub.h" #include "openavb_avtp_time_pub.h" +#include "openavb_tl_pub.h" #define MAX_SAMPLING_RATES_COUNT 91 @@ -59,6 +58,8 @@ struct openavb_tl_data_cfg { /// Role of the host avb_role_t role; + /// Initial Talker/Listener state + tl_init_state_t initial_state; /// MAC address of destination - multicast (talker only if SRP is enabled) cfg_mac_t dest_addr; /// MAC address of the source -- cgit v1.2.1 From b1db144a353403b1d5832edbab76143159278fbb Mon Sep 17 00:00:00 2001 From: Levi Pearson Date: Tue, 2 May 2017 13:42:49 -0600 Subject: Enable fixed_timestamp usage with intf_alsa for good timestamps This decouples the scheduling changes formerly associated with fixed_timestamp mode; this is now the spin_wait option. It also enables fixed_timestamp usage with the alsa_intf module. The mcs module is now more finely configurable as well, and is set up for future measurement and correction, but right now it stays with the ns-per-tick and correction amount/interval values it's given at init. The alsa_intf has a new config parameter, intf_nv_clock_skew_ppb, which accepts a signed integer describing the amount of skew to apply. Currently you'll get an info-level display every second showing the difference between the wall clock and the synthesized media clock time; you'll need to adjust the skew config parameter until this stays relatively constant. The alsa_intf init function for Tx mode also starts the alsa capture during init instead of waiting for the first read, which messed up the observation interval scheduling. --- lib/avtp_pipeline/avdecc/openavb_avdecc_read_ini_pub.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/avtp_pipeline/avdecc/openavb_avdecc_read_ini_pub.h') diff --git a/lib/avtp_pipeline/avdecc/openavb_avdecc_read_ini_pub.h b/lib/avtp_pipeline/avdecc/openavb_avdecc_read_ini_pub.h index fd1d2d69..0509129e 100644 --- a/lib/avtp_pipeline/avdecc/openavb_avdecc_read_ini_pub.h +++ b/lib/avtp_pipeline/avdecc/openavb_avdecc_read_ini_pub.h @@ -103,6 +103,8 @@ struct openavb_tl_data_cfg { bool rx_signal_mode; /// Enable fixed timestamping in interface U32 fixed_timestamp; + /// Wait for next observation interval by spinning rather than sleeping + bool spin_wait; /// Bit mask used for CPU pinning U32 thread_affinity; /// Real time priority of thread. -- cgit v1.2.1 From ad73232c1719b9c6c75eb2537aa3ec7fd700e79f Mon Sep 17 00:00:00 2001 From: Brant Thomsen Date: Mon, 22 May 2017 16:39:39 -0600 Subject: Upgraded to the Symphony Teleca/Harman International license. --- lib/avtp_pipeline/avdecc/openavb_avdecc_read_ini_pub.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/avtp_pipeline/avdecc/openavb_avdecc_read_ini_pub.h') diff --git a/lib/avtp_pipeline/avdecc/openavb_avdecc_read_ini_pub.h b/lib/avtp_pipeline/avdecc/openavb_avdecc_read_ini_pub.h index 0509129e..3cf778e6 100644 --- a/lib/avtp_pipeline/avdecc/openavb_avdecc_read_ini_pub.h +++ b/lib/avtp_pipeline/avdecc/openavb_avdecc_read_ini_pub.h @@ -1,5 +1,6 @@ /************************************************************************************************************* -Copyright (c) 2012-2017, Harman International Industries, Incorporated +Copyright (c) 2012-2015, Symphony Teleca Corporation, a Harman International Industries, Incorporated company +Copyright (c) 2016-2017, Harman International Industries, Incorporated All rights reserved. Redistribution and use in source and binary forms, with or without -- cgit v1.2.1 From 8f3cb7e74b147a2c27efd4c81ad36b836640ae51 Mon Sep 17 00:00:00 2001 From: Brant Thomsen Date: Mon, 3 Jul 2017 16:52:41 -0600 Subject: Added ACMP saved state support When the AVTP Pipeline with AVDECC support is told by the controller to run as a Listener, the connection information is saved to avdecc_save.ini. The saved state information is deleted when the connection is closed by the AVDECC controller. This will allow for future fast connect support that can used the saved state when AVDECC is initialized. --- .../avdecc/openavb_avdecc_read_ini_pub.h | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'lib/avtp_pipeline/avdecc/openavb_avdecc_read_ini_pub.h') diff --git a/lib/avtp_pipeline/avdecc/openavb_avdecc_read_ini_pub.h b/lib/avtp_pipeline/avdecc/openavb_avdecc_read_ini_pub.h index 3cf778e6..ca082ac1 100644 --- a/lib/avtp_pipeline/avdecc/openavb_avdecc_read_ini_pub.h +++ b/lib/avtp_pipeline/avdecc/openavb_avdecc_read_ini_pub.h @@ -148,4 +148,32 @@ typedef struct openavb_tl_data_cfg openavb_tl_data_cfg_t; */ bool openavbReadTlDataIniFile(const char *fileName, openavb_tl_data_cfg_t *pCfg); + +/** Save the connection to the saved state + * + * If fast connect support is enabled, this function is used to save the state + * of the connection by a Listener when a connection is successfully made to + * a Talker for possible fast connect support later. + * #openavbAvdeccClearSavedState() should be called when the connection is closed. + * + * \param pListener Pointer to configuration for the Listener + * \param talker_entity_id The binary entity id for the Talker + * \param controller_entity_id The binary entity id for the Controller that initiated the connection + * + * \return TRUE on success or FALSE on failure + */ +bool openavbAvdeccSaveState(const openavb_tl_data_cfg_t *pListener, const U8 talker_entity_id[8], const U8 controller_entity_id[8]); + +/** Delete a connection with saved state + * + * If fast connect support is enabled, this function is used to clear previously + * saved state information (from a previous call to #openavbAvdeccSaveState). + * This function should be called from the Listener when a Talker/Listener connection is closed. + * + * \param pListener Pointer to configuration for the Listener + * + * \return TRUE on success or FALSE on failure + */ +bool openavbAvdeccClearSavedState(const openavb_tl_data_cfg_t *pListener); + #endif // OPENAVB_AVDECC_READ_INI_PUB_H -- cgit v1.2.1 From dde71783cbe195b8c77a082c14a144e4eb961516 Mon Sep 17 00:00:00 2001 From: Brant Thomsen Date: Thu, 6 Jul 2017 10:05:03 -0600 Subject: Initial Fast Connect Support Saves additional information (flags and talker_unique_id) needed to support fast connect. SAVED_STATE flag set during the initial connection. Fast Connect is attempted if there is saved state for the Listener when it connects to the AVDECC app. Second timeout to Talker on Fast Connect (as defined in IEEE 1722.1-2013 Clause 8.2.2.1.1) still needs to be implemented. --- .../avdecc/openavb_avdecc_read_ini_pub.h | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'lib/avtp_pipeline/avdecc/openavb_avdecc_read_ini_pub.h') diff --git a/lib/avtp_pipeline/avdecc/openavb_avdecc_read_ini_pub.h b/lib/avtp_pipeline/avdecc/openavb_avdecc_read_ini_pub.h index ca082ac1..50f8330d 100644 --- a/lib/avtp_pipeline/avdecc/openavb_avdecc_read_ini_pub.h +++ b/lib/avtp_pipeline/avdecc/openavb_avdecc_read_ini_pub.h @@ -157,12 +157,14 @@ bool openavbReadTlDataIniFile(const char *fileName, openavb_tl_data_cfg_t *pCfg) * #openavbAvdeccClearSavedState() should be called when the connection is closed. * * \param pListener Pointer to configuration for the Listener + * \param flags The flags used for the connection (CLASS_B, SUPPORTS_ENCRYPTED, ENCRYPTED_PDU) + * \param talker_unique_id The unique id for the Talker * \param talker_entity_id The binary entity id for the Talker * \param controller_entity_id The binary entity id for the Controller that initiated the connection * * \return TRUE on success or FALSE on failure */ -bool openavbAvdeccSaveState(const openavb_tl_data_cfg_t *pListener, const U8 talker_entity_id[8], const U8 controller_entity_id[8]); +bool openavbAvdeccSaveState(const openavb_tl_data_cfg_t *pListener, U16 flags, U16 talker_unique_id, const U8 talker_entity_id[8], const U8 controller_entity_id[8]); /** Delete a connection with saved state * @@ -176,4 +178,19 @@ bool openavbAvdeccSaveState(const openavb_tl_data_cfg_t *pListener, const U8 tal */ bool openavbAvdeccClearSavedState(const openavb_tl_data_cfg_t *pListener); +/** Determine if the connection as a saved state + * + * If fast connect support is enabled, this function is used to get the last + * saved state (from a call to #openavbAvdeccSaveState) for a Listener, if any. + * + * \param pListener Pointer to configuration for the Listener + * \param p_flags Optional pointer to the flags used for the connection (CLASS_B, SUPPORTS_ENCRYPTED, ENCRYPTED_PDU) + * \param p_talker_unique_id Optional pointer to the unique id for the Talker + * \param p_talker_entity_id Optional pointer to the buffer to fill in the binary entity id for the Talker + * \param p_controller_entity_id Optional pointer to the buffer to fill in the binary entity id for the Controller that initiated the connection + * + * \return TRUE if there is a saved state, or FALSE otherwise + */ +bool openavbAvdeccSaveStateInfo(const openavb_tl_data_cfg_t *pListener, U16 *p_flags, U16 *p_talker_unique_id, U8 (*p_talker_entity_id)[8], U8 (*p_controller_entity_id)[8]); + #endif // OPENAVB_AVDECC_READ_INI_PUB_H -- cgit v1.2.1 From 0a6f93c857bd0be87d3c80b94b29c53ed645103c Mon Sep 17 00:00:00 2001 From: Brant Thomsen Date: Fri, 7 Jul 2017 11:21:08 -0600 Subject: Made a comment more clear Added CONNECT_RX_COMMAND and CONNECT_TX_RESPONSE to TODO to make intent more clear. Also fixed two spelling errors in comments. --- lib/avtp_pipeline/avdecc/openavb_avdecc_read_ini_pub.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/avtp_pipeline/avdecc/openavb_avdecc_read_ini_pub.h') diff --git a/lib/avtp_pipeline/avdecc/openavb_avdecc_read_ini_pub.h b/lib/avtp_pipeline/avdecc/openavb_avdecc_read_ini_pub.h index 50f8330d..a8587c92 100644 --- a/lib/avtp_pipeline/avdecc/openavb_avdecc_read_ini_pub.h +++ b/lib/avtp_pipeline/avdecc/openavb_avdecc_read_ini_pub.h @@ -178,7 +178,7 @@ bool openavbAvdeccSaveState(const openavb_tl_data_cfg_t *pListener, U16 flags, U */ bool openavbAvdeccClearSavedState(const openavb_tl_data_cfg_t *pListener); -/** Determine if the connection as a saved state +/** Determine if the connection has a saved state * * If fast connect support is enabled, this function is used to get the last * saved state (from a call to #openavbAvdeccSaveState) for a Listener, if any. -- cgit v1.2.1 From ef7ac5942b557839f0146028eac68ca0f588eb61 Mon Sep 17 00:00:00 2001 From: Brant Thomsen Date: Fri, 7 Jul 2017 16:31:31 -0600 Subject: Fast connect retried if Talker is discovered If the initial fast connect attempt has timed out, watch for ENTITY_AVAILABLE discovery PDUs to indicate that the Talker is now available. Reattempt the fast connect to the Talker once an appropriate PDU is detected. Keeps track of the fast connect status in the openavb_aem_descriptor_stream_io_t descriptor, for easy access. Renamed openavbAvdeccSaveStateInfo() to openavbAvdeccGetSaveStateInfo() to make the purpose more clear. --- lib/avtp_pipeline/avdecc/openavb_avdecc_read_ini_pub.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/avtp_pipeline/avdecc/openavb_avdecc_read_ini_pub.h') diff --git a/lib/avtp_pipeline/avdecc/openavb_avdecc_read_ini_pub.h b/lib/avtp_pipeline/avdecc/openavb_avdecc_read_ini_pub.h index a8587c92..5c71d5b7 100644 --- a/lib/avtp_pipeline/avdecc/openavb_avdecc_read_ini_pub.h +++ b/lib/avtp_pipeline/avdecc/openavb_avdecc_read_ini_pub.h @@ -170,7 +170,8 @@ bool openavbAvdeccSaveState(const openavb_tl_data_cfg_t *pListener, U16 flags, U * * If fast connect support is enabled, this function is used to clear previously * saved state information (from a previous call to #openavbAvdeccSaveState). - * This function should be called from the Listener when a Talker/Listener connection is closed. + * This function should be called from the Listener when a Talker/Listener connection is closed + * (and fast connects should no longer be attempted in the future). * * \param pListener Pointer to configuration for the Listener * @@ -191,6 +192,6 @@ bool openavbAvdeccClearSavedState(const openavb_tl_data_cfg_t *pListener); * * \return TRUE if there is a saved state, or FALSE otherwise */ -bool openavbAvdeccSaveStateInfo(const openavb_tl_data_cfg_t *pListener, U16 *p_flags, U16 *p_talker_unique_id, U8 (*p_talker_entity_id)[8], U8 (*p_controller_entity_id)[8]); +bool openavbAvdeccGetSaveStateInfo(const openavb_tl_data_cfg_t *pListener, U16 *p_flags, U16 *p_talker_unique_id, U8 (*p_talker_entity_id)[8], U8 (*p_controller_entity_id)[8]); #endif // OPENAVB_AVDECC_READ_INI_PUB_H -- cgit v1.2.1