User Tools

Site Tools


transsecscriptingmethodlist

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
transsecscriptingmethodlist [2024/11/17 15:04] wikiadmintranssecscriptingmethodlist [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>var TransSecsController = Java.type('com.ergotech.transsecs.secs.TransSecsController');</code>+<code javascript> 
 +var DataSource = Java.type('com.ergotech.vib.servers.DataSource'); 
 +var LongValueObject = Java.type('com.ergotech.vib.valueobjects.LongValueObject'); 
 +var TransSecsController = Java.type('com.ergotech.transsecs.secs.TransSecsController'); 
 +var SOFTREV =  Java.type('com.ergotech.secs.SOFTREV'); 
 +</code> 
 + 
 +====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; //allows 20 chars for both MDLN and SoftRev values (otherwise maximum is 6) 
 +</code>
  
 ====TransSECSController==== ====TransSECSController====
Line 41: Line 54:
 eventServer = gemHandler.getServerForName("CEID.STARTED"); //get the server for an event id (CEID) by name eventServer = gemHandler.getServerForName("CEID.STARTED"); //get the server for an event id (CEID) by name
 vidServer = gemHandler.getServerForName("VID.ProcessState"); //get the the server for a vid by name vidServer = gemHandler.getServerForName("VID.ProcessState"); //get the the server for a vid by name
 +
 +//example to trigger an event
 +eventServer.setIntValue(1); //trigger the CEID.STARTED event
 +
 +//directly set values to vids using the gemHandler
 +gemHandler.setValue("OnlineOfflineState",new LongValueObject(1));//Go ONLINE 
 +gemHandler.setValue("LocalRemoteState",new LongValueObject(1)); //Go REMOTE, now the tool should respond to host messages
 +
 +//access vid values
 +controlState = gemHandler.getServerForName("VID.ControlState").getIntValue();
 +
 </code> </code>
  
  
  
transsecscriptingmethodlist.1731873860.txt.gz · Last modified: by wikiadmin

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki