-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into range_view
- Loading branch information
Showing
20 changed files
with
581 additions
and
510 deletions.
There are no files selected for viewing
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,17 @@ | ||
|
||
#ifndef I_UWB_SIMULATOR_HXX | ||
#define I_UWB_SIMULATOR_HXX | ||
|
||
#include <cstdint> | ||
|
||
namespace windows::devices::uwb::simulator | ||
{ | ||
struct IUwbSimulator | ||
{ | ||
static constexpr uint8_t VersionMajor = 1; | ||
static constexpr uint8_t VersionMinor = 0; | ||
static constexpr uint32_t Version = (VersionMajor << 16U) | VersionMinor; | ||
}; | ||
} // namespace windows::devices::uwb::simulator | ||
|
||
#endif // I_UWB_SIMULATOR_HXX |
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
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,61 @@ | ||
|
||
#ifndef I_UWB_SIMULATOR_DDI_HANDLER_HXX | ||
#define I_UWB_SIMULATOR_DDI_HANDLER_HXX | ||
|
||
#include <cstddef> | ||
#include <span> | ||
|
||
#include <windows.h> | ||
|
||
#include <wdf.h> | ||
|
||
namespace windows::devices::uwb::simulator | ||
{ | ||
/** | ||
* @brief Base class which responsible for handling DDI i/o control requests. | ||
*/ | ||
struct IUwbSimulatorDdiHandler | ||
{ | ||
virtual ~IUwbSimulatorDdiHandler() = default; | ||
|
||
/** | ||
* @brief Indicates whether the specified i/o control code is handled by | ||
* this handler. | ||
* | ||
* @param ioControlCode The i/o control code to check. | ||
* @return true | ||
* @return false | ||
*/ | ||
virtual bool | ||
HandlesIoControlCode(ULONG ioControlCode) = 0; | ||
|
||
/** | ||
* @brief Validates that a given request is valid. | ||
* | ||
* This is responsible for validating that the input and output buffers are | ||
* of sufficient length. | ||
* | ||
* @param request | ||
* @param ioControlCode | ||
* @param inputBufferLength | ||
* @param outputBufferLength | ||
* @return NTSTATUS | ||
*/ | ||
virtual NTSTATUS | ||
ValidateRequest(WDFREQUEST request, ULONG ioControlCode, std::size_t inputBufferLength, std::size_t outputBufferLength) = 0; | ||
|
||
/** | ||
* @brief Handles the request. | ||
* | ||
* @param request | ||
* @param ioControlCode | ||
* @param inputBuffer | ||
* @param outputBuffer | ||
* @return NTSTATUS | ||
*/ | ||
virtual NTSTATUS | ||
HandleRequest(WDFREQUEST request, ULONG ioControlCode, std::span<uint8_t> inputBuffer, std::span<uint8_t> outputBuffer) = 0; | ||
}; | ||
} // namespace windows::devices::uwb::simulator | ||
|
||
#endif // I_UWB_SIMULATOR_DDI_HANDLER_HXX |
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 @@ | ||
|
||
#ifndef I_UWB_SIMULATOR_SESSION_HXX | ||
#define I_UWB_SIMULATOR_SESSION_HXX | ||
|
||
#include <memory> | ||
#include <unordered_set> | ||
#include <vector> | ||
|
||
#include <uwb/UwbMacAddress.hxx> | ||
#include <uwb/protocols/fira/FiraDevice.hxx> | ||
#include <windows/devices/uwb/UwbAppConfiguration.hxx> | ||
|
||
namespace windows::devices::uwb::simulator | ||
{ | ||
using ::uwb::protocol::fira::UwbSessionState; | ||
using ::uwb::protocol::fira::UwbSessionType; | ||
|
||
struct IUwbSimulatorSession | ||
{ | ||
uint32_t Id; | ||
UwbSessionType Type{ UwbSessionType::RangingSession }; | ||
UwbSessionState State{ UwbSessionState::Deinitialized }; | ||
uint32_t Sequence{ 0 }; | ||
std::unordered_set<::uwb::UwbMacAddress> Controlees; | ||
std::vector<std::shared_ptr<IUwbAppConfigurationParameter>> ApplicationConfigurationParameters; | ||
}; | ||
} // namespace windows::devices::uwb::simulator | ||
|
||
#endif // I_UWB_SIMULATOR_SESSION_HXX |
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
Oops, something went wrong.