Quantcast

Property String Length limited to 1023 characters

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Property String Length limited to 1023 characters

Mahesh Kakuturu
Hi,

core_.getProperty() only returning 1023 characters maximum. is this something can be modified in MM 1.4 source code or do I have to deal with this issue. Not sure where it is limiting and why?
Can anybody tell me how to transfer a string of length more than 100,000 characters length from my device adopter to MM side?

--
Best Regards,
Mahesh Kakuturu
Sr. Software Engineer
Angstrom Science, Inc.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Property String Length limited to 1023 characters

JonD
Hi Mahesh,

Hopefully someone more authoritative will reply but here's a start:

Mahesh Kakuturu wrote
core_.getProperty() only returning 1023 characters maximum. is this
something can be modified in MM 1.4 source code or do I have to deal with
this issue. Not sure where it is limiting and why?
You'll find references to MM::MaxStrLength littered throughout MMCore's C++ code whenever strings are involved.  I'm guessing it's so that buffers can be pre-allocated because they are C-style strings.  C++'s  standard library <strings> is used some places so maybe that is a historical artifact.


Mahesh Kakuturu wrote
Can anybody tell me how to transfer a string of length more than 100,000
characters length from my device adopter to MM side?
Cameras pass MB-size of data through the image buffer.  You could also pass it in 1k chunks through a string property that is updated multiple times.

If you can describe in a bit more detail what you are trying to do then that might trigger ideas from me or others.

Jon

-------------------------------------------
Jon Daniels
Applied Scientific Instrumentation
29391 West Enid Rd, Eugene, OR 97402
Phone: (541) 461-8181 x118
-------------------------------------------
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Property String Length limited to 1023 characters

Mahesh Kakuturu
Hi Jon,

Thanks for your reply. I managed to hack this one. First getting the length of the characters and looping through to read 1023 characters on each getProperty() call until the end of string. Seems working this way. I am basically transferring my spectrum data generated in my device adapter dll contains more than 1000K characters of length when I converted my double array to string.

On Wed, May 3, 2017 at 6:23 PM, JonD <[hidden email]> wrote:
Hi Mahesh,

Hopefully someone more authoritative will reply but here's a start:


Mahesh Kakuturu wrote
> core_.getProperty() only returning 1023 characters maximum. is this
> something can be modified in MM 1.4 source code or do I have to deal with
> this issue. Not sure where it is limiting and why?

You'll find references to MM::MaxStrLength littered throughout MMCore's C++
code whenever strings are involved.  I'm guessing it's so that buffers can
be pre-allocated because they are C-style strings.  C++'s  standard library
<strings> is used some places so maybe that is a historical artifact.



Mahesh Kakuturu wrote
> Can anybody tell me how to transfer a string of length more than 100,000
> characters length from my device adopter to MM side?

Cameras pass MB-size of data through the image buffer.  You could also pass
it in 1k chunks through a string property that is updated multiple times.

If you can describe in a bit more detail what you are trying to do then that
might trigger ideas from me or others.

Jon

-------------------------------------------
Jon Daniels
Applied Scientific Instrumentation
29391 West Enid Rd, Eugene, OR 97402
Phone: <a href="tel:%28541%29%20461-8181%20x118" value="+15414618181">(541) 461-8181 x118
-------------------------------------------



--
View this message in context: http://micro-manager.3463995.n2.nabble.com/Property-String-Length-limited-to-1023-characters-tp7588376p7588377.html
Sent from the Micro-Manager mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general



--
Best Regards,
Mahesh Kakuturu
Sr. Software Engineer
Angstrom Science, Inc.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
Loading...