Skip to content

Conversation

@rlabbeptc
Copy link
Collaborator

Resolved differences in how project properties can be retrieved from server. With full project load, the server provides the properties in a 'client_interfaces' array, with groups of each interface type (opcda, opcua, etc).

"client_interfaces": [
			{
				"common.ALLTYPES_NAME": "thingworxinterface",
				"thingworxinterface.ENABLED": false,
				"thingworxinterface.HOSTNAME": "localhost",
				"thingworxinterface.PORT": 443,
				"thingworxinterface.RESOURCE": "/Thingworx/WS",
				"thingworxinterface.APPKEY": "",
				"thingworxinterface.ALLOW_SELF_SIGNED_CERTIFICATE": false,
				"thingworxinterface.TRUST_ALL_CERTIFICATES": false,
				"thingworxinterface.DISABLE_ENCRYPTION": false,
				"thingworxinterface.MAX_THING_COUNT": 500,
				"thingworxinterface.THING_NAME": "ThingWorxKepwareEdge",
				"thingworxinterface.PUBLISH_FLOOR_MSEC": 1000,
				"thingworxinterface.LOGGING_ENABLED": false,
				"thingworxinterface.LOG_LEVEL": 3,
				"thingworxinterface.VERBOSE": false,
				"thingworxinterface.PROXY_ENABLED": false,
				"thingworxinterface.PROXY_HOST": "localhost",
				"thingworxinterface.PROXY_PORT": 3128,
				"thingworxinterface.PROXY_USERNAME": "",
				"thingworxinterface.PROXY_PASSWORD": ""
			},
			{
				"common.ALLTYPES_NAME": "uaserverinterface",
				"uaserverinterface.PROJECT_OPC_UA_ENABLE": true,
				"uaserverinterface.PROJECT_OPC_UA_DIAGNOSTICS": false,
				"uaserverinterface.PROJECT_OPC_UA_ANONYMOUS_LOGIN": false,
				"uaserverinterface.PROJECT_OPC_UA_MAX_CONNECTIONS": 13,
				"uaserverinterface.PROJECT_OPC_UA_MIN_SESSION_TIMEOUT_SEC": 15,
				"uaserverinterface.PROJECT_OPC_UA_MAX_SESSION_TIMEOUT_SEC": 60,
				"uaserverinterface.PROJECT_OPC_UA_TAG_CACHE_TIMEOUT_SEC": 5,
				"uaserverinterface.PROJECT_OPC_UA_BROWSE_TAG_PROPERTIES": true,
				"uaserverinterface.PROJECT_OPC_UA_BROWSE_ADDRESS_HINTS": true,
				"uaserverinterface.PROJECT_OPC_UA_MAX_DATA_QUEUE_SIZE": 2,
				"uaserverinterface.PROJECT_OPC_UA_MAX_RETRANSMIT_QUEUE_SIZE": 10,
				"uaserverinterface.PROJECT_OPC_UA_MAX_NOTIFICATION_PER_PUBLISH": 65536
			}
		]

If just the project properties are retrieved from the server, they are presented in a singular object that flattens the array.

{
	"PROJECT_ID": 3917533378,
	"common.ALLTYPES_DESCRIPTION": "",
	"servermain.PROJECT_TITLE": "Simulation Driver Demo",
	"servermain.PROJECT_TAGS_DEFINED": "0",
	"uaserverinterface.PROJECT_OPC_UA_ENABLE": true,
	"uaserverinterface.PROJECT_OPC_UA_DIAGNOSTICS": false,
	"uaserverinterface.PROJECT_OPC_UA_ANONYMOUS_LOGIN": false,
	"uaserverinterface.PROJECT_OPC_UA_MAX_CONNECTIONS": 13,
	"uaserverinterface.PROJECT_OPC_UA_MIN_SESSION_TIMEOUT_SEC": 15,
	"uaserverinterface.PROJECT_OPC_UA_MAX_SESSION_TIMEOUT_SEC": 60,
	"uaserverinterface.PROJECT_OPC_UA_TAG_CACHE_TIMEOUT_SEC": 5,
	"uaserverinterface.PROJECT_OPC_UA_BROWSE_TAG_PROPERTIES": true,
	"uaserverinterface.PROJECT_OPC_UA_BROWSE_ADDRESS_HINTS": true,
	"uaserverinterface.PROJECT_OPC_UA_MAX_DATA_QUEUE_SIZE": 2,
	"uaserverinterface.PROJECT_OPC_UA_MAX_RETRANSMIT_QUEUE_SIZE": 10,
	"uaserverinterface.PROJECT_OPC_UA_MAX_NOTIFICATION_PER_PUBLISH": 65536,
	"thingworxinterface.ENABLED": false,
	"thingworxinterface.HOSTNAME": "localhost",
	"thingworxinterface.PORT": 443,
	"thingworxinterface.RESOURCE": "/Thingworx/WS",
	"thingworxinterface.APPKEY": "",
	"thingworxinterface.ALLOW_SELF_SIGNED_CERTIFICATE": false,
	"thingworxinterface.TRUST_ALL_CERTIFICATES": false,
	"thingworxinterface.DISABLE_ENCRYPTION": false,
	"thingworxinterface.MAX_THING_COUNT": 500,
	"thingworxinterface.THING_NAME": "ThingWorxKepwareEdge",
	"thingworxinterface.PUBLISH_FLOOR_MSEC": 1000,
	"thingworxinterface.LOGGING_ENABLED": false,
	"thingworxinterface.LOG_LEVEL": 3,
	"thingworxinterface.VERBOSE": false,
	"thingworxinterface.PROXY_ENABLED": false,
	"thingworxinterface.PROXY_HOST": "localhost",
	"thingworxinterface.PROXY_PORT": 3128,
	"thingworxinterface.PROXY_USERNAME": "",
	"thingworxinterface.PROXY_PASSWORD": ""
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(api): Add proper handling of Project Properties API vs JSON differences

1 participant