-
Notifications
You must be signed in to change notification settings - Fork 53
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
B06:- Get variables requests #218
Conversation
lib/ocpp/v201/device_model.cpp
Outdated
@@ -112,6 +113,12 @@ GetVariableStatusEnum DeviceModel::request_value(const Component& component_id, | |||
return GetVariableStatusEnum::NotSupportedAttributeType; | |||
} | |||
|
|||
// only internal functions can access WriteOnly variables | |||
if (attribute_opt.value().mutability.has_value() && !allow_write_only && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Slight nitpick but I normally prefer the simple bool comparison values up front before the longer checks:
if (attribute_opt.value().mutability.has_value() && !allow_write_only && | |
if (!allow_write_only && attribute_opt.value().mutability.has_value() && |
Edit: Also they use and
instead of &&
@@ -719,9 +719,9 @@ void ChargePoint::handle_message(const EnhancedMessage<v201::MessageType>& messa | |||
|
|||
void ChargePoint::message_callback(const std::string& message) { | |||
auto enhanced_message = this->message_queue->receive(message); | |||
enhanced_message.message_size = message.size(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just wondering if we would like to do this assignment in the queue itself so 1.6 can use it as well.
Signed-off-by: Soumya Subramanya <[email protected]>
Signed-off-by: Soumya Subramanya <[email protected]>
…sts a WriteOnly value Signed-off-by: Soumya Subramanya <[email protected]>
Signed-off-by: Soumya Subramanya <[email protected]>
Signed-off-by: Soumya Subramanya <[email protected]>
Signed-off-by: Soumya Subramanya <[email protected]>
Signed-off-by: Soumya Subramanya <[email protected]>
Signed-off-by: Soumya Subramanya <[email protected]> fix formatting Signed-off-by: Soumya Subramanya <[email protected]>
Signed-off-by: Soumya Subramanya <[email protected]>
Signed-off-by: Soumya Subramanya <[email protected]>
9eab486
to
e102ee5
Compare
Returns a rejected as a response to get variable request for write only variables