Hi…
My unique identifier key with “IoT mqtt borker service” I use ( Adafruit IO ) is longer
than the IoTMadeEasy Component seams to support on its “Client Identifier” field .
On mouse over “Client Identifier” field, on IoTMadeEasy Component properties, it is said 20 characters maximum.
My unique identifier key is 32 characters long.
How to solve this ???
Any ideas ???
IoTMadeEasy component : "Client Identifier" field supports only 20 characters
-
- Posts: 52
- http://meble-kuchenne.info.pl
- Joined: Mon Jan 04, 2021 8:08 pm
- Has thanked: 7 times
- Been thanked: 4 times
IoTMadeEasy component : "Client Identifier" field supports only 20 characters
Many thanks in advance,
Miguel Garcia,
Electronic Systems Developer
Re: IoTMadeEasy component : "Client Identifier" field supports only 20 characters
Hi...
I also have Flowcode 6 Professional and on both, 6 and 9, if I click create a new variable, from the list we can see the string option says exactly
( default size = 20 ) .
This is (at least) coherent with what is said in IoTMadeEasy Component on its “Client Identifier” field (with mouse over).
Anyway I will try it... Lets see what happens ...
I also have Flowcode 6 Professional and on both, 6 and 9, if I click create a new variable, from the list we can see the string option says exactly
( default size = 20 ) .
This is (at least) coherent with what is said in IoTMadeEasy Component on its “Client Identifier” field (with mouse over).
Anyway I will try it... Lets see what happens ...
Many thanks in advance,
Miguel Garcia,
Electronic Systems Developer
-
- Valued Contributor
- Posts: 1460
- Joined: Wed Dec 09, 2020 9:37 pm
- Has thanked: 135 times
- Been thanked: 709 times
Re: IoTMadeEasy component : "Client Identifier" field supports only 20 characters
Hi Miguel,
Have a look at the code generated - view c - it looks okay!
The default string size is 20 - but if you pass without local copy then it gets passed by reference with a length. (This is probably the best way to do it - saves space on the stack)
If you pass WITH a local copy then a local variable is created of the length defined in macro definition and this needs to be large enough to handle the parameter - I think FC will just copy the first 20 (defined size) characters rather than using the (passed) size and trashing memory.
Note - this applies to other arrays - so you can have a macro parameter x[1] and pass y[100] without problem - you need a dab of C to get the size though..
Martin
Have a look at the code generated - view c - it looks okay!
The default string size is 20 - but if you pass without local copy then it gets passed by reference with a length. (This is probably the best way to do it - saves space on the stack)
If you pass WITH a local copy then a local variable is created of the length defined in macro definition and this needs to be large enough to handle the parameter - I think FC will just copy the first 20 (defined size) characters rather than using the (passed) size and trashing memory.
Note - this applies to other arrays - so you can have a macro parameter x[1] and pass y[100] without problem - you need a dab of C to get the size though..
Martin
Re: IoTMadeEasy component : "Client Identifier" field supports only 20 characters
Hi
Thanks again for you additional information...
The problem is:
" if you pass without local copy then it gets passed by reference with a length "
I don´t know what is passing without local copy ...
Are you talking about to pass it as a global variable ?
If yes, how to change this component field to accept this ?
Thanks again for you additional information...
The problem is:
" if you pass without local copy then it gets passed by reference with a length "
I don´t know what is passing without local copy ...
Are you talking about to pass it as a global variable ?
If yes, how to change this component field to accept this ?
Many thanks in advance,
Miguel Garcia,
Electronic Systems Developer
-
- Valued Contributor
- Posts: 1460
- Joined: Wed Dec 09, 2020 9:37 pm
- Has thanked: 135 times
- Been thanked: 709 times
Re: IoTMadeEasy component : "Client Identifier" field supports only 20 characters
Sorry to confuse - it was just some comments about the default size and what it affects...
You can define any size for example - and the examples were just showing how to pass these strings (and also arrays) as parameters to macros... Basically FC uses the string and it's length and not the size written in the definition in certain cases - which are useful to be aware of.
You can't however define a variable x[5] = "Hello world"
Martin
You can define any size
Code: Select all
string s[100]
You can't however define a variable x[5] = "Hello world"
Martin
-
- Matrix Staff
- Posts: 1926
- Joined: Mon Dec 07, 2020 10:06 am
- Has thanked: 501 times
- Been thanked: 686 times
Re: IoTMadeEasy component : "Client Identifier" field supports only 20 characters
Hello,
The tooltip max size of 20 looks to be incorrect, it looks like the limit is 32 and so you should be fine.
Please note that each client device needs it's own unique name and so you can call your client identifier anything. e.g. Flowcode1.
The tooltip max size of 20 looks to be incorrect, it looks like the limit is 32 and so you should be fine.
Please note that each client device needs it's own unique name and so you can call your client identifier anything. e.g. Flowcode1.
Regards Ben Rowland - MatrixTSL
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel