Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates Service Area with name changes since 0.7 #34711

Merged
merged 31 commits into from
Aug 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
e4087bd
Updated the golabl data type's XMLs, removing the cluster entries.
hicklin Jul 31, 2024
7342db3
Zap generated after XML update.
hicklin Jul 31, 2024
63edf2e
Fixed namespaces used of global structs.
hicklin Jul 31, 2024
1cab752
Restyled by clang-format
restyled-commits Jul 31, 2024
72de6c5
Renamed LocationInfoStruct to AreaInfoStruct.
hicklin Aug 1, 2024
f2add10
Zap generated after XML update.
hicklin Aug 1, 2024
c6134a6
Renamed LocationStruct to AreaStruct and its LocationID and LocationD…
hicklin Aug 1, 2024
af8b02c
Zap generated after XML update.
hicklin Aug 1, 2024
a20d803
Updated SDK and example code to match the new naming.
hicklin Aug 1, 2024
8bb0d34
Updated the ProgressStruct's LocationID name to AreaID.
hicklin Aug 1, 2024
5bd0285
Zap generated after XML update.
hicklin Aug 1, 2024
5dc5eb0
Updated the SDK code following name changes.
hicklin Aug 1, 2024
5429771
Updated the SelectLocationsStatus and SkipLocationStatus enum names a…
hicklin Aug 1, 2024
04e87b6
Zap generated after XML update.
hicklin Aug 1, 2024
91f4446
Updated the SelectLocationsStatus and SkipCurrentLocationStatus names…
hicklin Aug 1, 2024
31a3c1a
Updated the names of the SupportedLocations, SelectedLocations and Cu…
hicklin Aug 1, 2024
f7d6a54
Zap generated after XML update.
hicklin Aug 1, 2024
4c128e6
Updated the changed names in the SDK.
hicklin Aug 1, 2024
088f01d
Updated the service area command names in XML.
hicklin Aug 1, 2024
a6b8036
Zap generated after XML update.
hicklin Aug 1, 2024
69eb53f
Updated the service area command names in the SDK.
hicklin Aug 1, 2024
c6c3659
Updated the rvc-example zap file.
hicklin Aug 1, 2024
d378b4e
Refactored LocationStructureWrapper to AreaStructureWrapper.
hicklin Aug 1, 2024
75a3369
Merge branch 'master' into update_names
hicklin Aug 1, 2024
86c38ed
Restyled by clang-format
restyled-commits Aug 1, 2024
a611a5b
Regenerated zap files due to changes upsteram.
hicklin Aug 1, 2024
56d0184
Merge branch 'master' into update_names
hicklin Aug 2, 2024
b3abfbd
Removed unused generated file.
hicklin Aug 2, 2024
afb1084
Merge branch 'master' into update_names
hicklin Aug 5, 2024
ba24897
spacing changes form zap regen.
hicklin Aug 5, 2024
4f61bf3
Fixed minor mistake during merge.
hicklin Aug 5, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 18 additions & 18 deletions examples/rvc-app/rvc-common/include/rvc-service-area-delegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,39 +35,39 @@ class RvcServiceAreaDelegate : public Delegate
{
private:
// containers for array attributes.
std::vector<ServiceArea::LocationStructureWrapper> mSupportedLocations;
std::vector<ServiceArea::AreaStructureWrapper> mSupportedAreas;
std::vector<ServiceArea::MapStructureWrapper> mSupportedMaps;
std::vector<uint32_t> mSelectedLocations;
std::vector<uint32_t> mSelectedAreas;
std::vector<ServiceArea::Structs::ProgressStruct::Type> mProgressList;

public:
CHIP_ERROR Init() override;

// command support
bool IsSetSelectedLocationsAllowed(MutableCharSpan statusText) override;
bool IsSetSelectedAreasAllowed(MutableCharSpan statusText) override;

bool IsValidSelectLocationsSet(const ServiceArea::Commands::SelectLocations::DecodableType & req,
ServiceArea::SelectLocationsStatus & locationStatus, MutableCharSpan statusText) override;
bool IsValidSelectAreasSet(const ServiceArea::Commands::SelectAreas::DecodableType & req,
ServiceArea::SelectAreasStatus & locationStatus, MutableCharSpan statusText) override;

bool HandleSkipCurrentLocation(MutableCharSpan skipStatusText) override;
bool HandleSkipCurrentArea(MutableCharSpan skipStatusText) override;

//*************************************************************************
// Supported Locations accessors

bool IsSupportedLocationsChangeAllowed() override;
bool IsSupportedAreasChangeAllowed() override;

uint32_t GetNumberOfSupportedLocations() override;
uint32_t GetNumberOfSupportedAreas() override;

bool GetSupportedLocationByIndex(uint32_t listIndex, ServiceArea::LocationStructureWrapper & supportedLocation) override;
bool GetSupportedLocationByIndex(uint32_t listIndex, ServiceArea::AreaStructureWrapper & supportedLocation) override;

bool GetSupportedLocationById(uint32_t aLocationId, uint32_t & listIndex,
ServiceArea::LocationStructureWrapper & supportedLocation) override;
bool GetSupportedLocationById(uint32_t aAreaId, uint32_t & listIndex,
ServiceArea::AreaStructureWrapper & supportedLocation) override;

bool AddSupportedLocation(const ServiceArea::LocationStructureWrapper & newLocation, uint32_t & listIndex) override;
bool AddSupportedLocation(const ServiceArea::AreaStructureWrapper & newArea, uint32_t & listIndex) override;

bool ModifySupportedLocation(uint32_t listIndex, const ServiceArea::LocationStructureWrapper & modifiedLocation) override;
bool ModifySupportedLocation(uint32_t listIndex, const ServiceArea::AreaStructureWrapper & modifiedLocation) override;

bool ClearSupportedLocations() override;
bool ClearSupportedAreas() override;

//*************************************************************************
// Supported Maps accessors
Expand All @@ -89,15 +89,15 @@ class RvcServiceAreaDelegate : public Delegate
//*************************************************************************
// Selected Locations accessors

uint32_t GetNumberOfSelectedLocations() override;
uint32_t GetNumberOfSelectedAreas() override;

bool GetSelectedLocationByIndex(uint32_t listIndex, uint32_t & selectedLocation) override;

// IsSelectedLocation() no override

bool AddSelectedLocation(uint32_t aLocationId, uint32_t & listIndex) override;
bool AddSelectedLocation(uint32_t aAreaId, uint32_t & listIndex) override;

bool ClearSelectedLocations() override;
bool ClearSelectedAreas() override;

//*************************************************************************
// Progress accessors
Expand All @@ -106,7 +106,7 @@ class RvcServiceAreaDelegate : public Delegate

bool GetProgressElementByIndex(uint32_t listIndex, ServiceArea::Structs::ProgressStruct::Type & aProgressElement) override;

bool GetProgressElementById(uint32_t aLocationId, uint32_t & listIndex,
bool GetProgressElementById(uint32_t aAreaId, uint32_t & listIndex,
ServiceArea::Structs::ProgressStruct::Type & aProgressElement) override;

bool AddProgressElement(const ServiceArea::Structs::ProgressStruct::Type & newProgressElement, uint32_t & listIndex) override;
Expand Down
60 changes: 30 additions & 30 deletions examples/rvc-app/rvc-common/rvc-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -1421,17 +1421,17 @@ provisional cluster ServiceArea = 336 {
kCompleted = 3;
}

enum SelectLocationsStatus : enum8 {
enum SelectAreasStatus : enum8 {
kSuccess = 0;
kUnsupportedLocation = 1;
kDuplicatedLocations = 2;
kUnsupportedArea = 1;
kDuplicatedAreas = 2;
kInvalidInMode = 3;
kInvalidSet = 4;
}

enum SkipCurrentLocationStatus : enum8 {
enum SkipAreaStatus : enum8 {
kSuccess = 0;
kInvalidLocationList = 1;
kInvalidAreaList = 1;
kInvalidInMode = 2;
}

Expand All @@ -1440,17 +1440,17 @@ provisional cluster ServiceArea = 336 {
kSelectWhileRunning = 0x2;
}

struct LocationInfoStruct {
struct AreaInfoStruct {
nullable LocationDescriptorStruct locationInfo = 0;
nullable LandmarkTag landmarkTag = 1;
nullable PositionTag positionTag = 2;
nullable FloorSurfaceTag surfaceTag = 3;
}

struct LocationStruct {
int32u locationID = 0;
struct AreaStruct {
int32u areaID = 0;
nullable int8u mapID = 1;
LocationInfoStruct locationInfo = 2;
AreaInfoStruct areaDesc = 2;
}

struct MapStruct {
Expand All @@ -1459,16 +1459,16 @@ provisional cluster ServiceArea = 336 {
}

struct ProgressStruct {
int32u locationID = 0;
int32u areaID = 0;
OperationalStatusEnum status = 1;
optional nullable elapsed_s totalOperationalTime = 2;
optional nullable elapsed_s estimatedTime = 3;
}

readonly attribute LocationStruct supportedLocations[] = 0;
readonly attribute AreaStruct supportedAreas[] = 0;
readonly attribute nullable MapStruct supportedMaps[] = 1;
readonly attribute nullable int32u selectedLocations[] = 2;
readonly attribute optional nullable int32u currentLocation = 3;
readonly attribute nullable int32u selectedAreas[] = 2;
readonly attribute optional nullable int32u currentArea = 3;
readonly attribute optional nullable epoch_s estimatedEndTime = 4;
readonly attribute optional nullable ProgressStruct progress[] = 5;
readonly attribute command_id generatedCommandList[] = 65528;
Expand All @@ -1478,24 +1478,24 @@ provisional cluster ServiceArea = 336 {
readonly attribute bitmap32 featureMap = 65532;
readonly attribute int16u clusterRevision = 65533;

request struct SelectLocationsRequest {
nullable int32u newLocations[] = 0;
request struct SelectAreasRequest {
nullable int32u newAreas[] = 0;
}

response struct SelectLocationsResponse = 1 {
SelectLocationsStatus status = 0;
response struct SelectAreasResponse = 1 {
SelectAreasStatus status = 0;
optional char_string<256> statusText = 1;
}

response struct SkipCurrentLocationResponse = 3 {
SkipCurrentLocationStatus status = 0;
response struct SkipAreaResponse = 3 {
SkipAreaStatus status = 0;
optional char_string<256> statusText = 1;
}

/** Command used to select a set of device locations, where the device is to operate */
command SelectLocations(SelectLocationsRequest): SelectLocationsResponse = 0;
/** This command is used to skip the current location where the device operates. */
command SkipCurrentLocation(): SkipCurrentLocationResponse = 2;
/** Command used to select a set of device areas, where the device is to operate. */
command SelectAreas(SelectAreasRequest): SelectAreasResponse = 0;
/** This command is used to skip an area where the device operates. */
command SkipArea(): SkipAreaResponse = 2;
}

endpoint 0 {
Expand Down Expand Up @@ -1755,10 +1755,10 @@ endpoint 1 {
}

server cluster ServiceArea {
callback attribute supportedLocations;
callback attribute supportedAreas;
callback attribute supportedMaps;
callback attribute selectedLocations;
callback attribute currentLocation;
callback attribute selectedAreas;
callback attribute currentArea;
callback attribute estimatedEndTime;
callback attribute progress;
callback attribute generatedCommandList;
Expand All @@ -1768,10 +1768,10 @@ endpoint 1 {
callback attribute featureMap;
ram attribute clusterRevision default = 1;

handle command SelectLocations;
handle command SelectLocationsResponse;
handle command SkipCurrentLocation;
handle command SkipCurrentLocationResponse;
handle command SelectAreas;
handle command SelectAreasResponse;
handle command SkipArea;
handle command SkipAreaResponse;
}
}

Expand Down
21 changes: 11 additions & 10 deletions examples/rvc-app/rvc-common/rvc-app.zap
Original file line number Diff line number Diff line change
Expand Up @@ -2885,33 +2885,34 @@
"define": "SERVICE_AREA_CLUSTER",
"side": "server",
"enabled": 1,
"apiMaturity": "provisional",
"commands": [
{
"name": "SelectLocations",
"name": "SelectAreas",
"code": 0,
"mfgCode": null,
"source": "client",
"isIncoming": 1,
"isEnabled": 1
},
{
"name": "SelectLocationsResponse",
"name": "SelectAreasResponse",
"code": 1,
"mfgCode": null,
"source": "server",
"isIncoming": 0,
"isEnabled": 1
},
{
"name": "SkipCurrent",
"name": "SkipArea",
"code": 2,
"mfgCode": null,
"source": "client",
"isIncoming": 1,
"isEnabled": 1
},
{
"name": "SkipCurrentResponse",
"name": "SkipAreaResponse",
"code": 3,
"mfgCode": null,
"source": "server",
Expand All @@ -2921,7 +2922,7 @@
],
"attributes": [
{
"name": "SupportedLocations",
"name": "SupportedAreas",
"code": 0,
"mfgCode": null,
"side": "server",
Expand Down Expand Up @@ -2953,7 +2954,7 @@
"reportableChange": 0
},
{
"name": "SelectedLocations",
"name": "SelectedAreas",
"code": 2,
"mfgCode": null,
"side": "server",
Expand All @@ -2969,7 +2970,7 @@
"reportableChange": 0
},
{
"name": "CurrentLocation",
"name": "CurrentArea",
"code": 3,
"mfgCode": null,
"side": "server",
Expand All @@ -2978,7 +2979,7 @@
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
Expand All @@ -2994,7 +2995,7 @@
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
Expand Down Expand Up @@ -3090,7 +3091,7 @@
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "0",
"defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
Expand Down
Loading
Loading