Functions | |
| int | NetmexGetEx (NETKEY *key, void *inbuf, int inbuffmt, int inbuflen) |
| The extended version of NetmexGet(). Synchronous. Retrieves a NETMEX keyword. | |
| int | NetmexGet (NETKEY *key) |
| The extended version of NetmexGet(). Synchronous. Retrieves a NETMEX keyword. | |
| int | LinkNetmexEx (NETKEY *key, int PollRate, void(*function)(char *, int), short mode, void *inbuf, int inbuffmt, int inbuflen) |
| Extended version of LinkNetmex(). Asynchronous NETMEX data acquisition. Refreshes the input keyword and calls the input callback function. | |
| int | LinkNetmex (NETKEY *key, int PollRate, void(*function)(char *, int), short mode) |
| Asynchronous NETMEX data acquisition. Refreshes the input keyword and calls the input callback function. | |
|
||||||||||||||||||||
|
Asynchronous NETMEX data acquisition. Refreshes the input keyword and calls the input callback function. This is an asynchronous mechanism to obtain the NETMEX Keyword information for the input Keyword, and is the preferred method of obtaining NETMEX parameters.
#include "cprolog.h" #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/types.h> #include "errors.h" #include "rpctypes.h" #include "netmex.h" #include "hera.h" void showKeyword(char *keyword,int cc) { int i; if (!strcmp(keyword,HPENERGY.Property)) { printf("Energy callback: %f Gev\n",*(float *)HPENERGY.data); return; } } int main(int argc, char *argv[]) { int i,cycle = 0; switch (argc) { case 2: NGdebug = atoi(argv[1]); break; default: NGdebug = 0; } if ((i=LinkNetmex(&HPENERGY,1000,showKeyword,CM_REFRESH)) != 0) printf("Link error: %d (%s)\n>",i,erlst[i]); for (;;) { SystemCycle(TRUE); } return 0; } |
|
||||||||||||||||||||||||||||||||
|
Extended version of LinkNetmex(). Asynchronous NETMEX data acquisition. Refreshes the input keyword and calls the input callback function. This call differs from LinkNetmex() in that it provides parameters for specifying input information when the Keyword in question requires input (seldem the case). This is an asynchronous mechanism to obtain the NETMEX Keyword information for the input Keyword, and is the preferred method of obtaining NETMEX parameters.
|
|
|
The extended version of NetmexGet(). Synchronous. Retrieves a NETMEX keyword. This is a synchronous call to obtain the NETMEX Keyword information for the input Keyword.
|
|
||||||||||||||||||||
|
The extended version of NetmexGet(). Synchronous. Retrieves a NETMEX keyword. This call differs from NetmexGet() in that it provides parameters for specifying input information when the Keyword in question requires input (seldem the case). This is a synchronous call to obtain the NETMEX Keyword information for the input Keyword.
|
1.3.2