AVB Status Report Type.
This type is returned by avb_periodic(), avb_srp_process_packet() and avb_1722_maap_process_packet(). and indicates any change in state of the AVB system.
Enum Values:
- AVB_NO_STATUS¶
-1No status to report.
- AVB_SRP_OK¶
0Status is ok (no change).
- AVB_SRP_TALKER_ROUTE_FAILED¶
A route from one of the devices sources has failed to reach an intended listener (probably due to lack of bandwidth).
Use avb_srp_get_failed_stream() to find the streamID of the failed stream.
- AVB_SRP_LISTENER_ROUTE_FAILED¶
A route from to one of the devices sinks has failed to reach from an intended talker (probably due to lack of bandwidth).
Use avb_srp_get_failed_stream() to find the streamID of the failed stream.
- AVB_SRP_INDICATION¶
One of the SRP indications has occured.
The stream flags will be marked appropriately.
- AVB_MAAP_ADDRESSES_RESERVED¶
Multicast addresses have been successfully been reserved after a called to avb_1722_maap_request_addresses().
Use avb_1722_maap_get_base_address() or avb_1722_maap_get_offset_address() to access the reserved addresses.
- AVB_MAAP_ADDRESSES_LOST¶
Previously reserved multicast addresses have been lost.
After this event the control thread should disable any streams using MAAP addresses and recall avb_1722_maap_request_addresses()
- AVB_1722_1_OK¶
1722.1 status ok
- AVB_1722_1_ENTITY_ADDED¶
An entity has been added to the database by the discovery protocol.
- AVB_1722_1_ENTITY_REMOVED¶
An entity has been removed from the database by the discovery protocol.
- AVB_1722_1_CONNECT_TALKER¶
A connection management protocol message has been received indicating that a talker component should initiate a connection.
- AVB_1722_1_DISCONNECT_TALKER¶
An SCM message indicates that a talker should release a connection.
- AVB_1722_1_CONNECT_LISTENER¶
An SCM message indicates that a listener should initiate a connection.
- AVB_1722_1_DISCONNECT_LISTENER¶
An SCM message indicates that a listener should release a connection.
Initialize the AVB control thread.
This function initializes the AVB system. It needs to be called in the main user control thread before any other AVB control call. The function takes chanends connected to other parts of the system and registers all of these components.
At this point the sinks, sources and media FIFOs are allocated numbers. The allocation is performed by registering numbers from 0 upwards working through the listener_ctl/talker_ctl/media_ctl arrays. Each component in this array may register several sink/sources/FIFOs. For example, if the listener_ctl array connects to two listener units each registering 3 sinks then the first unit will be allocated sink numbers 0,1,2 and the second 3,4,5.
Note that this call does not start any protocols communicating over the network (e.g. advertising talkers via IEEE 802.1Qat). That is deferred until the call to avb_start().
Parameters: |
|
---|
Start any AVB protocol state machines.
This call starts any AVB protocol state machines running. It should be called after the ethernet link goes up.
Perform AVB periodic processing.
This function performs AVB periodic processing. It should be called from the main control thread at least once each ms. If it returns a state other than AVB_NO_STATUS then it should be called again immediately.
Returns: | A status update from the periodic processing to indicate an event due to a timeout etc. (see avb_status_t) |
---|
Receives an 802.1Qat SRP packet or an IEEE P1722 MAAP packet.
This function receives an AVB control packet from the ethernet MAC. It is selectable so can be used in a select statement as a case.
Parameters: |
|
---|
Process an AVB control packet.
This function processes an ethernet packet and if it is a 802.1Qat or IEEE 1722 MAAP packet will handle it.
This function should always be called on the buffer filled by avb_get_control_packet().
Parameters: |
|
---|---|
Returns: | AVB_SRP_TALKER_ROUTE_FAILED if the incoming packet reports a talker routing failure (i.e. a failure in getting an outgoing stream to its intended listener). AVB_SRP_LISTENER_ROUTE_FAILED if the incoming packet reports a listener routing failure (i.e. a failure in listening to a stream). If the packet causes a previously asked for, or reserved, multicast address range to be no longer available, then AVB_MAAP_ADDRESSES_LOST is returned. |
Check whether a new incoming AVB stream has been detected.
This function checks whether a new IEEE 1722 stream has been detected. A new stream will be detected if an 802.1Qat talker advertise packet is received by the endpoint.
Each new stream seen will be reported once by this function. Internally the AVB system keeps a history up to the size AVB_STREAM_HISTORY_SIZE which has a default value of 128 and can be set in avb_conf.h
Parameters: |
|
---|---|
Returns: | a non-zero value if a new stream is detected, zero otherwise |
Set the endpoint into “legacy mode”.
This function sets the endpoint into “legacy mode” to work with non-AVB switches for testing or demonstration purposes. In this mode the destination address of certain protocols change to become legacy (non-AVB) traffic and the PTP 802.1as protocol behaves in a slightly different manner. In this case:
Parameters: |
|
---|