Skip to content
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

Md5 methodId instead of unsigned int counter #207

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from

Conversation

kikass13
Copy link

@kikass13 kikass13 commented Oct 7, 2021

related issue

General

I hacked together a simple solution (and cleaned up the underlying frame generation a little) for utilizing md5 generated hashes for message Ids, which allows to assign/distribute different messages across multiple endpoints inside 1:n (or n:n) topologic network.

it is more costly (traffic and computational), but allows a more flexible approach for different types of underlying transport networks. The current erpc implementation cannot safely distribute messages across different endpoints.

This is a proof of concept and should contain all the necessary changes (it's actually not that much) and the "important" is actually contained inside the erpcgen tool (which is basically a sandbox for 'somewhat questionable' code practices anyways, as far as I can tell) :)

Stuff that should not be here

There are also some changes in here which are not part of the overall solution to the problem, but are there because the develop branch seems to have some "not building on my system" problems, mainly:

  • Makefile
  • erpc_c/port/erpc_threading_pthreads.cpp

These can be cherry picked if necessary (or fixed in the actual develop branch)

TLDR

  • slight cleanup of erpc frame header generation
  • md5 hash containing function prototype <T foo(T, T...)> in erpcgen
  • md5 hash as methodId client code adaptation
  • md5 hash as methodId server code adaptation
  • it uses constepxr if because enums are pretty much useless here
    • so there have to be some changes when only looking at older C (++) stuff

@MichalPrincNXP
Copy link
Member

Again, thank you @kikass13 for your effort. Let us try and evaluate.

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

Successfully merging this pull request may close these issues.

2 participants