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]); |