Skip to content
This repository has been archived by the owner on Dec 12, 2021. It is now read-only.

Input with parameters? #1

Open
AndrewSB opened this issue Sep 26, 2016 · 0 comments
Open

Input with parameters? #1

AndrewSB opened this issue Sep 26, 2016 · 0 comments

Comments

@AndrewSB
Copy link
Contributor

AndrewSB commented Sep 26, 2016

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?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant