-
Notifications
You must be signed in to change notification settings - Fork 61
Expand file tree
/
Copy pathDataViewer_CAPI.cpp
More file actions
37 lines (29 loc) · 866 Bytes
/
DataViewer_CAPI.cpp
File metadata and controls
37 lines (29 loc) · 866 Bytes
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
//
// Copyright (c) Microsoft Corporation. All rights reserved.
// SPDX-License-Identifier: Apache-2.0
//
#include "DataViewer_CAPI.hpp"
namespace MAT_NS_BEGIN {
DataViewer_CAPI::DataViewer_CAPI(dataviewer_callback_fn_t callbackFn)
: m_callbackFn(callbackFn),
m_endpoint("DataViewer_CAPI")
{
}
void DataViewer_CAPI::ReceiveData(const std::vector<uint8_t>& packetData) noexcept
{
m_callbackFn(packetData.data(), packetData.size());
}
const char* DataViewer_CAPI::GetName() const noexcept
{
return s_name;
}
bool DataViewer_CAPI::IsTransmissionEnabled() const noexcept
{
return true;
}
const std::string& DataViewer_CAPI::GetCurrentEndpoint() const noexcept
{
return m_endpoint;
}
const char* DataViewer_CAPI::s_name = "DataViewer_CAPI";
} MAT_NS_END