cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X

VirtualThing InfoTable property with DataShape using annotations

rtaylor-3
1-Newbie

VirtualThing InfoTable property with DataShape using annotations

Greetings,

I'm working with Thingworx Edge SDK 6.0.0 and creating a VirtualThing which contains a property of type InfoTable with a known DataShape.

I've defined the DataShape using the following annotation:

@ThingworxDataShapeDefinitions(

        dataShapes = {

                @ThingworxDataShapeDefinition(name = "AnalyticsDataShape", fields = {

                        @ThingworxFieldDefinition(name = "sourceId", description = "", baseType = "STRING",  aspects = { "isPrimaryKey:true" }),

                        @ThingworxFieldDefinition(name = "anomalous", description = "", baseType = "BOOLEAN"),

                        @ThingworxFieldDefinition(name = "gauge", description = "", baseType = "NUMBER"),

                        @ThingworxFieldDefinition(name = "value", description = "", baseType = "NUMBER"),

                        @ThingworxFieldDefinition(name = "state", description = "", baseType = "STRING")

                }),             

              })

And my property as the following:

@ThingworxPropertyDefinition(

       name = "Temperature_Analytics",

       description = "corresponding property analytics",

       baseType = "INFOTABLE",

       aspects = {

                           "dataChangeType:NEVER",

                        "dataChangeThreshold:0",

                        "cacheTime:1",

                        "isPersistent:FALSE",

                        "isReadOnly:TRUE",

                        "pushType:ALWAYS",

                          "isLogged:true",

                           "dataShape:AnalyticsDataShape"

  }),

However, when i go and bind the remote properties, Thingworx says theirs an error:

"Error browsing properties. Be sure the remote device/server is connected and configured properly"


If i comment out the dataShape:AnalyticsDataShape, then the remote property shows up and i can bind it.


What am i doing wrong?



0 REPLIES 0
Top Tags