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

Add custom types to chip ZCL inside src/app/zap-templates/zcl #4348

Merged
merged 1 commit into from
Jan 14, 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
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
// Prevent multiple inclusion
#pragma once

// General cluster attributes ids
// Global cluster attribute ids
#define ZCL_CLUSTER_REVISION_CLIENT_ATTRIBUTE_ID (0xFFFD)
#define ZCL_CLUSTER_REVISION_SERVER_ATTRIBUTE_ID (0xFFFD)
#define ZCL_REPORTING_STATUS_CLIENT_ATTRIBUTE_ID (0xFFFE)
Expand Down Expand Up @@ -4059,12 +4059,8 @@
// Attribute ids for cluster: Binding

// Client attributes
#define ZCL_CLUSTER_REVISION_CLIENT_ATTRIBUTE_ID (0xFFFD)
#define ZCL_REPORTING_STATUS_CLIENT_ATTRIBUTE_ID (0xFFFE)

// Server attributes
#define ZCL_CLUSTER_REVISION_SERVER_ATTRIBUTE_ID (0xFFFD)
#define ZCL_REPORTING_STATUS_SERVER_ATTRIBUTE_ID (0xFFFE)

// Attribute ids for cluster: Sample Mfg Specific Cluster

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,5 @@ ZCL_DATA8_ATTRIBUTE_TYPE, 1, ZCL_DATA16_ATTRIBUTE_TYPE, 2, ZCL_DATA24_ATTRIBUTE_
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,
ZCL_ENDPOINT_ID_ATTRIBUTE_TYPE, 1, ZCL_GROUP_ID_ATTRIBUTE_TYPE, 2, ZCL_COMMAND_ID_ATTRIBUTE_TYPE, 1, ZCL_NODE_ID_ATTRIBUTE_TYPE,
8,
Original file line number Diff line number Diff line change
Expand Up @@ -76,5 +76,9 @@ 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_ENDPOINT_ID_ATTRIBUTE_TYPE = 0xF2, // Endpoint Id
ZCL_GROUP_ID_ATTRIBUTE_TYPE = 0xF3, // Group Id
ZCL_COMMAND_ID_ATTRIBUTE_TYPE = 0xF4, // Command Id
ZCL_NODE_ID_ATTRIBUTE_TYPE = 0xF5, // Node Id
ZCL_UNKNOWN_ATTRIBUTE_TYPE = 0xFF, // Unknown
};
Original file line number Diff line number Diff line change
Expand Up @@ -5665,9 +5665,9 @@
/** @brief Command description for Bind
*
* Command: Bind
* @param nodeId INT64U
* @param groupId INT16U
* @param endpointId INT8U
* @param nodeId NODE_ID
* @param groupId GROUP_ID
* @param endpointId ENDPOINT_ID
* @param clusterId CLUSTER_ID
*/
#define emberAfFillCommandBindingClusterBind(nodeId, groupId, endpointId, clusterId) \
Expand All @@ -5678,9 +5678,9 @@
/** @brief Command description for Unbind
*
* Command: Unbind
* @param nodeId INT64U
* @param groupId INT16U
* @param endpointId INT8U
* @param nodeId NODE_ID
* @param groupId GROUP_ID
* @param endpointId ENDPOINT_ID
* @param clusterId CLUSTER_ID
*/
#define emberAfFillCommandBindingClusterUnbind(nodeId, groupId, endpointId, clusterId) \
Expand Down
2 changes: 1 addition & 1 deletion examples/all-clusters-app/all-clusters-common/gen/enums.h
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ typedef enum
EMBER_ZCL_DOOR_LOCK_OPERATING_MODE_PRIVACY_MODE = 0x02,
EMBER_ZCL_DOOR_LOCK_OPERATING_MODE_NO_RF_LOCK_OR_UNLOCK = 0x03,
EMBER_ZCL_DOOR_LOCK_OPERATING_MODE_LOCAL_PROGRAMMING_MODE = 0x04,
EMBER_ZCL_DOOR_LOCK_OPERATING_MODE_PASSAGE_MODE______ = 0x05,
EMBER_ZCL_DOOR_LOCK_OPERATING_MODE_PASSAGE_MODE = 0x05,
} EmberAfDoorLockOperatingMode;

// Enum for DoorLockOperationEventCode
Expand Down
6 changes: 1 addition & 5 deletions examples/lighting-app/lighting-common/gen/attribute-id.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
// Prevent multiple inclusion
#pragma once

// General cluster attributes ids
// Global cluster attribute ids
#define ZCL_CLUSTER_REVISION_CLIENT_ATTRIBUTE_ID (0xFFFD)
#define ZCL_CLUSTER_REVISION_SERVER_ATTRIBUTE_ID (0xFFFD)
#define ZCL_REPORTING_STATUS_CLIENT_ATTRIBUTE_ID (0xFFFE)
Expand Down Expand Up @@ -4059,12 +4059,8 @@
// Attribute ids for cluster: Binding

// Client attributes
#define ZCL_CLUSTER_REVISION_CLIENT_ATTRIBUTE_ID (0xFFFD)
#define ZCL_REPORTING_STATUS_CLIENT_ATTRIBUTE_ID (0xFFFE)

// Server attributes
#define ZCL_CLUSTER_REVISION_SERVER_ATTRIBUTE_ID (0xFFFD)
#define ZCL_REPORTING_STATUS_SERVER_ATTRIBUTE_ID (0xFFFE)

// Attribute ids for cluster: Sample Mfg Specific Cluster

Expand Down
2 changes: 2 additions & 0 deletions examples/lighting-app/lighting-common/gen/attribute-size.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,5 @@ ZCL_DATA8_ATTRIBUTE_TYPE, 1, ZCL_DATA16_ATTRIBUTE_TYPE, 2, ZCL_DATA24_ATTRIBUTE_
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,
ZCL_ENDPOINT_ID_ATTRIBUTE_TYPE, 1, ZCL_GROUP_ID_ATTRIBUTE_TYPE, 2, ZCL_COMMAND_ID_ATTRIBUTE_TYPE, 1, ZCL_NODE_ID_ATTRIBUTE_TYPE,
8,
4 changes: 4 additions & 0 deletions examples/lighting-app/lighting-common/gen/attribute-type.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,5 +76,9 @@ 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_ENDPOINT_ID_ATTRIBUTE_TYPE = 0xF2, // Endpoint Id
ZCL_GROUP_ID_ATTRIBUTE_TYPE = 0xF3, // Group Id
ZCL_COMMAND_ID_ATTRIBUTE_TYPE = 0xF4, // Command Id
ZCL_NODE_ID_ATTRIBUTE_TYPE = 0xF5, // Node Id
ZCL_UNKNOWN_ATTRIBUTE_TYPE = 0xFF, // Unknown
};
12 changes: 6 additions & 6 deletions examples/lighting-app/lighting-common/gen/client-command-macro.h
Original file line number Diff line number Diff line change
Expand Up @@ -5665,9 +5665,9 @@
/** @brief Command description for Bind
*
* Command: Bind
* @param nodeId INT64U
* @param groupId INT16U
* @param endpointId INT8U
* @param nodeId NODE_ID
* @param groupId GROUP_ID
* @param endpointId ENDPOINT_ID
* @param clusterId CLUSTER_ID
*/
#define emberAfFillCommandBindingClusterBind(nodeId, groupId, endpointId, clusterId) \
Expand All @@ -5678,9 +5678,9 @@
/** @brief Command description for Unbind
*
* Command: Unbind
* @param nodeId INT64U
* @param groupId INT16U
* @param endpointId INT8U
* @param nodeId NODE_ID
* @param groupId GROUP_ID
* @param endpointId ENDPOINT_ID
* @param clusterId CLUSTER_ID
*/
#define emberAfFillCommandBindingClusterUnbind(nodeId, groupId, endpointId, clusterId) \
Expand Down
2 changes: 1 addition & 1 deletion examples/lighting-app/lighting-common/gen/enums.h
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ typedef enum
EMBER_ZCL_DOOR_LOCK_OPERATING_MODE_PRIVACY_MODE = 0x02,
EMBER_ZCL_DOOR_LOCK_OPERATING_MODE_NO_RF_LOCK_OR_UNLOCK = 0x03,
EMBER_ZCL_DOOR_LOCK_OPERATING_MODE_LOCAL_PROGRAMMING_MODE = 0x04,
EMBER_ZCL_DOOR_LOCK_OPERATING_MODE_PASSAGE_MODE______ = 0x05,
EMBER_ZCL_DOOR_LOCK_OPERATING_MODE_PASSAGE_MODE = 0x05,
} EmberAfDoorLockOperatingMode;

// Enum for DoorLockOperationEventCode
Expand Down
6 changes: 1 addition & 5 deletions examples/lock-app/lock-common/gen/attribute-id.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
// Prevent multiple inclusion
#pragma once

// General cluster attributes ids
// Global cluster attribute ids
#define ZCL_CLUSTER_REVISION_CLIENT_ATTRIBUTE_ID (0xFFFD)
#define ZCL_CLUSTER_REVISION_SERVER_ATTRIBUTE_ID (0xFFFD)
#define ZCL_REPORTING_STATUS_CLIENT_ATTRIBUTE_ID (0xFFFE)
Expand Down Expand Up @@ -4059,12 +4059,8 @@
// Attribute ids for cluster: Binding

// Client attributes
#define ZCL_CLUSTER_REVISION_CLIENT_ATTRIBUTE_ID (0xFFFD)
#define ZCL_REPORTING_STATUS_CLIENT_ATTRIBUTE_ID (0xFFFE)

// Server attributes
#define ZCL_CLUSTER_REVISION_SERVER_ATTRIBUTE_ID (0xFFFD)
#define ZCL_REPORTING_STATUS_SERVER_ATTRIBUTE_ID (0xFFFE)

// Attribute ids for cluster: Sample Mfg Specific Cluster

Expand Down
2 changes: 2 additions & 0 deletions examples/lock-app/lock-common/gen/attribute-size.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,5 @@ ZCL_DATA8_ATTRIBUTE_TYPE, 1, ZCL_DATA16_ATTRIBUTE_TYPE, 2, ZCL_DATA24_ATTRIBUTE_
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,
ZCL_ENDPOINT_ID_ATTRIBUTE_TYPE, 1, ZCL_GROUP_ID_ATTRIBUTE_TYPE, 2, ZCL_COMMAND_ID_ATTRIBUTE_TYPE, 1, ZCL_NODE_ID_ATTRIBUTE_TYPE,
8,
4 changes: 4 additions & 0 deletions examples/lock-app/lock-common/gen/attribute-type.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,5 +76,9 @@ 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_ENDPOINT_ID_ATTRIBUTE_TYPE = 0xF2, // Endpoint Id
ZCL_GROUP_ID_ATTRIBUTE_TYPE = 0xF3, // Group Id
ZCL_COMMAND_ID_ATTRIBUTE_TYPE = 0xF4, // Command Id
ZCL_NODE_ID_ATTRIBUTE_TYPE = 0xF5, // Node Id
ZCL_UNKNOWN_ATTRIBUTE_TYPE = 0xFF, // Unknown
};
12 changes: 6 additions & 6 deletions examples/lock-app/lock-common/gen/client-command-macro.h
Original file line number Diff line number Diff line change
Expand Up @@ -5665,9 +5665,9 @@
/** @brief Command description for Bind
*
* Command: Bind
* @param nodeId INT64U
* @param groupId INT16U
* @param endpointId INT8U
* @param nodeId NODE_ID
* @param groupId GROUP_ID
* @param endpointId ENDPOINT_ID
* @param clusterId CLUSTER_ID
*/
#define emberAfFillCommandBindingClusterBind(nodeId, groupId, endpointId, clusterId) \
Expand All @@ -5678,9 +5678,9 @@
/** @brief Command description for Unbind
*
* Command: Unbind
* @param nodeId INT64U
* @param groupId INT16U
* @param endpointId INT8U
* @param nodeId NODE_ID
* @param groupId GROUP_ID
* @param endpointId ENDPOINT_ID
* @param clusterId CLUSTER_ID
*/
#define emberAfFillCommandBindingClusterUnbind(nodeId, groupId, endpointId, clusterId) \
Expand Down
2 changes: 1 addition & 1 deletion examples/lock-app/lock-common/gen/enums.h
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ typedef enum
EMBER_ZCL_DOOR_LOCK_OPERATING_MODE_PRIVACY_MODE = 0x02,
EMBER_ZCL_DOOR_LOCK_OPERATING_MODE_NO_RF_LOCK_OR_UNLOCK = 0x03,
EMBER_ZCL_DOOR_LOCK_OPERATING_MODE_LOCAL_PROGRAMMING_MODE = 0x04,
EMBER_ZCL_DOOR_LOCK_OPERATING_MODE_PASSAGE_MODE______ = 0x05,
EMBER_ZCL_DOOR_LOCK_OPERATING_MODE_PASSAGE_MODE = 0x05,
} EmberAfDoorLockOperatingMode;

