Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 17 additions & 7 deletions definitions/Definitions.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
<ClCompile Include="..\interfaces\json\JsonEnum_NetworkControl.cpp" />
<ClCompile Include="..\interfaces\json\JsonEnum_OCDM.cpp" />
<ClCompile Include="..\interfaces\json\JsonEnum_OpenCDM.cpp" />
<ClCompile Include="..\interfaces\json\JsonEnum_PerformanceMonitor.cpp" />
<ClCompile Include="..\interfaces\json\JsonEnum_Provisioning.cpp" />
<ClCompile Include="..\interfaces\json\JsonEnum_RemoteControl.cpp" />
<ClCompile Include="..\interfaces\json\JsonEnum_ScriptEngine.cpp" />
Expand Down Expand Up @@ -221,18 +220,32 @@
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ProjectDir)../interfaces/json/JSubsystemControl.h</Outputs>
</CustomBuild>
<CustomBuild Include="..\interfaces\IPluginAsyncStateControl.h">
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectDir)../interfaces/json/JPluginAsyncStateControl.h</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">python "$(ToolPath)\JsonGenerator\JsonGenerator.py" -I "$(FrameworkPath)\" -I "$(ProjectDir)\" --keep-empty --case-convention legacy -c -j "$(ProjectDir)../interfaces" -o "$(ProjectDir)../interfaces/json" "%(FullPath)" --force</Command>
<OutputItemType Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">ClInclude</OutputItemType>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">python "$(ToolPath)\JsonGenerator\JsonGenerator.py" -I "$(FrameworkPath)\" -I "$(ProjectDir)\" --keep-empty --case-convention legacy -c -j "$(ProjectDir)../interfaces" -o "$(ProjectDir)../interfaces/json" "%(FullPath)" --force</Command>
<OutputItemType Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">ClInclude</OutputItemType>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">python "$(ToolPath)\JsonGenerator\JsonGenerator.py" -I "$(FrameworkPath)\" -I "$(ProjectDir)\" --keep-empty --case-convention legacy -c -j "$(ProjectDir)../interfaces" -o "$(ProjectDir)../interfaces/json" "%(FullPath)" --force</Command>
<OutputItemType Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">ClInclude</OutputItemType>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">python "$(ToolPath)\JsonGenerator\JsonGenerator.py" -I "$(FrameworkPath)\" -I "$(ProjectDir)\" --keep-empty --case-convention legacy -c -j "$(ProjectDir)../interfaces" -o "$(ProjectDir)../interfaces/json" "%(FullPath)" --force</Command>
<OutputItemType Condition="'$(Configuration)|$(Platform)'=='Release|x64'">ClInclude</OutputItemType>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)../interfaces/json/JPluginAsyncStateControl.h</Outputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)../interfaces/json/JPluginAsyncStateControl.h</Outputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectDir)../interfaces/json/JPluginAsyncStateControl.h</Outputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ProjectDir)../interfaces/json/JPluginAsyncStateControl.h</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">python "$(ToolPath)\JsonGenerator\JsonGenerator.py" -I "$(FrameworkPath)\" -I "$(ProjectDir)\" --keep-empty --case-convention legacy -c -j "$(ProjectDir)../interfaces" -o "$(ProjectDir)../interfaces/json" "%(FullPath)" --force</Command>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">python "$(ToolPath)\JsonGenerator\JsonGenerator.py" -I "$(FrameworkPath)\" -I "$(ProjectDir)\" --keep-empty --case-convention legacy -c -j "$(ProjectDir)../interfaces" -o "$(ProjectDir)../interfaces/json" "%(FullPath)" --force</Command>
</CustomBuild>
<CustomBuild Include="..\interfaces\IPerformance.h">
<OutputItemType Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">ClInclude</OutputItemType>
<OutputItemType Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">ClInclude</OutputItemType>
<OutputItemType Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">ClInclude</OutputItemType>
<OutputItemType Condition="'$(Configuration)|$(Platform)'=='Release|x64'">ClInclude</OutputItemType>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">python "$(ToolPath)\JsonGenerator\JsonGenerator.py" -I "$(FrameworkPath)\" -I "$(ProjectDir)\" --keep-empty --case-convention legacy -c -j "$(ProjectDir)../interfaces" -o "$(ProjectDir)../interfaces/json" "%(FullPath)" --force</Command>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">python "$(ToolPath)\JsonGenerator\JsonGenerator.py" -I "$(FrameworkPath)\" -I "$(ProjectDir)\" --keep-empty --case-convention legacy -c -j "$(ProjectDir)../interfaces" -o "$(ProjectDir)../interfaces/json" "%(FullPath)" --force</Command>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">python "$(ToolPath)\JsonGenerator\JsonGenerator.py" -I "$(FrameworkPath)\" -I "$(ProjectDir)\" --keep-empty --case-convention legacy -c -j "$(ProjectDir)../interfaces" -o "$(ProjectDir)../interfaces/json" "%(FullPath)" --force</Command>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">python "$(ToolPath)\JsonGenerator\JsonGenerator.py" -I "$(FrameworkPath)\" -I "$(ProjectDir)\" --keep-empty --case-convention legacy -c -j "$(ProjectDir)../interfaces" -o "$(ProjectDir)../interfaces/json" "%(FullPath)" --force</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)../interfaces/json/JPerformance.h</Outputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)../interfaces/json/JPerformance.h</Outputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectDir)../interfaces/json/JPerformance.h</Outputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ProjectDir)../interfaces/json/JPerformance.h</Outputs>
</CustomBuild>
<ClInclude Include="ValuePoint.h" />
<CustomBuild Include="..\interfaces\IMath.h">
Expand Down Expand Up @@ -422,9 +435,6 @@
<CustomBuild Include="..\jsonrpc\OCDM.json">
<FileType>Document</FileType>
</CustomBuild>
<CustomBuild Include="..\jsonrpc\PerformanceMonitor.json">
<FileType>Document</FileType>
</CustomBuild>
<CustomBuild Include="..\jsonrpc\Provisioning.json">
<FileType>Document</FileType>
</CustomBuild>
Expand Down
9 changes: 3 additions & 6 deletions definitions/Definitions.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,6 @@
<ClCompile Include="..\interfaces\json\JsonEnum_OpenCDM.cpp">
<Filter>Generated Files</Filter>
</ClCompile>
<ClCompile Include="..\interfaces\json\JsonEnum_PerformanceMonitor.cpp">
<Filter>Generated Files</Filter>
</ClCompile>
<ClCompile Include="..\interfaces\json\JsonEnum_Provisioning.cpp">
<Filter>Generated Files</Filter>
</ClCompile>
Expand Down Expand Up @@ -224,9 +221,6 @@
<CustomBuild Include="..\jsonrpc\OCDM.json">
<Filter>JSON Files</Filter>
</CustomBuild>
<CustomBuild Include="..\jsonrpc\PerformanceMonitor.json">
<Filter>JSON Files</Filter>
</CustomBuild>
<CustomBuild Include="..\jsonrpc\Provisioning.json">
<Filter>JSON Files</Filter>
</CustomBuild>
Expand Down Expand Up @@ -258,6 +252,9 @@
<CustomBuild Include="..\interfaces\IPluginAsyncStateControl.h">
<Filter>Interface Files</Filter>
</CustomBuild>
<CustomBuild Include="..\interfaces\IPerformance.h">
<Filter>Interface Files</Filter>
</CustomBuild>
</ItemGroup>
<ItemGroup>
<None Include="..\jsonrpc\common.json">
Expand Down
53 changes: 50 additions & 3 deletions interfaces/IPerformance.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,65 @@
*/

