public class UAScriptHelper
extends java.lang.Object
implements org.scripthelper.context.ScriptHelper
UAScriptContext
class and provide several utility methods for the Scripts.Modifier and Type | Field and Description |
---|---|
protected UAScriptContext |
context |
Constructor and Description |
---|
UAScriptHelper()
Create the script helper.
|
Modifier and Type | Method and Description |
---|---|
java.util.List<java.lang.Object> |
getArrayValue(java.lang.String name)
Return the data value as an array.
|
java.util.List<java.lang.Object> |
getArrayValue(java.lang.String serviceName,
java.lang.String name)
Return the data value as an array.
|
boolean |
getBooleanValue(java.lang.String name)
Return the value of a Data as a boolean.
|
boolean |
getBooleanValue(java.lang.String serviceName,
java.lang.String name)
Return the value of a Data as a boolean.
|
UAScriptContext |
getContext()
Return the Script context.
|
org.da.protoframework.model.core.Data |
getData(java.lang.String name)
Return the Data of a specified name for the default subscribed Service.
|
org.da.protoframework.model.core.Data |
getData(java.lang.String serviceName,
java.lang.String name)
Return the Data of a specified name for a specified Service.
|
float |
getFloatValue(java.lang.String name)
Return the value of a Data as a float.
|
float |
getFloatValue(java.lang.String name,
short unit)
Return the value of a Data as a float.
|
float |
getFloatValue(java.lang.String serviceName,
java.lang.String name)
Return the value of a Data as a float.
|
float |
getFloatValue(java.lang.String serviceName,
java.lang.String name,
short unit)
Return the value of a Data as a float.
|
ScriptedFunctionalUA |
getFunctionalUA() |
int |
getIntValue(java.lang.String name)
Return the value of a Data as an int.
|
int |
getIntValue(java.lang.String serviceName,
java.lang.String name)
Return the value of a Data as an int.
|
java.lang.String |
getStateValueAsString(java.lang.String name)
Return the value of a enumeration state as a String.
|
java.lang.String |
getStateValueAsString(java.lang.String serviceName,
java.lang.String name)
Return the value of a enumeration state as a String.
|
java.lang.String |
getStringValue(java.lang.String name)
Return the value of a Data as a String.
|
java.lang.String |
getStringValue(java.lang.String serviceName,
java.lang.String name)
Return the value of a Data as a String.
|
java.util.List<java.lang.Object> |
getStructureValue(java.lang.String name)
Return the value of a Data as a structure.
|
java.lang.Object |
getStructureValue(java.lang.String serviceName,
java.lang.String name)
Return the value of a Data as a structure.
|
java.lang.Object |
getValue(java.lang.String name)
Return the value of a Data.
|
java.lang.Object |
getValue(java.lang.String serviceName,
java.lang.String name)
Return the value of a Data.
|
boolean |
hasChanged(java.lang.String name)
Return true if a Data has changed.
|
boolean |
hasChanged(java.lang.String serviceName,
java.lang.String name)
Return true if a Data has changed.
|
void |
initialize(UAScriptContext context,
ScriptedFunctionalUA ua)
Initialize the script helper.
|
boolean |
isStateValue(java.lang.String name,
java.lang.String stateAsString)
Return true if the value of a enumeration state as a String is equal to a specified String.
|
boolean |
isStateValue(java.lang.String serviceName,
java.lang.String name,
java.lang.String stateAsString)
Return true if the value of a enumeration state as a String is equal to a specified String.
|
protected UAScriptContext context
public void initialize(UAScriptContext context, ScriptedFunctionalUA ua)
context
- the Script Contextua
- the ScriptedFunctionalUApublic UAScriptContext getContext()
getContext
in interface org.scripthelper.context.ScriptHelper
public ScriptedFunctionalUA getFunctionalUA()
public boolean hasChanged(java.lang.String serviceName, java.lang.String name)
serviceName
- the Service namename
- the data namepublic boolean hasChanged(java.lang.String name)
name
- the data namepublic java.lang.String getStateValueAsString(java.lang.String serviceName, java.lang.String name)
serviceName
- the Service namename
- the enumeration data namepublic java.lang.String getStateValueAsString(java.lang.String name)
name
- the enumeration data namepublic boolean isStateValue(java.lang.String serviceName, java.lang.String name, java.lang.String stateAsString)
serviceName
- the Service namename
- the enumeration data namestateAsString
- the requested state value as a Stringpublic boolean isStateValue(java.lang.String name, java.lang.String stateAsString)
name
- the enumeration data namestateAsString
- the requested state value as a Stringpublic org.da.protoframework.model.core.Data getData(java.lang.String name)
name
- the Data namepublic org.da.protoframework.model.core.Data getData(java.lang.String serviceName, java.lang.String name)
serviceName
- the Service namename
- the Data namepublic java.util.List<java.lang.Object> getArrayValue(java.lang.String serviceName, java.lang.String name)
serviceName
- the Service namename
- the data namepublic java.util.List<java.lang.Object> getArrayValue(java.lang.String name)
name
- the data namepublic java.lang.Object getValue(java.lang.String name)
name
- the data namepublic java.lang.Object getValue(java.lang.String serviceName, java.lang.String name)
serviceName
- the service namename
- the data namepublic java.util.List<java.lang.Object> getStructureValue(java.lang.String name)
name
- the data namepublic java.lang.Object getStructureValue(java.lang.String serviceName, java.lang.String name)
serviceName
- the service namename
- the data namepublic int getIntValue(java.lang.String serviceName, java.lang.String name)
serviceName
- the Service namename
- the data namepublic int getIntValue(java.lang.String name)
name
- the data namepublic float getFloatValue(java.lang.String serviceName, java.lang.String name)
serviceName
- the Service namename
- the data namepublic float getFloatValue(java.lang.String serviceName, java.lang.String name, short unit)
serviceName
- the Service namename
- the data nameunit
- the unitpublic float getFloatValue(java.lang.String name)
name
- the data namepublic float getFloatValue(java.lang.String name, short unit)
name
- the data nameunit
- the unitpublic boolean getBooleanValue(java.lang.String serviceName, java.lang.String name)
serviceName
- the Service namename
- the data namepublic boolean getBooleanValue(java.lang.String name)
name
- the data namepublic java.lang.String getStringValue(java.lang.String serviceName, java.lang.String name)
serviceName
- the Service namename
- the data namepublic java.lang.String getStringValue(java.lang.String name)
name
- the data nameCopyright ©2017-2024 Dassault Aviation. All Rights Reserved. Documentation and source under the LGPL v3 licence