Subversion Repositories f9daq

Compare Revisions

Ignore whitespace Rev 155 → Rev 156

/cvi/instr/MPOD/MPOD.c
164,6 → 164,7
int ch=0;
int iret;
// int i, j;
char cret[2000];
 
HSNMP crate1;
176,6 → 177,9
printf("-----------------------------------------------------------------\n");
 
strcpy(cret, MPOD_GetString(0,"moduleDescription.ma0"));
printf("Module type: %s\n",cret);
iret=getMainSwitch(crate1);
printf("Main Switch = %i\n", iret);
 
183,10 → 187,14
iret=MPOD_GetIntCh(0,"moduleNumber",0);
printf("Module Number = %i\n", iret);
 
iret=MPOD_GetIntCh(0,"fanNominalSpeed",0);
printf("Fan nominal speed = %i\n", iret);
 
ret=MPOD_GetDouble(0,"outputVoltage.1");
printf("Output Voltage = %f.\n", ret);
 
vSet = getOutputVoltage(crate1, ch);
// vSet = getOutputVoltage(crate1, ch);
vSet = MPOD_GetDoubleCh(0, "outputVoltage", ch+1);
printf("Output Voltage %i = %f.\n", ch, vSet);
//Test Channel Status
288,6 → 296,14
return snmpSetDouble(crateHsnmp[mpodn], &tmpObject, dset);
}
 
char * _VI_FUNC MPOD_GetString (int mpodn, char *oidstr)
{
SnmpObject tmpObject;
getNode(oidstr, &tmpObject);
return snmpGetString(crateHsnmp[mpodn], &tmpObject);
}
 
int _VI_FUNC MPOD_GetIntCh (int mpodn, char *oidstrbase, int ich)
{
SnmpObject tmpObject;
321,6 → 337,14
return snmpSetDouble(crateHsnmp[mpodn], &tmpObject, dset);
}
 
char * _VI_FUNC MPOD_GetStringCh (int mpodn, char oidstrbase[], int ich)
{
SnmpObject tmpObject;
getIndexNode(oidstrbase, ich, &tmpObject);
return snmpGetString(crateHsnmp[mpodn], &tmpObject);
}
 
int _VI_FUNC MPOD_Close (int mpodn)
{
snmpClose(crateHsnmp[mpodn]);
/cvi/instr/MPOD/MPOD.fp
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/cvi/instr/MPOD/MPOD.h
7,6 → 7,7
 
#include <cvidef.h>
#include <ivi.h>
 
//#include "WIENER_SNMP.h"
//************************* WIENER_SNMP.h *****************************
#ifdef _MSC_VER
220,6 → 221,8
 
double _VI_FUNC MPOD_SetDouble (int mpodn, char *oidstr, double dset);
 
char * _VI_FUNC MPOD_GetString (int mpodn, char *oidstr);
 
int _VI_FUNC MPOD_GetIntCh (int mpodn, char *oidstrbase, int ich);
 
int _VI_FUNC MPOD_SetIntCh (int mpodn, char *oidstrbase, int ich, int iset);
229,6 → 232,8
double _VI_FUNC MPOD_SetDoubleCh (int mpodn, char *oidstrbase, int ich,
double dset);
 
char * _VI_FUNC MPOD_GetStringCh (int mpodn, char oidstrbase[], int ich);
 
int _VI_FUNC MPOD_Close (int mpodn);
 
int _VI_FUNC MPOD_End (void);