Skip to content

Commit

Permalink
Update Temperature Measurement gen/ folder from ZAP
Browse files Browse the repository at this point in the history
  • Loading branch information
vivien-apple committed Nov 13, 2020
1 parent 9fcb5d5 commit 2d21d6e
Show file tree
Hide file tree
Showing 14 changed files with 8,069 additions and 31,707 deletions.
533 changes: 268 additions & 265 deletions examples/temperature-measurement-app/esp32/main/gen/af-structs.h

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/**

/*
*
* Copyright (c) 2020 Project CHIP Authors
*
Expand All @@ -14,13 +15,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// This file is generated by Simplicity Studio. Please do not edit manually.

// Enclosing macro to prevent multiple inclusion
#ifndef SILABS_ATTRIBUTE_STORAGE_GEN
#define SILABS_ATTRIBUTE_STORAGE_GEN
// Prevent multiple inclusion
#pragma once

// Attribute masks modify how attributes are used by the framework
//
// Attribute that has this mask is NOT read-only
#define ATTRIBUTE_MASK_WRITABLE (0x01)
// Attribute that has this mask is saved to a token
Expand All @@ -37,6 +37,7 @@
#define ATTRIBUTE_MASK_CLIENT (0x40)

// Cluster masks modify how clusters are used by the framework
//
// Does this cluster have init function?
#define CLUSTER_MASK_INIT_FUNCTION (0x01)
// Does this cluster have attribute changed function?
Expand All @@ -45,7 +46,7 @@
#define CLUSTER_MASK_DEFAULT_RESPONSE_FUNCTION (0x04)
// Does this cluster have message sent function?
#define CLUSTER_MASK_MESSAGE_SENT_FUNCTION (0x08)
// Does this cluster have manufacturer specific attribute changed funciton?
// Does this cluster have manufacturer specific attribute changed function?
#define CLUSTER_MASK_MANUFACTURER_SPECIFIC_ATTRIBUTE_CHANGED_FUNCTION (0x10)
// Does this cluster have pre-attribute changed function?
#define CLUSTER_MASK_PRE_ATTRIBUTE_CHANGED_FUNCTION (0x20)
Expand All @@ -55,6 +56,7 @@
#define CLUSTER_MASK_CLIENT (0x80)

// Command masks modify meanings of commands
//
// Is sending of this client command supported
#define COMMAND_MASK_OUTGOING_CLIENT (0x01)
// Is sending of this server command supported
Expand All @@ -65,4 +67,3 @@
#define COMMAND_MASK_INCOMING_SERVER (0x08)
// Is this command manufacturer specific?
#define COMMAND_MASK_MANUFACTURER_SPECIFIC (0x10)
#endif // SILABS_ATTRIBUTE_STORAGE_GEN
8,319 changes: 4,048 additions & 4,271 deletions examples/temperature-measurement-app/esp32/main/gen/attribute-id.h

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/**

/*
*
* Copyright (c) 2020 Project CHIP Authors
*
Expand All @@ -14,17 +15,20 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// This file is generated by Simplicity Studio. Please do not edit manually.

// Enclosing macro to prevent multiple inclusion
#ifndef SILABS_ATTRIBUTE_SIZE
#define SILABS_ATTRIBUTE_SIZE
// Prevent multiple inclusion
#pragma once

// Used ZCL attribute type sizes
ZCL_BITMAP16_ATTRIBUTE_TYPE, 2, ZCL_BITMAP24_ATTRIBUTE_TYPE, 3, ZCL_BITMAP32_ATTRIBUTE_TYPE, 4, ZCL_BITMAP48_ATTRIBUTE_TYPE, 6,
ZCL_BITMAP64_ATTRIBUTE_TYPE, 8, ZCL_BITMAP8_ATTRIBUTE_TYPE, 1, ZCL_BOOLEAN_ATTRIBUTE_TYPE, 1, ZCL_DATA8_ATTRIBUTE_TYPE, 1,
ZCL_ENUM16_ATTRIBUTE_TYPE, 2, ZCL_ENUM8_ATTRIBUTE_TYPE, 1, ZCL_FLOAT_SINGLE_ATTRIBUTE_TYPE, 4, ZCL_IEEE_ADDRESS_ATTRIBUTE_TYPE,
8, ZCL_INT16S_ATTRIBUTE_TYPE, 2, ZCL_INT16U_ATTRIBUTE_TYPE, 2, ZCL_INT24S_ATTRIBUTE_TYPE, 3, ZCL_INT24U_ATTRIBUTE_TYPE, 3,
ZCL_INT32S_ATTRIBUTE_TYPE, 4, ZCL_INT32U_ATTRIBUTE_TYPE, 4, ZCL_INT48U_ATTRIBUTE_TYPE, 6, ZCL_INT56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S_ATTRIBUTE_TYPE, 5, ZCL_INT48S_ATTRIBUTE_TYPE, 6, ZCL_INT56S_ATTRIBUTE_TYPE, 7,
ZCL_INT64S_ATTRIBUTE_TYPE, 8, ZCL_ENUM8_ATTRIBUTE_TYPE, 1, ZCL_ENUM16_ATTRIBUTE_TYPE, 2, ZCL_FLOAT_SEMI_ATTRIBUTE_TYPE, 2,
ZCL_FLOAT_SINGLE_ATTRIBUTE_TYPE, 4, ZCL_FLOAT_DOUBLE_ATTRIBUTE_TYPE, 8, ZCL_TIME_OF_DAY_ATTRIBUTE_TYPE, 4,
ZCL_DATE_ATTRIBUTE_TYPE, 4, ZCL_UTC_TIME_ATTRIBUTE_TYPE, 4, ZCL_CLUSTER_ID_ATTRIBUTE_TYPE, 2, ZCL_ATTRIBUTE_ID_ATTRIBUTE_TYPE,
2, ZCL_BACNET_OID_ATTRIBUTE_TYPE, 4, ZCL_IEEE_ADDRESS_ATTRIBUTE_TYPE, 8, ZCL_SECURITY_KEY_ATTRIBUTE_TYPE, 16,\
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/**

/*
*
* Copyright (c) 2020 Project CHIP Authors
*
Expand All @@ -14,11 +15,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// This file is generated by Simplicity Studio. Please do not edit manually.

// Enclosing macro to prevent multiple inclusion
#ifndef SILABS_EMBER_AF_ATTRIBUTE_TYPES
#define SILABS_EMBER_AF_ATTRIBUTE_TYPES
// Prevent multiple inclusion
#pragma once

// ZCL attribute types
enum
Expand Down Expand Up @@ -78,7 +77,5 @@ enum
ZCL_BACNET_OID_ATTRIBUTE_TYPE = 0xEA, // BACnet OID
ZCL_IEEE_ADDRESS_ATTRIBUTE_TYPE = 0xF0, // IEEE address
ZCL_SECURITY_KEY_ATTRIBUTE_TYPE = 0xF1, // 128-bit security key
ZCL_UNKNOWN_ATTRIBUTE_TYPE = 0xFF // Unknown

ZCL_UNKNOWN_ATTRIBUTE_TYPE = 0xFF, // Unknown
};
#endif // SILABS_EMBER_AF_ATTRIBUTE_TYPES
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/**

/*
*
* Copyright (c) 2020 Project CHIP Authors
*
Expand All @@ -14,23 +15,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// This file is generated by Simplicity Studio. Please do not edit manually.

// This is a set of generated functions that parse the
// the incomming message, and call appropriate command handler.

#ifdef EZSP_HOST
// Includes needed for ember related functions for the EZSP host
#include "app/util/ezsp/ezsp-protocol.h"
#include "app/util/ezsp/ezsp-utils.h"
#include "app/util/ezsp/ezsp.h"
#include "app/util/ezsp/serial-interface.h"
#include "stack/include/ember-types.h"
#include "stack/include/error.h"
#else
// Includes needed for ember related functions for the EM250
// #include "stack/include/ember.h"
#endif // EZSP_HOST

#include <stdint.h>

Expand All @@ -40,6 +24,9 @@
#include "command-id.h"
#include "util.h"

EmberAfStatus emberAfBasicClusterServerCommandParse(EmberAfClusterCommand * cmd);
EmberAfStatus emberAfTemperatureMeasurementClusterServerCommandParse(EmberAfClusterCommand * cmd);

static EmberAfStatus status(bool wasHandled, bool clusterExists, bool mfgSpecific)
{
if (wasHandled)
Expand All @@ -52,7 +39,7 @@ static EmberAfStatus status(bool wasHandled, bool clusterExists, bool mfgSpecifi
}
else if (clusterExists)
{
return EMBER_ZCL_STATUS_UNSUP_CLUSTER_COMMAND;
return EMBER_ZCL_STATUS_UNSUP_COMMAND;
}
else
{
Expand All @@ -69,12 +56,6 @@ EmberAfStatus emberAfClusterSpecificCommandParse(EmberAfClusterCommand * cmd)
{
switch (cmd->apsFrame->clusterId)
{
case ZCL_BASIC_CLUSTER_ID:
result = status(false, true, cmd->mfgSpecific);
break;
case ZCL_TEMP_MEASUREMENT_CLUSTER_ID:
result = status(false, true, cmd->mfgSpecific);
break;
default:
// Unrecognized cluster ID, error status will apply.
break;
Expand All @@ -89,7 +70,7 @@ EmberAfStatus emberAfClusterSpecificCommandParse(EmberAfClusterCommand * cmd)
result = emberAfBasicClusterServerCommandParse(cmd);
break;
case ZCL_TEMP_MEASUREMENT_CLUSTER_ID:
result = status(false, true, cmd->mfgSpecific);
result = emberAfTemperatureMeasurementClusterServerCommandParse(cmd);
break;
default:
// Unrecognized cluster ID, error status will apply.
Expand All @@ -99,16 +80,17 @@ EmberAfStatus emberAfClusterSpecificCommandParse(EmberAfClusterCommand * cmd)
return result;
}

// Cluster: Basic, server
// Cluster specific command parsing

EmberAfStatus emberAfBasicClusterServerCommandParse(EmberAfClusterCommand * cmd)
{
bool wasHandled = false;

if (!cmd->mfgSpecific)
{
switch (cmd->commandId)
{
case ZCL_RESET_TO_FACTORY_DEFAULTS_COMMAND_ID: {
// Command is fixed length: 0
wasHandled = emberAfBasicClusterResetToFactoryDefaultsCallback();
break;
}
Expand All @@ -120,3 +102,19 @@ EmberAfStatus emberAfBasicClusterServerCommandParse(EmberAfClusterCommand * cmd)
}
return status(wasHandled, true, cmd->mfgSpecific);
}
EmberAfStatus emberAfTemperatureMeasurementClusterServerCommandParse(EmberAfClusterCommand * cmd)
{
bool wasHandled = false;

if (!cmd->mfgSpecific)
{
switch (cmd->commandId)
{
default: {
// Unrecognized command ID, error status will apply.
break;
}
}
}
return status(wasHandled, true, cmd->mfgSpecific);
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/**

/*
*
* Copyright (c) 2020 Project CHIP Authors
*
Expand All @@ -14,18 +15,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// This file is generated by Simplicity Studio. Please do not edit manually.

// Enclosing macro to prevent multiple inclusion
#ifndef SILABS_EMBER_AF_COMMAND_PARSE_HEADER
#define SILABS_EMBER_AF_COMMAND_PARSE_HEADER
// Prevent multiple inclusion
#pragma once

#include "af-types.h"

// This is a set of generated prototype for functions that parse the
// the incomming message, and call appropriate command handler.

// Cluster: Basic, server
EmberAfStatus emberAfBasicClusterServerCommandParse(EmberAfClusterCommand * cmd);

#endif // SILABS_EMBER_AF_COMMAND_PARSE_HEADER
Loading

0 comments on commit 2d21d6e

Please sign in to comment.