Skip to content
代码片段 群组 项目
提交 8cecf15d 编辑于 作者: jfpenven's avatar jfpenven
浏览文件

Complete static files template

- Complete static file such as enums, type, define
- Switch back to Silabs XML because of missing/incomplete data in dotdot
  xml
上级 d5e3e7c4
No related branches found
No related tags found
无相关合并请求
......@@ -21,7 +21,7 @@
"test:unit:watchAll": "jest --watchAll",
"postinstall": "electron-builder install-app-deps",
"zap": "node src-script/zap-start.js --logToStdout",
"zapc": "node src-script/zap-start.js --logToStdout --zcl ./zcl-builtin/dotdot/library.xml --gen ./test/gen-template/chip/gen-templates.json",
"zapc": "node src-script/zap-start.js --logToStdout --gen ./test/gen-template/chip/gen-templates.json",
"build-spa": "node src-script/build-spa.js",
"doc": "jsdoc src-electron src-shared -r -u docs -d ./generated-html/ README.md",
"apidoc": "jsdoc2md src-shared/**/*.js src-electron/**/*.js > docs/api.md",
......
{{chip_header}}
{{silabs_header}}
\ No newline at end of file
{{silabs_header}}
#ifndef SILABS_EMBER_AF_STRUCTS
#define SILABS_EMBER_AF_STRUCTS
#include "enums.h"
{{#zcl_structs}}
// Struct for {{label}}
typedef struct _{{asType label}} {
{{#zcl_struct_items}}
{{ident}}{{asUnderlyingType type}} {{asSymbol label}};
{{/zcl_struct_items}}
} {{asType label}};
{{/zcl_structs}}
#endif // SILABS_EMBER_AF_STRUCTS
\ No newline at end of file
{{chip_header}}
{{silabs_header}}
\ No newline at end of file
{{silabs_header}}
// Enclosing macro to prevent multiple inclusion
#ifndef SILABS_ATTRIBUTE_STORAGE_GEN
#define SILABS_ATTRIBUTE_STORAGE_GEN
// 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
#define ATTRIBUTE_MASK_TOKENIZE (0x02)
// Attribute that has this mask has a min/max values
#define ATTRIBUTE_MASK_MIN_MAX (0x04)
// Manufacturer specific attribute
#define ATTRIBUTE_MASK_MANUFACTURER_SPECIFIC (0x08)
// Attribute deferred to external storage
#define ATTRIBUTE_MASK_EXTERNAL_STORAGE (0x10)
// Attribute is singleton
#define ATTRIBUTE_MASK_SINGLETON (0x20)
// Attribute is a client attribute
#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?
#define CLUSTER_MASK_ATTRIBUTE_CHANGED_FUNCTION (0x02)
// Does this cluster have default response function?
#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 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)
// Cluster is a server
#define CLUSTER_MASK_SERVER (0x40)
// Cluster is a client
#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
#define COMMAND_MASK_OUTGOING_SERVER (0x02)
// Is receiving of this client command supported
#define COMMAND_MASK_INCOMING_CLIENT (0x04)
// Is receiving of this server command supported
#define COMMAND_MASK_INCOMING_SERVER (0x08)
// Is this command manufacturer specific?
#define COMMAND_MASK_MANUFACTURER_SPECIFIC (0x10)
#endif // SILABS_ATTRIBUTE_STORAGE_GEN
\ No newline at end of file
......@@ -27,7 +27,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
{
......
......@@ -4,7 +4,7 @@
{{#zcl_clusters}}
// Definitions for cluster: {{label}}
#define ZCL_{{asDelimitedMacro define}}_CLUSTER_ID ({{asHex code 4}})
#define ZCL_{{asDelimitedMacro define}}_ID ({{asHex code 4}})
{{/zcl_clusters}}
......
......@@ -11,9 +11,11 @@
{{#zcl_clusters}}
{{#zcl_commands}}
{{#first}}
{{#first}}
// Commands for cluster: {{parent.label}}
{{/first}}
#define ZCL_{{asDelimitedMacro label}}_COMMAND_ID ({{asHex code 2}})
{{/zcl_commands}}
{{/zcl_clusters}}
\ No newline at end of file
{{/zcl_clusters}}
#endif // __ZAP_GEN_ID__
\ No newline at end of file
......@@ -14,11 +14,6 @@
},
"helpers": ["helper-chip.js"],
"templates": [
{
"path": "af-gen-event.zapt",
"name": "ZCL af-gen-event header",
"output": "af-gen-event.h"
},
{
"path": "af-structs.zapt",
"name": "ZCL af-structs header",
......@@ -34,41 +29,11 @@
"name": "ZCL attribute-id header",
"output": "attribute-id.h"
},
{
"path": "attribute-size.zapt",
"name": "ZCL attribute-size header",
"output": "attribute-size.h"
},
{
"path": "attribute-type.zapt",
"name": "ZCL attribute-type header",
"output": "attribute-type.h"
},
{
"path": "call-command-handler-src.zapt",
"name": "ZCL call-command-handler source",
"output": "call-command-handler.c"
},
{
"path": "call-command-handler.zapt",
"name": "ZCL call-command-handler header",
"output": "call-command-handler.h"
},
{
"path": "callback-stub-src.zapt",
"name": "ZCL callback-stub source",
"output": "callback-stub.c"
},
{
"path": "callback.zapt",
"name": "ZCL callback header",
"output": "callback.h"
},
{
"path": "client-command-macro.zapt",
"name": "ZCL client-command-macro header",
"output": "client-command-macro.h"
},
{
"path": "cluster-id.zapt",
"name": "ZCL cluster-id header",
......@@ -79,50 +44,10 @@
"name": "ZCL command-id header",
"output": "command-id.h"
},
{
"path": "debug-printing-test.zapt",
"name": "ZCL debug-printing-test header",
"output": "debug-printing-test.h"
},
{
"path": "debug-printing.zapt",
"name": "ZCL debug-printing header",
"output": "debug-printing.h"
},
{
"path": "endpoint_config.zapt",
"name": "ZCL endpoint_config header",
"output": "endpoint_config.h"
},
{
"path": "enums.zapt",
"name": "ZCL enums header",
"output": "enums.h"
},
{
"path": "gen_config.zapt",
"name": "ZCL gen_config header",
"output": "gen_config.h"
},
{
"path": "gen_tokens.zapt",
"name": "ZCL gen_tokens header",
"output": "gen_tokens.h"
},
{
"path": "print-cluster.zapt",
"name": "ZCL print-cluster header",
"output": "print-cluster.h"
},
{
"path": "znet-bookkeeping-src.zapt",
"name": "ZCL znet-bookkeeping source",
"output": "znet-bookkeeping.c"
},
{
"path": "znet-bookkeeping.zapt",
"name": "ZCL znet-bookkeeping header",
"output": "znet-bookkeeping.h"
}
]
}
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册