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

Cannot call the same sequence twice from Waldo function #54

Open
harrison8989 opened this issue Aug 5, 2013 · 0 comments
Open

Cannot call the same sequence twice from Waldo function #54

harrison8989 opened this issue Aug 5, 2013 · 0 comments
Labels

Comments

@harrison8989
Copy link
Collaborator

For example, if I have a Waldo sequence SeqSendMSG and a Waldo function send_msg defined as

Public Function send_msg(Text msg) {
    SeqSendMSG(msg);
    SeqSendMSG(msg);
}

Calling this function will return the following error, along with a stack trace:

Compiler error: Already had an entry for variable trying to insert into store.

To clarify, the error does not actually occur when the Waldo file is being compiled.

Full code:
Test.wld:

Test
Endpoint Client;
Endpoint Server;

Sequences {
    SeqSendMSG: Client.sendMSG -> Server.receiveMSG;
}

Sequence SeqSendMSG (Text msg) returns Text result
{
    Client.sendMSG {
    }

    Server.receiveMSG {
    }

}

Client
{
    Public Function send_msg(Text msg) {
        SeqSendMSG(msg);
        SeqSendMSG(msg);
    }

}

Server
{
}

Server.py:

from emitted import Server
import sys
sys.path.append("../../../")
from waldo.lib import Waldo
import time

HOSTNAME = '127.0.0.1'
PORT = 9028


Waldo.tcp_accept(Server, HOSTNAME, PORT)

print 'Server is up and running.'

while True:
    pass

Client.py:

from emitted import Client
import sys
sys.path.append("../../../")
from waldo.lib import Waldo

HOSTNAME = '127.0.0.1'
PORT = 9028

client = Waldo.tcp_connect(Client, HOSTNAME, PORT)
client.send_msg('100')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant