mil.dod.th.ose.remote.integration/src/mil/dod/th/ose/remote/integration/namespace/TestMissionProgrammingNamespace.java
private void loadProtoTestTemplate() throws IOException, InterruptedException
    {
        MessageListener listener = new MessageListener(m_Socket);
        
        //construct template
        MissionProgramTemplateGen.MissionVariableMetaData varData = 
                MissionProgramTemplateGen.MissionVariableMetaData.newBuilder().
            setBase(VariableMetaData.newBuilder().
                setName("variable").
                setDescription("I describe a variable").
                setDefaultValue("My Asset").
                setHumanReadableName("human readable name")).
            setType(MissionVariableTypes.Enum.ASSET).
            build();
        MissionProgramTemplateGen.MissionProgramTemplate template = MissionProgramTemplateGen.
            MissionProgramTemplate.newBuilder().
            setName("TEST_TEMPLATE_REMOTE").
            setSource("TheSource!@@#(*&$^%_@##$").
            setDescription("Something").
            addVariableMetaData(varData).build();
        //construct template message        
        LoadTemplateRequestData programMessage = MissionProgramMessages.LoadTemplateRequestData.newBuilder().
            setMission(template).build();
        
        //create terra harvest message
        TerraHarvestMessage message = createMissionProgramMessage(MissionProgrammingMessageType.LoadTemplateRequest, 
            programMessage);
        
        // send out message
        message.writeDelimitedTo(m_Socket.getOutputStream());
        
        //verify correct namespace, and response type
        listener.waitForMessage(Namespace.MissionProgramming, MissionProgrammingMessageType.LoadTemplateResponse, 
                    500);
    }
/**
     * Load proto created test template.
     */
Load proto created test template.
Load proto created test template .
private void loadProtoTestTemplate() throws IOException, InterruptedException
    {
        MessageListener listener = new MessageListener(m_Socket);
        MissionProgramTemplateGen.MissionVariableMetaData varData = 
                MissionProgramTemplateGen.MissionVariableMetaData.newBuilder().
            setBase(VariableMetaData.newBuilder().
                setName("variable").
                setDescription("I describe a variable").
                setDefaultValue("My Asset").
                setHumanReadableName("human readable name")).
            setType(MissionVariableTypes.Enum.ASSET).
            build();
        MissionProgramTemplateGen.MissionProgramTemplate template = MissionProgramTemplateGen.
            MissionProgramTemplate.newBuilder().
            setName("TEST_TEMPLATE_REMOTE").
            setSource("TheSource!@@#(*&$^%_@##$").
            setDescription("Something").
            addVariableMetaData(varData).build();
         message        
        LoadTemplateRequestData programMessage = MissionProgramMessages.LoadTemplateRequestData.newBuilder().
            setMission(template).build();
        TerraHarvestMessage message = createMissionProgramMessage(MissionProgrammingMessageType.LoadTemplateRequest, 
            programMessage);
        message.writeDelimitedTo(m_Socket.getOutputStream());
        listener.waitForMessage(Namespace.MissionProgramming, MissionProgrammingMessageType.LoadTemplateResponse, 
                    500);
    }
private void loadProtoTestTemplate ( ) throws IOException , InterruptedException { MessageListener listener = new MessageListener ( m_Socket ) ; MissionProgramTemplateGen . MissionVariableMetaData varData = MissionProgramTemplateGen . MissionVariableMetaData . newBuilder ( ) . setBase ( VariableMetaData . newBuilder ( ) . setName ( "variable" ) . setDescription ( "I describe a variable" ) . setDefaultValue ( "My Asset" ) . setHumanReadableName ( "human readable name" ) ) . setType ( MissionVariableTypes . Enum . ASSET ) . build ( ) ; MissionProgramTemplateGen . MissionProgramTemplate template = MissionProgramTemplateGen . MissionProgramTemplate . newBuilder ( ) . setName ( "TEST_TEMPLATE_REMOTE" ) . setSource ( "TheSource!@@#(*&$^%_@##$" ) . setDescription ( "Something" ) . addVariableMetaData ( varData ) . build ( ) ; LoadTemplateRequestData programMessage = MissionProgramMessages . LoadTemplateRequestData . newBuilder ( ) . setMission ( template ) . build ( ) ; TerraHarvestMessage message = createMissionProgramMessage ( MissionProgrammingMessageType . LoadTemplateRequest , programMessage ) ; message . writeDelimitedTo ( m_Socket . getOutputStream ( ) ) ; listener . waitForMessage ( Namespace . MissionProgramming , MissionProgrammingMessageType . LoadTemplateResponse , 500 ) ; }
Load proto created test template.
Load proto created test template .
//construct template //construct template message         //create terra harvest message // send out message //verify correct namespace, and response type