Package de.nordakademie.cerca.lcd

Examples of de.nordakademie.cerca.lcd.NativeLCD


    // load C library
    System.loadLibrary("cerca");
  }
  public static void main(String[] args) {
    // implementing customized behavior
    NativeLCD lcd = NativeLCD.getInstance();
    lcd.setBehaviour(new MyLCD());
   
    NativeBattery nb = NativeBattery.getInstance();
    nb.setBehaviour(new MyBattery());
   
    MySensorPort mySensorPort = new MySensorPort();
View Full Code Here


   * @param args
   * @throws InterruptedException
   */
  public static void main(String[] args) throws InterruptedException {
    // implementing customized behaviour
    NativeLCD lcd = NativeLCD.getInstance();
    lcd.setBehaviour(new MyLCD());
   
    NativeButton btn = NativeButton.getInstance();
    MyButton myBtn = new MyButton();
    btn.setBehaviour(myBtn);
   
View Full Code Here

   * resets variables hasExpectedParams and isCalled prior to every
   * test.
   */
  @Before
  public void setUp() {
    NativeLCD lcd = NativeLCD.getInstance();
    lcd.setBehaviour(this);
    this.hasExpectedParameters = false;
    this.isCalled = false;
  }
View Full Code Here

    assertEquals(' ', lcdStub.getDisplayArray()[0][0]);
    assertEquals('1', lcdStub.getDisplayArray()[0][1]);
  }
  @Test
  public void testCercaDelegationToLcdStub() {
    NativeLCD nLcd = NativeLCD.getInstance();
    nLcd.setBehaviour(lcdStub);

    LCD.drawString("Test", 0, 0);
    assertEquals('T', lcdStub.getDisplayArray()[0][0]);

    LCD.drawInt(123, 0, 0);
View Full Code Here

  public void testWithZPilot() throws InterruptedException{
   
    NativeMotorPort nativeMotorPort = NativeMotorPort.getInstance();
    NativeBattery nativeBattery = NativeBattery.getInstance();
    NativeButton nativeButton = NativeButton.getInstance();
    NativeLCD nativeLcd = NativeLCD.getInstance();
    NativeSensorPort nativeSensor = NativeSensorPort.getInstance();
   
    //Verhalten f�r die Cerca Instanzen setzen
    NativeMotorPortStub motorportStub = new NativeMotorPortStub();
    nativeMotorPort.setBehaviour(motorportStub);   
    NativeBatteryStub batteryStub = new NativeBatteryStub();
    nativeBattery.setBehaviour(batteryStub);   
    NativeButtonStub btnStub = new NativeButtonStub();
    nativeButton.setBehaviour(btnStub);     
    NativeLcdStub lcdStub = new NativeLcdStub();
    nativeLcd.setBehaviour(lcdStub);   
    NativeSensorPortStub sensorPortStub = new NativeSensorPortStub();
    nativeSensor.setBehaviour(sensorPortStub);
   
    // Initialsetzung der angeschlossenen Elemente des SimPilots   
    simPilot.setTrackWidth(11.6f);
View Full Code Here

TOP

Related Classes of de.nordakademie.cerca.lcd.NativeLCD

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.