Skip to content

Commit

Permalink
ZAP.
Browse files Browse the repository at this point in the history
  • Loading branch information
cecille committed May 15, 2023
1 parent b141c6f commit f2a7f9e
Show file tree
Hide file tree
Showing 20 changed files with 8,488 additions and 3,647 deletions.
133 changes: 108 additions & 25 deletions src/controller/data_model/controller-clusters.matter
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ client cluster Scenes = 5 {
}

response struct AddSceneResponse = 0 {
ENUM8 status = 0;
status status = 0;
group_id groupID = 1;
INT8U sceneID = 2;
}
Expand All @@ -183,7 +183,7 @@ client cluster Scenes = 5 {
}

response struct ViewSceneResponse = 1 {
ENUM8 status = 0;
status status = 0;
group_id groupID = 1;
INT8U sceneID = 2;
optional INT16U transitionTime = 3;
Expand All @@ -197,7 +197,7 @@ client cluster Scenes = 5 {
}

response struct RemoveSceneResponse = 2 {
ENUM8 status = 0;
status status = 0;
group_id groupID = 1;
INT8U sceneID = 2;
}
Expand All @@ -207,7 +207,7 @@ client cluster Scenes = 5 {
}

response struct RemoveAllScenesResponse = 3 {
ENUM8 status = 0;
status status = 0;
group_id groupID = 1;
}

Expand All @@ -217,7 +217,7 @@ client cluster Scenes = 5 {
}

response struct StoreSceneResponse = 4 {
ENUM8 status = 0;
status status = 0;
group_id groupID = 1;
INT8U sceneID = 2;
}
Expand All @@ -233,7 +233,7 @@ client cluster Scenes = 5 {
}

response struct GetSceneMembershipResponse = 6 {
ENUM8 status = 0;
status status = 0;
nullable INT8U capacity = 1;
group_id groupID = 2;
optional INT8U sceneList[] = 3;
Expand All @@ -248,7 +248,7 @@ client cluster Scenes = 5 {
}

response struct EnhancedAddSceneResponse = 64 {
ENUM8 status = 0;
status status = 0;
group_id groupID = 1;
INT8U sceneID = 2;
}
Expand All @@ -259,7 +259,7 @@ client cluster Scenes = 5 {
}

response struct EnhancedViewSceneResponse = 65 {
ENUM8 status = 0;
status status = 0;
group_Id groupID = 1;
INT8U sceneID = 2;
optional INT16U transitionTime = 3;
Expand All @@ -276,7 +276,7 @@ client cluster Scenes = 5 {
}

response struct CopySceneResponse = 66 {
ENUM8 status = 0;
status status = 0;
group_Id groupIdentifierFrom = 1;
INT8U sceneIdentifierFrom = 2;
}
Expand Down Expand Up @@ -815,11 +815,49 @@ client cluster Actions = 37 {
Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number,
which apply to the whole Node. Also allows setting user device information such as location. */
client cluster BasicInformation = 40 {
enum ColorEnum : ENUM8 {
kBlack = 0;
kNavy = 1;
kGreen = 2;
kTeal = 3;
kMaroon = 4;
kPurple = 5;
kOlive = 6;
kGray = 7;
kBlue = 8;
kLime = 9;
kAqua = 10;
kRed = 11;
kFuchsia = 12;
kYellow = 13;
kWhite = 14;
kNickel = 15;
kChrome = 16;
kBrass = 17;
kCopper = 18;
kSilver = 19;
kGold = 20;
}

enum ProductFinishEnum : ENUM8 {
kOther = 0;
kMatte = 1;
kSatin = 2;
kPolished = 3;
kRugged = 4;
kFabric = 5;
}

struct CapabilityMinimaStruct {
int16u caseSessionsPerFabric = 0;
int16u subscriptionsPerFabric = 1;
}

struct ProductAppearanceStruct {
ProductFinishEnum finish = 0;
nullable ColorEnum primaryColor = 1;
}

critical event StartUp = 0 {
INT32U softwareVersion = 0;
}
Expand Down Expand Up @@ -855,6 +893,7 @@ client cluster BasicInformation = 40 {
readonly attribute optional boolean reachable = 17;
readonly attribute optional char_string<32> uniqueID = 18;
readonly attribute CapabilityMinimaStruct capabilityMinima = 19;
readonly attribute optional ProductAppearanceStruct productAppearance = 20;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
Expand Down Expand Up @@ -2124,7 +2163,7 @@ client cluster TimeSynchronization = 56 {
readonly attribute nullable epoch_us UTCTime = 0;
readonly attribute GranularityEnum granularity = 1;
readonly attribute optional TimeSourceEnum timeSource = 2;
readonly attribute nullable TrustedTimeSourceStruct trustedTimeSource = 3;
readonly attribute optional nullable TrustedTimeSourceStruct trustedTimeSource = 3;
readonly attribute optional nullable char_string<128> defaultNTP = 4;
readonly attribute optional TimeZoneStruct timeZone[] = 5;
readonly attribute optional DSTOffsetStruct DSTOffset[] = 6;
Expand All @@ -2141,8 +2180,8 @@ client cluster TimeSynchronization = 56 {
readonly attribute bitmap32 featureMap = 65532;
readonly attribute int16u clusterRevision = 65533;

request struct SetUtcTimeRequest {
epoch_us utcTime = 0;
request struct SetUTCTimeRequest {
epoch_us UTCTime = 0;
GranularityEnum granularity = 1;
optional TimeSourceEnum timeSource = 2;
}
Expand All @@ -2168,7 +2207,7 @@ client cluster TimeSynchronization = 56 {
}

/** This command MAY be issued by Administrator to set the time. */
command access(invoke: administer) SetUtcTime(SetUtcTimeRequest): DefaultSuccess = 0;
command access(invoke: administer) SetUTCTime(SetUTCTimeRequest): DefaultSuccess = 0;
/** This command SHALL set TrustedTimeSource. */
fabric command access(invoke: administer) SetTrustedTimeSource(SetTrustedTimeSourceRequest): DefaultSuccess = 1;
/** This command SHALL set TimeZone. */
Expand All @@ -2184,6 +2223,44 @@ client cluster TimeSynchronization = 56 {
collection of attributes that the Node MAY collect to aid in conveying information regarding the Bridged Device to a user,
such as the vendor name, the model name, or user-assigned name. */
client cluster BridgedDeviceBasicInformation = 57 {
enum ColorEnum : ENUM8 {
kBlack = 0;
kNavy = 1;
kGreen = 2;
kTeal = 3;
kMaroon = 4;
kPurple = 5;
kOlive = 6;
kGray = 7;
kBlue = 8;
kLime = 9;
kAqua = 10;
kRed = 11;
kFuchsia = 12;
kYellow = 13;
kWhite = 14;
kNickel = 15;
kChrome = 16;
kBrass = 17;
kCopper = 18;
kSilver = 19;
kGold = 20;
}

enum ProductFinishEnum : ENUM8 {
kOther = 0;
kMatte = 1;
kSatin = 2;
kPolished = 3;
kRugged = 4;
kFabric = 5;
}

struct ProductAppearanceStruct {
ProductFinishEnum finish = 0;
nullable ColorEnum primaryColor = 1;
}

critical event StartUp = 0 {
INT32U softwareVersion = 0;
}
Expand Down Expand Up @@ -2213,6 +2290,7 @@ client cluster BridgedDeviceBasicInformation = 57 {
readonly attribute optional char_string<32> serialNumber = 15;
readonly attribute boolean reachable = 17;
readonly attribute optional char_string<32> uniqueID = 18;
readonly attribute optional ProductAppearanceStruct productAppearance = 20;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
Expand Down Expand Up @@ -5038,18 +5116,19 @@ client cluster ElectricalMeasurement = 2820 {
command GetMeasurementProfileCommand(GetMeasurementProfileCommandRequest): DefaultSuccess = 1;
}

/** Client Monitoring allows for ensuring that listed clients meet the required monitoring conditions on the server. */
/** Client Monitoring allows servers to ensure that listed clients are notified when a server is available for communication. */
client cluster ClientMonitoring = 4166 {
fabric_scoped struct MonitoringRegistration {
node_id clientNodeId = 1;
int64u ICid = 2;
fabric_scoped struct MonitoringRegistrationStruct {
fabric_sensitive node_id clientNodeID = 1;
fabric_sensitive octet_string<16> key = 2;
fabric_idx fabricIndex = 254;
}

readonly attribute int32u idleModeInterval = 0;
readonly attribute int32u activeModeInterval = 1;
readonly attribute int16u activeModeThreshold = 2;
readonly attribute MonitoringRegistration expectedClients[] = 3;
readonly attribute access(read: administer) MonitoringRegistrationStruct expectedClients[] = 3;
readonly attribute access(read: administer) int32u ICDCounter = 4;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
Expand All @@ -5058,21 +5137,25 @@ client cluster ClientMonitoring = 4166 {
readonly attribute int16u clusterRevision = 65533;

request struct RegisterClientMonitoringRequest {
node_id clientNodeId = 0;
INT64U ICid = 1;
node_id clientNodeID = 0;
OCTET_STRING<16> key = 1;
}

response struct RegisterClientMonitoringResponse = 1 {
ENUM8 status = 0;
nullable INT32U ICDCounter = 1;
}

request struct UnregisterClientMonitoringRequest {
node_id clientNodeId = 0;
INT64U ICid = 1;
node_id clientNodeID = 0;
}

/** Register a client to the end device */
command access(invoke: manage) RegisterClientMonitoring(RegisterClientMonitoringRequest): DefaultSuccess = 0;
fabric command access(invoke: manage) RegisterClientMonitoring(RegisterClientMonitoringRequest): RegisterClientMonitoringResponse = 0;
/** Unregister a client from an end device */
command access(invoke: manage) UnregisterClientMonitoring(UnregisterClientMonitoringRequest): DefaultSuccess = 1;
fabric command access(invoke: manage) UnregisterClientMonitoring(UnregisterClientMonitoringRequest): DefaultSuccess = 2;
/** Request the end device to stay in Active Mode for an additional ActiveModeThreshold */
command access(invoke: manage) StayAwakeRequest(): DefaultSuccess = 2;
command access(invoke: manage) StayAwakeRequest(): DefaultSuccess = 3;
}

/** The Test Cluster is meant to validate the generated code */
Expand Down
Loading

0 comments on commit f2a7f9e

Please sign in to comment.