@@ -672,7 +672,7 @@ Status EnergyEvseDelegate::HandleEVPluggedInEvent()
672
672
if (mState == StateEnum::kNotPluggedIn )
673
673
{
674
674
/* EV was not plugged in - start a new session */
675
- // TODO get energy meter readings
675
+ // TODO get energy meter readings - #35370
676
676
mSession .StartSession (mEndpointId , 0 , 0 );
677
677
SendEVConnectedEvent ();
678
678
@@ -694,7 +694,7 @@ Status EnergyEvseDelegate::HandleEVNotDetectedEvent()
694
694
SendEnergyTransferStoppedEvent (EnergyTransferStoppedReasonEnum::kOther );
695
695
}
696
696
697
- // TODO get energy meter readings
697
+ // TODO get energy meter readings - #35370
698
698
mSession .StopSession (mEndpointId , 0 , 0 );
699
699
SendEVNotDetectedEvent ();
700
700
SetState (StateEnum::kNotPluggedIn );
@@ -1627,10 +1627,11 @@ bool EnergyEvseDelegate::IsEvsePluggedIn()
1627
1627
/* *
1628
1628
* @brief This function samples the start-time, and energy meter to hold the session info
1629
1629
*
1630
+ * @param endpointId - The endpoint to report the update on
1630
1631
* @param chargingMeterValue - The current value of the energy meter (charging) in mWh
1631
1632
* @param dischargingMeterValue - The current value of the energy meter (discharging) in mWh
1632
1633
*/
1633
- void EvseSession::StartSession (EndpointId aEndpointId , int64_t chargingMeterValue, int64_t dischargingMeterValue)
1634
+ void EvseSession::StartSession (EndpointId endpointId , int64_t chargingMeterValue, int64_t dischargingMeterValue)
1634
1635
{
1635
1636
/* Get Timestamp */
1636
1637
uint32_t chipEpoch = 0 ;
@@ -1662,13 +1663,13 @@ void EvseSession::StartSession(EndpointId aEndpointId, int64_t chargingMeterValu
1662
1663
mSessionEnergyCharged = MakeNullable (static_cast <int64_t >(0 ));
1663
1664
mSessionEnergyDischarged = MakeNullable (static_cast <int64_t >(0 ));
1664
1665
1665
- MatterReportingAttributeChangeCallback (aEndpointId , EnergyEvse::Id, SessionID::Id);
1666
- MatterReportingAttributeChangeCallback (aEndpointId , EnergyEvse::Id, SessionDuration::Id);
1667
- MatterReportingAttributeChangeCallback (aEndpointId , EnergyEvse::Id, SessionEnergyCharged::Id);
1668
- MatterReportingAttributeChangeCallback (aEndpointId , EnergyEvse::Id, SessionEnergyDischarged::Id);
1666
+ MatterReportingAttributeChangeCallback (endpointId , EnergyEvse::Id, SessionID::Id);
1667
+ MatterReportingAttributeChangeCallback (endpointId , EnergyEvse::Id, SessionDuration::Id);
1668
+ MatterReportingAttributeChangeCallback (endpointId , EnergyEvse::Id, SessionEnergyCharged::Id);
1669
+ MatterReportingAttributeChangeCallback (endpointId , EnergyEvse::Id, SessionEnergyDischarged::Id);
1669
1670
1670
1671
// Write values to persistent storage.
1671
- ConcreteAttributePath path = ConcreteAttributePath (aEndpointId , EnergyEvse::Id, SessionID::Id);
1672
+ ConcreteAttributePath path = ConcreteAttributePath (endpointId , EnergyEvse::Id, SessionID::Id);
1672
1673
GetSafeAttributePersistenceProvider ()->WriteScalarValue (path, mSessionID );
1673
1674
1674
1675
// TODO persist mStartTime
@@ -1679,22 +1680,25 @@ void EvseSession::StartSession(EndpointId aEndpointId, int64_t chargingMeterValu
1679
1680
/* *
1680
1681
* @brief This function updates the session information at the unplugged event
1681
1682
*
1683
+ * @param endpointId - The endpoint to report the update on
1682
1684
* @param chargingMeterValue - The current value of the energy meter (charging) in mWh
1683
1685
* @param dischargingMeterValue - The current value of the energy meter (discharging) in mWh
1684
1686
*/
1685
- void EvseSession::StopSession (EndpointId aEndpointId , int64_t chargingMeterValue, int64_t dischargingMeterValue)
1687
+ void EvseSession::StopSession (EndpointId endpointId , int64_t chargingMeterValue, int64_t dischargingMeterValue)
1686
1688
{
1687
- RecalculateSessionDuration (aEndpointId );
1688
- UpdateEnergyCharged (aEndpointId , chargingMeterValue);
1689
- UpdateEnergyDischarged (aEndpointId , dischargingMeterValue);
1689
+ RecalculateSessionDuration (endpointId );
1690
+ UpdateEnergyCharged (endpointId , chargingMeterValue);
1691
+ UpdateEnergyDischarged (endpointId , dischargingMeterValue);
1690
1692
}
1691
1693
1692
1694
/* ---------------------- EvseSession functions --------------------------*/
1693
1695
1694
1696
/* *
1695
1697
* @brief This function updates the session attrs to allow read attributes to return latest values
1698
+ *
1699
+ * @param endpointId - The endpoint to report the update on
1696
1700
*/
1697
- void EvseSession::RecalculateSessionDuration (EndpointId aEndpointId )
1701
+ void EvseSession::RecalculateSessionDuration (EndpointId endpointId )
1698
1702
{
1699
1703
/* Get Timestamp */
1700
1704
uint32_t chipEpoch = 0 ;
@@ -1710,27 +1714,29 @@ void EvseSession::RecalculateSessionDuration(EndpointId aEndpointId)
1710
1714
1711
1715
uint32_t duration = chipEpoch - mStartTime ;
1712
1716
mSessionDuration = MakeNullable (duration);
1713
- MatterReportingAttributeChangeCallback (aEndpointId , EnergyEvse::Id, SessionDuration::Id);
1717
+ MatterReportingAttributeChangeCallback (endpointId , EnergyEvse::Id, SessionDuration::Id);
1714
1718
}
1715
1719
1716
1720
/* *
1717
1721
* @brief This function updates the EnergyCharged meter value
1718
1722
*
1723
+ * @param endpointId - The endpoint to report the update on
1719
1724
* @param chargingMeterValue - The value of the energy meter (charging) in mWh
1720
1725
*/
1721
- void EvseSession::UpdateEnergyCharged (EndpointId aEndpointId , int64_t chargingMeterValue)
1726
+ void EvseSession::UpdateEnergyCharged (EndpointId endpointId , int64_t chargingMeterValue)
1722
1727
{
1723
1728
mSessionEnergyCharged = MakeNullable (chargingMeterValue - mSessionEnergyChargedAtStart );
1724
- MatterReportingAttributeChangeCallback (aEndpointId , EnergyEvse::Id, SessionEnergyCharged::Id);
1729
+ MatterReportingAttributeChangeCallback (endpointId , EnergyEvse::Id, SessionEnergyCharged::Id);
1725
1730
}
1726
1731
1727
1732
/* *
1728
1733
* @brief This function updates the EnergyDischarged meter value
1729
1734
*
1735
+ * @param endpointId - The endpoint to report the update on
1730
1736
* @param dischargingMeterValue - The value of the energy meter (discharging) in mWh
1731
1737
*/
1732
- void EvseSession::UpdateEnergyDischarged (EndpointId aEndpointId , int64_t dischargingMeterValue)
1738
+ void EvseSession::UpdateEnergyDischarged (EndpointId endpointId , int64_t dischargingMeterValue)
1733
1739
{
1734
1740
mSessionEnergyDischarged = MakeNullable (dischargingMeterValue - mSessionEnergyDischargedAtStart );
1735
- MatterReportingAttributeChangeCallback (aEndpointId , EnergyEvse::Id, SessionEnergyDischarged::Id);
1741
+ MatterReportingAttributeChangeCallback (endpointId , EnergyEvse::Id, SessionEnergyDischarged::Id);
1736
1742
}
0 commit comments