Пример #1
0
def make_process(input_queue, all_stream_names_tuple, input_stream_names_tuple,
                 output_stream_names_dict, agent_descriptor_dict):
    print 'entered make_process'
    print 'input_queue', input_queue
    print 'input_stream_names_tuple', input_stream_names_tuple
    print 'output_stream_names_dict', output_stream_names_dict
    print 'agent_descriptor_dict', agent_descriptor_dict

    stream_dict, agent_dict = \
      make_network(all_stream_names_tuple, agent_descriptor_dict)

    print 'stream_dict', stream_dict
    print 'agent_dict', agent_dict

    input_stream_dict = dict()
    for stream_name in input_stream_names_tuple:
        input_stream_dict[stream_name] = stream_dict[stream_name]
    print 'input_stream_dict', input_stream_dict

    # Create the input stream manager which takes
    # messages from the input queue and appends each message
    # to the specified input stream.
    make_input_manager(input_queue, input_stream_dict)

    # Create the output stream manager which subscribes
    # to messages on streams going outside the process.
    # The output stream manger takes each message m it receives
    # on a stream s and puts m in the input queues of each process
    # that receives s.
    output_manager = make_output_manager(stream_dict, output_stream_names_dict)
def make_process(input_queue,
                 all_stream_names_tuple,
                 input_stream_names_tuple,
                 output_stream_names_dict,
                 agent_descriptor_dict):

    # Create the network
    # Create all the agents and make the streams connecting them
    stream_dict, agent_dict = \
      make_network(all_stream_names_tuple, agent_descriptor_dict)


    input_stream_dict = dict()
    for stream_name in input_stream_names_tuple:
        input_stream_dict[stream_name] = stream_dict[stream_name]

    # Create the output stream manager which subscribes
    # to messages on streams going outside the process.
    # The output stream manger takes each message m it receives
    # on a stream s and puts m in the input queues of each process
    # that receives s.
    output_manager = make_output_manager(
        stream_dict, output_stream_names_dict)

    # Create the input stream manager which takes
    # messages from the input queue and appends each message
    # to the specified input stream.
    make_input_manager(input_queue, input_stream_dict)
Пример #3
0
def make_process(input_queue,
                 all_stream_names_tuple,
                 input_stream_names_tuple,
                 output_stream_names_dict,
                 agent_descriptor_dict):
    print 'entered make_process'
    print 'input_queue', input_queue
    print 'input_stream_names_tuple', input_stream_names_tuple
    print 'output_stream_names_dict', output_stream_names_dict
    print 'agent_descriptor_dict', agent_descriptor_dict

    stream_dict, agent_dict = \
      make_network(all_stream_names_tuple, agent_descriptor_dict)

    print 'stream_dict', stream_dict
    print 'agent_dict', agent_dict

    input_stream_dict = dict()
    for stream_name in input_stream_names_tuple:
        input_stream_dict[stream_name] = stream_dict[stream_name]
    print 'input_stream_dict', input_stream_dict

    # Create the input stream manager which takes
    # messages from the input queue and appends each message
    # to the specified input stream.
    make_input_manager(input_queue, input_stream_dict)

    # Create the output stream manager which subscribes
    # to messages on streams going outside the process.
    # The output stream manger takes each message m it receives
    # on a stream s and puts m in the input queues of each process
    # that receives s.
    output_manager = make_output_manager(
        stream_dict, output_stream_names_dict)
def make_process(input_queue, all_stream_names_tuple, input_stream_names_tuple,
                 output_stream_names_dict, agent_descriptor_dict):

    # Create the network
    # Create all the agents and make the streams connecting them
    stream_dict, agent_dict = \
      make_network(all_stream_names_tuple, agent_descriptor_dict)

    input_stream_dict = dict()
    for stream_name in input_stream_names_tuple:
        input_stream_dict[stream_name] = stream_dict[stream_name]

    # Create the output stream manager which subscribes
    # to messages on streams going outside the process.
    # The output stream manger takes each message m it receives
    # on a stream s and puts m in the input queues of each process
    # that receives s.
    output_manager = make_output_manager(stream_dict, output_stream_names_dict)

    # Create the input stream manager which takes
    # messages from the input queue and appends each message
    # to the specified input stream.
    make_input_manager(input_queue, input_stream_dict)