Skip to content

Commit

Permalink
samples: matter: remove diagnostic clusters from template ZAP
Browse files Browse the repository at this point in the history
We do not need to have Thread, Wi-Fi and Software diagnostic
clusters in the template sample, so we can remove it from the
ZAP file.

Signed-off-by: Arkadiusz Balys <arkadiusz.balys@nordicsemi.no>
  • Loading branch information
ArekBalysNordic authored and rlubos committed Oct 5, 2023
1 parent b742ff6 commit ad9c84a
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 695 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -516,6 +516,10 @@ Matter samples

* Added the :ref:`Matter thermostat <matter_thermostat_sample>` sample.

* :ref:`matter_template_sample`:

* Removed support for the Thread, Wi-Fi, and software diagnostics clusters from the ZAP file.

NFC samples
-----------

Expand Down
360 changes: 0 additions & 360 deletions samples/matter/template/src/template.matter
Original file line number Diff line number Diff line change
Expand Up @@ -642,267 +642,6 @@ server cluster GeneralDiagnostics = 51 {
command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0;
}

/** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */
server cluster SoftwareDiagnostics = 52 {
bitmap SoftwareDiagnosticsFeature : BITMAP32 {
kWaterMarks = 0x1;
}

struct ThreadMetricsStruct {
int64u id = 0;
optional char_string<8> name = 1;
optional int32u stackFreeCurrent = 2;
optional int32u stackFreeMinimum = 3;
optional int32u stackSize = 4;
}

info event SoftwareFault = 0 {
INT64U id = 0;
optional CHAR_STRING name = 1;
optional OCTET_STRING faultRecording = 2;
}

readonly attribute int64u currentHeapFree = 1;
readonly attribute int64u currentHeapUsed = 2;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
readonly attribute attrib_id attributeList[] = 65531;
readonly attribute bitmap32 featureMap = 65532;
readonly attribute int16u clusterRevision = 65533;
}

/** The Thread Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems */
server cluster ThreadNetworkDiagnostics = 53 {
enum ConnectionStatusEnum : ENUM8 {
kConnected = 0;
kNotConnected = 1;
}

enum NetworkFault : ENUM8 {
kUnspecified = 0;
kLinkDown = 1;
kHardwareFailure = 2;
kNetworkJammed = 3;
}

enum RoutingRole : ENUM8 {
kUnspecified = 0;
kUnassigned = 1;
kSleepyEndDevice = 2;
kEndDevice = 3;
kReed = 4;
kRouter = 5;
kLeader = 6;
}

bitmap ThreadNetworkDiagnosticsFeature : BITMAP32 {
kPacketCounts = 0x1;
kErrorCounts = 0x2;
kMLECounts = 0x4;
kMACCounts = 0x8;
}

struct NeighborTable {
int64u extAddress = 0;
int32u age = 1;
int16u rloc16 = 2;
int32u linkFrameCounter = 3;
int32u mleFrameCounter = 4;
int8u lqi = 5;
nullable int8s averageRssi = 6;
nullable int8s lastRssi = 7;
int8u frameErrorRate = 8;
int8u messageErrorRate = 9;
boolean rxOnWhenIdle = 10;
boolean fullThreadDevice = 11;
boolean fullNetworkData = 12;
boolean isChild = 13;
}

struct OperationalDatasetComponents {
boolean activeTimestampPresent = 0;
boolean pendingTimestampPresent = 1;
boolean masterKeyPresent = 2;
boolean networkNamePresent = 3;
boolean extendedPanIdPresent = 4;
boolean meshLocalPrefixPresent = 5;
boolean delayPresent = 6;
boolean panIdPresent = 7;
boolean channelPresent = 8;
boolean pskcPresent = 9;
boolean securityPolicyPresent = 10;
boolean channelMaskPresent = 11;
}

struct RouteTable {
int64u extAddress = 0;
int16u rloc16 = 1;
int8u routerId = 2;
int8u nextHop = 3;
int8u pathCost = 4;
int8u LQIIn = 5;
int8u LQIOut = 6;
int8u age = 7;
boolean allocated = 8;
boolean linkEstablished = 9;
}

struct SecurityPolicy {
int16u rotationTime = 0;
int16u flags = 1;
}

info event ConnectionStatus = 0 {
ConnectionStatusEnum connectionStatus = 0;
}

info event NetworkFaultChange = 1 {
NetworkFault current[] = 0;
NetworkFault previous[] = 1;
}

readonly attribute nullable int16u channel = 0;
readonly attribute nullable RoutingRole routingRole = 1;
readonly attribute nullable char_string<16> networkName = 2;
readonly attribute nullable int16u panId = 3;
readonly attribute nullable int64u extendedPanId = 4;
readonly attribute nullable octet_string<17> meshLocalPrefix = 5;
readonly attribute int64u overrunCount = 6;
readonly attribute NeighborTable neighborTable[] = 7;
readonly attribute RouteTable routeTable[] = 8;
readonly attribute nullable int32u partitionId = 9;
readonly attribute nullable int8u weighting = 10;
readonly attribute nullable int8u dataVersion = 11;
readonly attribute nullable int8u stableDataVersion = 12;
readonly attribute nullable int8u leaderRouterId = 13;
readonly attribute int16u detachedRoleCount = 14;
readonly attribute int16u childRoleCount = 15;
readonly attribute int16u routerRoleCount = 16;
readonly attribute int16u leaderRoleCount = 17;
readonly attribute int16u attachAttemptCount = 18;
readonly attribute int16u partitionIdChangeCount = 19;
readonly attribute int16u betterPartitionAttachAttemptCount = 20;
readonly attribute int16u parentChangeCount = 21;
readonly attribute int32u txTotalCount = 22;
readonly attribute int32u txUnicastCount = 23;
readonly attribute int32u txBroadcastCount = 24;
readonly attribute int32u txAckRequestedCount = 25;
readonly attribute int32u txAckedCount = 26;
readonly attribute int32u txNoAckRequestedCount = 27;
readonly attribute int32u txDataCount = 28;
readonly attribute int32u txDataPollCount = 29;
readonly attribute int32u txBeaconCount = 30;
readonly attribute int32u txBeaconRequestCount = 31;
readonly attribute int32u txOtherCount = 32;
readonly attribute int32u txRetryCount = 33;
readonly attribute int32u txDirectMaxRetryExpiryCount = 34;
readonly attribute int32u txIndirectMaxRetryExpiryCount = 35;
readonly attribute int32u txErrCcaCount = 36;
readonly attribute int32u txErrAbortCount = 37;
readonly attribute int32u txErrBusyChannelCount = 38;
readonly attribute int32u rxTotalCount = 39;
readonly attribute int32u rxUnicastCount = 40;
readonly attribute int32u rxBroadcastCount = 41;
readonly attribute int32u rxDataCount = 42;
readonly attribute int32u rxDataPollCount = 43;
readonly attribute int32u rxBeaconCount = 44;
readonly attribute int32u rxBeaconRequestCount = 45;
readonly attribute int32u rxOtherCount = 46;
readonly attribute int32u rxAddressFilteredCount = 47;
readonly attribute int32u rxDestAddrFilteredCount = 48;
readonly attribute int32u rxDuplicatedCount = 49;
readonly attribute int32u rxErrNoFrameCount = 50;
readonly attribute int32u rxErrUnknownNeighborCount = 51;
readonly attribute int32u rxErrInvalidSrcAddrCount = 52;
readonly attribute int32u rxErrSecCount = 53;
readonly attribute int32u rxErrFcsCount = 54;
readonly attribute int32u rxErrOtherCount = 55;
readonly attribute nullable int64u activeTimestamp = 56;
readonly attribute nullable int64u pendingTimestamp = 57;
readonly attribute nullable int32u delay = 58;
readonly attribute nullable SecurityPolicy securityPolicy = 59;
readonly attribute nullable octet_string<4> channelPage0Mask = 60;
readonly attribute nullable OperationalDatasetComponents operationalDatasetComponents = 61;
readonly attribute NetworkFault activeNetworkFaultsList[] = 62;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
readonly attribute attrib_id attributeList[] = 65531;
readonly attribute bitmap32 featureMap = 65532;
readonly attribute int16u clusterRevision = 65533;

command ResetCounts(): DefaultSuccess = 0;
}

/** The Wi-Fi Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */
server cluster WiFiNetworkDiagnostics = 54 {
enum AssociationFailureCauseEnum : ENUM8 {
kUnknown = 0;
kAssociationFailed = 1;
kAuthenticationFailed = 2;
kSsidNotFound = 3;
}

enum ConnectionStatusEnum : ENUM8 {
kConnected = 0;
kNotConnected = 1;
}

enum SecurityTypeEnum : ENUM8 {
kUnspecified = 0;
kNone = 1;
kWep = 2;
kWpa = 3;
kWpa2 = 4;
kWpa3 = 5;
}

enum WiFiVersionEnum : ENUM8 {
kA = 0;
kB = 1;
kG = 2;
kN = 3;
kAc = 4;
kAx = 5;
}

bitmap WiFiNetworkDiagnosticsFeature : BITMAP32 {
kPacketCounts = 0x1;
kErrorCounts = 0x2;
}

info event Disconnection = 0 {
INT16U reasonCode = 0;
}

info event AssociationFailure = 1 {
AssociationFailureCauseEnum associationFailure = 0;
INT16U status = 1;
}

info event ConnectionStatus = 2 {
ConnectionStatusEnum connectionStatus = 0;
}

readonly attribute nullable octet_string<6> bssid = 0;
readonly attribute nullable SecurityTypeEnum securityType = 1;
readonly attribute nullable WiFiVersionEnum wiFiVersion = 2;
readonly attribute nullable int16u channelNumber = 3;
readonly attribute nullable int8s rssi = 4;
readonly attribute nullable int32u beaconRxCount = 6;
readonly attribute nullable int32u packetMulticastRxCount = 7;
readonly attribute nullable int32u packetMulticastTxCount = 8;
readonly attribute nullable int32u packetUnicastRxCount = 9;
readonly attribute nullable int32u packetUnicastTxCount = 10;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
readonly attribute attrib_id attributeList[] = 65531;
readonly attribute bitmap32 featureMap = 65532;
readonly attribute int16u clusterRevision = 65533;
}

