gem300_scripts

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
gem300_scripts [2025/02/28 19:44]
wikiadmin
gem300_scripts [2025/02/28 20:17] (current)
wikiadmin
Line 459: Line 459:
       // carrier has departed       // carrier has departed
       e87ServiceWrapper.carrierDeparted(carrier.getLoadPortId(), carrier.getCarrierId());       e87ServiceWrapper.carrierDeparted(carrier.getLoadPortId(), carrier.getCarrierId());
 +</code>
 +
 +The most commonly used methods to manage an E87 carrier are contained in the Facade interface:
 +<code java>
 +package  com.ergotech.secs.e87;
 +
 +
 +import com.ergotech.secs.SecsException;
 +import com.ergotech.secs.SecsFormat00;
 +import com.ergotech.secs.e39.InvalidStateTransitionException;
 +import com.ergotech.secs.e87.E87ServiceWrapper.CMStatus;
 +import com.ergotech.vib.exceptions.BadParameterException;
 +
 +
 +
 +/** This implements the E87 services. It is normally called from E39. */
 +public interface E87ServiceWrapperFacadeInterface {
 +  /** Creates the load port object for the specific id.
 +   * @param loadPortId the id of the load port to create
 +   * @param readyForService true if the load port is ready for service, otherwise false.
 +   * If this parameter is true then the load port will transition to "IN SERVICE"
 +   * and so to "READY TO LOAD" as soon as it is created.
 +   * @return a new LoadPort
 +   * @throws BadParameterException thrown if a load port with the given id already exists.
 +   */
 +  public void createLoadPort(int loadPortId, boolean readyForService)throws BadParameterException;
 +
 +  /** This service shall associate a CarrierID to a load port and shall cause 
 +   * the load port to transition to the RESERVED state.
 +   * @param portId the port id where the carrier is expected.
 +   * @param carrierId the expected carrierID.
 +   * @return CMStatus information concerning the result of the service
 +   */
 +  public CMStatus bind ( int portId, String carrierId);
 +
 +
 +  /** This service cancels a CarrierID to load port association and shall cause
 +    the load port to transition to the NOT RESERVED state.
 +   * @param loadPortId the portID for which to cancel the load port to carrier 
 +   * association.  Either PortID or CarrierID must be specified.
 +   * @param carrierId the CarrierId for which to cancel the load port to carrier 
 +   * association.  Either PortID or CarrierID must be specified.
 +   * @return information concerning the result of the service
 +   */
 +  public CMStatus cancelBind ( int loadPortId, String carrierId );
 +
 +  /** This service shall Cancel the current carrier related action, and the 
 +   * production equipment shall return the carrier to the unload position
 +   * of the load port.
 +   * @param carrierId the carrierID to cancel
 +   * @param portId the PortID where the carrier object is located.  This
 +   * parameter is not required if the carrier object has previously been 
 +   * instantiated.
 +   @return information concerning the result of the service
 +   */
 +  public CMStatus cancelCarrier ( int portId, String carrierId);
 +
 +  /** This service shall Cancel the current carrier related action,
 +   * and the production equipment shall return the carrier to the unload 
 +   * position of the load port.
 +   * @param portId any carrier that exist on the load port specified shall be 
 +    made ready for unloading.
 +   * @return information concerning the result of the service
 +   */
 +  public CMStatus cancelCarrierAtPort ( int portId );
 +
 +  /** Create a carrier.  This can be mocked for unit testing. 
 +   * @throws BadParameterException thrown if a Carrier with the given ID already
 +   * exists.
 +   * @throws SecsException thrown if the properties list contains a slot map 
 +   * or a content map who's size does not match the capacity of the carrier.
 +   */
 +  public Carrier createCarrier (String carrierId, int loadPortId,  SecsFormat00 propertiesList, int transition ) throws BadParameterException, SecsException;
 +
 +  /** Stores the callback object.
 +   * @see com.ergotech.secs.e87.E87Interface#registerCallBack(com.ergotech.secs.e87.E87CallbackInterface)
 +   */
 +  public void registerCallBack(E87CallbackInterface callback);
 +
 +  /** Attempt the state transition on the port.  The port is not checked for
 +   * validity and an attempt to call this method on an invalid port will cause
 +   * a null pointer exception.
 +   */
 +  public void setLoadPortTransferState(int port, int stateTransition) throws InvalidStateTransitionException;
 +
 +  /** Return the transfer state of the port.  The port is not checked for
 +   * validity and an attempt to call this method on an invalid port will cause
 +   * a null pointer exception.
 +   * @see com.ergotech.secs.e87.E87Interface#getLoadPortTransferState(int)
 +   */
 +  public int getLoadPortTransferState(int port);
 +
 +  /** Attempt the state transition on the port.  The port is not checked for
 +   * validity and an attempt to call this method on an invalid port will cause
 +   * a null pointer exception.
 +   */
 +  public void setLoadPortAccessState(int port, int state) throws InvalidStateTransitionException, SecsException;
 +
 +  /** Returns the current access state of the port.  The port is not checked for
 +   * validity and an attempt to call this method on an invalid port will cause
 +   * a null pointer exception.
 +   * @see com.ergotech.secs.e87.E87Interface#getLoadPortAccessState(int)
 +   */
 +  public int getLoadPortAccessState(int port);
 +
 +  /** 
 +   * Change the carrier access status.  There are three states:<p>
 +     begin=0<p>
 +     complete=1<p>
 +     stopped=2<p>
 +   * The carrier is not checked for validity and an attempt to access an invalid
 +   * carrier will result in a null pointer exception.
 +   * @throws InvalidStateTransitionException thrown if the access attempt is invalid
 +   * @throws SecsException thrown if the status is an invalid request.
 +   */
 +  public void accessCarrier(String carrierID, Carrier.CarrierAccessE87State state) throws InvalidStateTransitionException, SecsException;
 +
 +  /** Request to put the port in service.  The port is not checked for
 +   * validity and an attempt to call this method on an invalid port will cause
 +   * a null pointer exception.
 +   * @throws InvalidStateTransitionException
 +   * @see com.ergotech.secs.e87.E87Interface#getLoadPortAccessState(int)
 +   */
 +  public void requestInService(int port) throws InvalidStateTransitionException;
 +
 +  /** Request to put the port in service.  
 +   * The port is not checked for validity and an attempt to call this 
 +   * method on an invalid port will cause a null pointer exception.
 +   * @throws InvalidStateTransitionException
 +   * @see com.ergotech.secs.e87.E87Interface#requestOutOfService(int)
 +   */
 +  public void requestOutOfService(int port) throws InvalidStateTransitionException;
 +
 +   /**
 +   * The application will invoke this when a carrier has arrived at a given port,
 +   * after it has read the carrier id.
 +   
 +   * @param carrierId
 +   * @param port The load port.  The port is not checked for validity and an 
 +               attempt to call this method on an invalid port will cause a 
 +               null pointer exception.
 +   * @param readOK the carrier id read is valid.
 +   * @param bypassReadId if this is true, the carrierID and readOK flags
 +          are ignored and processing continues with the carrier that is at the
 +          provided port.
 +   * @return 0:verified, 2:waiting for host proceed (or cancel), 3: duplicate id
 +   * @throws InvalidStateTransitionException
 +   * @throws BadParameterException
 +   */
 +  public int carrierArrived(String carrierId, int port, boolean readOK, boolean bypassReadId, boolean hostVerification ) throws InvalidStateTransitionException, BadParameterException;
 +
 +  /** When the carrier arrives, the LoadPort may already be in the "Transfer Blocked" state (eg as part of E84).
 +   * This method will check the current state of the load port.  If it is not in "Transfer Blocked" it will attempt
 +   * the transition 6.  If that transition is invalide, the method will throw.
 +   
 +   * @param loadPort the load port on which to execute the transition.
 +   * @throws InvalidStateTransitionException thrown if load port transition 6 is not a valid transition.
 +   */
 +  public void conditionalLoadPortTransition6(LoadPort loadPort) throws InvalidStateTransitionException;
 +
 +  /** When the carrier departs, the LoadPort may not be in the "Transfer Blocked" state (eg as part of E84).
 +   * This method will check the current state of the load port.  If it is not in "Transfer Blocked" it will attempt
 +   * the transition 6.  If that transition is invalide, the method will throw.
 +   
 +   * @param loadPort the load port on which to execute the transition.
 +   * @throws InvalidStateTransitionException thrown if load port transition 6 is not a valid transition.
 +   */
 +  public void conditionalLoadPortTransition8(LoadPort loadPort) throws InvalidStateTransitionException;
 +
 +  /** Execute transition21 to indicate that the carrier has departed.  This also destroys the 
 +   * carrier instance.
 +   * Set the carrier to null to indicate that it has departed.
 +   * The port is not checked for validity and an attempt to call this 
 +   * method on an invalid port will cause a null pointer exception.
 +   * @throws InvalidStateTransitionException
 +   * @see com.ergotech.secs.e87.E87Interface#carrierDeparted(int)
 +   */
 +  public void carrierDeparted(int port, String carrierId ) throws InvalidStateTransitionException;
 +
 +  /** 
 +   * The port is not checked for validity and an attempt to call this 
 +   * method on an invalid port will cause a null pointer exception.
 +   * @throws InvalidStateTransitionException
 +   * @see com.ergotech.secs.e87.E87Interface#carrierDeparted(int)
 +   */
 +  public void carrierDeparted(int port) throws InvalidStateTransitionException;
 +
 +  /** Cancel the carrier at the port.
 +   * The port is not checked for validity and an attempt to call this 
 +   * method on an invalid port will cause a null pointer exception.
 +   * @throws InvalidStateTransitionException
 +   */
 +  public void cancelCarrier(int port) throws InvalidStateTransitionException;
 +  
 +  /** Returns all carriers
 +   * @return  an array of all carriers.
 +   */
 +  public Carrier[] getAllCarriers();
 +
 +  /** Return the carrier instance for the ID, or null if the carrier does not exist. 
 +   
 +   * @param carrierId the carrier id
 +   */
 +  public Carrier getCarrier ( String carrierId );
 +
 +}
 </code> </code>
  
  • gem300_scripts.1740793468.txt.gz
  • Last modified: 2025/02/28 19:44
  • by wikiadmin