⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 agconmemtest.cpp.bak

📁 STK的二次开发
💻 BAK
字号:
/********************************************************************
 * For Customer Support contact Analytical Graphics, Inc. at        *
 *   1.888.785.9973  or 1.610.578.1111                              *
 ********************************************************************/

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "AgConnect.h"

char AgEAppName[]="Connect";
static char        *initFileName     = NULL;
static char        *connection1      = NULL;
static char  connectName[256] = "localhost:5001";
    AgTConReturnInfo returnInfo; 


	int sendCommandToStk(char *command){
		return (AgConProcessSTKCmd(connection1,command,&returnInfo));
	}

int
main()
{

    static char  cmdString[256]  = "GetReport */Satellite/Sat \"LLA Position\""; 
    int   i;


    /* Initialize Connect */

    AgConInit(initFileName);

    /* Open a connection to STK */

    AgConOpenSTK(&connection1, AgCTcpType, connectName); 

    /* Begin sending IPC Commands */

    /*AgConProcessSTKCmd(connection1, cmdString1, &returnInfo);*/
	sendCommandToStk(cmdString);

    /*
     * No need to free memory allocated to returnInfo because a Load
     * command returns no data.
     *
     */

  
    /* Finished sending commands, now close the connection */
    
    AgConCloseSTK(&connection1);

    /*  Print out the results of the AllAccess command
     */

    for (i=0; i < returnInfo.numEntries; i++) 
    {
        AgUtMsg( AgCMsgForceInfo, AgCMsgNoWait, AgCMsgDispDefault, AgCMsgNoErrorCode, 
                 AgCMSourceLine, "Return entry %d:\n%s\n", i+1, returnInfo.returnList[i]);
    } 

    /*  Clean up the Return Information, freeing any unneeded memory */


    /*  Free remaining allocated memory in the Connect module in
     *  preparation for exit
     */

     AgConShutdownConnect();

     return (0);
} 
    

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -