Class SEEAbstractFederate

java.lang.Object
org.see.skf.core.SKBaseFederate
org.see.skf.core.SEEAbstractFederate
All Implemented Interfaces:
SKFederateInterface
Direct Known Subclasses:
SEELateJoinerFederate

public abstract class SEEAbstractFederate extends SKBaseFederate
A complete federate implementation for SEE. It contains the necessary of methods needed for a SpaceFOM federate. Depending on the role of the federate i.e., early or late joiner, these methods must be called in the sequence put forth in the SpaceFOM standard.
Since:
1.5
  • Constructor Details

    • SEEAbstractFederate

      protected SEEAbstractFederate(SEEFederateAmbassador federateAmbassador, org.see.skf.conf.FederateConfiguration config)
  • Method Details

    • startExecution

      public void startExecution()
      Begin executing the simulation.
    • freezeExecution

      public void freezeExecution()
      Enter the SpaceFOM freeze executive control state and pause all simulation activity indefinitely.
    • resumeExecution

      public void resumeExecution()
      Leave the SpaceFOM freeze executive control state and resume simulation activity.
    • shutdownExecution

      public void shutdownExecution()
      Disconnect from the federation execution and terminate the simulation.
    • setupTimeManagement

      public void setupTimeManagement()
      This method should only be called post ExCO-discovery or there is a risk of inducing a time regulation failure due to missing look ahead interval value.
    • advanceToHLTB

      public final void advanceToHLTB() throws hla.rti1516_2025.exceptions.RTIexception
      Advances the federate to the HLA logical time boundary (HLTB).
      Throws:
      hla.rti1516_2025.exceptions.RTIexception
    • advanceTime

      public final void advanceTime(hla.rti1516_2025.time.HLAinteger64Time timeStep) throws hla.rti1516_2025.exceptions.InTimeAdvancingState, hla.rti1516_2025.exceptions.FederateNotExecutionMember, hla.rti1516_2025.exceptions.RestoreInProgress, hla.rti1516_2025.exceptions.RequestForTimeConstrainedPending, hla.rti1516_2025.exceptions.NotConnected, hla.rti1516_2025.exceptions.LogicalTimeAlreadyPassed, hla.rti1516_2025.exceptions.InvalidLogicalTime, hla.rti1516_2025.exceptions.RTIinternalError, hla.rti1516_2025.exceptions.SaveInProgress, hla.rti1516_2025.exceptions.RequestForTimeRegulationPending
      Advances the federate from its current time step to the HLA logical time provided.
      Parameters:
      timeStep - The HLA logical time the federate should advance to.
      Throws:
      hla.rti1516_2025.exceptions.InTimeAdvancingState
      hla.rti1516_2025.exceptions.FederateNotExecutionMember
      hla.rti1516_2025.exceptions.RestoreInProgress
      hla.rti1516_2025.exceptions.RequestForTimeConstrainedPending
      hla.rti1516_2025.exceptions.NotConnected
      hla.rti1516_2025.exceptions.LogicalTimeAlreadyPassed
      hla.rti1516_2025.exceptions.InvalidLogicalTime
      hla.rti1516_2025.exceptions.RTIinternalError
      hla.rti1516_2025.exceptions.SaveInProgress
      hla.rti1516_2025.exceptions.RequestForTimeRegulationPending
    • update

      public abstract void update()
      Activities performed by the simulation should be done here. It is called once per tick.
    • registerSyncPoint

      public void registerSyncPoint(SyncPoint syncPoint) throws hla.rti1516_2025.exceptions.FederateNotExecutionMember, hla.rti1516_2025.exceptions.RestoreInProgress, hla.rti1516_2025.exceptions.NotConnected, hla.rti1516_2025.exceptions.RTIinternalError, hla.rti1516_2025.exceptions.SaveInProgress
      Registers a federation-wide synchronization point that must be achieved by all federates.
      Parameters:
      syncPoint - A supported synchronization point in the SpaceFOM standard.
      Throws:
      hla.rti1516_2025.exceptions.FederateNotExecutionMember
      hla.rti1516_2025.exceptions.RestoreInProgress
      hla.rti1516_2025.exceptions.NotConnected
      hla.rti1516_2025.exceptions.RTIinternalError
      hla.rti1516_2025.exceptions.SaveInProgress
    • achieveSyncPoint

      public void achieveSyncPoint(SyncPoint syncPoint, boolean flag) throws hla.rti1516_2025.exceptions.SynchronizationPointLabelNotAnnounced, hla.rti1516_2025.exceptions.FederateNotExecutionMember, hla.rti1516_2025.exceptions.RestoreInProgress, hla.rti1516_2025.exceptions.NotConnected, hla.rti1516_2025.exceptions.RTIinternalError, hla.rti1516_2025.exceptions.SaveInProgress
      Signals that the federate has achieved a previously-announced synchronization point.
      Parameters:
      syncPoint - A supported synchronization point in the SpaceFOM standard.
      flag - true or false depending on if the synchronization point was achieved or not.
      Throws:
      hla.rti1516_2025.exceptions.SynchronizationPointLabelNotAnnounced
      hla.rti1516_2025.exceptions.FederateNotExecutionMember
      hla.rti1516_2025.exceptions.RestoreInProgress
      hla.rti1516_2025.exceptions.NotConnected
      hla.rti1516_2025.exceptions.RTIinternalError
      hla.rti1516_2025.exceptions.SaveInProgress
    • awaitSyncPointAnnouncement

      public boolean awaitSyncPointAnnouncement(SyncPoint syncPoint, int maxWaitingTime)
      Waits for a synchronization point to be announced within the supplied time period.
      Parameters:
      syncPoint - The SpaceFOM sync point.
      maxWaitingTime - The anticipated time period to wait for the sync point to be announced.
      Returns:
      true or false depending on whether the synchronization point announcement was successful or not.
    • awaitFederationSynchronization

      public boolean awaitFederationSynchronization(SyncPoint syncPoint, int maxWaitingTime)
      Waits for a synchronization point to be achieved by the federation within the supplied time period.
      Parameters:
      syncPoint - The SpaceFOM sync point.
      maxWaitingTime - The anticipated time period to wait for the sync point to be achieved.
      Returns:
      true or false depending on whether the federation was successfully synchronized or not.
    • getSimulationTime

      public org.see.skf.time.Time getSimulationTime()
    • getThreadWaitInterval

      public static long getThreadWaitInterval()
    • setThreadWaitInterval

      public static void setThreadWaitInterval(long interval)
    • getFederateAmbassador

      public SEEFederateAmbassador getFederateAmbassador()
      Overrides:
      getFederateAmbassador in class SKBaseFederate