Skip to content

Commit

Permalink
Update third_party/zap/repo (#9533)
Browse files Browse the repository at this point in the history
* Update ZAP repo

* Update templates and templates helpers to works with the updated ZAP repo

* Run ./scripts/tools/zap_convert_all.py

* Update generated content

* Remove EmberAf prefix from some structs
  • Loading branch information
vivien-apple authored and pull[bot] committed Sep 14, 2021
1 parent a7ffa1b commit b53aed7
Show file tree
Hide file tree
Showing 51 changed files with 3,209 additions and 3,217 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"featureLevel": 45,
"featureLevel": 51,
"creator": "zap",
"keyValuePairs": [
{
Expand Down Expand Up @@ -17335,6 +17335,5 @@
"endpointVersion": null,
"deviceIdentifier": null
}
],
"log": []
]
}
5 changes: 2 additions & 3 deletions examples/bridge-app/bridge-common/bridge-app.zap
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"featureLevel": 45,
"featureLevel": 51,
"creator": "zap",
"keyValuePairs": [
{
Expand Down Expand Up @@ -3379,6 +3379,5 @@
"endpointVersion": null,
"deviceIdentifier": null
}
],
"log": []
]
}
2 changes: 1 addition & 1 deletion examples/chip-tool/templates/helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/

// Import helpers from zap core
const zapPath = '../../../third_party/zap/repo/src-electron/';
const zapPath = '../../../third_party/zap/repo/dist/src-electron/';
const templateUtil = require(zapPath + 'generator/template-util.js')
const zclHelper = require(zapPath + 'generator/helper-zcl.js')

Expand Down
5 changes: 2 additions & 3 deletions examples/lighting-app/lighting-common/lighting-app.zap
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"featureLevel": 45,
"featureLevel": 51,
"creator": "zap",
"keyValuePairs": [
{
Expand Down Expand Up @@ -5490,6 +5490,5 @@
"endpointVersion": 1,
"deviceIdentifier": 259
}
],
"log": []
]
}
5 changes: 2 additions & 3 deletions examples/lock-app/lock-common/lock-app.zap
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"featureLevel": 45,
"featureLevel": 51,
"creator": "zap",
"keyValuePairs": [
{
Expand Down Expand Up @@ -4391,6 +4391,5 @@
"endpointVersion": 0,
"deviceIdentifier": null
}
],
"log": []
]
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"featureLevel": 45,
"featureLevel": 51,
"creator": "zap",
"keyValuePairs": [
{
Expand Down Expand Up @@ -3313,6 +3313,5 @@
"endpointVersion": 1,
"deviceIdentifier": null
}
],
"log": []
]
}
5 changes: 2 additions & 3 deletions examples/pump-app/pump-common/pump-app.zap
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"featureLevel": 45,
"featureLevel": 51,
"creator": "zap",
"keyValuePairs": [
{
Expand Down Expand Up @@ -5028,6 +5028,5 @@
"endpointVersion": 1,
"deviceIdentifier": null
}
],
"log": []
]
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"featureLevel": 45,
"featureLevel": 51,
"creator": "zap",
"keyValuePairs": [
{
Expand Down Expand Up @@ -5028,6 +5028,5 @@
"endpointVersion": 1,
"deviceIdentifier": null
}
],
"log": []
]
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"featureLevel": 45,
"featureLevel": 51,
"creator": "zap",
"keyValuePairs": [
{
Expand Down Expand Up @@ -2526,6 +2526,5 @@
"endpointVersion": null,
"deviceIdentifier": null
}
],
"log": []
]
}
5 changes: 2 additions & 3 deletions examples/thermostat/thermostat-common/thermostat.zap
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"featureLevel": 45,
"featureLevel": 51,
"creator": "zap",
"keyValuePairs": [
{
Expand Down Expand Up @@ -16375,6 +16375,5 @@
"endpointVersion": null,
"deviceIdentifier": null
}
],
"log": []
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ vector<uint16_t> ApplicationLauncherManager::proxyGetApplicationList()
return applications;
}

ApplicationLauncherResponse applicationLauncherClusterLaunchApp(EmberAfApplicationLauncherApp application, std::string data)
ApplicationLauncherResponse applicationLauncherClusterLaunchApp(ApplicationLauncherApp application, std::string data)
{
// TODO: Insert your code
ApplicationLauncherResponse response;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,16 @@ CHIP_ERROR AudioOutputManager::Init()
return err;
}

vector<EmberAfAudioOutputInfo> AudioOutputManager::proxyGetListOfAudioOutputInfo()
vector<AudioOutputInfo> AudioOutputManager::proxyGetListOfAudioOutputInfo()
{
// TODO: Insert code here
vector<EmberAfAudioOutputInfo> audioOutputInfos;
vector<AudioOutputInfo> audioOutputInfos;
int maximumVectorSize = 3;
char name[] = "exampleName";

for (int i = 0; i < maximumVectorSize; ++i)
{
EmberAfAudioOutputInfo audioOutputInfo;
AudioOutputInfo audioOutputInfo;
audioOutputInfo.outputType = EMBER_ZCL_AUDIO_OUTPUT_TYPE_HDMI;
audioOutputInfo.name = chip::ByteSpan(chip::Uint8::from_char(name), sizeof(name));
audioOutputInfo.index = static_cast<uint8_t>(1 + i);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ class AudioOutputManager
{
public:
CHIP_ERROR Init();
std::vector<EmberAfAudioOutputInfo> proxyGetListOfAudioOutputInfo();
std::vector<AudioOutputInfo> proxyGetListOfAudioOutputInfo();
};
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ vector<EmberAfContentLaunchStreamingType> ContentLauncherManager::proxyGetSuppor
return supportedStreamingTypes;
}

ContentLaunchResponse ContentLauncherManager::proxyLaunchContentRequest(list<EmberAfContentLaunchParamater> parameterList,
bool autoplay, string data)
ContentLaunchResponse ContentLauncherManager::proxyLaunchContentRequest(list<ContentLaunchParamater> parameterList, bool autoplay,
string data)
{
// TODO: Insert code here
ContentLaunchResponse response;
Expand All @@ -82,7 +82,7 @@ ContentLaunchResponse ContentLauncherManager::proxyLaunchContentRequest(list<Emb
return response;
}
ContentLaunchResponse ContentLauncherManager::proxyLaunchUrlRequest(string contentUrl, string displayString,
EmberAfContentLaunchBrandingInformation brandingInformation)
ContentLaunchBrandingInformation brandingInformation)
{
// TODO: Insert code here
ContentLaunchResponse response;
Expand All @@ -108,7 +108,7 @@ bool emberAfContentLauncherClusterLaunchContentCallback(chip::EndpointId endpoin
{

string dataString(reinterpret_cast<char *>(data));
list<EmberAfContentLaunchParamater> parameterList;
list<ContentLaunchParamater> parameterList;
ContentLaunchResponse response = ContentLauncherManager().proxyLaunchContentRequest(parameterList, autoplay, dataString);
sendResponse("LaunchContent", response, ZCL_LAUNCH_CONTENT_RESPONSE_COMMAND_ID);
return true;
Expand All @@ -119,7 +119,7 @@ bool emberAfContentLauncherClusterLaunchURLCallback(chip::EndpointId endpoint, c
{
string contentUrlString(reinterpret_cast<char *>(contentUrl));
string displayStringString(reinterpret_cast<char *>(displayString));
EmberAfContentLaunchBrandingInformation brandingInformation;
ContentLaunchBrandingInformation brandingInformation;
ContentLaunchResponse response =
ContentLauncherManager().proxyLaunchUrlRequest(contentUrlString, displayStringString, brandingInformation);
sendResponse("LaunchURL", response, ZCL_LAUNCH_URL_RESPONSE_COMMAND_ID);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ class ContentLauncherManager
CHIP_ERROR Init();
std::vector<chip::ByteSpan> proxyGetAcceptsHeader();
std::vector<EmberAfContentLaunchStreamingType> proxyGetSupportedStreamingTypes();
ContentLaunchResponse proxyLaunchContentRequest(std::list<EmberAfContentLaunchParamater> parameterList, bool autoplay,
ContentLaunchResponse proxyLaunchContentRequest(std::list<ContentLaunchParamater> parameterList, bool autoplay,
std::string data);
ContentLaunchResponse proxyLaunchUrlRequest(std::string contentUrl, std::string displayString,
EmberAfContentLaunchBrandingInformation brandingInformation);
ContentLaunchBrandingInformation brandingInformation);
};
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,17 @@ CHIP_ERROR MediaInputManager::Init()
return err;
}

std::vector<EmberAfMediaInputInfo> MediaInputManager::proxyGetInputList()
std::vector<MediaInputInfo> MediaInputManager::proxyGetInputList()
{
// TODO: Insert code here
std::vector<EmberAfMediaInputInfo> mediaInputList;
std::vector<MediaInputInfo> mediaInputList;
int maximumVectorSize = 2;
char description[] = "exampleDescription";
char name[] = "exampleName";

for (int i = 0; i < maximumVectorSize; ++i)
{
EmberAfMediaInputInfo mediaInput;
MediaInputInfo mediaInput;
mediaInput.description = chip::ByteSpan(chip::Uint8::from_char(description), sizeof(description));
mediaInput.name = chip::ByteSpan(chip::Uint8::from_char(name), sizeof(name));
mediaInput.inputType = EMBER_ZCL_MEDIA_INPUT_TYPE_HDMI;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ class MediaInputManager
{
public:
CHIP_ERROR Init();
std::vector<EmberAfMediaInputInfo> proxyGetInputList();
std::vector<MediaInputInfo> proxyGetInputList();
};
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,16 @@ CHIP_ERROR TargetNavigatorManager::Init()
return err;
}

std::vector<EmberAfNavigateTargetTargetInfo> TargetNavigatorManager::proxyGetTargetInfoList()
std::vector<NavigateTargetTargetInfo> TargetNavigatorManager::proxyGetTargetInfoList()
{
// TODO: Insert code here
std::vector<EmberAfNavigateTargetTargetInfo> targets;
std::vector<NavigateTargetTargetInfo> targets;
int maximumVectorSize = 2;
char name[] = "exampleName";

for (int i = 0; i < maximumVectorSize; ++i)
{
EmberAfNavigateTargetTargetInfo targetInfo;
NavigateTargetTargetInfo targetInfo;
targetInfo.name = chip::ByteSpan(chip::Uint8::from_char(name), sizeof(name));
targetInfo.identifier = static_cast<uint8_t>(1 + i);
targets.push_back(targetInfo);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ class TargetNavigatorManager
{
public:
CHIP_ERROR Init();
std::vector<EmberAfNavigateTargetTargetInfo> proxyGetTargetInfoList();
std::vector<NavigateTargetTargetInfo> proxyGetTargetInfoList();
};
10 changes: 5 additions & 5 deletions examples/tv-app/linux/include/tv-channel/TvChannelManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,18 +41,18 @@ CHIP_ERROR TvChannelManager::Init()
return err;
}

std::vector<EmberAfTvChannelInfo> TvChannelManager::proxyGetTvChannelList()
std::vector<TvChannelInfo> TvChannelManager::proxyGetTvChannelList()
{
// TODO: Insert code here
std::vector<EmberAfTvChannelInfo> tvChannels;
std::vector<TvChannelInfo> tvChannels;
int maximumVectorSize = 2;
char affiliateCallSign[] = "exampleASign";
char callSign[] = "exampleCSign";
char name[] = "exampleName";

for (int i = 0; i < maximumVectorSize; ++i)
{
EmberAfTvChannelInfo channelInfo;
TvChannelInfo channelInfo;
channelInfo.affiliateCallSign = ByteSpan(Uint8::from_char(affiliateCallSign), sizeof(affiliateCallSign));
channelInfo.callSign = ByteSpan(Uint8::from_char(callSign), sizeof(callSign));
channelInfo.name = ByteSpan(Uint8::from_char(name), sizeof(name));
Expand All @@ -64,10 +64,10 @@ std::vector<EmberAfTvChannelInfo> TvChannelManager::proxyGetTvChannelList()
return tvChannels;
}

EmberAfTvChannelInfo tvChannelClusterChangeChannel(std::string match)
TvChannelInfo tvChannelClusterChangeChannel(std::string match)
{
// TODO: Insert code here
EmberAfTvChannelInfo channel = {};
TvChannelInfo channel = {};
return channel;
}
bool tvChannelClusterChangeChannelByNumber(uint16_t majorNumber, uint16_t minorNumber)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ class TvChannelManager
{
public:
CHIP_ERROR Init();
std::vector<EmberAfTvChannelInfo> proxyGetTvChannelList();
std::vector<TvChannelInfo> proxyGetTvChannelList();
};
5 changes: 2 additions & 3 deletions examples/tv-app/tv-common/tv-app.zap
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"featureLevel": 45,
"featureLevel": 51,
"creator": "zap",
"keyValuePairs": [
{
Expand Down Expand Up @@ -8753,6 +8753,5 @@
"endpointVersion": 1,
"deviceIdentifier": 36
}
],
"log": []
]
}
5 changes: 2 additions & 3 deletions examples/tv-casting-app/tv-casting-common/tv-casting-app.zap
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"featureLevel": 45,
"featureLevel": 51,
"creator": "zap",
"keyValuePairs": [
{
Expand Down Expand Up @@ -16179,6 +16179,5 @@
"endpointVersion": null,
"deviceIdentifier": null
}
],
"log": []
]
}
5 changes: 2 additions & 3 deletions examples/window-app/common/window-app.zap
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"featureLevel": 45,
"featureLevel": 51,
"creator": "zap",
"keyValuePairs": [
{
Expand Down Expand Up @@ -6289,6 +6289,5 @@
"endpointVersion": 1,
"deviceIdentifier": 514
}
],
"log": []
]
}
Loading

0 comments on commit b53aed7

Please sign in to comment.