Skip to content

Commit 104fe88

Browse files
authored
Activenetworkprofile variable missing and is required if we support networkconnectionprofile (#424)
* Set the active network profile each time we try a connection Signed-off-by: Marc Emmers <m.emmers@alfen.com> * Allow setting the read only variable Signed-off-by: Marc Emmers <m.emmers@alfen.com> --------- Signed-off-by: Marc Emmers <m.emmers@alfen.com>
1 parent 36df4f0 commit 104fe88

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

lib/ocpp/v201/charge_point.cpp

+7
Original file line numberDiff line numberDiff line change
@@ -675,6 +675,13 @@ void ChargePoint::init_websocket() {
675675
return;
676676
}
677677

678+
const auto& active_network_profile_cv = ControllerComponentVariables::ActiveNetworkProfile;
679+
if (active_network_profile_cv.variable.has_value()) {
680+
this->device_model->set_read_only_value(active_network_profile_cv.component,
681+
active_network_profile_cv.variable.value(), AttributeEnum::Actual,
682+
configuration_slot);
683+
}
684+
678685
const auto& security_profile_cv = ControllerComponentVariables::SecurityProfile;
679686
if (security_profile_cv.variable.has_value()) {
680687
this->device_model->set_read_only_value(security_profile_cv.component, security_profile_cv.variable.value(),

lib/ocpp/v201/device_model.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ SetVariableStatusEnum DeviceModel::set_read_only_value(const Component& componen
206206
const AttributeEnum& attribute_enum, const std::string& value) {
207207

208208
if (component == ControllerComponents::AuthCacheCtrlr or component == ControllerComponents::LocalAuthListCtrlr or
209-
component == ControllerComponents::SecurityCtrlr) {
209+
component == ControllerComponents::OCPPCommCtrlr or component == ControllerComponents::SecurityCtrlr) {
210210
return this->set_value_internal(component, variable, attribute_enum, value, true);
211211
}
212212
throw std::invalid_argument("Not allowed to set read only value for component " + component.name.get());

0 commit comments

Comments
 (0)