Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

concept of internal communication wanted! #44

Closed
vassik opened this issue Mar 14, 2014 · 1 comment
Closed

concept of internal communication wanted! #44

vassik opened this issue Mar 14, 2014 · 1 comment

Comments

@vassik
Copy link
Contributor

vassik commented Mar 14, 2014

It seems like we need something that allows passing and receiving messages internally. It is possible do it by defining two ports and connecting them together. It looks quite complex and cluttering a thing. We do not use these ports for communication with other things so we should not expose them publicly. Binding these ports looks redundant and we usually forget this.

We suggest having sort of 'trigger' concept which acts as a couple of ports connected together by default. We should be able to generate more efficient code for the internal communication.

Example:

Expected

thing X includes Xmessages {

    trigger trigger_name message_name;

    statechart behavior init Start {
        ...
        state Start{
          on entry do
            print "Srating...\n"
            b = getSomethig()
            trigger_name!message_name(b)
          end

          transition->Something
          event e : trigger_name?message_name
          .....
        }
       ......
    }
}

Actual (current workaround)

thing X includes Xmessages {
    provided port sendportinternal {
           sends message_name
    }
   required port receiveportinternal {
           receives message_name
    }

    statechart behavior init Start {
        ...
        state Start{
          on entry do
            print "Srating...\n"
            b = getSomethig()
            sendportinternal!message_name(b)
          end

          transition->Something
          event e : receiveportinternal?message_name
          .....
        }
       ......
    }
}
configuration Some {
    instance x:X
    connector x.receiveportinternal => x.sendportinternal // we usually forget this
}

Note:
Franck you can reassign to anyone you want if you think this feature makes sense )))

@brice-morin
Copy link
Collaborator

Yes, some people in the HEADS project also need internal port HEADS-project/heads_ide#70

brice-morin added a commit that referenced this issue Oct 30, 2015
brice-morin added a commit that referenced this issue Oct 30, 2015
…ust waiting for support in C by @Lyadis :-)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants