[Event cannot happen] printing conflicting event number in the executable trace

homepage Forums BridgePoint/xtUML Usage and Training [Event cannot happen] printing conflicting event number in the executable trace

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #7758
    Schmill
    Participant

    When using the verifier, I get a well formatted message indicating the event that cannot happen in the current state. but when observing the trace oof the generated executable, I can only see the state number.

    I tried to modify the dispatch function by adding printf( "Event: %s \n", GetOoaEventNumber( event )); but unfortunately this yields null.

    How can I trace the conflicting event Number?

    Thank you.

    #7759
    cort
    Keymaster

    Did you mark the state transition tracing on? (.invoke MarkStateTransitionTracingOn( “*” ))
    This mark is found in the domain.mark file.

    #7760
    Schmill
    Participant

    Indeed this mark is enabled. but I do not get the event number, here is a sample trace:
    Event cannot happen: ND current_state = 3

    #7761
    cort
    Keymaster

    Hmm, that looks like it should work.

    #7762
    Schmill
    Participant

    I used the UserEventCantHappenCalloutf now with the line printf( "Event: %hhu in state: %hhu \n", event_number,current_state);
    prints:
    Event: 0 in state: 3
    Also cheeked in another place with different Cannot Happen, it is also 0.

    #7763
    Schmill
    Participant

    It appears that I was confused by the fact that event_number does not correspond to the event numbers displayed in Bridgepoint, so 0 is a valid number.

    #7764
    cort
    Keymaster

    Right, there is a mapping. Because BridgePoint allows event numbers to be anything. And the dispatcher needs to index into an array.

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.