/**
 * Copyright (c) 2021, 2025 Contributors to the Eclipse Foundation
 *
 * This program and the accompanying materials are made
 * available under the terms of the Eclipse Public License 2.0
 * which is available at https://www.eclipse.org/legal/epl-2.0/
 *
 * SPDX-License-Identifier: EPL-2.0
 */
import "tutorial.machine" // <1>

Machine Tutorial 

PeripheralType LinearMotor {
  SetPoints {
    X
  }
  Axes {
    X [mm] moves X
  }
  Conversion "X=X/1000"
}


PeripheralType FlipperType { 
    SetPoints {
        C
    }
    Axes {
        C [mm] moves C
    }
    Conversion "C=C"
}

Resource Robot(give,take) { // <2>
  C: Clamp
  M: LinearMotor {
    SymbolicPositions { 
    	Home
    	Transfer
    	Flip
    	
    }
    Profiles (normal, slow) 
    Paths { 
      Home <-> Transfer profile normal
      Transfer <-> Flip profiles slow, normal
    }
  }
}

Resource Flipper { 
    C: Clamp
    F: FlipperType {
        Profiles (normal)
        Distances {     // <3>
            HalfRound
        }
    }
}
