-
Notifications
You must be signed in to change notification settings - Fork 221
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
add ustring builtin type (unsigned char*) #125
Conversation
Hello @pgu-swir , I am sorry not being able to respond sooner when discussed with @Hadatko about this problem. To be honest, @Hadatko is more experienced in this field than me, however it seems to me OK to introduce ustring type and also the so-far-done steps should be ok. As for the failing Travis, please ignore this in both of your PRs ... I have migrated erpc project from travis-ci.org to travis-ci.com recently and there are build issues since that time (head of develop branch also fails under travis-ci.com while it was passing under travis-ci.org). Will try to solve this soon. |
Hi @MichalPrincNXP , no worries. The "full" patch is available now and works for me and seems to have passed Travis tests :-) |
Anything else I should do? |
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.
So far so good ;)
@@ -232,7 +232,7 @@ codec->readData({$info.name}, {$info.sizeTemp} * sizeof({$info.builtinTypeName}) | |||
{# Encode sending data #} | |||
{% def encodeBuiltinType(info) ----------------- %} | |||
{% if info.builtinType == "kStringType" %} | |||
codec->writeString(strlen({$info.name}), {$info.name}); | |||
codec->writeString(strlen((const char*){$info.name}), (const char*){$info.name}); |
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.
if info.builtinType == "kStringType" looks like it is not counting with ustring type. Am i wrong?
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.
Ok i looked into code and it should be ok.
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.
Hello @pgu-swir , I have just finished testing on my side and all seems to be OK. Thanks for this effort!
@pgu-swir it would be good if you could add some erpcgen pytest. Not execution but for generating ouput. To keep support for future. Take a look here: https://github.com/EmbeddedRPC/erpc/tree/develop/erpcgen/test |
Well, Dusan, I have already updated tests + added one more test on my side ... I will provide this update on the develop branch later this week with other NXP changes for 1.8.0 version. |
I'll look at it - I need to figure out exactly what/where to add something as ustring are really a string |
Do not worry about this, I will manage that as written in my previous note. |
oh, thanks so much! |
This answers issue #124 by using "ustring" and casting string types to (const char *) when used in the codecWrite.
This is still WIP as the server shim code needs as well to do some cast... but I wanted to know if the direction is satisfactory for you