Class SimulatedControllerPtr

  • public class SimulatedControllerPtr
    extends java.lang.Object
    Ptr stores a pointer and optionally takes ownership of the value.
    • Constructor Detail

      • SimulatedControllerPtr

        public SimulatedControllerPtr​(long cPtr,
                                      boolean cMemoryOwn)
      • SimulatedControllerPtr

        public SimulatedControllerPtr()
        Default constructor yielding a NULL-pointer.
      • SimulatedControllerPtr

        public SimulatedControllerPtr​(SimulatedController ptr)
        Do not take ownership of ptr.

        ptr can be null.

        The constructor is implicit on purpose.
    • Method Detail

      • delete

        public void delete()
      • isShared

        public boolean isShared()
        check if this Ptr has shared ownership or none
        true if Ptr has shared ownership, false if it has no ownership.
      • isNull

        public boolean isNull()
        checks if the pointer is null
        Returns true if the pointer is null
      • getControllerName

        public java.lang.String getControllerName()
        get the name of this controller
        name of this controller
      • update

        public void update​(Simulator.UpdateInfo info,
                           State state)
        updates/steps the controller with time step dt. It will update
        the state state accordingly
        info - [in] update information related to the time step.
        state - [in/out] the current state
      • reset

        public void reset​(State state)
        reset the controller to the applied state
        state - [in] the state to reset to
      • getControllerHandle

        public ControllerPtr getControllerHandle​(SimulatorPtr sim)
        get the controller handle eg. statefull handle, associated with this simulated
      • getControllerModel

        public ControllerModelPtr getControllerModel()
        get the controllermodel of this simulated controller
      • setEnabled

        public void setEnabled​(boolean enabled)
        disable or enable this controller
        enabled -
      • isEnabled

        public boolean isEnabled()
        true if this controller is enabled
      • registerIn

        public void registerIn​(State state)
        initialize this stateless data to a specific state
        state - [in] the state in which to register the data.

        Note: the data will be registered in the state structure of the state
        and any copies or other instances of the state will therefore also
        contain the added states.
      • registerIn

        public void registerIn​(StateStructurePtr state)
        register this stateless object in a statestructure.
      • unregister

        public void unregister()
        unregisters all state data of this stateless object
      • getStateStructure

        public StateStructurePtr getStateStructure()
        Get the state structure.
        the state structure.
      • isRegistered

        public boolean isRegistered()
        Check if object has registered its state.
        true if registered, false otherwise.