inamiy/RxAutomaton

Input with parameters?

AndrewSB opened this issue · 0 comments

Hey @inamiy! I'm testing out RxAutomaton in favor of SwiftState for a state machine that models the CoreBluetooth's CBCentralManager.

The issue I'm running into is handling an input with parameters. For example, my "discovered bluetooth peripheral" input takes an argument rssi: Int (case discovered(rssi: Int)).
(Here are all of my inputs):
screen shot 2016-09-26 at 4 23 21 pm

If I try to compose my mappings, I get an error saying expects argument of type (rssi: Int):
screen shot 2016-09-26 at 4 21 10 pm

Which I can fulfill by explicitly specifying some integer amount, but I'd like to be allow the mapping to take effect for every .discovered input, regardless of integer amount. Is that currently possible with RxAutomaton?