artavd / device-emulator

Application for emulation of message-based devices
0 stars 0 forks source link

Implement device emulator class #6

Closed artavd closed 8 years ago

artavd commented 8 years ago

Device emulator should be Device and DeviceController at the same time. It should have ability to work with several messages independently.

artavd commented 8 years ago

Could get cool pausable observable:

Observable
    .interval(period, TimeUnit.MILLISECONDS, scheduler)
    .takeUntil(getStateFeed().filter(state -> state == DeviceState.STOPPED))
    .repeatWhen(_unused_ -> getStateFeed().filter(state -> state == DeviceState.STARTED), scheduler)

Need to check on real use cases, not only on tests with TestScheduler.