Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable ZLL OnOff specific commands in bridge-app.zap #4879

Merged
merged 2 commits into from
Feb 16, 2021
Merged
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
14 changes: 14 additions & 0 deletions BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,10 @@ if (current_toolchain != "${dir_pw_toolchain}/dummy:dummy") {
enable_linux_all_clusters_app_build =
enable_default_builds && (host_os == "linux" || host_os == "mac")

# Build the Linux bridge app example.
enable_linux_bridge_app_build =
enable_default_builds && (host_os == "linux" || host_os == "mac")

# Build the Linux lighting app example.
enable_linux_lighting_app_build =
enable_default_builds && (host_os == "linux" || host_os == "mac")
Expand Down Expand Up @@ -257,6 +261,13 @@ if (current_toolchain != "${dir_pw_toolchain}/dummy:dummy") {
}
}

if (enable_linux_bridge_app_build) {
group("linux_bridge_app") {
deps =
[ "${chip_root}/examples/bridge-app/linux(${standalone_toolchain})" ]
}
}

if (enable_linux_lighting_app_build) {
group("linux_lighting_app") {
deps = [
Expand Down Expand Up @@ -317,6 +328,9 @@ if (current_toolchain != "${dir_pw_toolchain}/dummy:dummy") {
if (enable_linux_all_clusters_app_build) {
deps += [ ":linux_all_clusters_app" ]
}
if (enable_linux_bridge_app_build) {
deps += [ ":linux_bridge_app" ]
}
if (enable_linux_lighting_app_build) {
deps += [ ":linux_lighting_app" ]
}
Expand Down
108 changes: 54 additions & 54 deletions examples/bridge-app/bridge-common/bridge-app.zap
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"writeTime": "Fri Feb 12 2021 07:41:35 GMT-0800 (Pacific Standard Time)",
"writeTime": "Tue Feb 16 2021 18:07:17 GMT+0100 (Central European Standard Time)",
"featureLevel": 11,
"creator": "zap",
"keyValuePairs": [
Expand Down Expand Up @@ -451,56 +451,6 @@
"define": "SCENES_CLUSTER",
"side": "server",
"enabled": 0,
"commands": [
{
"name": "AddSceneResponse",
"code": 0,
"mfgCode": null,
"source": "server",
"incoming": 0,
"outgoing": 1
},
{
"name": "ViewSceneResponse",
"code": 1,
"mfgCode": null,
"source": "server",
"incoming": 0,
"outgoing": 1
},
{
"name": "RemoveSceneResponse",
"code": 2,
"mfgCode": null,
"source": "server",
"incoming": 0,
"outgoing": 1
},
{
"name": "RemoveAllScenesResponse",
"code": 3,
"mfgCode": null,
"source": "server",
"incoming": 0,
"outgoing": 1
},
{
"name": "StoreSceneResponse",
"code": 4,
"mfgCode": null,
"source": "server",
"incoming": 0,
"outgoing": 1
},
{
"name": "GetSceneMembershipResponse",
"code": 6,
"mfgCode": null,
"source": "server",
"incoming": 0,
"outgoing": 1
}
],
"attributes": [
{
"name": "cluster revision",
Expand Down Expand Up @@ -592,6 +542,56 @@
"maxInterval": 65344,
"reportableChange": 0
}
],
"commands": [
{
"name": "AddSceneResponse",
"code": 0,
"mfgCode": null,
"source": "server",
"incoming": 0,
"outgoing": 1
},
{
"name": "ViewSceneResponse",
"code": 1,
"mfgCode": null,
"source": "server",
"incoming": 0,
"outgoing": 1
},
{
"name": "RemoveSceneResponse",
"code": 2,
"mfgCode": null,
"source": "server",
"incoming": 0,
"outgoing": 1
},
{
"name": "RemoveAllScenesResponse",
"code": 3,
"mfgCode": null,
"source": "server",
"incoming": 0,
"outgoing": 1
},
{
"name": "StoreSceneResponse",
"code": 4,
"mfgCode": null,
"source": "server",
"incoming": 0,
"outgoing": 1
},
{
"name": "GetSceneMembershipResponse",
"code": 6,
"mfgCode": null,
"source": "server",
"incoming": 0,
"outgoing": 1
}
]
},
{
Expand Down Expand Up @@ -1617,23 +1617,23 @@
"code": 64,
"mfgCode": null,
"source": "client",
"incoming": 1,
"incoming": 0,
"outgoing": 0
},
{
"name": "OnWithRecallGlobalScene",
"code": 65,
"mfgCode": null,
"source": "client",
"incoming": 1,
"incoming": 0,
"outgoing": 0
},
{
"name": "OnWithTimedOff",
"code": 66,
"mfgCode": null,
"source": "client",
"incoming": 1,
"incoming": 0,
"outgoing": 0
}
],
Expand Down
51 changes: 0 additions & 51 deletions examples/bridge-app/bridge-common/gen/call-command-handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -338,61 +338,10 @@ EmberAfStatus emberAfOnOffClusterServerCommandParse(EmberAfClusterCommand * cmd)
wasHandled = emberAfOnOffClusterOffCallback();
break;
}
case ZCL_OFF_WITH_EFFECT_COMMAND_ID: {
uint16_t payloadOffset = cmd->payloadStartIndex;
uint8_t effectId;
uint8_t effectVariant;

if (cmd->bufLen < payloadOffset + 1)
{
return EMBER_ZCL_STATUS_MALFORMED_COMMAND;
}
effectId = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen);
payloadOffset = static_cast<uint16_t>(payloadOffset + 1);
if (cmd->bufLen < payloadOffset + 1)
{
return EMBER_ZCL_STATUS_MALFORMED_COMMAND;
}
effectVariant = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen);

wasHandled = emberAfOnOffClusterOffWithEffectCallback(effectId, effectVariant);
break;
}
case ZCL_ON_COMMAND_ID: {
wasHandled = emberAfOnOffClusterOnCallback();
break;
}
case ZCL_ON_WITH_RECALL_GLOBAL_SCENE_COMMAND_ID: {
wasHandled = emberAfOnOffClusterOnWithRecallGlobalSceneCallback();
break;
}
case ZCL_ON_WITH_TIMED_OFF_COMMAND_ID: {
uint16_t payloadOffset = cmd->payloadStartIndex;
uint8_t onOffControl;
uint16_t onTime;
uint16_t offWaitTime;

if (cmd->bufLen < payloadOffset + 1)
{
return EMBER_ZCL_STATUS_MALFORMED_COMMAND;
}
onOffControl = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen);
payloadOffset = static_cast<uint16_t>(payloadOffset + 1);
if (cmd->bufLen < payloadOffset + 2)
{
return EMBER_ZCL_STATUS_MALFORMED_COMMAND;
}
onTime = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen);
payloadOffset = static_cast<uint16_t>(payloadOffset + 2);
if (cmd->bufLen < payloadOffset + 2)
{
return EMBER_ZCL_STATUS_MALFORMED_COMMAND;
}
offWaitTime = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen);

