示例#1
0
文件: coSimClient.C 项目: nixz/covise
int coSend3Data(const char *portName, int numElem, float *data0,
                float *data1, float *data2)
{
    if (coSendC(SEND_3DATA, portName))
        return -1;
    return coSend3DataCommon(numElem, data0, data1, data2);
}
示例#2
0
int coSend3Data(const char *portName, int numElem, float *data)
{
   if (coSendC(SEND_3DATA,portName)) 
      return -1;
   /* return coSend3DataCommon(numElem,data,);@@@@@@@@@@@@@@@@@@@@@@@@@@@@ */
   return 0;
}
示例#3
0
/* Read a Filename Parameter of the module */
int coGetParaFile(const char *name, int *data)            /* Fortran 77: COGPFI() */
{
   if (coSendC(GET_FILE_PARA,name))
      return -1;;
   if (   recvData((void*)&data,256,BSWP_DONTSWAP) != 256 ) 
      return -1;
   return 0;
}
示例#4
0
/* Read a Text Parameter of the module */
int coGetParaText(const char *name, char *data)
{
   if (coSendC(GET_TEXT_PARA,name))
      return -1;;
   if (   recvData((void*)&data,256,BSWP_DONTSWAP) != 256 ) 
      return -1;
   return 0;
}
示例#5
0
int coParallelPort(const char *portName, int isCellData)
{ 
   int32 data = isCellData; 
   if ( coSendC(PARA_PORT,portName))                                  return -1;
   
   if (sendData((void*)&data,sizeof(data),BSWP_MUSTSWAP) != sizeof(data) )
      return -1;
   else
      return 0;
}
示例#6
0
文件: coSimClient.C 项目: nixz/covise
/* Read a Text Parameter of the module */
int coGetParaText(const char *name, char *data)
{
    char buffer[256];
    if (coSendC(GET_TEXT_PARA, name))
        return -1;
    ;
    if (recvData((void *)&buffer, 256) != 256)
    {
        fprintf(stdout, "cogetparatext():%s", buffer);
        return -1;
    }
    strcpy(data, buffer);
    if (strlen(data) == 0)
        return -1;
    return 0;
}
示例#7
0
int coAddAttribute(const char *portName,
                   const char *attrName,
                   const char *attrVal)
{ 
   char buf[1024];

   if ( coSendC(ATTRIBUTE,portName))                                  return -1;
   
   strncpy(buf,attrName,1023);
   buf[1023]='\0';
   if (sendData(buf,1024,BSWP_DONTSWAP) != 1024 )                                   return -1;

   strncpy(buf,attrVal,1023);
   buf[1023]='\0';
   if (sendData(buf,1024,BSWP_DONTSWAP) != 1024 )                                   return -1;

   return 0;
}
示例#8
0
文件: coSimClient.C 项目: nixz/covise
int coSend1Data(const char *portName, int numElem, float *data)
{
    if (coSendC(SEND_1DATA, portName))
        return -1;
    return coSend1DataCommon(numElem, data);
}
示例#9
0
文件: coSimClient.C 项目: nixz/covise
/* C API */
int coGetParaBool(const char *name, int *val)
{
    if (coSendC(GET_BOOL_PARA, name))
        return -1;
    return coGetParaBo(val);
}
示例#10
0
文件: coSimClient.C 项目: nixz/covise
/* C API */
int coGetParaChoice(const char *name, int *val)
{
    if (coSendC(GET_CHOICE_PARA, name))
        return -1;
    return coGetParaCh(val);
}
示例#11
0
文件: coSimClient.C 项目: nixz/covise
int coGetParaIntScalar(const char *name, int *val)
{
    if (coSendC(GET_SC_PARA_INT, name))
        return -1;
    return coGetParaScaInt(val);
}
示例#12
0
文件: coSimClient.C 项目: nixz/covise
int coGetParaFloatVector(const char *name, float *val)
{
    if (coSendC(GET_V3_PARA_FLO, name))
        return -1;
    return coGetParaVecFlo(val);
}
示例#13
0
文件: coSimClient.C 项目: nixz/covise
int coGetParaFloatScalar(const char *name, float *val)
{
    if (coSendC(GET_SC_PARA_FLO, name))
        return -1;
    return coGetParaScaFlo(val);
}
示例#14
0
文件: coSimClient.C 项目: nixz/covise
/* C API */
int coGetParaSlider(const char *name, float *min, float *max, float *val)
{
    if (coSendC(GET_SLI_PARA, name))
        return -1;
    return coGetParaSli(min, max, val);
}