Is there a way to pass double in FSM text file?

Developer
Dec 21, 2008 at 9:13 PM
Hi,

I would like to be able to use FSM text file that contains numbers of type double.
Something like:

FSM
(
    0, AcceptingStates(2), Transitions
    (
             t(0, AddEntity(Entity(1), 33.22), 1),
             t(1, AddEntity(Entity(2), 98.77), 2)
    ),
    Vocabulary("AddEntity")
)

Is there a way to do it?

Thanks in advance,
Ofer
Coordinator
Jan 9, 2009 at 6:30 PM
Ofer,

You tried:
>
t(0, AddEntity(Entity(1), 33.22), 1), > t(1, AddEntity(Entity(2), 98.77), 2)
mpv draws the FSM if you change the lines like this, just add quotes:

> t(0, AddEntity(Entity(1), "33.22"), 1), > t(1, AddEntity(Entity(2), "98.77"), 2) Another way that might be more helpful is > t(0, AddEntity(Entity(1), double("33.22")), 1), > t(1, AddEntity(Entity(2), double("98.77")), 2) I expect this will compose as expected with a C# model program where the action method has an argument of type double. I expect an FSM with just the quotes will not compose as expected.
 In our ClientServer sample, the ServerSend and ClientReceive actions have a double argument. mpv shows these arguments as ServerSend(double("99.9")) etc., and so do the test suites generated by otg.
Jon