/** Commands to trigger a Node to allow a new Administrator to commission it. */
server cluster AdministratorCommissioning = 60 {
enum CommissioningWindowStatusEnum : ENUM8 {
Expand Down Expand Up @@ -1245,105 +984,6 @@ endpoint 0 {
ram attribute clusterRevision default = 1;
}

server cluster SoftwareDiagnostics {
callback attribute currentHeapFree default = 0x0000000000000000;
callback attribute currentHeapUsed default = 0x0000000000000000;
callback attribute generatedCommandList;
callback attribute acceptedCommandList;
callback attribute attributeList;
callback attribute featureMap default = 0;
ram attribute clusterRevision default = 1;
}

server cluster ThreadNetworkDiagnostics {
callback attribute channel;
callback attribute routingRole;
callback attribute networkName default = "0";
callback attribute panId default = 0x0000;
callback attribute extendedPanId default = 0x0000000000000000;
callback attribute meshLocalPrefix;
callback attribute overrunCount default = 0x0000000000000000;
callback attribute neighborTable;
callback attribute routeTable;
callback attribute partitionId;
callback attribute weighting;
callback attribute dataVersion;
callback attribute stableDataVersion;
callback attribute leaderRouterId;
callback attribute detachedRoleCount default = 0x0000;
callback attribute childRoleCount default = 0x0000;
callback attribute routerRoleCount default = 0x0000;
callback attribute leaderRoleCount default = 0x0000;
callback attribute attachAttemptCount default = 0x0000;
callback attribute partitionIdChangeCount default = 0x0000;
callback attribute betterPartitionAttachAttemptCount default = 0x0000;
callback attribute parentChangeCount default = 0x0000;
callback attribute txTotalCount default = 0x0000;
callback attribute txUnicastCount default = 0x0000;
callback attribute txBroadcastCount default = 0x0000;
callback attribute txAckRequestedCount default = 0x0000;
callback attribute txAckedCount default = 0x0000;
callback attribute txNoAckRequestedCount default = 0x0000;
callback attribute txDataCount default = 0x0000;
callback attribute txDataPollCount default = 0x0000;
callback attribute txBeaconCount default = 0x0000;
callback attribute txBeaconRequestCount default = 0x0000;
callback attribute txOtherCount default = 0x0000;
callback attribute txRetryCount default = 0x0000;
callback attribute txDirectMaxRetryExpiryCount default = 0x0000;
callback attribute txIndirectMaxRetryExpiryCount default = 0x0000;
callback attribute txErrCcaCount default = 0x0000;
callback attribute txErrAbortCount default = 0x0000;
callback attribute txErrBusyChannelCount default = 0x0000;
callback attribute rxTotalCount default = 0x0000;
callback attribute rxUnicastCount default = 0x0000;
callback attribute rxBroadcastCount default = 0x0000;
callback attribute rxDataCount default = 0x0000;
callback attribute rxDataPollCount default = 0x0000;
callback attribute rxBeaconCount default = 0x0000;
callback attribute rxBeaconRequestCount default = 0x0000;
callback attribute rxOtherCount default = 0x0000;
callback attribute rxAddressFilteredCount default = 0x0000;
callback attribute rxDestAddrFilteredCount default = 0x0000;
callback attribute rxDuplicatedCount default = 0x0000;
callback attribute rxErrNoFrameCount default = 0x0000;
callback attribute rxErrUnknownNeighborCount default = 0x0000;
callback attribute rxErrInvalidSrcAddrCount default = 0x0000;
callback attribute rxErrSecCount default = 0x0000;
callback attribute rxErrFcsCount default = 0x0000;
callback attribute rxErrOtherCount default = 0x0000;
callback attribute activeTimestamp default = 0x0000000000000000;
callback attribute pendingTimestamp default = 0x0000000000000000;
callback attribute delay default = 0x0000;
callback attribute securityPolicy;
callback attribute channelPage0Mask default = "0x0000";
callback attribute operationalDatasetComponents;
callback attribute activeNetworkFaultsList;
callback attribute generatedCommandList;
callback attribute acceptedCommandList;
callback attribute attributeList;
ram attribute featureMap default = 0x000F;
ram attribute clusterRevision default = 1;
}

server cluster WiFiNetworkDiagnostics {
callback attribute bssid;
callback attribute securityType;
callback attribute wiFiVersion;
callback attribute channelNumber default = 0x0000;
callback attribute rssi default = 0x00;
callback attribute beaconRxCount default = 0x00000000;
callback attribute packetMulticastRxCount default = 0x00000000;
callback attribute packetMulticastTxCount default = 0x00000000;
callback attribute packetUnicastRxCount default = 0x00000000;
callback attribute packetUnicastTxCount default = 0x00000000;
callback attribute generatedCommandList;
callback attribute acceptedCommandList;
callback attribute attributeList;
ram attribute featureMap default = 1;
ram attribute clusterRevision default = 0x0001;
}

server cluster AdministratorCommissioning {
callback attribute windowStatus default = 0;
callback attribute adminFabricIndex default = 1;
Expand Down
Loading

0 comments on commit ad9c84a

Please sign in to comment.