Skip to content

Commit 800b5c0

Browse files
authored
Merge branch 'master' into development/input-switch-interface
2 parents 06b10c2 + d952300 commit 800b5c0

File tree

7 files changed

+80
-83
lines changed

7 files changed

+80
-83
lines changed

definitions/Definitions.vcxproj

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,21 @@
220220
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectDir)../interfaces/json/JInputSwitch.h</Outputs>
221221
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ProjectDir)../interfaces/json/JInputSwitch.h</Outputs>
222222
</CustomBuild>
223+
<CustomBuild Include="..\interfaces\ISubsystemControl.h">
224+
<OutputItemType Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">ClInclude</OutputItemType>
225+
<OutputItemType Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">ClInclude</OutputItemType>
226+
<OutputItemType Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">ClInclude</OutputItemType>
227+
<OutputItemType Condition="'$(Configuration)|$(Platform)'=='Release|x64'">ClInclude</OutputItemType>
228+
<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>
229+
<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>
230+
<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>
231+
<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>
232+
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)../interfaces/json/JSubsystemControl.h</Outputs>
233+
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)../interfaces/json/JSubsystemControl.h</Outputs>
234+
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectDir)../interfaces/json/JSubsystemControl.h</Outputs>
235+
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ProjectDir)../interfaces/json/JSubsystemControl.h</Outputs>
236+
</CustomBuild>
237+
</CustomBuild>
223238
<ClInclude Include="ValuePoint.h" />
224239
<CustomBuild Include="..\interfaces\IMath.h">
225240
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)../interfaces/json/JMath.h</Outputs>
@@ -423,9 +438,6 @@
423438
<CustomBuild Include="..\jsonrpc\Streamer.json">
424439
<FileType>Document</FileType>
425440
</CustomBuild>
426-
<CustomBuild Include="..\jsonrpc\SubsystemControl.json">
427-
<FileType>Document</FileType>
428-
</CustomBuild>
429441
<None Include="..\jsonrpc\WebKitBrowser.json" />
430442
</ItemGroup>
431443
<PropertyGroup Label="Globals">

definitions/Definitions.vcxproj.filters

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -239,9 +239,6 @@
239239
<CustomBuild Include="..\jsonrpc\Streamer.json">
240240
<Filter>JSON Files</Filter>
241241
</CustomBuild>
242-
<CustomBuild Include="..\jsonrpc\SubsystemControl.json">
243-
<Filter>JSON Files</Filter>
244-
</CustomBuild>
245242
<CustomBuild Include="..\interfaces\IOCDM.h">
246243
<Filter>Interface Files</Filter>
247244
</CustomBuild>
@@ -252,9 +249,14 @@
252249
<Filter>Interface Files</Filter>
253250
</CustomBuild>
254251
<CustomBuild Include="..\interfaces\IPower.h" />
252+
<Filter>Interface Files</Filter>
253+
</CustomBuild>
255254
<CustomBuild Include="..\interfaces\IInputSwitch.h">
256255
<Filter>Interface Files</Filter>
257256
</CustomBuild>
257+
<CustomBuild Include="..\interfaces\ISubsystemControl.h">
258+
<Filter>Interface Files</Filter>
259+
</CustomBuild>
258260
</ItemGroup>
259261
<ItemGroup>
260262
<None Include="..\jsonrpc\common.json">

interfaces/ISubsystemControl.h

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
/*
2+
* If not stated otherwise in this file or this component's LICENSE file the
3+
* following copyright and licenses apply:
4+
*
5+
* Copyright 2021 Metrological
6+
*
7+
* Licensed under the Apache License, Version 2.0 (the "License");
8+
* you may not use this file except in compliance with the License.
9+
* You may obtain a copy of the License at
10+
*
11+
* http://www.apache.org/licenses/LICENSE-2.0
12+
*
13+
* Unless required by applicable law or agreed to in writing, software
14+
* distributed under the License is distributed on an "AS IS" BASIS,
15+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
* See the License for the specific language governing permissions and
17+
* limitations under the License.
18+
*/
19+
20+
#pragma once
21+
22+
#include "Module.h"
23+
24+
// @stubgen:include <plugins/ISubSystem.h>
25+
26+
namespace Thunder {
27+
28+
namespace Exchange {
29+
30+
// @json 1.0.0 @text:legacy_lowercase
31+
struct EXTERNAL ISubsystemControl : virtual public Core::IUnknown {
32+
33+
enum { ID = ID_SUBSYSTEM_CONTROL };
34+
35+
// @brief Activates a subsystem
36+
// @description This method allows a subsystem to be activated from the outside. This is usefull in case Thunder can not determine the availability of a subsystem but it needs to be triggered from the outside.
37+
// @param subsystem: Subsystem to activate (e.g. network)
38+
// @param configuration: A JSON string that holds the information applicable to the subsystem to be activated
39+
// @retval ERROR_BAD_REQUEST: Setting a subsystem to disabled is not supported
40+
virtual Core::hresult Activate(const PluginHost::ISubSystem::subsystem subsystem, const Core::OptionalType<string>& configuration /* @opaque */) = 0;
41+
42+
};
43+
44+
} // namespace Exchange
45+
46+
}

interfaces/Ids.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,9 @@ namespace Exchange {
409409
ID_MEMORY_MONITOR_NOTIFICATION = ID_MEMORY_MONITOR + 1,
410410

411411
ID_IOCONNECTOR = RPC::IDS::ID_EXTERNAL_INTERFACE_OFFSET + 0x580,
412-
ID_IOCONNECTOR_NOTIFICATION = ID_IOCONNECTOR + 1
412+
ID_IOCONNECTOR_NOTIFICATION = ID_IOCONNECTOR + 1,
413+
414+
ID_SUBSYSTEM_CONTROL = RPC::IDS::ID_EXTERNAL_INTERFACE_OFFSET + 0x590
413415
};
414416
}
415417
}

interfaces/Interfaces.vcxproj

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@
151151
<ClInclude Include="IStore.h" />
152152
<ClInclude Include="IStoreCache.h" />
153153
<ClInclude Include="IStream.h" />
154+
<ClInclude Include="ISubsystemControl.h" />
154155
<ClInclude Include="ISwitchBoard.h" />
155156
<ClInclude Include="ISystemCommands.h" />
156157
<ClInclude Include="ITextToSpeech.h" />
@@ -387,4 +388,13 @@
387388
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
388389
<ImportGroup Label="ExtensionTargets">
389390
</ImportGroup>
391+
<Target Name="CustomCleanGeneratedFiles" BeforeTargets="Clean">
392+
<RemoveDir Directories="proxystubs" />
393+
<ItemGroup>
394+
<JsonFolder Include="json\*.*" Exclude="json\ExternalMetadata.h" />
395+
<Definitions Include="definitions.h" />
396+
</ItemGroup>
397+
<Delete Files="@(JsonFolder)" />
398+
<Delete Files="@(Definitions)" />
399+
</Target>
390400
</Project>

interfaces/Interfaces.vcxproj.filters

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@
142142
<ClInclude Include="Module.h" />
143143
<ClInclude Include="ValuePoint.h" />
144144
<ClInclude Include="IIOConnector.h" />
145+
<ClInclude Include="ISubsystemControl.h" />
145146
</ItemGroup>
146147
<ItemGroup>
147148
<Text Include="CMakeLists.txt" />

jsonrpc/SubsystemControl.json

Lines changed: 0 additions & 76 deletions
This file was deleted.

0 commit comments

Comments
 (0)