Skip to content

Commit

Permalink
Updated energy-evse-cluster.xml to use latest EnergyEVSE.adoc which r…
Browse files Browse the repository at this point in the history
…emoves numberOfWeeklyTargets, numberOfDailyTargets, and adds new ChargingTargetScheduleStruct in Get/Set/Clear Target commands
  • Loading branch information
jamesharrow committed Jan 14, 2024
1 parent 8788e1f commit c0626e5
Show file tree
Hide file tree
Showing 44 changed files with 654 additions and 1,268 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3867,6 +3867,11 @@ provisional cluster EnergyEvse = 153 {
optional energy_mwh addedEnergy = 2;
}

struct ChargingTargetScheduleStruct {
optional TargetDayOfWeekBitmap dayOfWeekforSequence = 0;
optional ChargingTargetStruct chargingTargets[] = 1;
}

info event EVConnected = 0 {
int32u sessionID = 0;
}
Expand Down Expand Up @@ -3914,8 +3919,6 @@ provisional cluster EnergyEvse = 153 {
readonly attribute optional amperage_ma maximumDischargeCurrent = 8;
attribute access(write: manage) optional amperage_ma userMaximumChargeCurrent = 9;
attribute access(write: manage) optional elapsed_s randomizationDelayWindow = 10;
readonly attribute optional int8u numberOfWeeklyTargets = 33;
readonly attribute optional int8u numberOfDailyTargets = 34;
readonly attribute optional nullable epoch_s nextChargeStartTime = 35;
readonly attribute optional nullable epoch_s nextChargeTargetTime = 36;
readonly attribute optional nullable energy_mwh nextChargeRequiredEnergy = 37;
Expand All @@ -3936,8 +3939,7 @@ provisional cluster EnergyEvse = 153 {
readonly attribute int16u clusterRevision = 65533;

response struct GetTargetsResponse = 0 {
TargetDayOfWeekBitmap dayOfWeekforSequence = 0;
ChargingTargetStruct chargingTargets[] = 1;
ChargingTargetScheduleStruct chargingTargetSchedules[] = 0;
}

request struct EnableChargingRequest {
Expand All @@ -3952,12 +3954,7 @@ provisional cluster EnergyEvse = 153 {
}

request struct SetTargetsRequest {
TargetDayOfWeekBitmap dayOfWeekforSequence = 0;
ChargingTargetStruct chargingTargets[] = 1;
}

request struct GetTargetsRequest {
TargetDayOfWeekBitmap daysToReturn = 0;
ChargingTargetScheduleStruct chargingTargetSchedules[] = 0;
}

/** Allows a client to disable the EVSE from charging and discharging. */
Expand All @@ -3971,7 +3968,7 @@ provisional cluster EnergyEvse = 153 {
/** Allows a client to set the user specified charging targets. */
timed command SetTargets(SetTargetsRequest): DefaultSuccess = 5;
/** Allows a client to retrieve the user specified charging targets. */
timed command GetTargets(GetTargetsRequest): GetTargetsResponse = 6;
timed command GetTargets(): GetTargetsResponse = 6;
/** Allows a client to clear all stored charging targets. */
timed command ClearTargets(): DefaultSuccess = 7;
}
Expand Down Expand Up @@ -7454,8 +7451,6 @@ endpoint 1 {
callback attribute maximumDischargeCurrent default = 0;
callback attribute userMaximumChargeCurrent default = 0;
callback attribute randomizationDelayWindow default = 600;
callback attribute numberOfWeeklyTargets default = 0;
callback attribute numberOfDailyTargets default = 1;
callback attribute nextChargeStartTime;
callback attribute nextChargeTargetTime;
callback attribute nextChargeRequiredEnergy;
Expand Down
54 changes: 11 additions & 43 deletions examples/all-clusters-app/all-clusters-common/all-clusters-app.zap
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,19 @@
}
],
"package": [
{
"pathRelativity": "relativeToZap",
"path": "../../../src/app/zap-templates/app-templates.json",
"type": "gen-templates-json",
"version": "chip-v1"
},
{
"pathRelativity": "relativeToZap",
"path": "../../../src/app/zap-templates/zcl/zcl-with-test-extensions.json",
"type": "zcl-properties",
"category": "matter",
"version": 1,
"description": "Matter SDK ZCL data with some extensions"
},
{
"pathRelativity": "relativeToZap",
"path": "../../../src/app/zap-templates/app-templates.json",
"type": "gen-templates-json",
"version": "chip-v1"
}
],
"endpointTypes": [
Expand Down Expand Up @@ -8427,7 +8427,7 @@
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
Expand Down Expand Up @@ -8459,7 +8459,7 @@
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
Expand All @@ -8475,7 +8475,7 @@
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
Expand All @@ -8491,7 +8491,7 @@
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
Expand All @@ -8507,7 +8507,7 @@
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
Expand Down Expand Up @@ -12257,38 +12257,6 @@
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "NumberOfWeeklyTargets",
"code": 33,
"mfgCode": null,
"side": "server",
"type": "int8u",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "0",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "NumberOfDailyTargets",
"code": 34,
"mfgCode": null,
"side": "server",
"type": "int8u",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "1",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "NextChargeStartTime",
"code": 35,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -972,6 +972,11 @@ provisional cluster EnergyEvse = 153 {
optional energy_mwh addedEnergy = 2;
}

struct ChargingTargetScheduleStruct {
optional TargetDayOfWeekBitmap dayOfWeekforSequence = 0;
optional ChargingTargetStruct chargingTargets[] = 1;
}

info event EVConnected = 0 {
int32u sessionID = 0;
}
Expand Down Expand Up @@ -1019,8 +1024,6 @@ provisional cluster EnergyEvse = 153 {
readonly attribute optional amperage_ma maximumDischargeCurrent = 8;
attribute access(write: manage) optional amperage_ma userMaximumChargeCurrent = 9;
attribute access(write: manage) optional elapsed_s randomizationDelayWindow = 10;
readonly attribute optional int8u numberOfWeeklyTargets = 33;
readonly attribute optional int8u numberOfDailyTargets = 34;
readonly attribute optional nullable epoch_s nextChargeStartTime = 35;
readonly attribute optional nullable epoch_s nextChargeTargetTime = 36;
readonly attribute optional nullable energy_mwh nextChargeRequiredEnergy = 37;
Expand All @@ -1041,8 +1044,7 @@ provisional cluster EnergyEvse = 153 {
readonly attribute int16u clusterRevision = 65533;

response struct GetTargetsResponse = 0 {
TargetDayOfWeekBitmap dayOfWeekforSequence = 0;
ChargingTargetStruct chargingTargets[] = 1;
ChargingTargetScheduleStruct chargingTargetSchedules[] = 0;
}

request struct EnableChargingRequest {
Expand All @@ -1057,12 +1059,7 @@ provisional cluster EnergyEvse = 153 {
}

request struct SetTargetsRequest {
TargetDayOfWeekBitmap dayOfWeekforSequence = 0;
ChargingTargetStruct chargingTargets[] = 1;
}

request struct GetTargetsRequest {
TargetDayOfWeekBitmap daysToReturn = 0;
ChargingTargetScheduleStruct chargingTargetSchedules[] = 0;
}

/** Allows a client to disable the EVSE from charging and discharging. */
Expand All @@ -1076,7 +1073,7 @@ provisional cluster EnergyEvse = 153 {
/** Allows a client to set the user specified charging targets. */
timed command SetTargets(SetTargetsRequest): DefaultSuccess = 5;
/** Allows a client to retrieve the user specified charging targets. */
timed command GetTargets(GetTargetsRequest): GetTargetsResponse = 6;
timed command GetTargets(): GetTargetsResponse = 6;
/** Allows a client to clear all stored charging targets. */
timed command ClearTargets(): DefaultSuccess = 7;
}
Expand Down Expand Up @@ -1308,8 +1305,6 @@ endpoint 1 {
callback attribute maximumDischargeCurrent default = 0;
callback attribute userMaximumChargeCurrent default = 0;
callback attribute randomizationDelayWindow default = 600;
callback attribute numberOfWeeklyTargets default = 0;
callback attribute numberOfDailyTargets default = 1;
callback attribute nextChargeStartTime;
callback attribute nextChargeTargetTime;
callback attribute nextChargeRequiredEnergy;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2768,38 +2768,6 @@
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "NumberOfWeeklyTargets",
"code": 33,
"mfgCode": null,
"side": "server",
"type": "int8u",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "0",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "NumberOfDailyTargets",
"code": 34,
"mfgCode": null,
"side": "server",
"type": "int8u",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "1",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "NextChargeStartTime",
"code": 35,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,6 @@ class EnergyEvseDelegate : public EnergyEvse::Delegate
CHIP_ERROR SetRandomizationDelayWindow(uint32_t) override;

/* PREF attributes */
uint8_t GetNumberOfWeeklyTargets() override;
uint8_t GetNumberOfDailyTargets() override;
DataModel::Nullable<uint32_t> GetNextChargeStartTime() override;
DataModel::Nullable<uint32_t> GetNextChargeTargetTime() override;
DataModel::Nullable<int64_t> GetNextChargeRequiredEnergy() override;
Expand Down Expand Up @@ -293,8 +291,6 @@ class EnergyEvseDelegate : public EnergyEvse::Delegate
int64_t mUserMaximumChargeCurrent = kDefaultUserMaximumChargeCurrent; // TODO update spec
uint32_t mRandomizationDelayWindow = kDefaultRandomizationDelayWindow;
/* PREF attributes */
uint8_t mNumberOfWeeklyTargets = 0;
uint8_t mNumberOfDailyTargets = 1;
DataModel::Nullable<uint32_t> mNextChargeStartTime;
DataModel::Nullable<uint32_t> mNextChargeTargetTime;
DataModel::Nullable<int64_t> mNextChargeRequiredEnergy;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1374,14 +1374,6 @@ CHIP_ERROR EnergyEvseDelegate::SetRandomizationDelayWindow(uint32_t newValue)
}

/* PREF attributes */
uint8_t EnergyEvseDelegate::GetNumberOfWeeklyTargets()
{
return mNumberOfWeeklyTargets;
}
uint8_t EnergyEvseDelegate::GetNumberOfDailyTargets()
{
return mNumberOfDailyTargets;
}
DataModel::Nullable<uint32_t> EnergyEvseDelegate::GetNextChargeStartTime()
{
return mNextChargeStartTime;
Expand Down
4 changes: 0 additions & 4 deletions src/app/clusters/energy-evse-server/energy-evse-server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,6 @@ CHIP_ERROR Instance::Read(const ConcreteReadAttributePath & aPath, AttributeValu
/* Optional */
return aEncoder.Encode(mDelegate.GetRandomizationDelayWindow());
/* PREF - ChargingPreferences attributes */
case NumberOfWeeklyTargets::Id:
return aEncoder.Encode(mDelegate.GetNumberOfWeeklyTargets());
case NumberOfDailyTargets::Id:
return aEncoder.Encode(mDelegate.GetNumberOfDailyTargets());
case NextChargeStartTime::Id:
return aEncoder.Encode(mDelegate.GetNextChargeStartTime());
case NextChargeTargetTime::Id:
Expand Down
7 changes: 2 additions & 5 deletions src/app/clusters/energy-evse-server/energy-evse-server.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,6 @@ class Delegate
virtual int64_t GetUserMaximumChargeCurrent() = 0;
virtual uint32_t GetRandomizationDelayWindow() = 0;
/* PREF attributes */
virtual uint8_t GetNumberOfWeeklyTargets() = 0;
virtual uint8_t GetNumberOfDailyTargets() = 0;
virtual DataModel::Nullable<uint32_t> GetNextChargeStartTime() = 0;
virtual DataModel::Nullable<uint32_t> GetNextChargeTargetTime() = 0;
virtual DataModel::Nullable<int64_t> GetNextChargeRequiredEnergy() = 0;
Expand Down Expand Up @@ -142,9 +140,8 @@ class Instance : public AttributeAccessInterface, public CommandHandlerInterface
public:
Instance(EndpointId aEndpointId, Delegate & aDelegate, Feature aFeature, OptionalAttributes aOptionalAttrs,
OptionalCommands aOptionalCmds) :
AttributeAccessInterface(MakeOptional(aEndpointId), Id),
CommandHandlerInterface(MakeOptional(aEndpointId), Id), mDelegate(aDelegate), mFeature(aFeature),
mOptionalAttrs(aOptionalAttrs), mOptionalCmds(aOptionalCmds)
AttributeAccessInterface(MakeOptional(aEndpointId), Id), CommandHandlerInterface(MakeOptional(aEndpointId), Id),
mDelegate(aDelegate), mFeature(aFeature), mOptionalAttrs(aOptionalAttrs), mOptionalCmds(aOptionalCmds)
{
/* set the base class delegates endpointId */
mDelegate.SetEndpointId(aEndpointId);
Expand Down
Loading

0 comments on commit c0626e5

Please sign in to comment.