// Enum for DoorLockOperationEventCode
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
// Prevent multiple inclusion
#pragma once

// General cluster attributes ids
// Global cluster attribute ids
#define ZCL_CLUSTER_REVISION_CLIENT_ATTRIBUTE_ID (0xFFFD)
#define ZCL_CLUSTER_REVISION_SERVER_ATTRIBUTE_ID (0xFFFD)
#define ZCL_REPORTING_STATUS_CLIENT_ATTRIBUTE_ID (0xFFFE)
Expand Down Expand Up @@ -4059,12 +4059,8 @@
// Attribute ids for cluster: Binding

// Client attributes
#define ZCL_CLUSTER_REVISION_CLIENT_ATTRIBUTE_ID (0xFFFD)
#define ZCL_REPORTING_STATUS_CLIENT_ATTRIBUTE_ID (0xFFFE)

// Server attributes
#define ZCL_CLUSTER_REVISION_SERVER_ATTRIBUTE_ID (0xFFFD)
#define ZCL_REPORTING_STATUS_SERVER_ATTRIBUTE_ID (0xFFFE)

// Attribute ids for cluster: Sample Mfg Specific Cluster

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,5 @@ ZCL_DATA8_ATTRIBUTE_TYPE, 1, ZCL_DATA16_ATTRIBUTE_TYPE, 2, ZCL_DATA24_ATTRIBUTE_
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,
ZCL_ENDPOINT_ID_ATTRIBUTE_TYPE, 1, ZCL_GROUP_ID_ATTRIBUTE_TYPE, 2, ZCL_COMMAND_ID_ATTRIBUTE_TYPE, 1, ZCL_NODE_ID_ATTRIBUTE_TYPE,
8,
Original file line number Diff line number Diff line change
Expand Up @@ -76,5 +76,9 @@ 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_ENDPOINT_ID_ATTRIBUTE_TYPE = 0xF2, // Endpoint Id
ZCL_GROUP_ID_ATTRIBUTE_TYPE = 0xF3, // Group Id
ZCL_COMMAND_ID_ATTRIBUTE_TYPE = 0xF4, // Command Id
ZCL_NODE_ID_ATTRIBUTE_TYPE = 0xF5, // Node Id
ZCL_UNKNOWN_ATTRIBUTE_TYPE = 0xFF, // Unknown
};
Original file line number Diff line number Diff line change
Expand Up @@ -5665,9 +5665,9 @@
/** @brief Command description for Bind
*
* Command: Bind
* @param nodeId INT64U
* @param groupId INT16U
* @param endpointId INT8U
* @param nodeId NODE_ID
* @param groupId GROUP_ID
* @param endpointId ENDPOINT_ID
* @param clusterId CLUSTER_ID
*/
#define emberAfFillCommandBindingClusterBind(nodeId, groupId, endpointId, clusterId) \
Expand All @@ -5678,9 +5678,9 @@
/** @brief Command description for Unbind
*
* Command: Unbind
* @param nodeId INT64U
* @param groupId INT16U
* @param endpointId INT8U
* @param nodeId NODE_ID
* @param groupId GROUP_ID
* @param endpointId ENDPOINT_ID
* @param clusterId CLUSTER_ID
*/
#define emberAfFillCommandBindingClusterUnbind(nodeId, groupId, endpointId, clusterId) \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ typedef enum
EMBER_ZCL_DOOR_LOCK_OPERATING_MODE_PRIVACY_MODE = 0x02,
EMBER_ZCL_DOOR_LOCK_OPERATING_MODE_NO_RF_LOCK_OR_UNLOCK = 0x03,
EMBER_ZCL_DOOR_LOCK_OPERATING_MODE_LOCAL_PROGRAMMING_MODE = 0x04,
EMBER_ZCL_DOOR_LOCK_OPERATING_MODE_PASSAGE_MODE______ = 0x05,
EMBER_ZCL_DOOR_LOCK_OPERATING_MODE_PASSAGE_MODE = 0x05,
} EmberAfDoorLockOperatingMode;

