Open-AVB AVTP Pipeline SDK
1.4
|
Talker Listener Public Interface. More...
#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"
Go to the source code of this file.
Data Structures | |
struct | openavb_tl_cfg_t |
Structure containing configuration of the host. More... | |
struct | openavb_tl_cfg_name_value_t |
Structure holding configuration of mapping and interface modules. More... | |
Macros | |
#define | MAX_LIB_CFG_ITEMS 64 |
Maximum number of configuration parameters inside INI file a host can have. | |
#define | IFNAMSIZE 16 |
Maximum size of interface name. | |
Typedefs | |
typedef void * | tl_handle_t |
Handle to a single talker or listener. | |
Enumerations | |
enum | tl_stat_t { TL_STAT_TX_CALLS, TL_STAT_TX_FRAMES, TL_STAT_TX_LATE, TL_STAT_TX_BYTES, TL_STAT_RX_CALLS, TL_STAT_RX_FRAMES, TL_STAT_RX_LOST, TL_STAT_RX_BYTES } |
Types of statistics gathered. More... | |
Functions | |
bool | openavbTLInitialize (U32 maxTL) |
Initialize the talker listener library. More... | |
bool | openavbTLCleanup (void) |
Final cleanup of the talker listener library. More... | |
bool | openavbGetVersion (U8 *major, U8 *minor, U8 *revision) |
Get the version of the AVB stack. More... | |
tl_handle_t | openavbTLOpen (void) |
Open a talker or listener. More... | |
void | openavbTLInitCfg (openavb_tl_cfg_t *pCfg) |
Initialize the configuration to default values. More... | |
bool | openavbTLConfigure (tl_handle_t handle, openavb_tl_cfg_t *pCfg, openavb_tl_cfg_name_value_t *pNVCfg) |
Configure the talker / listener. More... | |
bool | openavbTLRun (tl_handle_t handle) |
Run the talker or listener. More... | |
bool | openavbTLStop (tl_handle_t handle) |
Stop a single talker or listener. More... | |
void | openavbTLPauseStream (tl_handle_t handle, bool bPause) |
Pause or resume as stream. More... | |
bool | openavbTLClose (tl_handle_t handle) |
Close the talker or listener. More... | |
void * | openavbTLGetIntfHostCBList (tl_handle_t handle) |
Get a pointer to a list of interfaces module callbacks. More... | |
void * | openavbTLGetIntfHandle (tl_handle_t handle) |
Get a handle to the interface module data from this talker or listener. More... | |
bool | openavbTLIsRunning (tl_handle_t handle) |
Check if a talker or listener is running. More... | |
bool | openavbTLIsConnected (tl_handle_t handle) |
Checks if a talker or listener is connected to the endpoint. More... | |
bool | openavbTLIsStreaming (tl_handle_t handle) |
Checks if a talker or listener has an open stream. More... | |
avb_role_t | openavbTLGetRole (tl_handle_t handle) |
Return the role of the current stream handle. More... | |
U64 | openavbTLStat (tl_handle_t handle, tl_stat_t stat) |
Allows pulling current stat counters for a running stream. More... | |
bool | openavbTLReadIniFileOsal (tl_handle_t TLhandle, const char *fileName, openavb_tl_cfg_t *pCfg, openavb_tl_cfg_name_value_t *pNVCfg) |
Read an ini file. More... | |
Talker Listener Public Interface.
enum tl_stat_t |
Types of statistics gathered.
bool openavbTLInitialize | ( | U32 | maxTL | ) |
Initialize the talker listener library.
This function must be called first before any other in the openavb_tl API. Any AVTP wide initialization occurs at this point
maxTL | The maximum number of talkers and listeners that will be started |
bool openavbTLCleanup | ( | void | ) |
Final cleanup of the talker listener library.
This function must be called last after all talkers and listeners have been closed
Get the version of the AVB stack.
Fills the major, minor and revision parameters with the values version information of the AVB stack
major | The major part of the version number |
minor | The minor part of the version number |
revision | The revision part of the version number |
tl_handle_t openavbTLOpen | ( | void | ) |
Open a talker or listener.
This will create a talker / listener
void openavbTLInitCfg | ( | openavb_tl_cfg_t * | pCfg | ) |
Initialize the configuration to default values.
Initializes configuration file to default values
pCfg | Pointer to configuration structure |
bool openavbTLConfigure | ( | tl_handle_t | handle, |
openavb_tl_cfg_t * | pCfg, | ||
openavb_tl_cfg_name_value_t * | pNVCfg | ||
) |
Configure the talker / listener.
Configures talker/listener with configuration values from configuration structure and name value pairs
handle | Handle of talker/listener |
pCfg | Pointer to configuration structure |
pNVCfg | Pointer to name value pair configuration structure |
bool openavbTLRun | ( | tl_handle_t | handle | ) |
Run the talker or listener.
The talker or listener indicated by handle that was previously loaded with the openavbTLOpen() function will be run. The stream will be opened at this time. Two threads created, one for endpoint IPC and one for stream handling.
handle | The handle return from openavbTLOpen() |
bool openavbTLStop | ( | tl_handle_t | handle | ) |
Stop a single talker or listener.
Stop a single talker or listener. At this point data will not be sent or recieved
handle | The handle return from openavbTLOpen() |
void openavbTLPauseStream | ( | tl_handle_t | handle, |
bool | bPause | ||
) |
Pause or resume as stream.
A paused stream will do everything except will toss both tx and rx packets
handle | The handle return from openavbTLOpen() |
bPause | TRUE to pause, FALSE to resume |
bool openavbTLClose | ( | tl_handle_t | handle | ) |
Close the talker or listener.
The talker or listener indicated by handle that was previously loaded with the openavbTLOpen() function will be closed. The stream will be shutdown at this time and the threads created for this talker or listener will be killed
handle | The handle return from openavbTLOpen() |
void* openavbTLGetIntfHostCBList | ( | tl_handle_t | handle | ) |
Get a pointer to a list of interfaces module callbacks.
In cases where a host application needs to call directly into an interface module it is preferable to do so with the APIs supplied in this SDK. This will allow passing back into the interface module a handle to its data. This handle is the value returned from openavbTLGetIntfHandle()
handle | The handle return from openavbTLOpen() |
void* openavbTLGetIntfHandle | ( | tl_handle_t | handle | ) |
Get a handle to the interface module data from this talker or listener.
Returns a handle to the interface module data. This handle will be used in call backs into the interface module from the host application and allows the interface module to associate the call back with the correct talker / listener (stream)
handle | The handle return from openavbTLOpen() |
bool openavbTLIsRunning | ( | tl_handle_t | handle | ) |
Check if a talker or listener is running.
Checks if the talker or listener indicated by handle is running. The running status will be true after calling openavbTLRun()
handle | The handle return from openavbTLOpen() |
bool openavbTLIsConnected | ( | tl_handle_t | handle | ) |
Checks if a talker or listener is connected to the endpoint.
Checks if the talker or listener indicated by handle is connected to the endpoint process
handle | The handle return from openavbTLOpen() |
bool openavbTLIsStreaming | ( | tl_handle_t | handle | ) |
Checks if a talker or listener has an open stream.
Checks if the talker or listener indicated by handle has an open stream
handle | The handle return from openavbTLOpen() |
avb_role_t openavbTLGetRole | ( | tl_handle_t | handle | ) |
Return the role of the current stream handle.
Returns if the current open stream is a talker or listener
handle | The handle return from openavbTLOpen() |
U64 openavbTLStat | ( | tl_handle_t | handle, |
tl_stat_t | stat | ||
) |
Allows pulling current stat counters for a running stream.
The various stat counters for a stream can be retrieved with this function
handle | The handle return from openavbTLOpen() |
stat | Which stat to retrieve |
bool openavbTLReadIniFileOsal | ( | tl_handle_t | TLhandle, |
const char * | fileName, | ||
openavb_tl_cfg_t * | pCfg, | ||
openavb_tl_cfg_name_value_t * | pNVCfg | ||
) |
Read an ini file.
Parses an input configuration file tp populate configuration structures, and name value pairs. Only used in Operating Systems that have a file system
TLhandle | Pointer to handle of talker/listener |
fileName | Pointer to configuration file name |
pCfg | Pointer to configuration structure |
pNVCfg | Pointer to name value pair configuration structure |