1 // Copyright (C) 2018-2020 Intel Corporation
2 // SPDX-License-Identifier: Apache-2.0
8 #include "XLinkPublicDefines.h"
10 # if (defined(_WIN32) || defined(_WIN64))
11 # include "win_semaphore.h"
14 # include "pthread_semaphore.h"
16 # include <semaphore.h>
21 * @brief Streams opened to device
24 char name[MAX_STREAM_NAME_LENGTH];
27 uint32_t readSize; /*No need of read buffer. It's on remote,
28 will read it directly to the requested buffer*/
29 streamPacketDesc_t packets[XLINK_MAX_PACKETS_PER_STREAM];
30 uint32_t availablePackets;
31 uint32_t blockedPackets;
34 uint32_t firstPacketUnused;
35 uint32_t firstPacketFree;
37 uint32_t remoteFillLevel;
38 uint32_t localFillLevel;
39 uint32_t remoteFillPacketLevel;
41 uint32_t closeStreamInitiated;
46 XLinkError_t XLinkStreamInitialize(
47 streamDesc_t* stream, streamId_t id, const char* name);
49 void XLinkStreamReset(streamDesc_t* stream);
51 #endif //_XLINKSTREAM_H