-
Notifications
You must be signed in to change notification settings - Fork 0
/
irsfunnel_dll.cpp
47 lines (35 loc) · 1.35 KB
/
irsfunnel_dll.cpp
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
#include "mxsrclib_dll_global.h"
#include "irsfunnel.h"
irs::handle_t<irs::funnel_client_t> p_funnel_client;
MXSRCLIB_DLLEXPORT void funnel_client_create(size_t a_mxdata_addr, uint32_t a_funnel_start_index,
uint32_t a_offset, uint32_t a_size)
{
p_funnel_client.reset(nullptr);
irs::mxdata_t *mxdata = reinterpret_cast<irs::mxdata_t*>(a_mxdata_addr);
p_funnel_client.reset(new irs::funnel_client_t(mxdata, a_funnel_start_index, MS_TO_CNT(200),
a_offset, a_size, irs::fcm_reduce));
}
MXSRCLIB_DLLEXPORT void funnel_client_destroy() {
p_funnel_client.reset(nullptr);
}
MXSRCLIB_DLLEXPORT int funnel_client_connected() {
return p_funnel_client->connected();
}
MXSRCLIB_DLLEXPORT size_t funnel_client_get() {
return reinterpret_cast<size_t>(p_funnel_client.get());
}
MXSRCLIB_DLLEXPORT void funnel_client_tick() {
p_funnel_client->tick();
}
MXSRCLIB_DLLEXPORT void funnel_client_reset_is_read_complete() {
p_funnel_client->reset_stat_read_complete();
}
MXSRCLIB_DLLEXPORT int is_read_complete() {
return p_funnel_client->read_complete();
}
MXSRCLIB_DLLEXPORT int funnel_client_get_read_size() {
return p_funnel_client->get_read_size();
}
MXSRCLIB_DLLEXPORT int funnel_client_get_write_size() {
return p_funnel_client->get_write_size();
}