transsecscriptingmethodlist
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| transsecscriptingmethodlist [2024/11/17 14:44] – wikiadmin | transsecscriptingmethodlist [2024/11/17 15:42] (current) – wikiadmin | ||
|---|---|---|---|
| Line 5: | Line 5: | ||
| ====Common Declarations==== | ====Common Declarations==== | ||
| - | Be sure to declare the classes used from the API so you can reference these by name in the code. | + | Be sure to declare the classes used from the API so you can reference these by name in the code. Here are some examples of classes you may want to use: |
| - | <code javascript> | + | <code javascript> |
| + | var DataSource = Java.type(' | ||
| + | var LongValueObject = Java.type(' | ||
| + | var TransSecsController = Java.type(' | ||
| + | var SOFTREV = Java.type(' | ||
| + | </ | ||
| + | |||
| + | ====SOFTREV==== | ||
| + | |||
| + | SOFTREV is a class in the SECS/GEM package which has a maxLength parameter you can set to allow 20 character SOFTREV and MDLN values | ||
| + | |||
| + | <code javascript> | ||
| + | SOFTREV.maxLength=20; | ||
| + | </ | ||
| ====TransSECSController==== | ====TransSECSController==== | ||
| - | is used to get the running tool or host instance: | + | TransSECSController |
| TransSecsController.getSingleController() | TransSecsController.getSingleController() | ||
| Line 18: | Line 31: | ||
| <code javascript> | <code javascript> | ||
| tool = TransSecsController.getSingleController(); | tool = TransSecsController.getSingleController(); | ||
| - | </javascript> | + | </code> |
| with the tool instance you can do these operations: | with the tool instance you can do these operations: | ||
| <code javascript> | <code javascript> | ||
| - | status = tool.getWrapper(1).toString(); | + | status = tool.getWrapper(1).toString(); |
| gemHandler = tool.getGemHandler(); | gemHandler = tool.getGemHandler(); | ||
| </ | </ | ||
| + | There are also some methods you can use on the tool instance: | ||
| + | |||
| + | <code javascript> | ||
| + | tool.setDeviceId(2); | ||
| + | tool.setPort(5000); | ||
| + | </ | ||
| ====GemHandler==== | ====GemHandler==== | ||
| - | with the gemHandler you can do these operations: | + | With the gemHandler you can access the id servers in the tool to set or get values |
| - | //get the server for an event (CEID) | + | <code javascript> |
| + | eventServer = gemHandler.getServerForName(" | ||
| + | vidServer = gemHandler.getServerForName(" | ||
| - | event = gemHandler.getServerForName("CEID.STARTED"); | + | //example to trigger an event |
| + | eventServer.setIntValue(1); //trigger the CEID.STARTED | ||
| + | //directly set values to vids using the gemHandler | ||
| + | gemHandler.setValue(" | ||
| + | gemHandler.setValue(" | ||
| + | |||
| + | //access vid values | ||
| + | controlState = gemHandler.getServerForName(" | ||
| + | |||
| + | </ | ||
| - | var DataSource = Java.type(' | ||
| - | var DataSourceContainer = Java.type(' | ||
| - | //var BroadcastServer = Java.type(' | ||
| - | var TransSecsController = Java.type(' | ||
| - | var LongValueObject = Java.type(' | ||
| - | var StringValueObject = Java.type(' | ||
| - | var ArrayValueObject = Java.type(' | ||
| - | var ValueChangedEvent = Java.type(' | ||
| - | var Thread = Java.type(' | ||
| - | var Runnable = Java.type(' | ||
| - | var List = Java.type(' | ||
| - | // Key used for encryption and decryption | ||
| - | var JavaString = Java.type(" | ||
| - | var Files = Java.type(" | ||
| - | var Paths = Java.type(" | ||
| - | var SecretKeySpec = Java.type(" | ||
| - | var Cipher = Java.type(" | ||
| - | var Base64 = Java.type(" | ||
| - | var keyString = " | ||
| - | var key = new SecretKeySpec(keyString.getBytes(" | ||
| - | // | ||
| - | var Properties = Java.type(' | ||
| - | var FileInputStream = Java.type(' | ||
| - | var FileOutputStream = Java.type(' | ||
transsecscriptingmethodlist.1731872655.txt.gz · Last modified: by wikiadmin
