Max number of particle.functions

It was not until now that I doscovered in the Photon documentation that "Up to 15 cloud functions may be registered…
However: in one of my applications I have registered as many as 18 particle.functions(), and they all seem to work just fine.
Is the limitation to 15 as "hard"as it is stated in the documentation?
Might 18 functions in the end behave instable, faulty or whatever?
Or is this limit of 15 no longer valid and does the documentation need to be adapted?

It’s not a hard limit of 15. It’s probably best to not exceed 15 because the limit could be enforced in a future version of Device OS.

There is an actual limit, but it depends on the length of the function names, which is why you were able to get 18 to work.

@Jan_dM, in most of my projects I use a single Particle.function() which accepts a structured command set which I parse (and act on) in the function callback. This allows me to expand the command set easily, only having to update the parser and action functions. Typically, the command parser is designed to be called from functions receiving data from Serial, TCP or UDP, etc, making it even more portable!

3 Likes

Yes, I do understand what you mean. But you know how things evolve: starting with a few functions and then you think of again adding something, and then again… Certainly not the way to end up in a well strucured program.
And I was just wondering if I would run into any risk with these 18 functions, because they all seemed to work fine.
Anyhow, thanks!