wasHandled = emberAfOnOffClusterOnWithTimedOffCallback(onOffControl, onTime, offWaitTime);
break;
}
case ZCL_TOGGLE_COMMAND_ID: {
wasHandled = emberAfOnOffClusterToggleCallback();
break;
Expand Down
23 changes: 0 additions & 23 deletions examples/bridge-app/bridge-common/gen/callback.h
Original file line number Diff line number Diff line change
Expand Up @@ -355,35 +355,12 @@ bool emberAfLevelControlClusterStopWithOnOffCallback();

bool emberAfOnOffClusterOffCallback();

/**
* @brief On/off Cluster OffWithEffect Command callback
* @param effectId
* @param effectVariant
*/

bool emberAfOnOffClusterOffWithEffectCallback(uint8_t effectId, uint8_t effectVariant);

/**
* @brief On/off Cluster On Command callback
*/

bool emberAfOnOffClusterOnCallback();

/**
* @brief On/off Cluster OnWithRecallGlobalScene Command callback
*/

bool emberAfOnOffClusterOnWithRecallGlobalSceneCallback();

/**
* @brief On/off Cluster OnWithTimedOff Command callback
* @param onOffControl
* @param onTime
* @param offWaitTime
*/

bool emberAfOnOffClusterOnWithTimedOffCallback(uint8_t onOffControl, uint16_t onTime, uint16_t offWaitTime);

/**
* @brief On/off Cluster Toggle Command callback
*/
Expand Down
6 changes: 3 additions & 3 deletions examples/bridge-app/bridge-common/gen/endpoint_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -235,11 +235,11 @@
{ 0x0006, 0x02, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* On/off (server): Toggle */ \
{ 0x0006, 0x02, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* On/off (server): Toggle */ \
{ 0x0006, 0x02, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* On/off (server): Toggle */ \
{ 0x0006, 0x40, 0 }, /* On/off (server): OffWithEffect */ \
{ 0x0006, 0x40, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* On/off (server): OffWithEffect */ \
{ 0x0006, 0x40, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* On/off (server): OffWithEffect */ \
{ 0x0006, 0x41, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* On/off (server): OnWithRecallGlobalScene */ \
{ 0x0006, 0x41, 0 }, /* On/off (server): OnWithRecallGlobalScene */ \
{ 0x0006, 0x41, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* On/off (server): OnWithRecallGlobalScene */ \
{ 0x0006, 0x42, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* On/off (server): OnWithTimedOff */ \
{ 0x0006, 0x42, 0 }, /* On/off (server): OnWithTimedOff */ \
{ 0x0006, 0x42, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* On/off (server): OnWithTimedOff */ \
{ 0x0008, 0x00, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* Level Control (server): MoveToLevel */ \
{ 0x0008, 0x00, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* Level Control (server): MoveToLevel */ \
Expand Down
4 changes: 2 additions & 2 deletions examples/bridge-app/linux/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ config("includes") {
]
}

executable("chip-tool-server") {
executable("bridge-app-server") {
sources = [
"LightingManager.cpp",
"Options.cpp",
Expand All @@ -52,5 +52,5 @@ executable("chip-tool-server") {
}

group("linux") {
deps = [ ":chip-tool-server" ]
deps = [ ":bridge-app-server" ]
}