Open-AVB AVTP Pipeline SDK  1.4
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
openavb_types_base_pub.h
Go to the documentation of this file.
1 /*************************************************************************************************************
2 Copyright (c) 2012-2015, Symphony Teleca Corporation, a Harman International Industries, Incorporated company
3 All rights reserved.
4 
5 Redistribution and use in source and binary forms, with or without
6 modification, are permitted provided that the following conditions are met:
7 
8 1. Redistributions of source code must retain the above copyright notice, this
9  list of conditions and the following disclaimer.
10 2. Redistributions in binary form must reproduce the above copyright notice,
11  this list of conditions and the following disclaimer in the documentation
12  and/or other materials provided with the distribution.
13 
14 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS LISTED "AS IS" AND
15 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
16 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
17 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS LISTED BE LIABLE FOR
18 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
19 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
20 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
21 ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
23 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 
25 Attributions: The inih library portion of the source code is licensed from
26 Brush Technology and Ben Hoyt - Copyright (c) 2009, Brush Technology and Copyright (c) 2009, Ben Hoyt.
27 Complete license and copyright information can be found at
28 https://github.com/benhoyt/inih/commit/74d2ca064fb293bc60a77b0bd068075b293cf175.
29 *************************************************************************************************************/
30 
31 /*
32 * MODULE : Public AVB Base Types (have no dependencies)
33 */
34 
35 #ifndef AVB_TYPES_BASE_PUB_H
36 #define AVB_TYPES_BASE_PUB_H 1
37 
38 #include "openavb_types_base_tcal_pub.h"
39 #include <stdbool.h>
40 #include <inttypes.h>
41 
47 /*
48  * Useful types for OPENAVB AVB
49  *
50  */
52 #define NANOSECONDS_PER_SECOND (1000000000ULL)
53 #define NANOSECONDS_PER_MSEC (1000000L)
55 #define NANOSECONDS_PER_USEC (1000L)
57 #define MICROSECONDS_PER_SECOND (1000000L)
59 #define MICROSECONDS_PER_MSEC (1000L)
61 
62 #ifndef TRUE // possible confict with gboolean
63 #define TRUE true
65 #define FALSE false
67 #endif
68 
69 #ifndef NULL
70 #define NULL 0
72 #endif
73 
75 typedef int8_t S8;
77 typedef uint8_t U8;
79 typedef int16_t S16;
81 typedef uint16_t U16;
83 typedef int32_t S32;
85 typedef uint32_t U32;
87 typedef int64_t S64;
89 typedef uint64_t U64;
90 
92 typedef enum {
99 } avb_role_t;
100 
101 
102 
104 typedef enum {
109 // SR_CLASS_C,
110 // SR_CLASS_D,
113 } SRClassIdx_t;
114 
116 #define SR_RANK_REGULAR 1
117 #define SR_RANK_EMERGENCY 0
119 
120 #endif // AVB_TYPES_BASE_PUB_H
int16_t S16
Signed 16 bit type.
Definition: openavb_types_base_pub.h:79
uint8_t U8
Unsigned 8 bit type.
Definition: openavb_types_base_pub.h:77
Host acts as a listener.
Definition: openavb_types_base_pub.h:98
int8_t S8
Signed 8 bit type.
Definition: openavb_types_base_pub.h:75
Host acts as a talker.
Definition: openavb_types_base_pub.h:96
uint32_t U32
Unsigned 32 bit type.
Definition: openavb_types_base_pub.h:85
Stream reservation class B. 4000 packets per second.
Definition: openavb_types_base_pub.h:108
Stream reservation class A. 8000 packets per second.
Definition: openavb_types_base_pub.h:106
uint64_t U64
Unsigned 64 bit type.
Definition: openavb_types_base_pub.h:89
int32_t S32
Signed 32 bit type.
Definition: openavb_types_base_pub.h:83
avb_role_t
Describes role of the host.
Definition: openavb_types_base_pub.h:92
int64_t S64
Signed 64 bit type.
Definition: openavb_types_base_pub.h:87
uint16_t U16
Unsigned 16 bit type.
Definition: openavb_types_base_pub.h:81
Role undefined or wrong handle.
Definition: openavb_types_base_pub.h:94
Number of supported stream reservation classes.
Definition: openavb_types_base_pub.h:112
SRClassIdx_t
Supported AVB classes.
Definition: openavb_types_base_pub.h:104