Noob question. But as I don't have java background, not able to import modules available on https://files.inductiveautomation.com/sdk/javadoc/ignition81/8.1.8/index.html
I want to import public String getGatewayScriptingProject()
method from com.inductiveautomation.ignition.gateway.model.SystemPropertiesRecord
how can I do that? or is there any reference doc for it?
thanks.
Everything starts with the GatewayContext instance that your module is handed in the hook's setup()
method. You are expected to save this context for later use, and provide it to any other objects you create that might need it. (If they don't get it from elsewhere, like extension point methods.)
The gateway context has many methods that provide access to various Ignition subsystem instances, which may have nested objects of interest. Follow the links from the context to the data types of each getSomething()
method for inner details.
Also, you should not use that method from the system properties record. You will note that it is documented as deprecated. Use the SystemPropertyManager
instead, and use the property keys from GatewaySystemProperties
(as hinted by the .getPropertyValue()
method doc).
Further note: you cannot call object instance methods without an instance of a particular type. Being able to import a class in java just gets you the type and its static methods, not an instance. Most infrastructure types in Ignition are singletons that you must get from the platform. You cannot create them yourself.
3 Likes