MESSAGE Size Limitation to 255 Bits?

Forum related to ERIKA Enterprise and RT-Druid version 2

Moderator: paolo.gai

Post Reply
dimitrie
Newbie
Posts: 2
Joined: Fri Jan 12, 2018 5:53 pm

MESSAGE Size Limitation to 255 Bits?

Post by dimitrie » Tue Jan 16, 2018 10:22 am

Am I correct, that the size of a Message is limited to 255 bits?
Why is that ?

e.guidieri
Full Member
Posts: 166
Joined: Tue May 10, 2011 2:05 pm

Re: MESSAGE Size Limitation to 255 Bits?

Post by e.guidieri » Wed Jan 17, 2018 3:59 pm

Yes you are right,

we chose an uint8_t as message size field, so that is the size limit.
I the use cases that have been took in account we never needed a bigger size.

Errico

paolo.gai
Administrator
Posts: 875
Joined: Thu Dec 07, 2006 12:11 pm

Re: MESSAGE Size Limitation to 255 Bits?

Post by paolo.gai » Wed Jan 17, 2018 4:08 pm

Btw, what kind of size do you need for the messages?

I guess a UINT16 could be fine, but we have to check the implications in the code (if you are going to implement it, pelase submita patch).

Ciao,

PJ

dimitrie
Newbie
Posts: 2
Joined: Fri Jan 12, 2018 5:53 pm

Re: MESSAGE Size Limitation to 255 Bits?

Post by dimitrie » Thu Jan 18, 2018 8:44 pm

Hello,
thank you for the fast reply.

As part of my studies, I deal with implementations of the OSEK standard. Recently, I took a closer look at Erika and developed a few example implementations. I did a few performance measurements. Among other taskswitches, or message handling. According to the OSEK standard, the message size in bits of a NETWORKMESSAGE is encoded with a UINT32 type. However, I do not know what the exact specification for MESSAGE looks like. During testing, I wanted to send a MESSAGE with a size of 128 bytes. I was surprised when I got error messages.

Besides Erika I also work with Trampoline RTOS and there is no problem with such big messages. Among other things, I also check the portability of OSEK applications between different OSEK implementations and between different hardware platforms.

Even if such large MESSAGES are not commonplace and certainly not common in practice, this still poses a portability problem.

I posted this question to the forum because I was not sure what the reason for this is that the message size is encoded only with 8 bits.

paolo.gai
Administrator
Posts: 875
Joined: Thu Dec 07, 2006 12:11 pm

Re: MESSAGE Size Limitation to 255 Bits?

Post by paolo.gai » Fri Jan 19, 2018 1:07 pm

Hi,

Thank for your message. We did not get requests in the past for big messages, but I understand the portability issue for longer messages.

We are going to likely issue a fix in the next weeks (we are quite busy preparing the demos for Embedded World right now).

I'm also quite interested in the comparison you are performing. Will the thesis be public in the near future? if so I would like to get a copy :-) ... if there is also a comparison with other OSEK/VDX RTOS I also would like to get some news, just to know where we can improve!

Ciao,

PJ

ilanbiala
Newbie
Posts: 3
Joined: Tue Jun 12, 2018 2:33 am

Re: MESSAGE Size Limitation to 255 Bits?

Post by ilanbiala » Tue Jun 12, 2018 5:05 pm

Has there been any progress on this? Is there a fix that allows for messages of larger sizes? Some of the messages we're sending (or are trying to get to send) are in the 1-2 KB range.

paolo.gai
Administrator
Posts: 875
Joined: Thu Dec 07, 2006 12:11 pm

Re: MESSAGE Size Limitation to 255 Bits?

Post by paolo.gai » Tue Jun 12, 2018 5:13 pm

Hi,

Currently no news on this. We would have liked to implement that, but we are currently busy with customer requests on other topics, and no customer (I mean companies asking for commercial support on this topic) asked for the feature yet.

Please note that the development on ERIKA is done mainly thanks to companies and research projects funding for the features and allowing us to release them back as open source. Also note that if you need commercial support on this, we'll be happy to do the work (just ask for this using the direct e-mail and not on the forum).

Ciao,

PJ

ilanbiala
Newbie
Posts: 3
Joined: Tue Jun 12, 2018 2:33 am

Re: MESSAGE Size Limitation to 255 Bits?

Post by ilanbiala » Tue Jun 12, 2018 5:38 pm

Thanks for the update. Does Erika v3 also have this limitation?

Is there a public repository for Erika v2 that we could open a PR against and submit the changes to if we decide to move forward and attempt to make this change within the RTOS?

Also, do you know if the changes should be contained to the functions in ee_api.h? At first glance it seems like they should be, but I wanted to check to see if this is more complex than I initially thought.

ilanbiala
Newbie
Posts: 3
Joined: Tue Jun 12, 2018 2:33 am

Re: MESSAGE Size Limitation to 255 Bits?

Post by ilanbiala » Tue Jun 12, 2018 7:08 pm

After a bit more investigation, I checked which changes are necessary for the COM type we're using (CCCB) and the changes seem more localized within the EE_com_* functions, which is good.

I wanted to check though what underlying memory the COM functions are using, since sending larger messages will obviously need more allocated space. Are the message queues being stored in the RTOS's stack memory (the stack memory left after allocating stack space for all of the application-defined tasks and IRQ stacks)? Or are they stored somewhere else, like within the sending task's stack memory?

paolo.gai
Administrator
Posts: 875
Joined: Thu Dec 07, 2006 12:11 pm

Re: MESSAGE Size Limitation to 255 Bits?

Post by paolo.gai » Tue Jun 12, 2018 10:21 pm

Hi anonymous,

about ERIKA v3: it does not support yet OSEK COM.

about the public repo:
http://erika.tuxfamily.org/wiki/index.p ... SVN_Access

CCCB is for internal messaging. the buffers if I remember well are global and defined using macros. There are three demos using COM in the repository:
cortex_mx/lpc12xx/com_ccca_demo/conf.oil
cortex_mx/lpc12xx/com_cccb_demo/conf.oil
pic30/pic30_oo_com_base/conf.oil
Just check them when you download the SVN; you can use them as a basis to see where things are allocated.

Ciao,

PJ

Post Reply