Hi,
I try to read sql tags in the client context of a module and I have the following error :
com.inductiveautomation.ignition.client.gateway_interface.GatewayException: Unable to locate function ‘SQLTags.read’
clientContext is memorized from the startup AbstractClientModuleHook.
The exposed function is used in a client script :
import system
liste = []
liste.append("testAlarme")
system.byes.utils.readTag("default",None,liste)
@ScriptFunction(docBundlePrefix = "ClientScriptModule")
public void readTag(
@ScriptArg("source") String source,
@ScriptArg("system") String system,
@ScriptArg("pathParts") java.util.List<java.lang.String> pathParts) {
try {
List<TagPath> paths = new ArrayList<TagPath>();
TagProp prop = TagProp.Value;
paths.add(new BasicTagPath(source,system,pathParts,prop));
java.util.List<QualifiedValue> qv = this.clientContext.getTagManager().read(paths);
// une seule valeur prévue pour ce test
logger.info("readTag return V : " + qv.get(0).getValue().toString());
logger.info("readTag return T : " + qv.get(0).getTimestamp().toString());
logger.info("readTag return Q : " + qv.get(0).getQuality().toString());
} catch (Exception e) {
logger.error(e.getMessage());
}
}
I don’t understand what I have missed