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:40] – wikiadmin | transsecscriptingmethodlist [2024/11/17 15:42] (current) – wikiadmin | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| =====List of Common TransSECS Scripting Methods===== | =====List of Common TransSECS Scripting Methods===== | ||
| - | This is a quick reference to the methods in the SECS/GEM (TransSECS) API to do common operations on the tool or host instances and their ids (SVIDs, | + | This is a quick reference to the methods in the SECS/GEM (TransSECS) API to do common operations on the tool or host instances and their ids (SVIDs, |
| - | + | ||
| - | <note tip> | + | |
| ====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> | ||
| + | var DataSource = Java.type(' | ||
| + | var LongValueObject = Java.type(' | ||
| var TransSecsController = 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==== | ||
| - | used to get the running tool or host instance: | + | TransSECSController is used to get the single |
| TransSecsController.getSingleController() | TransSecsController.getSingleController() | ||
| - | <note tip> | + | <code javascript> |
| - | tool = TransSecsController.getSingleController();</ | + | tool = TransSecsController.getSingleController(); |
| + | </code> | ||
| with the tool instance you can do these operations: | with the tool instance you can do these operations: | ||
| - | <note tip>status = tool.getWrapper(1).toString(); | + | <code javascript> |
| - | gemHandler = tool.getGemHandler(); | + | status = tool.getWrapper(1).toString(); |
| + | gemHandler = tool.getGemHandler(); | ||
| + | </code> | ||
| + | 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.1731872407.txt.gz · Last modified: by wikiadmin
