public class MockedArduinoDevice extends Object implements Arduino
| Modifier and Type | Field and Description |
|---|---|
Map<String,String> |
keyValueMap |
Stack<Message> |
sentMessages |
| Constructor and Description |
|---|
MockedArduinoDevice() |
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(ArduinoListener listener) |
void |
fireReceived(String key,
String value)
Fires the rx event
|
void |
fireTransmitted(String key,
String value)
Fires the tx event
|
String |
get(String key,
Attribute... attributes) |
KeyValueCache |
getCache() |
ConnectionState |
getCurrentState() |
ConnectionState |
getTargetState() |
void |
receive(String key,
String value)
Test method to simulate received events from the arduino
|
void |
removeListener(ArduinoListener listener) |
void |
send(String key,
String value) |
void |
setCache(KeyValueCache cache) |
void |
setTargetState(ConnectionState state) |
public void receive(String key, String value)
key - value - public ConnectionState getCurrentState()
getCurrentState in interface Arduinopublic ConnectionState getTargetState()
getTargetState in interface Arduinopublic void setTargetState(ConnectionState state)
setTargetState in interface Arduinopublic void setCache(KeyValueCache cache)
public KeyValueCache getCache()
public void addListener(ArduinoListener listener)
addListener in interface Arduinopublic void removeListener(ArduinoListener listener)
removeListener in interface Arduinopublic void fireReceived(String key, String value)
key - value - Copyright © 2015. All Rights Reserved.