Skip to content

Commit

Permalink
Implement Localisation Time Format cluster server support (#13477)
Browse files Browse the repository at this point in the history
* Implement Localization Time Format cluster server support

* Run codegen

* Update src/app/clusters/time-format-localization-server/time-format-localization-server.cpp

Co-authored-by: Boris Zbarsky <bzbarsky@apple.com>

Co-authored-by: Boris Zbarsky <bzbarsky@apple.com>
  • Loading branch information
2 people authored and pull[bot] committed Aug 29, 2023
1 parent 39bbee4 commit 1025642
Show file tree
Hide file tree
Showing 148 changed files with 4,466 additions and 590 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2926,6 +2926,33 @@ server cluster ThreadNetworkDiagnostics = 53 {
command ResetCounts(): DefaultSuccess = 0;
}

server cluster TimeFormatLocalization = 44 {
enum CalendarType : ENUM8 {
kBuddhist = 0;
kChinese = 1;
kCoptic = 2;
kEthiopian = 3;
kGregorian = 4;
kHebrew = 5;
kIndian = 6;
kIslamic = 7;
kJapanese = 8;
kKorean = 9;
kPersian = 10;
kTaiwanese = 11;
}

enum HourFormat : ENUM8 {
k12hr = 0;
k24hr = 1;
}

attribute HourFormat hourFormat = 0;
attribute CalendarType activeCalendarType = 1;
readonly attribute CalendarType supportedCalendarTypes[] = 2;
readonly global attribute int16u clusterRevision = 65533;
}

server cluster UserLabel = 65 {
attribute LabelStruct labelList[] = 0;
readonly global attribute int16u clusterRevision = 65533;
Expand Down Expand Up @@ -3050,6 +3077,7 @@ endpoint 0 {
server cluster RelativeHumidityMeasurement;
server cluster SoftwareDiagnostics;
server cluster ThreadNetworkDiagnostics;
server cluster TimeFormatLocalization;
server cluster UserLabel;
server cluster WiFiNetworkDiagnostics;
}
Expand Down
81 changes: 81 additions & 0 deletions examples/all-clusters-app/all-clusters-common/all-clusters-app.zap
Original file line number Diff line number Diff line change
Expand Up @@ -1677,6 +1677,87 @@
}
]
},
{
"name": "Time Format Localization",
"code": 44,
"mfgCode": null,
"define": "TIME_FORMAT_LOCALIZATION_CLUSTER",
"side": "client",
"enabled": 0,
"commands": [],
"attributes": []
},
{
"name": "Time Format Localization",
"code": 44,
"mfgCode": null,
"define": "TIME_FORMAT_LOCALIZATION_CLUSTER",
"side": "server",
"enabled": 1,
"commands": [],
"attributes": [
{
"name": "HourFormat",
"code": 0,
"mfgCode": null,
"side": "server",
"included": 1,
"storageOption": "NVM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "CalendarType",
"code": 1,
"mfgCode": null,
"side": "server",
"included": 1,
"storageOption": "NVM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "SupportedCalendarTypes",
"code": 2,
"mfgCode": null,
"side": "server",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "ClusterRevision",
"code": 65533,
"mfgCode": null,
"side": "server",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "1",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
}
]
},
{
"name": "Power Source Configuration",
"code": 46,
Expand Down
1 change: 1 addition & 0 deletions examples/all-clusters-app/esp32/main/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ set(SRC_DIRS_LIST
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/ias-zone-server"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/ethernet-network-diagnostics-server"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/localization-configuration-server"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/time-format-localization-server"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/wifi-network-diagnostics-server"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/wake-on-lan-server"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/pump-configuration-and-control-server"
Expand Down
1 change: 1 addition & 0 deletions examples/all-clusters-app/mbed/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ target_sources(${APP_TARGET} PRIVATE
${APP_CLUSTERS}/level-control/level-control.cpp
${APP_CLUSTERS}/low-power-server/low-power-server.cpp
${APP_CLUSTERS}/localization-configuration-server/localization-configuration-server.cpp
${APP_CLUSTERS}/time-format-localization-server/time-format-localization-server.cpp
${APP_CLUSTERS}/media-input-server/media-input-server.cpp
${APP_CLUSTERS}/media-playback-server/media-playback-server.cpp
${APP_CLUSTERS}/mode-select-server/mode-select-server.cpp
Expand Down
28 changes: 28 additions & 0 deletions examples/bridge-app/bridge-common/bridge-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -834,6 +834,33 @@ server cluster ThreadNetworkDiagnostics = 53 {
readonly global attribute int16u clusterRevision = 65533;
}

server cluster TimeFormatLocalization = 44 {
enum CalendarType : ENUM8 {
kBuddhist = 0;
kChinese = 1;
kCoptic = 2;
kEthiopian = 3;
kGregorian = 4;
kHebrew = 5;
kIndian = 6;
kIslamic = 7;
kJapanese = 8;
kKorean = 9;
kPersian = 10;
kTaiwanese = 11;
}

enum HourFormat : ENUM8 {
k12hr = 0;
k24hr = 1;
}

attribute HourFormat hourFormat = 0;
attribute CalendarType activeCalendarType = 1;
readonly attribute CalendarType supportedCalendarTypes[] = 2;
readonly global attribute int16u clusterRevision = 65533;
}

server cluster UserLabel = 65 {
attribute LabelStruct labelList[] = 0;
readonly global attribute int16u clusterRevision = 65533;
Expand Down Expand Up @@ -915,6 +942,7 @@ endpoint 0 {
server cluster OperationalCredentials;
server cluster SoftwareDiagnostics;
server cluster ThreadNetworkDiagnostics;
server cluster TimeFormatLocalization;
server cluster UserLabel;
server cluster WiFiNetworkDiagnostics;
}
Expand Down
81 changes: 81 additions & 0 deletions examples/bridge-app/bridge-common/bridge-app.zap
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,87 @@
}
]
},
{
"name": "Time Format Localization",
"code": 44,
"mfgCode": null,
"define": "TIME_FORMAT_LOCALIZATION_CLUSTER",
"side": "client",
"enabled": 0,
"commands": [],
"attributes": []
},
{
"name": "Time Format Localization",
"code": 44,
"mfgCode": null,
"define": "TIME_FORMAT_LOCALIZATION_CLUSTER",
"side": "server",
"enabled": 1,
"commands": [],
"attributes": [
{
"name": "HourFormat",
"code": 0,
"mfgCode": null,
"side": "server",
"included": 1,
"storageOption": "NVM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "CalendarType",
"code": 1,
"mfgCode": null,
"side": "server",
"included": 1,
"storageOption": "NVM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "SupportedCalendarTypes",
"code": 2,
"mfgCode": null,
"side": "server",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "ClusterRevision",
"code": 65533,
"mfgCode": null,
"side": "server",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "1",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
}
]
},
{
"name": "General Commissioning",
"code": 48,
Expand Down
3 changes: 2 additions & 1 deletion examples/bridge-app/esp32/main/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ idf_component_register(PRIV_INCLUDE_DIRS
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/level-control"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/diagnostic-logs-server"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/ethernet-network-diagnostics-server"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/localization-configuration-server"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/localization-configuration-server"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/time-format-localization-server"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/fixed-label-server"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/user-label-server"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/thread-network-diagnostics-server"
Expand Down
28 changes: 28 additions & 0 deletions examples/door-lock-app/door-lock-common/door-lock-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -1042,6 +1042,33 @@ server cluster ThreadNetworkDiagnostics = 53 {
readonly global attribute int16u clusterRevision = 65533;
}

server cluster TimeFormatLocalization = 44 {
enum CalendarType : ENUM8 {
kBuddhist = 0;
kChinese = 1;
kCoptic = 2;
kEthiopian = 3;
kGregorian = 4;
kHebrew = 5;
kIndian = 6;
kIslamic = 7;
kJapanese = 8;
kKorean = 9;
kPersian = 10;
kTaiwanese = 11;
}

enum HourFormat : ENUM8 {
k12hr = 0;
k24hr = 1;
}

attribute HourFormat hourFormat = 0;
attribute CalendarType activeCalendarType = 1;
readonly attribute CalendarType supportedCalendarTypes[] = 2;
readonly global attribute int16u clusterRevision = 65533;
}

server cluster UserLabel = 65 {
attribute LabelStruct labelList[] = 0;
readonly global attribute int16u clusterRevision = 65533;
Expand Down Expand Up @@ -1125,6 +1152,7 @@ endpoint 0 {
server cluster PowerSourceConfiguration;
server cluster SoftwareDiagnostics;
server cluster ThreadNetworkDiagnostics;
server cluster TimeFormatLocalization;
server cluster UserLabel;
server cluster WiFiNetworkDiagnostics;
}
Expand Down
Loading

0 comments on commit 1025642

Please sign in to comment.