Skip to content

Commit

Permalink
zap-gui command
Browse files Browse the repository at this point in the history
  • Loading branch information
Damian-Nordic committed Apr 9, 2024
1 parent 90fb42e commit 66d24b1
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 3 deletions.
5 changes: 5 additions & 0 deletions scripts/setup/nrfconnect/west-commands.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,8 @@ west-commands:
- name: zap-generate
class: ZapGenerate
help: Generate ZAP code
- file: scripts/setup/nrfconnect/zap_gui.py
commands:
- name: zap-gui
class: ZapGui
help: Run Matter ZCL Advanced Platform (ZAP) GUI
11 changes: 11 additions & 0 deletions scripts/setup/nrfconnect/zap_common.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Copyright (c) 2024 Nordic Semiconductor ASA
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause

from pathlib import Path

class ZapFinder:
pass

class ZapInstaller:
INSTALL_DIR = Path('.zap-install')
37 changes: 37 additions & 0 deletions scripts/setup/nrfconnect/zap_gui.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Copyright (c) 2024 Nordic Semiconductor ASA
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause

import argparse

from pathlib import Path
from textwrap import dedent

from west.commands import WestCommand

class ZapGui(WestCommand):

def __init__(self):
super().__init__(
'zap-gui',
'Run Matter ZCL Advanced Platform (ZAP) GUI',
dedent('''
Run Matter ZCL Advanced Platform (ZAP) GUI.
The ZAP GUI in a node.js tool for configuring the data model
of a Matter application, which defines which clusters, commands,
attributes and events are enabled for the given application.'''))

def do_add_parser(self, parser_adder):
parser = parser_adder.add_parser(
self.name, help=self.help,
formatter_class=argparse.RawDescriptionHelpFormatter,
description=self.description)
parser.add_argument('-z', '--zap-file', type=Path,
help='Path to data model configuration file (*.zap)')
parser.add_argument('-j', '--zcl-json', type=Path,
help='Path to data model definition file (zcl.json)')
return parser

def do_run(self, args: argparse.Namespace, unknown_args: list[str]):
pass
3 changes: 0 additions & 3 deletions west.yml

This file was deleted.

0 comments on commit 66d24b1

Please sign in to comment.