-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Ayodeji Ige
committed
Nov 27, 2024
1 parent
f02d236
commit 85b115d
Showing
6 changed files
with
521 additions
and
427 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
394 changes: 198 additions & 196 deletions
394
Solutions/Clienttelemetry/Clienttelemetry.vcxitems.filters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// | ||
#ifndef DATAVIEWER_CAPI_HPP | ||
#define DATAVIEWER_CAPI_HPP | ||
|
||
|
||
#include "IDataViewer.hpp" | ||
#include "mat.h" | ||
|
||
namespace MAT_NS_BEGIN { | ||
class DataViewer_CAPI : public IDataViewer { | ||
public: | ||
DataViewer_CAPI(dataviewer_callback_fn_t callbackFn); | ||
void ReceiveData(const std::vector<uint8_t>& packetData) noexcept override; | ||
|
||
const char* GetName() const noexcept override; | ||
bool IsTransmissionEnabled() const noexcept override; | ||
const std::string& GetCurrentEndpoint() const noexcept override; | ||
|
||
private: | ||
dataviewer_callback_fn_t m_callbackFn; | ||
static const char* s_name; | ||
std::string m_endpoint; | ||
}; | ||
} MAT_NS_END | ||
|
||
#endif // DATAVIEWER_CAPI_HPP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters