libklvanc
vanc-packets.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2016 Kernel Labs Inc. All Rights Reserved
3  *
4  * Address: Kernel Labs Inc., PO Box 745, St James, NY. 11780
5  * Contact: sales@kernellabs.com
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2.1 of the License, or (at your option) any later version.
11  *
12  * This library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with this library; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20  */
21 
29 #ifndef _VANC_PACKETS_H
30 #define _VANC_PACKETS_H
31 
32 #include <sys/types.h>
33 #include <sys/errno.h>
34 
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
38 
43 {
44  VANC_TYPE_UNDEFINED = 0,
45  VANC_TYPE_AFD,
46  VANC_TYPE_EIA_708B,
47  VANC_TYPE_EIA_608,
48  VANC_TYPE_SCTE_104,
49  VANC_TYPE_KL_UINT64_COUNTER,
50  VANC_TYPE_SDP,
51  VANC_TYPE_SMPTE_S12_2,
52 };
53 
58 {
59  enum klvanc_packet_type_e type;
60  unsigned short adf[3];
61  unsigned short did;
62  unsigned short dbnsdid;
63  unsigned short checksum;
64 #define LIBKLVANC_PACKET_MAX_PAYLOAD (16384)
65  unsigned short payload[LIBKLVANC_PACKET_MAX_PAYLOAD];
66  unsigned short payloadLengthWords;
67  unsigned int checksumValid;
68  unsigned int lineNr;
69  unsigned short raw[LIBKLVANC_PACKET_MAX_PAYLOAD];
70  unsigned int rawLengthWords;
71  unsigned short horizontalOffset;
72 };
73 
82 #define klvanc_packetType1(pkt) (((pkt)->did >= 0x80) && ((pkt)->did <= 0x83))
83 
84 #ifdef __cplusplus
85 };
86 #endif
87 
88 #endif /* _VANC_PACKETS_H */
klvanc_packet_type_e
TODO - Brief description goes here.
Definition: vanc-packets.h:42
unsigned short horizontalOffset
Definition: vanc-packets.h:71
TODO - Brief description goes here.
Definition: vanc-packets.h:57
unsigned int lineNr
Definition: vanc-packets.h:68