Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

Serialization


  • Please log in to reply
5 replies to this topic

#1 stacyh3

stacyh3

    Advanced Member

  • Members
  • PipPipPip
  • 47 posts

Posted 02 September 2010 - 10:29 PM

Reflection.Serialize/Deserialize seems to work fine in the emulator, but not on the actual hardware. Is it not implemented in the release? Is it planned? Thanks, Stacy

#2 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 03 September 2010 - 04:13 AM

Hi Stacy, I'd have to double-check, but I don't think that serialization is supported on the Netduino. I'll check into it for you though. There are tradeoffs for codespace vs. flash, available RAM, etc. Since Netduino is open source, you might be able to compile it into your own firmware. I'll check on that too. Chris

#3 greg

greg

    Advanced Member

  • Members
  • PipPipPip
  • 169 posts
  • LocationChicago, IL

Posted 03 September 2010 - 11:34 AM

Hi Stacy,

I'd have to double-check, but I don't think that serialization is supported on the Netduino. I'll check into it for you though.

There are tradeoffs for codespace vs. flash, available RAM, etc. Since Netduino is open source, you might be able to compile it into your own firmware. I'll check on that too.

Chris


I don't think Serialization is available on any of the .net platforms (Netduino or Fez). Besides, for a microcontroller serialization is SLOW.

#4 amphibian

amphibian

    Member

  • Members
  • PipPip
  • 16 posts

Posted 03 September 2010 - 11:50 AM

Given that there is no Reflection.Serialize in the stock firmware, or BitConverter classes in MF period, what's the best way to convert value types to arrays of bytes and vice versa?

#5 CW2

CW2

    Advanced Member

  • Members
  • PipPipPip
  • 1592 posts
  • LocationCzech Republic

Posted 03 September 2010 - 11:57 AM

Given that there is no Reflection.Serialize in the stock firmware, or BitConverter classes in MF period, what's the best way to convert value types to arrays of bytes and vice versa?

Currently, this is limited to Utility.ExtractValueFromArray and Utility.InsertValueIntoArray methods. I am planning to implement BitConverter functionality in a custom firmware.

#6 stacyh3

stacyh3

    Advanced Member

  • Members
  • PipPipPip
  • 47 posts

Posted 03 September 2010 - 12:23 PM

I don't think Serialization is available on any of the .net platforms (Netduino or Fez). Besides, for a microcontroller serialization is SLOW.


Slow depends on the application don't you think? For my application it's okay it it's a bit slow. I need to deserialize once at startup and then the intervals between serialization are pretty long - on the order of minutes to hours.

In any case, if people are using the emulator, be aware that Reflection.Serialize and Reflection.Deserialize work fine, but they appear not to be in the Netduino firmware. This is not a major problem for me since I just implemented my own code for what I need, but it's good to know what's there and what's not.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.