Example of JSON File

The following is a complete example of a JSON file for object models where Data Point Types are imported and the corresponding Type Function (object model) is configured.

 

The following sample is to be intended as an example of file and not as a template. If you want to make a copy of it and create your own file to import, verify its content carefully and enter the data point types that you want to create. In particular, pay attention to the mandatory DPEs section.

 

{

    "DPTData": {

        "DPTS": [

            {

                "Name": "*",

                "DPES": [

                    { "Name": "MyMandatoryFields", "PvssType": { "PvssType": "REF", "Ref": "_GmsMyMandatoryFields" } }

                ]

            },

            {

                "Name": "Test_NormalPoint",

                "Description": [ { "Culture": "en-US", "Text": "Normal Point" } ],

                "ManagedType": 0,

                "DefaultProp": "Float_Value",

                "Validation": true,

                "GenericCreate": true,

                "GenericDelete": true,

                "MaxChildren": 10,

                "ChildName": "NormalPoint",

                "ChildNameReadOnly": false,

                "ParentTypes": [ "GMS_Aggregator", "GmsOPCNetwork" ],

                    "Classification": {

                        "Valid": true,

                        "Disc": 0,

                        "SubDisc": 0,

                        "Type": 0,

                        "SubType": 0

                    },

                    "DPES": [

                    {

                        "Name": "Char_Value",

                        "PvssType": {

                            "PvssType": "CHAR",

                            "Status": {

                                "Stat": true,

                                "DisplOffNormal": true,

                                "NormalValue": 101

                            }

                        },

                        "VL": true,

                        "AL": true,

                        "DL0": true,

                        "DL1": true,

                        "DL2": false,

                        "DL3": false,

                        "Persist": true,

                        "GroupId": "CONFIG",

                        "Description": [ { "Culture": "en-US", "Text": "Char Value" } ],

                        "Display": {

                            "Valid": true,

                        "Icon": {

                            "Library": "Global_Base_HQ_1",

                            "Name": "Op_DP_Generic_None_001.png"

                        }

                    },

                    "GmsType": { "GmsType": "GMSUINT" }

                },

                {

                    "Name": "UInt_Value",

                    "PvssType": { "PvssType": "UINT" },

                    "VL": true,

                    "AL": true,

                    "DL0": false,

                    "DL1": false,

                    "DL2": false,

                    "DL3": false,

                    "Persist": false,

                    "GroupId": "CONFIG",

                    "Description": [ { "Culture": "en-US", "Text": "Unsigned Value" } ],

                    "Display": {

                        "Valid": true,

                        "Icon": {

                            "Library": "Global_Base_HQ_1",

                            "Name": "Op_DP_Generic_None_001.png"

                        }

                    },

                    "GmsType": {

                        "GmsType": "GMSUINT",

                        "Attributes": {

                            "Valid": true,

                            "Properties": {

                                "Min": 0,

                                "Max": 100

                            },

                            "UnitText": {

                                "TextGroup": "TxG_EngineeringUnits",

                                "Unit": "%"

                            }

                        }

                    }

                    "Alarms": {

                        "Valid": true,

                        "AlarmsConfiguration": {

                            "Type": "FIELDSYSTEM",

                            "TableReference": "Alt_BACnetStandard"

                        }

                    }

                },

                {

                    "Name": "Enum_Value",

                    "PvssType": { "PvssType": "UINT" },

                    "VL": true,

                    "AL": true,

                    "Persist": true,

                    "GroupId": "CONFIG",

                    "Description": [ { "Culture": "en-US", "Text": "Enum Value" } ],

                    "Display": {

                        "Valid": true,

                        "Icon": {

                            " "Library": "Global_Base_HQ_1",

                            "Name": "Op_DP_Generic_None_001.png"

                        }

                    },

                    "GmsType": {

                        "GmsType": "GMSENUM",

                        "Attributes":{

                            "Valid": true,

                            "Properties": {

                                "Min": 0,

                                "Max": 5

                        },

                        "TextGroup": "TxG_DriverStatus"

                    }

                },

                "Alarms": {

                    "Valid": true,

                    "AlarmsConfiguration": {

                        "Type": "MANAGEMENTSTATION",

                        "Activated": true,

                        "AlarmsDefinition": {

                            "Kind": "DISCRETE",

                            "Flags": "None",

                            "AlarmsTable": [

                                { "AlarmClass": "" },

                                {

                                    "AlarmClass": "Anomaly",

                                    "AlarmProperty": { "Operation": "|", "Value1": [0, 3, 5] },

                                    "OffNormalText": [

                                    { "Culture": "en-US", "Text": "Off Normal Text" }

                                    ],

                                    "NormalText": [

                                        { "Culture": "en-US", "Text": "Normal Text" }

                                    ]

                                }

                            ]

                        }

                    }

                }

                {

                    "Name": "Int_Value",

                        "PvssType": "INT",

                        "Status": {

                            "Stat": true,

                            "DisplOffNormal": true,

                            "NormalValue": 20

                        }

                    },

                    "VL": true,

                    "AL": true,

                    "Persist": true,

                    "GroupId": "CONFIG",

                    "Description": [ { "Culture": "en-US", "Text": "Integer Value" } ],

                        "Display": {

                    "Valid": true,

                        "Icon": {

                            "Library": "Global_Base_HQ_1",

                            "Name": "Op_DP_Generic_None_001.png"

                        }

                    },

                    "GmsType": {

                        "GmsType": "GMSINT",

                        "Attributes": {

                        "Valid": true,

                        "UnitText": {

                            "TextGroup": "TxG_EngineeringUnits",

                            "Unit": "°C"

                        },

                        "Properties": {

                            "Min": -40,

                            "Max": 70

                        }

                    }

                }

                "Commands": {

                    "Dependency1": "UInt_Value",

                    "CommandsData": [

                        {

                            "CommandType": "GenericWriteInt",

                            "Name": "Write",

                            "Label": [ { "Culture": "en-US", "Text": "WriteInt" } ],

                            "Guid": "",

                            "Dependencies": [

                                {

                                    "Property": "UInt_Value",

                                    "Operation": "=",

                                    "Value1": 10

                                }

                            ],

                            "Alias": 0,

                            "Group": "STANDARD",

                            "Control": "DEFAULT",

                            "Combined": false,

                            "Display": "GENERIC_DISPLAY_SOFTWARE",

                            "TargetedProperty": "",

                            "Logging": "ALWAYS",

                            "Parameters": [

                        {

                            "Name": "Value",

                            "Label": [ { "Culture": "en-US", "Text": "ValueForInt" } ],

                            "DefaultValue": "PROVIDED",

                            "Value": 15,

                            "Control": "NUMERIC",

                            "AffectedProperty": "",

                            "Application": "PROPERTY"

                        }

                    ]

                }

            ]

        },

        "Alarms": {

        "Valid": true,

            "AlarmsConfiguration": {

                "Type": "MANAGEMENTSTATION",

                "Activated": true,

                "AlarmsDefinition": {

                    "Kind": "CONTINUOUS",

                    "Flags": "None",

                    "AlarmsTable": [

                        { "AlarmClass": "" },

                        {

                            "AlarmClass": "Alarm",

                            "AlarmProperty": { "Operation": "<", "Value1": 10 },

                            "UpperHysteresis": { "Operation": "=", "Value1": 4 },

                            "LowerHysteresis": { "Operation": "=", "Value1": -2 },

                            "OffNormalText": [

                                { "Culture": "en-US", "Text": "Low value" }

                            ],

                            "NormalText": [

                                {

                                    "Culture": "en-US",

                                    "Text": "Low value returned to normal"

                                }

                            ]

                            },

                            {

                                "AlarmClass": "Alarm",

                                "AlarmProperty": { "Operation": ">=", "Value1": 50 },

                                "UpperHysteresis": { "Operation": "=", "Value1": 5 },

                                "OffNormalText": [

                                    { "Culture": "en-US", "Text": "High value" }

                                ],

                                "NormalText": [

                                    {

                                        "Culture": "en-US",

                                        "Text": "High value returned to normal"

                                    }

                                ]

                            }

                        ]

                    }

                }

            }

        },

        {

        "Name": "Float_Value",

        "PvssType": { "PvssType": "FLOAT" },

        "VL": true,

        "AL": true,

        "Persist": true,

        "GroupId": "CONFIG",

        "Description": [ { "Culture": "en-US", "Text": "Real Value" } ],

        "Display": {

            "Valid": true,

            "Icon": {

                "Library": "Global_Base_HQ_1",

                "Name": "Op_DP_Generic_None_001.png"

            }

        },

        "GmsType": {

            "GmsType": "GMSREAL",

            "Attributes": {

                "Valid": true,

                "UnitText": {

                    "TextGroup": "TxG_EngineeringUnits",

                    "Unit": "KWh"

                    },

                    "Properties": {

                        "Min": 0.00,

                        "Max": 100.00,

                        "Res": 2

                    }

                }

            }

            "Alarms": {

                "Valid": true,

                "AlarmsConfiguration": { "Type": "NONE" }

            }

        },

        {

            "Name": "Bool_Value",

            "PvssType": { "PvssType": "BOOL" },

            "VL": true,

            "AL": true,

            "Persist": true,

            "GroupId": "CONFIG",

            "Description": [ { "Culture": "en-US", "Text": "Bool Value" } ],

            "Display": {

                "Valid": true,

                "Icon": {

                        "Library": "Global_Base_HQ_1",

                        "Name": "Op_DP_Generic_None_001.png"

                }

            },

            "GmsType": {

                "GmsType": "GMSBOOL",

                "Attributes": {

                    "Valid": true,

                    "TextGroup": "TxG_NoYes"

                }

            }

        },

        {

            "Name": "Bit32_Value",

            "PvssType": { "PvssType": "BIT" },

            "VL": true,

            "AL": true,

            "Persist": true,

            "GroupId": "CONFIG",

            "Description": [ { "Culture": "en-US", "Text": "BitString Value" } ],

            "Display": {

                "Valid": true,

                "Icon": {

                    "Library": "Global_Base_HQ_1",

                    "Name": "Op_DP_Generic_None_001.png"

                }

            },

            "GmsType": {

                "GmsType": "GMSBITSTRING",

            "Attributes": {

                "Valid": true,

                "Properties": {

                    "FirstBit": 0,

                    "LastBit": 2

                },

                "TextGroup": "TxG_LoadLevels",

                "SecondTextGroup": "TxG_OperationalStatus"

            },

        }

    },

    {

        "Name": "Duration_Value",

        "PvssType": { "PvssType": "UINT" },

        "VL": true,

        "AL": true,

        "Persist": true,

        "GroupId": "CONFIG",

        "Description": [ { "Culture": "en-US", "Text": "Duration Value" } ],

        "Display": {

            "Valid": true,

            "Icon": {

                "Library": "Global_Base_HQ_1",

                "Name": "Op_DP_Generic_None_001.png"

            }

        },

        "GmsType": {

            "GmsType": "GMSDURATION",

            "Attributes": {

            "Valid": true,

                "Properties": {

                    "Min": 0,

                        "Max": 10000

                },

                "DurationUnit": "MSEC",

                "DurationRes": "SM"

                }

            }

        }

    ]

},

{

                "Name": "Test_PointWithRef",

                "Description": [ { "Culture": "en-US", "Text": "Point with Ref" } ],

                "ManagedType": 0,

                "DefaultProp": "Blob_Value",

                "Validation": true,

                "GenericCreate": true,

                "GenericDelete": true,

                "MaxChildren": 1,

                "ChildName": "PointWithRef",

                "ChildNameReadOnly": true,

                "ParentTypes": [ "GMS_Aggregator" ],

                    "Classification": {

                        "Valid": true,

                    "Disc": 0,

                    "SubDisc": 0,

                    "Type": 0,

                    "SubType": 0

                        },

                "DPES": [

                    {

                        "Name": "String_Value",

                        "PvssType": { "PvssType": "STRING" },

                        "VL": true,

                        "AL": true,

                        "Persist": true,

                        "GroupId": "CONFIG",

                        "Description": [ { "Culture": "en-US", "Text": "DateTime Value" } ],

                            "Display": {

                                "Valid": true,

                            "Icon": {

                                "Library": "Global_Base_HQ_1",

                                "Name": "Op_DP_Generic_None_001.png"

                            }

                        },

                        "GmsType": {

                            "GmsType": "GMSDATETIME",

                            "Attributes": {

                                "Valid": true,

                            "Properties": {

                                "AllowDayOfWeek": true,

                                "AllowWildcards": true

                            },

                            "TimeDetail": "DATETIME",

                            "TimeRes": "SEC"

                                    }

                        }

                    },

                    { "Name": "Time_Value", "PvssType": { "PvssType": "TIME" } },

                    { "Name": "DpId_Value", "PvssType": { "PvssType": "DPID" } },

                    { "Name": "LangString_Value", "PvssType": { "PvssType": "LANGSTRING" } },

                    { "Name": "Blob_Value", "PvssType": { "PvssType": "BLOB" } },

                    { "Name": "Reference_Value", "PvssType": { "PvssType": "REF",

"Ref": "_Gms_TestReference" } }

                ]

            },

            {

                "Name": "Test_PointWithStruct",

                "Description": [ { "Culture": "en-US", "Text": "Point with Struct" } ],

                "ManagedType": 0,

                "DefaultProp": "Struct_Value.Int_Value",

                "Validation": true,

                "GenericCreate": true,

                "GenericDelete": true,

                "MaxChildren": 4294967295,

                "ChildName": "PointWithStruct",

                "ChildNameReadOnly": false,

                "ParentTypes": [ "GMS_Aggregator", "GmsOPCNetwork" ],

                        "Classification": {

                    "Valid:": true,

                        "Disc": 0,

                        "SubDisc": 0,

                        "Type": 0,

                        "SubType": 0

                        },

                    "DPES": [

                        {

                            "Name": "Struct_Value",

                            "PvssType": {

                            "PvssType": "STRUCT",

                            "DPES": [

                                { "Name": "Int_Value", "PvssType": { "PvssType": "INT" } },

                                { "Name": "String_Value", "PvssType": { "PvssType": "STRING" } },

                                {

                                    "Name": "Struct_Internal",

                                    "PvssType": {

                                        "PvssType": "STRUCT",

                                        "DPES": [

                                            { "Name": "Float_Value", "PvssType": { "PvssType": "FLOAT"} },

                                            { "Name": "Reference_Value", "PvssType": { "PvssType": "REF",

"Ref": "_Gms_TestReference"} }

                                        ]

                                    }

                                }

                            ]

                        }

                    }

                ]

            },

            {

                "Name": "Test_PointWithArray",

                "Description": [ { "Culture": "en-US", "Text": "Point with Array" } ],

                "ManagedType": 0,

                "DefaultProp": "ArrChar_Value",

                "Validation": true,

                "GenericCreate": true,

                "GenericDelete": true,

                "MaxChildren": 4294967295,

                "ChildName": "PointWithArray",

                "ChildNameReadOnly": false,

                "ParentTypes": [ "GMS_Aggregator" ],

                    "Classification":

                    {

                        "Valid": true,

                    "Disc": 0,

                    "SubDisc": 0,

                    "Type": 0,

                    "SubType": 0

                        },

                "DPES": [

                    { "Name": "ArrChar_Value", "PvssType": { "PvssType": "ARRAYCHAR" } },

                    {

                        "Name": "ArrUInt_Value",

                            "PvssType": {

                            "PvssType": "ARRAYUINT",

                                        "Status": {

                                                "Stat": true,

                                    "DisplOffNormal": true,

                                "NormalValue": 100

                            },

                            "ArrayAttributes": {

                                "Valid" : true,

                                    "TextGroup" : "TxG_Status"

                            }

                        },

                    },

                        { "Name": "ArrInt_Value", "PvssType": { "PvssType": "ARRAYINT" } },

                        { "Name": "ArrFloat_Value", "PvssType": { "PvssType": "ARRAYFLOAT" } }

                    ]

                },

                {

                    "Name": "Test_PointWithSet",

                    "Description": [ { "Culture": "en-US", "Text": "Point with Set" } ],

                    "ManagedType": 0,

                    "DefaultProp": "SetUint_Value[1]",

                    "Validation": true,

                    "GenericCreate": true,

                    "GenericDelete": true,

                    "MaxChildren": 4294967295,

                    "ChildName": "PointWithSet",

                    "ChildNameReadOnly": false,

                    "ParentTypes": [ "GMS_Aggregator" ],

                        "Classification": {

                            "Valid": true,

                        "Disc": 0,

                        "SubDisc": 0,

                        "Type": 0,

                        "SubType": 0

                            },

                    "DPES": [

                        {

                            "Name": "SetChar_Value",

                            "PvssType": {

                                "PvssType": "SETCHAR",

                                "DPES": [

                                    { "Name": "Char1", "PvssType": { "PvssType": "CHAR" } },

                                    { "Name": "Char2", "PvssType": { "PvssType": "CHAR" } }

                                ]

                            }

                        },

                        {

                            "Name": "SetUint_Value",

                            "PvssType": {

                                "PvssType": "SETUINT",

                                "DPES": [

                                    { "Name": "UInt1", "PvssType": { "PvssType": "UINT" } },

                                    { "Name": "UInt2", "PvssType": { "PvssType": "UINT" } },

                                    { "Name": "UInt3", "PvssType": { "PvssType": "UINT" } }

                                ]

                            }

                        }

                    ]

                }

            ]

        },

        "REFS": {

            "DPTS": [

                {

                    "Name": "_GmsMyMandatoryFields",

                    "DPES": [

                        {

                            "Name": "MandatoryText",

                            "PvssType": { "PvssType": "STRING" },

                            "VL": true,

                            "AL": true,

                            "Persist": true,

                            "GroupId": "CONFIG",

                            "Description": [ { "Culture": "en-US", "Text": "Mandatory Text" } ],

                                "Display": {

                                    "Valid": true,

                            "Icon": {

                                "Library": "Global_Base_HQ_1",

                                "Name": "Op_DP_Generic_None_001.png"

                                }

                            },

                        }

                    ]

                }

            ]

        },

        "TGSData": {

            "TGS": [

                { "Name": "MyText",

                    "Description": [ { "Culture": "en-US", "Text": "My Text Group"} ],

                    "TGElems":[

                        { "Id": 1,

                        "Text": [

                            { "Culture": "en-US", "Text": "Text 1" },

                            { "Culture": "it-IT", "Text": "Testo 1" }

                            ]

                        },

                        { "Id": 2,

                            "Text": [

                                { "Culture": "en-US", "Text": "Text 2" },

                                { "Culture": "it-IT", "Text": "Testo 2" }

                                ]

                            },

                            { "Id": 3,

                            "Text": [

                            { "Culture": "en-US", "Text": "Text 3" },

                            { "Culture": "it-IT", "Text": "Testo 3" }

                        ]

                    }

                ]

            }

        ]

    }

}