/* Example showing how to register a new command with iocsh */ #include #include #include #include /* Information needed by iocsh */ static const iocshArg readProbeArg0 = {"period", iocshArgInt}; static const iocshArg readProbeArg1 = {"address", iocshArgInt}; static const iocshArg *readProbeArgs[] = {&readProbeArg0, &readProbeArg1}; static const iocshFuncDef readProbeFuncDef = {"drvReadProbeCreate", 2, readProbeArgs}; /* Wrapper called by iocsh, selects the argument types that readProbe needs */ static void readProbeCallFunc(const iocshArgBuf *args) { drvReadProbeCreate(args[0].ival, args[1].ival); } /* Registration routine, runs at startup */ static void readProbeRegister(void) { iocshRegister(&readProbeFuncDef, readProbeCallFunc); } epicsExportRegistrar(readProbeRegister);