// Enum for DoorLockOperationEventCode
Expand Down
39 changes: 39 additions & 0 deletions src/app/zap-templates/common/ChipTypesHelper.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/*
*
* Copyright (c) 2021 Project CHIP Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

function asBasicType(type)
{
switch (type) {
case 'chip::CommandId':
case 'chip::EndpointId':
return 'uint8_t';
case 'chip::AttributeId':
case 'chip::ClusterId':
case 'chip::EventId':
case 'chip::GroupId':
return 'uint16_t';
case 'chip::NodeId':
return 'uint64_t';
default:
return type;
}
}

//
// Module exports
//
exports.asBasicType = asBasicType;
6 changes: 6 additions & 0 deletions src/app/zap-templates/common/override.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@
function atomicType(arg)
{
switch (arg.name) {
case 'node_id':
return 'chip::NodeId';
case 'endpoint_id':
return 'chip::EndpointId';
case 'group_id':
return 'chip::GroupId';
case 'attribute_id':
return 'chip::AttributeId';
case 'cluster_id':
Expand Down
6 changes: 4 additions & 2 deletions src/app/zap-templates/templates/app/helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ const templateUtil = require(zapPath + 'generator/template-util.js')
const zclHelper = require(zapPath + 'generator/helper-zcl.js')
const zclQuery = require(zapPath + 'db/query-zcl.js')

const StringHelper = require('../../common/StringHelper.js');
const StringHelper = require('../../common/StringHelper.js');
const ChipTypesHelper = require('../../common/ChipTypesHelper.js');

/**
* Check if the cluster (name) has any enabled manufacturer commands. This works only inside
Expand Down Expand Up @@ -127,7 +128,8 @@ function asReadType(type)
{
const options = { 'hash' : {} };
return zclHelper.asUnderlyingZclType.call(this, type, options).then(zclType => {
switch (zclType) {
const basicType = ChipTypesHelper.asBasicType(zclType);
switch (basicType) {
case 'int8_t':
case 'uint8_t':
return 'Int8u';
Expand Down
Loading