#pragma once

#include "Module.h"

namespace Thunder {

namespace Exchange {

// @json 1.0.0 @text:legacy_lowercase
struct EXTERNAL IPerformance : virtual public Core::IUnknown {

enum { ID = ID_PERFORMANCE };

virtual uint32_t Send(const uint16_t sendSize, const uint8_t buffer[] /* @length:sendSize @in */ ) = 0;
virtual uint32_t Receive(uint16_t& bufferSize /* @inout */, uint8_t buffer[] /* @length:bufferSize @out */) const = 0;
virtual uint32_t Exchange(uint16_t& bufferSize /* @inout */, uint8_t buffer[] /* @length:bufferSize @maxlength:maxBufferSize @inout*/, const uint16_t maxBufferSize) = 0;
// @brief Test the process of sending the data
// @param sendSize: Length of the sent data (e.g. 15)
// @param buffer: Any data to be sent (e.g. HelloWorld)
virtual Core::hresult Send(const uint16_t sendSize, const uint8_t buffer[] /* @encode:base64 @length:sendSize */) = 0;

// @brief Test the process of receiving the data
// @param bufferSize: Size of data to be provided (e.g. 10)
// @param buffer: Data with a specified length (e.g. fhrjtus4p1)
virtual Core::hresult Receive(uint16_t& bufferSize /* @inout */, uint8_t buffer[] /* @encode:base64 @length:bufferSize @maxlength:bufferSize @out */) const = 0;

// @brief Test the process of both sending and receiving the data
// @param bufferSize: Length of the data to be both sent as well as received (e.g. 20)
// @param buffer: Data to be sent and then also received (e.g. kjrpq018rt)
// @param maxBufferSize: Maximum size of the buffer that can be received (e.g. 100)
virtual Core::hresult Exchange(uint16_t& bufferSize /* @inout */, uint8_t buffer[] /* @encode:base64 @length:bufferSize @maxlength:maxBufferSize @inout */, const uint16_t maxBufferSize) = 0;
};

// @json 1.0.0 @text:legacy_lowercase
struct EXTERNAL IPerformanceStatistics : virtual public Core::IUnknown {

enum { ID = ID_PERFORMANCE_STATISTICS };

struct Statistics {
uint32_t minimum /* @brief Minimum value of measurements (e.g. 1) */;
uint32_t maximum /* @brief Maximum value of measurements (e.g. 4) */;
uint32_t average /* @brief Average value of measurements (e.g. 2) */;
uint32_t count /* @brief How many times measurement has been collected (e.g. 5) */;
};

struct Measurements {
Statistics serialization /* @brief Time taken to complete serialization */;
Statistics deserialization /* @brief Time taken to complete deserialization */;
Statistics execution /* @brief Time taken to complete execution */;
Statistics threadPool /* @brief Time taken to complete threadpool wait */;
Statistics communication /* @brief Time taken to complete communication */;
Statistics total /* @brief Time taken to complete whole JSON-RPC process */;
};

// @property
// @brief Retrieve the performance measurement against a given package size. Measurements will be provided in milliseconds
// @param index: Size of package which statistics info is about to be retrieved (e.g. 1000)
// @param measurement: Various performance measurements against a given package size
virtual Core::hresult Measurement(const uint32_t index /* @index */, Measurements& measurement /* @out */) const = 0;

// @brief Clear all performance data collected so far
// @alt:deprecated clear
virtual Core::hresult Reset() = 0;
};
}
}
1 change: 1 addition & 0 deletions interfaces/Ids.h
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ namespace Exchange {
ID_DSGCC_CLIENT_NOTIFICATION = ID_DSGCC_CLIENT + 1,

ID_PERFORMANCE = RPC::IDS::ID_EXTERNAL_INTERFACE_OFFSET + 0x230,
ID_PERFORMANCE_STATISTICS = ID_PERFORMANCE + 1,

ID_WEBPA = RPC::IDS::ID_EXTERNAL_INTERFACE_OFFSET + 0x240,
ID_WEBPA_CLIENT = ID_WEBPA + 1,
Expand Down
157 changes: 0 additions & 157 deletions jsonrpc/PerformanceMonitor.json

This file was deleted.

Loading