简体   繁体   English

Ignition SDK Gateway配置显示路径,而不是字符串

[英]Ignition SDK Gateway configuration shows path, not string

I am trying to program a MODULE for the Ignition SDK but I am running into problems with the paths of the strings in the .properties file not working properly. 我正在尝试为Ignition SDK编程一个模块,但是.properties文件中字符串的路径无法正常运行,我遇到了问题。

I have a file called 我有一个名为

ProfileSettings.properties

and one called 一个叫

ProfileSettings.java 

In .properties file, I have the following strings: 在.properties文件中,我具有以下字符串:

Category.Settings=Connection
ConnectionString.Name=Connection String
ConnectionString.Desc=Connection String for the IoT Hub device
MaxTime.Name=Maximum time 
MaxTime.Desc=The time spent 
MaxMessages.Name=Maximum to collect
MaxMessages.Desc=will be collected

and in the .java file, I have reference to the strings by using 在.java文件中,我通过使用

public static final StringField connectionString = new StringField(META, "ConnectionString");
public static final IntField maxTime = new IntField(META, "MaxTime");
public static final IntField maxMessages = new IntField(META, "MaxMessages");
Category CONNECTION_CATEGORY = new Category("ProfileSettings.Category.Connection", 1001)
        .include(connectionString, maxTime, maxMessages);

but when I load the module into the gateway and look at the configuration page, I get ¿ProfileSettings.ConnectionString.Name? 但是,当我将模块加载到网关中并查看配置页面时,我得到了¿ProfileSettings.ConnectionString.Name? where it shows question marks around the path and not the actual text needed for all the strings 它在路径周围显示问号,而不是所有字符串所需的实际文本

Maybe try using the complete field names? 也许尝试使用完整的字段名称?

public static final StringField connectionString = new StringField(META, "ConnectionString.Name");

Or possibly 或者可能

public static final StringField connectionStringName = new StringField(META, "ConnectionString.Name");

It would be helpful to have more information about what and where those files are from. 了解有关这些文件的来源和位置的更多信息将很有帮助。 Is the .properties file or properties.java something you wrote or is that something that comes as part of the SDK? .properties文件或properties.java是您编写的东西还是SDK附带的内容?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM