Any chance of System.Runtime.Serialization?

Any chance of System.Runtime.Serialization?
I could really use BinaryFormatter.

Im sending RF commands between devices and string building, composing and decomposing is a pain.
Can anyone suggest a better way?

2 Likes

I think serialization is very much needed on embedded devices. This is on our to do list.

4 Likes

A Json serialization? We have Reflection in tinyclr right?

Few years ago, I worked on this stuff for NetMF with other members of the community and the code was on the old GHI site … But I can’t find anymore…

http://old.ghielectronics.com/community/codeshare/entry/357

3 Likes

http://old.ghielectronics.com/community/codeshare/entry/464

This was serializer for XML

Discussion:
http://old.ghielectronics.com/community/forum/topic?id=7719

1 Like

Perhaps someone could adapt this to Tinyclr GitHub - PervasiveDigital/jsonnetmf: JSON serialize/deserialize for netmf

1 Like

Ive been looking at this:

There’s a NuGet package:

Also there’s a generator:
https://marketplace.visualstudio.com/items?itemName=jonasjakobsson.ProtobufGeneratorvisualstudio

I can generate the .CS file from the .proto, I get the types correctly generated but there seems to be some things missing for TinyCLR

System.Collections.Generic, IEquatable<> and Func<>

Netmf/TinyCLR/nanoFramework do not support generics

@Darko, did you ever get anywhere using Protocol Buffers? It would seem to me to Protocol Buffers would be a good standard to use to provide interoperability with other systems, particularly cloud services that might not be running C#.

I had never heard of Protocol Buffers until I came across Sparkplug by CirrusLink. Sparkplug “describes the MQTT topic namespace, the payload-encoding scheme, and the required flow of messages, which ensure state of data originating from an edge device reporting to a backend/central application.”

It is designed for SCADA/HMI/Control and Cloud services so there can be interoperability between systems. It uses Protocol Buffers to encode the data structures necessary to make it all work. Even if I didn’t use the whole Sparkplug definition just reading through their protocol specifications was very helpful when it comes to defining a large and expandable MQTT application.

The spec is open source: Eclipse Tahu™ | projects.eclipse.org

Cirrus Link (www.cirrus-link.com) is run by the co-creator of MQTT, Arlen Nipper.

1 Like

No, just quitted with that. Will try new serialization in TinyCLR 2.0 once i convert my boards to the new SOM’s.