Skip to content

Impl field methods v2#296

Open
KrishaDeshkool wants to merge 7 commits intoeclipse-score:mainfrom
KrishaDeshkool:impl_field_methods_v2
Open

Impl field methods v2#296
KrishaDeshkool wants to merge 7 commits intoeclipse-score:mainfrom
KrishaDeshkool:impl_field_methods_v2

Conversation

@KrishaDeshkool
Copy link
Copy Markdown
Contributor

No description provided.

Comment thread score/mw/com/impl/bindings/lola/methods/BUILD Outdated
Comment thread score/mw/com/impl/bindings/lola/methods/BUILD Outdated
@KrishaDeshkool KrishaDeshkool force-pushed the impl_field_methods_v2 branch 4 times, most recently from 6e2b103 to fd0dd71 Compare April 14, 2026 12:39
Comment thread score/mw/com/impl/method_type.h
Comment thread score/mw/com/impl/bindings/lola/proxy.cpp
Comment thread score/mw/com/impl/methods/proxy_method_with_in_args.h
@KrishaDeshkool KrishaDeshkool force-pushed the impl_field_methods_v2 branch 3 times, most recently from d9595bc to b32d6b7 Compare April 14, 2026 15:07
Comment thread score/mw/com/impl/method_identifier.h
@KrishaDeshkool KrishaDeshkool force-pushed the impl_field_methods_v2 branch 3 times, most recently from 0aeb0e5 to 292c717 Compare April 14, 2026 15:54
@KrishaDeshkool KrishaDeshkool force-pushed the impl_field_methods_v2 branch from 292c717 to 761f9eb Compare April 15, 2026 07:52
@KrishaDeshkool KrishaDeshkool force-pushed the impl_field_methods_v2 branch from 761f9eb to a48d3de Compare April 15, 2026 08:00
@KrishaDeshkool KrishaDeshkool marked this pull request as ready for review April 15, 2026 08:01

namespace detail
{

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe refactor into its own header: field_tag_types.h .
At least add a small comment, that these tag-types are used on ProxyField/SkeletonField level to accomplish overload-resolution for various signatures, which depend on the availability of Get/Set/Notifier.

}

auto queue_size = GetQueueSize(parent_handle, method_name_str);
// TODO : Field Get/Set methods use a fixed queue size of 1 for now, once it has been fully implemented, this should
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would change this:
Imho we currently already have the general restriction, that we only support a queue size of 1. Because we do have synchronous/blocking method calls!
I looked at the configureation-schema. Interesstingly there we already support 1..255 for method-call queue-size. I did NOT check whether/where we WARN if the user configures a queue size > 1?

Bottom-line:
I would like you NOT to do the "special" handling here. Instead extend GetQueueSize with the additional method_type arg here and within GetQueueSize you do the short-cut/special handling to return 1 in case of Get/Set type ...

ProxyBase& parent,
const std::string_view field_name) noexcept
{
return ProxyMethodBindingFactory<SampleType()>::Create(
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm. Now I lost track. Why do we have this asymetric approach? CreateEventBinding some lines above dispatches to CreateProxyServiceElement ... but here we are dispatching to ProxyMethodBindingFactory<SampleType()>::Create ? So - to me it seems, that either CreateProxyServiceElement (and therefore entire proxy_service_element_binding_factory_impl.h should be removed OR we always dispatch to it ... also in the method case!?
A proxy_service_element_binding_factory_impl.h, which only handles events/fields but not methods makes no sense to me - it is rather confusing!
Can you discuss this with Brendan? I find our approach hard to understand right now ...?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah! i see your point now. let me think about it

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm! so i moved out only the part that is genuinely shared across all of them like validating the parent is a lola proxy, std visiting the deployment variant, and resolving the element id into an ElementFqId. removed this misleading proxy_service_element_binding_factory_impl header and then every factory events field notifier, and methods now starts with that one call and then does its own make_unique with whatever args its type needs.

if (method_type == MethodType::kGet || method_type == MethodType::kSet)
{
lola_service_element_id =
GetServiceElementId<ServiceElementType::FIELD>(lola_type_deployment, method_name_str);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How do you handle the differentiation between a Get and Set method here?
They will boil down exactly to the same lola_service_element_id . Is this intended?
I mean the enclosing function gets called WITH method_type ... so you could differ here ... but you do not?
So in case this Create-API gets called for a field-method (get/set), method_name_str contains the field name!
Maybe document it here - that is maybe noteworthy ...

... and then some lines down (line 137) you create a ProxyMethodInstanceIdentifier which additionally gets the method_type ... so the resulting ProxyMethodInstanceIdentifier does contain the get/set distinction?

So - maybe all is fine and is intended - then maybe add some small comments (see above), which make it a bit clearer.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i see it could be better documented,
we can already see now this lola_service_element_id is of type LolaMethodOrFieldId so it is intentional that it would have both method and field ids in this.
will add a clarifying comments.

using Event = ProxyEvent<SampleType>;

template <typename SampleType>
// Note : at the moment the get side implementation is not in the branch which means the skeleton and proxy side
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.. the SkeletonField::Get implementation is not ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants