1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
// Copyright (C) 2018-2020 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#ifndef _XLINKPRIVATEFIELDS_H
#define _XLINKPRIVATEFIELDS_H
#include "XLinkDispatcher.h"
// ------------------------------------
// Global fields declaration. Begin.
// ------------------------------------
extern XLinkGlobalHandler_t* glHandler; //TODO need to either protect this with semaphor
//or make profiling data per device
extern xLinkDesc_t availableXLinks[MAX_LINKS];
extern DispatcherControlFunctions controlFunctionTbl;
extern sem_t pingSem; //to b used by myriad
// ------------------------------------
// Global fields declaration. End.
// ------------------------------------
// ------------------------------------
// Helpers declaration. Begin.
// ------------------------------------
xLinkDesc_t* getLinkById(linkId_t id);
xLinkDesc_t* getLink(void* fd);
xLinkState_t getXLinkState(xLinkDesc_t* link);
streamId_t getStreamIdByName(xLinkDesc_t* link, const char* name);
streamDesc_t* getStreamById(void* fd, streamId_t id);
streamDesc_t* getStreamByName(xLinkDesc_t* link, const char* name);
void releaseStream(streamDesc_t* stream);
// ------------------------------------
// Helpers declaration. End.
// ------------------------------------
#endif //PROJECT_XLINKPRIVATEFIELDS_H