Exemple #1
0
def add_sub_connector (name, topic, node) :
    comp = ""
    conn = ""
    
    config_prop = ""
    config_prop += generator.config_prop ("topic_name", "string", topic)
    
    comp += generator.comp_inst (name + "DDSConnector", config_prop, )
    
    deploy_req = generator.deploy_requirement ("edu.dre.vanderbilt.DAnCE.ConnectionType",
                                               "Local_Interface")
    conn += generator.connection (name + "info_out_data",
                                  deploy_req,
                                  generator.internal_endpoint ("info_out_data",
                                                               "false",
                                                               "SimplexReceptacle",
                                                               name + "ComponentInstance"),
                                  generator.internal_endpoint ("push_consumer_data",
                                                               "true",
                                                               "Facet",
                                                               name + "DDSConnector" + "ComponentInstance"))
    
    conn += generator.connection (name + "listenercontrol",
                                  deploy_req,
                                  generator.internal_endpoint ("info_out_data_control",
                                                               "false",
                                                               "SimplexReceptacle",
                                                               name + "ComponentInstance"),
                                  generator.internal_endpoint ("push_consumer_data_control",
                                                               "true",
                                                               "Facet",
                                                               name + "DDSConnector" + "ComponentInstance"))

    conn += generator.connection (name + "portstatuslistener",
                                  deploy_req,
                                  generator.internal_endpoint ("info_out_status",
                                                               "false",
                                                               "SimplexReceptacle",
                                                               name + "ComponentInstance"),
                                  generator.internal_endpoint ("push_consumer_status",
                                                               "true",
                                                               "Facet",
                                                               name + "DDSConnector" + "ComponentInstance"))

    conn += generator.connection (name + "listener",
                                  deploy_req,
                                  generator.internal_endpoint ("info_out_data_listener",
                                                               "false",
                                                               "SimplexReceptacle",
                                                               name + "ComponentInstance"),
                                  generator.internal_endpoint ("push_consumer_data_listener",
                                                               "true",
                                                               "Facet",
                                                               name + "DDSConnector" + "ComponentInstance"))
    return (comp, conn)
def add_sub_connector (name, topic, node) :
    comp = ""
    conn = ""

    config_prop = ""
    config_prop += generator.config_prop ("topic_name", "string", topic)

    comp += generator.comp_inst (name + "DDSConnector", config_prop, )

    deploy_req = generator.deploy_requirement ("edu.dre.vanderbilt.DAnCE.ConnectionType",
                                               "Local_Interface")
    conn += generator.connection (name + "info_out_data",
                                  deploy_req,
                                  generator.internal_endpoint ("info_out_data",
                                                               "false",
                                                               "SimplexReceptacle",
                                                               name + "ComponentInstance"),
                                  generator.internal_endpoint ("push_consumer_data",
                                                               "true",
                                                               "Facet",
                                                               name + "DDSConnector" + "ComponentInstance"))

    conn += generator.connection (name + "listenercontrol",
                                  deploy_req,
                                  generator.internal_endpoint ("info_out_data_control",
                                                               "false",
                                                               "SimplexReceptacle",
                                                               name + "ComponentInstance"),
                                  generator.internal_endpoint ("push_consumer_data_control",
                                                               "true",
                                                               "Facet",
                                                               name + "DDSConnector" + "ComponentInstance"))

    conn += generator.connection (name + "portstatuslistener",
                                  deploy_req,
                                  generator.internal_endpoint ("info_out_status",
                                                               "false",
                                                               "SimplexReceptacle",
                                                               name + "ComponentInstance"),
                                  generator.internal_endpoint ("push_consumer_status",
                                                               "true",
                                                               "Facet",
                                                               name + "DDSConnector" + "ComponentInstance"))

    conn += generator.connection (name + "listener",
                                  deploy_req,
                                  generator.internal_endpoint ("info_out_data_listener",
                                                               "false",
                                                               "SimplexReceptacle",
                                                               name + "ComponentInstance"),
                                  generator.internal_endpoint ("push_consumer_data_listener",
                                                               "true",
                                                               "Facet",
                                                               name + "DDSConnector" + "ComponentInstance"))
    return (comp, conn)
Exemple #3
0
def add_dds_sub_component (name, topic, node) :
    comps = ""
    conns = ""
    
    comps += generator.comp_inst (name, "", "DDS_PubComponentImplementation", node)

    compname = name + "_prov"
    comps += add_provide_component (compname, node)
    conns += generator.connection (name + "service",
                                   "",
                                   generator.internal_endpoint ("ping_port",
                                                                "true",
                                                                "Facet",
                                                                compname + "ComponentInstance"),
                                   generator.internal_endpoint ("ping_one",
                                                                "false",
                                                                "SimplexReceptacle",
                                                                name + "ComponentInstance"))    
    
    (tmpcomp, tmpconn) = add_sub_connector (name, topic, node)
    
    comps += tmpcomp
    conns += tmpconn
    
    return (comps, conns)
def add_dds_sub_component (name, topic, node) :
    comps = ""
    conns = ""

    comps += generator.comp_inst (name, "", "DDS_PubComponentImplementation", node)

    compname = name + "_prov"
    comps += add_provide_component (compname, node)
    conns += generator.connection (name + "service",
                                   "",
                                   generator.internal_endpoint ("ping_port",
                                                                "true",
                                                                "Facet",
                                                                compname + "ComponentInstance"),
                                   generator.internal_endpoint ("ping_one",
                                                                "false",
                                                                "SimplexReceptacle",
                                                                name + "ComponentInstance"))

    (tmpcomp, tmpconn) = add_sub_connector (name, topic, node)

    comps += tmpcomp
    conns += tmpconn

    return (comps, conns)