Crea sito


org.zu.ardulink.connection
Class FakeConnection

java.lang.Object
  extended by org.zu.ardulink.connection.FakeConnection
All Implemented Interfaces:
Connection

public class FakeConnection
extends Object
implements Connection

Ardulink - return to homepage

v0.6.1 Magnum PI

This is a fake connection used to create a Link without an Arduino. It hasn't a thread to manage messages coming from Arduino. It manages only link created with ALProtocol and it manages call backs with all ok messages. Since it hasn't a thread for incoming messages be careful with call backs that are done with the same caller thread.

Author:
Luciano Zu


Constructor Summary
FakeConnection()
           
 
Method Summary
 boolean connect(Object... params)
           
 boolean disconnect()
           
 List<String> getPortList()
           
 boolean isConnected()
           
 void setConnectionContact(ConnectionContact contact)
           
 boolean writeSerial(int numBytes, int[] message)
           
 boolean writeSerial(String message)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FakeConnection

public FakeConnection()
Method Detail

getPortList

public List<String> getPortList()
Specified by:
getPortList in interface Connection

connect

public boolean connect(Object... params)
Specified by:
connect in interface Connection

disconnect

public boolean disconnect()
Specified by:
disconnect in interface Connection

isConnected

public boolean isConnected()
Specified by:
isConnected in interface Connection

writeSerial

public boolean writeSerial(String message)
Specified by:
writeSerial in interface Connection

writeSerial

public boolean writeSerial(int numBytes,
                           int[] message)
Specified by:
writeSerial in interface Connection

setConnectionContact

public void setConnectionContact(ConnectionContact contact)
Specified by:
setConnectionContact in interface Connection


Copyright © 2015. All rights reserved.