Book a Demo

Author Topic: Executable State Machine -Interpreted Simulation returns error ''not a function'  (Read 9705 times)

DaVos

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Hi everyone

I am trying to simulate an executable state machine that calls an operation. The operation returns a value and it is defined on a class.

As a first step I have used the EA example CD Player.

By running the simulation on interpreted mode I got the following error

\\sim.next is not a function.\\ The simulation is running on java.

The same error I got on my simulation.

I have followed all the guidelines described on EA dynamic simulation guidelines.

Did anyone faced the same problems with dynamic simulation ?

Regarding technicalities
1. How EA defines an operation on a class ?
for example if I define the following
this.a=a
this.b=b
return a+b

Is this enough or I have to define a method based on Java ? Define public or state keywords for the method definition etc

2. How I call this operation from a class ?
I have to define an object or just a simple call will do the job ? For example this.result=add(1,2)

Any help appreciated

 









philchudley

  • EA User
  • **
  • Posts: 750
  • Karma: +22/-0
  • EA Consultant / Trainer - Sparx Europe
    • View Profile
I have exactly the same problem I am using EA version 15.2.1560, although a colleague has said it all works fine in EA 15.1 which I haven't tried.

I even get the same error when trying to use the examples within EAExample

Some form of reply would be very nice and appreciated.

Phil
Models are great!
Correct models are even greater!

philchudley

  • EA User
  • **
  • Posts: 750
  • Karma: +22/-0
  • EA Consultant / Trainer - Sparx Europe
    • View Profile
Just a follow up, I get the same "not a function" error in EA v16 beta

Phil
Models are great!
Correct models are even greater!