blob: e1c06a93f557c02e8d4bc6a0de7307d8a9455b8f (
plain)
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
47
48
|
// Copyright (C) 2018-2019 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
///
/// @file
///
/// @brief Application configuration Leon header
///
#ifndef _XLINKDISPATCHER_H
#define _XLINKDISPATCHER_H
#define _XLINK_ENABLE_PRIVATE_INCLUDE_
#include "XLinkPrivateDefines.h"
#ifdef __cplusplus
extern "C"
{
#endif
typedef int (*getRespFunction) (xLinkEvent_t*,
xLinkEvent_t*);
///Adds a new event with parameters and returns event.header.id
xLinkEvent_t* dispatcherAddEvent(xLinkEventOrigin_t origin,
xLinkEvent_t *event);
int dispatcherWaitEventComplete(void* xlinkFD, unsigned int timeout);
int dispatcherUnblockEvent(eventId_t id,
xLinkEventType_t type,
streamId_t stream,
void* xlinkFD);
struct dispatcherControlFunctions {
int (*eventSend) (xLinkEvent_t*);
int (*eventReceive) (xLinkEvent_t*);
getRespFunction localGetResponse;
getRespFunction remoteGetResponse;
void (*closeLink) (void* fd);
void (*closeDeviceFd) (void* fd);
};
int dispatcherInitialize(struct dispatcherControlFunctions* controlFunc);
int dispatcherStart(void* fd);
int dispatcherClean(void* xLinkFD);
#ifdef __cplusplus
}
#endif
#endif
|