Not Serializable? RRS feed

  • Question

  • I have an application which establishes a DSS Node and runs a couple services. One of the services contains an object called field of the type FieldState as part of its state. I'm trying to access this object by performing a Get on the serivice. However, whenever I try to return this object in my application, I get the following error:

    Error 1172 occurred at Error calling method Robotics.MRSComm.CommLink.GetFieldState of ObjectId handle: 0x751114C for obj 0x8D07CF[Robotics.MRSComm.CommLink] in domain [LabVIEW Domain for Run] and thread 3696 >> Exception has been thrown by the target of an invocation. >> Type 'Robotics.MRSComm.Control.Proxy.FieldState' in Assembly 'NXTControlComm.Y2007.M09.Proxy, Version=, Culture=neutral, PublicKeyToken=4331ebdf9bd23bb6' is not marked as serializable.

    I'm a little lost on how to fix this and would appreciate help.
    Wednesday, September 12, 2007 7:49 PM


  • For us to serialize anything it must be a

    1) a calss or struct annotated with [DataContract] and its fields with DataMember

    2) be serializable if its defined in some third party assembly. If its not, then it can no tmake across the wire and you will have to hide from the state and instead expose its contentsthrough some other simpler fields.

    Friday, September 14, 2007 9:31 PM