Post on 08-Jan-2017
PECuriosity
FunPrecision
Knowledge
SnapshotsOutput
States
Motors
Queries
Sensors
TiltedTwister 2.0 *
* Source: Hans Andersson - http://tiltedtwister.com/tiltedtwister2.html
CubeSolving
public class ScanBrickListener implements ExecutionListener {
public void notify(DelegateExecution execution) throws Exception {Number brickNo = (Number) execution.getVariable("brickNo");
String brickColor = (String) execution.getVariable("brickColor");
Turn Table
Cube Tilter
Brick
Color Sensor
PC/Remote API
Sensor/Motor Port API
JAR
Java Application
Main Process
Name Value
Subprocess
Name Value
Main Process
Scan single Brick
React on Cube
Walk CubeScan Face
Face
DMNScan all Bricks
Rotate Motor
Scan Cube Calculate Solve Cube
Face to
Face
Move
Face
Move
DMN
TwistTiltTurn
Robot Access Delegate Layer
Brick Access Factory
«JavaDelegate»
Data Objects
CubeFinder Functions RotateDelegate
FetchSampleDelegate
new MotorFactory()
new SensorFactory()
Very Static Model static Motor.A
static SensorPort.S1
Process
public class RotateDelegate implements JavaDelegate {
private FixedValue port;
private JuelExpression angle;
@Override
public void execute(DelegateExecution execution)
throws Exception {
String portValue = (String) port.getValue(execution);
Long angleValue = (Long) angle.getValue(execution);
String hostVar = ""+execution.getVariable("Host");
// leJOS API stuff here
}
public class
ProcessTestCubeFinderMain {
@Test
public void startProcess()
throws RemoteException {
repositoryService
.createDeployment()
.addInputStream(
"cubeFinderMain.bpmn20.xml",
mainPath))
.addInputStream(
"scan.bpmn20.xml",
scanPath)
.deploy();
}}
Run as …
Brick.java
RotateDelegate.java
FetchSampleDelegate.java