From 6de82bb0fd8e004e9a502c0605c078fbfb9f86fb Mon Sep 17 00:00:00 2001 From: AlexWells Date: Fri, 25 Aug 2023 10:07:59 +0200 Subject: [PATCH] Additional help messages for iocsh Henrique Silva --- modules/database/src/ioc/as/asIocRegister.c | 50 +++-- modules/database/src/ioc/db/dbIocRegister.c | 201 ++++++++++++------ .../src/ioc/dbStatic/dbStaticIocRegister.c | 21 +- .../database/src/ioc/misc/miscIocRegister.c | 4 +- modules/libcom/src/iocsh/iocsh.cpp | 2 +- modules/libcom/src/iocsh/libComRegister.c | 62 +++--- 6 files changed, 219 insertions(+), 121 deletions(-) diff --git a/modules/database/src/ioc/as/asIocRegister.c b/modules/database/src/ioc/as/asIocRegister.c index f97917d8e..dcc2a6bdd 100644 --- a/modules/database/src/ioc/as/asIocRegister.c +++ b/modules/database/src/ioc/as/asIocRegister.c @@ -21,7 +21,8 @@ static const iocshArg * const asSetFilenameArgs[] = {&asSetFilenameArg0}; static const iocshFuncDef asSetFilenameFuncDef = {"asSetFilename",1,asSetFilenameArgs, "Set path+file name of ACF file.\n" - "No immediate effect. Run as asInit() to (re)load.\n"}; + "No immediate effect. Run asInit to (re)load.\n" + "Example: asSetFilename /full/path/to/accessSecurityFile\n"}; static void asSetFilenameCallFunc(const iocshArgBuf *args) { asSetFilename(args[0].sval); @@ -33,7 +34,8 @@ static const iocshArg * const asSetSubstitutionsArgs[] = {&asSetSubstitutionsArg static const iocshFuncDef asSetSubstitutionsFuncDef = {"asSetSubstitutions",1,asSetSubstitutionsArgs, "Set subtitutions used when reading ACF file.\n" - "No immediate effect. Run as asInit() to (re)load.\n"}; + "No immediate effect. Run asInit to (re)load.\n" + "Example: asSetSubstitutions var1=5,var2=hello\n"}; static void asSetSubstitutionsCallFunc(const iocshArgBuf *args) { asSetSubstitutions(args[0].sval); @@ -59,7 +61,10 @@ static void asdbdumpCallFunc(const iocshArgBuf *args) static const iocshArg aspuagArg0 = { "uagname",iocshArgString}; static const iocshArg * const aspuagArgs[] = {&aspuagArg0}; static const iocshFuncDef aspuagFuncDef = {"aspuag",1,aspuagArgs, - "Show members of User Access Group.\n"}; + "Show members of the User Access Group.\n" + "If no Group is specified then the members\n" + "of all user access groups are displayed.\n" + "Example: aspuag mygroup\n"}; static void aspuagCallFunc(const iocshArgBuf *args) { aspuag(args[0].sval); @@ -69,7 +74,10 @@ static void aspuagCallFunc(const iocshArgBuf *args) static const iocshArg asphagArg0 = { "hagname",iocshArgString}; static const iocshArg * const asphagArgs[] = {&asphagArg0}; static const iocshFuncDef asphagFuncDef = {"asphag",1,asphagArgs, - "Show members of Host Access Group.\n"}; + "Show members of the Host Access Group.\n" + "If no Group is specified then the members\n" + "of all host access groups are displayed\n" + "Example: asphag mygroup\n"}; static void asphagCallFunc(const iocshArgBuf *args) { asphag(args[0].sval); @@ -78,8 +86,12 @@ static void asphagCallFunc(const iocshArgBuf *args) /* asprules */ static const iocshArg asprulesArg0 = { "asgname",iocshArgString}; static const iocshArg * const asprulesArgs[] = {&asprulesArg0}; -static const iocshFuncDef asprulesFuncDef = {"asprules",1,asprulesArgs, - "List rules of an Access Security Group.\n"}; +static const iocshFuncDef asprulesFuncDef = { + "asprules",1,asprulesArgs, + "List rules of an Access Security Group.\n" + "If no Group is specified then list the rules for all groups\n" + "Example: asprules mygroup" +}; static void asprulesCallFunc(const iocshArgBuf *args) { asprules(args[0].sval); @@ -89,8 +101,14 @@ static void asprulesCallFunc(const iocshArgBuf *args) static const iocshArg aspmemArg0 = { "asgname",iocshArgString}; static const iocshArg aspmemArg1 = { "clients",iocshArgInt}; static const iocshArg * const aspmemArgs[] = {&aspmemArg0,&aspmemArg1}; -static const iocshFuncDef aspmemFuncDef = {"aspmem",2,aspmemArgs, - "List members of Access Security Group.\n"}; +static const iocshFuncDef aspmemFuncDef = { + "aspmem",2,aspmemArgs, + "List members of Access Security Group.\n" + "If no Group is specified then print the members for all Groups.\n" + "If clients is (0, 1) then Channel Access clients attached to each member\n" + "(are not, are) shown\n" + "Example: aspmem mygroup 1\n", +}; static void aspmemCallFunc(const iocshArgBuf *args) { aspmem(args[0].sval,args[1].ival); @@ -101,8 +119,10 @@ static const iocshArg astacArg0 = { "recordname",iocshArgStringRecord}; static const iocshArg astacArg1 = { "user",iocshArgString}; static const iocshArg astacArg2 = { "host",iocshArgString}; static const iocshArg * const astacArgs[] = {&astacArg0,&astacArg1,&astacArg2}; -static const iocshFuncDef astacFuncDef = {"astac",3,astacArgs, - "Test Access Security privlages granted to user+host.\n"}; +static const iocshFuncDef astacFuncDef = { + "astac",3,astacArgs, + "Show what read/write permissions the user:host would have when\n" + "accessing a certain PV.\n"}; static void astacCallFunc(const iocshArgBuf *args) { astac(args[0].sval,args[1].sval,args[2].sval); @@ -111,8 +131,14 @@ static void astacCallFunc(const iocshArgBuf *args) /* ascar */ static const iocshArg ascarArg0 = { "level",iocshArgInt}; static const iocshArg * const ascarArgs[] = {&ascarArg0}; -static const iocshFuncDef ascarFuncDef = {"ascar",1,ascarArgs, - "Report status of PVs used in INP*() Access Security rules.\n"}; +static const iocshFuncDef ascarFuncDef = { + "ascar",1,ascarArgs, + "Report status of PVs used in INP*() Access Security rules.\n" + "Level 0 - Summary report\n" + " 1 - Summary report plus details on unconnected channels\n" + " 2 - Summary report plus detail report on each channel\n" + "Example: ascar 1\n" +}; static void ascarCallFunc(const iocshArgBuf *args) { ascar(args[0].ival); diff --git a/modules/database/src/ioc/db/dbIocRegister.c b/modules/database/src/ioc/db/dbIocRegister.c index 8bea9c74d..83a2c9114 100644 --- a/modules/database/src/ioc/db/dbIocRegister.c +++ b/modules/database/src/ioc/db/dbIocRegister.c @@ -72,7 +72,9 @@ static void dbLoadRecordsCallFunc(const iocshArgBuf *args) static const iocshArg dbbArg0 = { "record name",iocshArgStringRecord}; static const iocshArg * const dbbArgs[1] = {&dbbArg0}; static const iocshFuncDef dbbFuncDef = {"dbb",1,dbbArgs, - "Add breakpoint to a lock set.\n"}; + "Set Breakpoint on a record\n" + "This command spawns one breakpoint continuation task per lockset," + " in which further record execution is run\n"}; static void dbbCallFunc(const iocshArgBuf *args) { dbb(args[0].sval);} /* dbd */ @@ -86,27 +88,36 @@ static void dbdCallFunc(const iocshArgBuf *args) { dbd(args[0].sval);} static const iocshArg dbcArg0 = { "record name",iocshArgStringRecord}; static const iocshArg * const dbcArgs[1] = {&dbcArg0}; static const iocshFuncDef dbcFuncDef = {"dbc",1,dbcArgs, - "Continue processing in a lock set.\n"}; + "Continue processing in a lockset until next breakpoint is found.\n"}; static void dbcCallFunc(const iocshArgBuf *args) { dbc(args[0].sval);} /* dbs */ static const iocshArg dbsArg0 = { "record name",iocshArgStringRecord}; static const iocshArg * const dbsArgs[1] = {&dbsArg0}; static const iocshFuncDef dbsFuncDef = {"dbs",1,dbsArgs, - "Step through record processing.\n"}; + "Step through record processing within a lockset.\n" + "If called without an argument, automatically steps with the last breakpoint.\n"}; static void dbsCallFunc(const iocshArgBuf *args) { dbs(args[0].sval);} /* dbstat */ static const iocshFuncDef dbstatFuncDef = {"dbstat",0,0, - "print list of stopped records, and breakpoints set in locksets.\n"}; + "Print list of suspended records, and breakpoints set in locksets.\n"}; static void dbstatCallFunc(const iocshArgBuf *args) { dbstat();} /* dbp */ static const iocshArg dbpArg0 = { "record name",iocshArgStringRecord}; static const iocshArg dbpArg1 = { "interest level",iocshArgInt}; static const iocshArg * const dbpArgs[2] = {&dbpArg0,&dbpArg1}; -static const iocshFuncDef dbpFuncDef = {"dbp",2,dbpArgs, - "print stopped record.\n"}; +static const iocshFuncDef dbpFuncDef = { + "dbp",2,dbpArgs, + "Print Fields of a currently suspended record by a breakpoint.\n" + "interest level 0 - Fields of interest to an Application developer and\n" + " that can be changed as a result of record processing.\n" + " 1 - Fields of interest to an Application developer and\n" + " that do not change during record processing.\n" + " 2 - Fields of major interest to a System developer.\n" + " 3 - Fields of minor interest to a System developer.\n" + " 4 - Internal record fields.\n"}; static void dbpCallFunc(const iocshArgBuf *args) { dbp(args[0].sval,args[1].ival);} @@ -114,14 +125,17 @@ static void dbpCallFunc(const iocshArgBuf *args) static const iocshArg dbapArg0 = { "record name",iocshArgStringRecord}; static const iocshArg * const dbapArgs[1] = {&dbapArg0}; static const iocshFuncDef dbapFuncDef = {"dbap",1,dbapArgs, - "toggle printing after processing a certain record.\n"}; + "Auto Print.\n" + "Toggle automatic printing after processing a record that has a breakpoint.\n"}; static void dbapCallFunc(const iocshArgBuf *args) { dbap(args[0].sval);} /* dbsr */ static const iocshArg dbsrArg0 = { "interest level",iocshArgInt}; static const iocshArg * const dbsrArgs[1] = {&dbsrArg0}; static const iocshFuncDef dbsrFuncDef = {"dbsr",1,dbsrArgs, - "Database Server Report.\n"}; + "Database Server Report.\n" + "Print current status of server and number of connected clients.\n" + "Level 0 prints summary information. Higher levels print more.\n"}; static void dbsrCallFunc(const iocshArgBuf *args) { dbsr(args[0].ival);} /* dbcar */ @@ -131,9 +145,9 @@ static const iocshArg * const dbcarArgs[2] = {&dbcarArg0,&dbcarArg1}; static const iocshFuncDef dbcarFuncDef = {"dbcar",2,dbcarArgs, "Database Channel Access Report.\n" "Shows status of Channel Access links (CA_LINK).\n" - "interest level 0 - Shows statistics for all links.\n" - " 1 - Shows info. of only disconnected links.\n" - " 2 - Shows info. for all links.\n"}; + " level 0 - Shows statistics for all links.\n" + " 1 - Shows info. of only disconnected links.\n" + " 2 - Shows info. for all links.\n"}; static void dbcarCallFunc(const iocshArgBuf *args) { dbcar(args[0].sval,args[1].ival); @@ -144,7 +158,8 @@ static const iocshArg dbjlrArg0 = { "record name",iocshArgStringRecord}; static const iocshArg dbjlrArg1 = { "level",iocshArgInt}; static const iocshArg * const dbjlrArgs[2] = {&dbjlrArg0,&dbjlrArg1}; static const iocshFuncDef dbjlrFuncDef = {"dbjlr",2,dbjlrArgs, - "Database JSON link Report.\n"}; + "Database JSON link Report.\n" + "List all JSON links in a record. If no record is specified, print for all\n"}; static void dbjlrCallFunc(const iocshArgBuf *args) { dbjlr(args[0].sval,args[1].ival); @@ -156,7 +171,9 @@ static const iocshArg dbelArg1 = { "level",iocshArgInt}; static const iocshArg * const dbelArgs[2] = {&dbelArg0,&dbelArg1}; static const iocshFuncDef dbelFuncDef = {"dbel",2,dbelArgs, "Database event list.\n" - "Show information on dbEvent subscriptions.\n"}; + "Show information on dbEvent subscriptions.\n" + "Higher level shows more information (0 - 4)\n" + "Example: dbel aitest 2\n"}; static void dbelCallFunc(const iocshArgBuf *args) { dbel(args[0].sval, args[1].ival); @@ -166,7 +183,10 @@ static void dbelCallFunc(const iocshArgBuf *args) static const iocshArg dbaArg0 = { "record name",iocshArgStringRecord}; static const iocshArg * const dbaArgs[1] = {&dbaArg0}; static const iocshFuncDef dbaFuncDef = {"dba",1,dbaArgs, - "dbAddr info.\n"}; + "Database Address.\n" + "Print information in the dbAddr structure for a specific field.\n" + "If no field is specified, VAL is assumed.\n\n" + "Example: dba(\"aitest.HIGH\")\n"}; static void dbaCallFunc(const iocshArgBuf *args) { dba(args[0].sval);} /* dbl */ @@ -176,7 +196,12 @@ static const iocshArg * const dblArgs[] = {&dblArg0,&dblArg1}; static const iocshFuncDef dblFuncDef = {"dbl",2,dblArgs, "Database list.\n" "List record/field names.\n" - "With no arguments, lists all record names.\n"}; + "With no arguments, lists all record names.\n" + "If record type is given, then only the names of records maching the type are printed\n" + "If a field list is given, then their values are also printed\n\n" + "Example: dbl(\"\")\n" + " dbl(\"ai\")\n" + " dbl(\"ai\",\"HIGH LOW VAL PREC\")\n"}; static void dblCallFunc(const iocshArgBuf *args) { dbl(args[0].sval,args[1].sval); @@ -186,28 +211,35 @@ static void dblCallFunc(const iocshArgBuf *args) static const iocshArg dbnrArg0 = { "verbose",iocshArgInt}; static const iocshArg * const dbnrArgs[1] = {&dbnrArg0}; static const iocshFuncDef dbnrFuncDef = {"dbnr",1,dbnrArgs, - "List stats on record alias()s.\n"}; + "List number of records and aliases by type.\n" + "If verbose, list all record types regardless of being instanced\n"}; static void dbnrCallFunc(const iocshArgBuf *args) { dbnr(args[0].ival);} /* dbli */ static const iocshArg dbliArg0 = { "pattern",iocshArgString}; static const iocshArg * const dbliArgs[1] = {&dbliArg0}; static const iocshFuncDef dbliFuncDef = {"dbli",1,dbliArgs, - "List info() tags with names matching pattern.\n"}; + "List info() tags with names matching pattern.\n\n" + "Example: dbli(\"autosave*\")\n"}; static void dbliCallFunc(const iocshArgBuf *args) { dbli(args[0].sval);} /* dbla */ static const iocshArg dblaArg0 = { "pattern",iocshArgStringRecord}; static const iocshArg * const dblaArgs[1] = {&dblaArg0}; static const iocshFuncDef dblaFuncDef = {"dbla",1,dblaArgs, - "List record alias()s by alias name pattern.\n"}; + "List record alias()s by alias name pattern.\n\n" + "Example: dbla(\"alia*\")\n"}; static void dblaCallFunc(const iocshArgBuf *args) { dbla(args[0].sval);} /* dbgrep */ static const iocshArg dbgrepArg0 = { "pattern",iocshArgStringRecord}; static const iocshArg * const dbgrepArgs[1] = {&dbgrepArg0}; static const iocshFuncDef dbgrepFuncDef = {"dbgrep",1,dbgrepArgs, - "List record names matching pattern.\n"}; + "List record names matching pattern.\n" + "The pattern can contain any characters that are legal in record names as well as:\n" + " - \"?\", which matches 0 or one characters.\n" + " - \"*\", which matches 0 or more characters.\n\n" + "Example: dbgrep(\"*gpibAi*\")\n"}; static void dbgrepCallFunc(const iocshArgBuf *args) { dbgrep(args[0].sval);} /* dbgf */ @@ -215,7 +247,9 @@ static const iocshArg dbgfArg0 = { "record name",iocshArgStringRecord}; static const iocshArg * const dbgfArgs[1] = {&dbgfArg0}; static const iocshFuncDef dbgfFuncDef = {"dbgf",1,dbgfArgs, "Database Get Field.\n" - "Print current value of record field.\n"}; + "Print current value of record field.\n" + "If no field name is specified, VAL is assumed.\n\n" + "Example: dbgf(\"aitest.VAL\")\n"}; static void dbgfCallFunc(const iocshArgBuf *args) { dbgf(args[0].sval);} /* dbpf */ @@ -224,7 +258,8 @@ static const iocshArg dbpfArg1 = { "value",iocshArgString}; static const iocshArg * const dbpfArgs[2] = {&dbpfArg0,&dbpfArg1}; static const iocshFuncDef dbpfFuncDef = {"dbpf",2,dbpfArgs, "Database Put Field.\n" - "Change value of record field.\n"}; + "Change value of record field and read it back with dbgf.\n" + "If no field is specified, VAL is assumed\n"}; static void dbpfCallFunc(const iocshArgBuf *args) { dbpf(args[0].sval,args[1].sval);} @@ -232,9 +267,17 @@ static void dbpfCallFunc(const iocshArgBuf *args) static const iocshArg dbprArg0 = { "record name",iocshArgStringRecord}; static const iocshArg dbprArg1 = { "interest level",iocshArgInt}; static const iocshArg * const dbprArgs[2] = {&dbprArg0,&dbprArg1}; -static const iocshFuncDef dbprFuncDef = {"dbpr",2,dbprArgs, - "Database Print Record.\n" - "Print values of record fields.\n"}; +static const iocshFuncDef dbprFuncDef = { + "dbpr",2,dbprArgs, + "Database Print Record.\n" + "Print values of record fields for given interest level.\n" + "interest level 0 - Fields that can be changed as a result of record processing.\n" + " 1 - Fields that do not change during record processing.\n" + " 2 - Fields of major interest to a System developer.\n" + " 3 - Fields of minor interest to a System developer.\n" + " 4 - Internal record fields.\n\n" + "Example: dbpr aitest 3\n" +}; static void dbprCallFunc(const iocshArgBuf *args) { dbpr(args[0].sval,args[1].ival);} @@ -250,7 +293,9 @@ static const iocshArg dbtgfArg0 = { "record name",iocshArgStringRecord}; static const iocshArg * const dbtgfArgs[1] = {&dbtgfArg0}; static const iocshFuncDef dbtgfFuncDef = {"dbtgf",1,dbtgfArgs, "Database Test Get Field.\n" - "Get field with different DBR_* types\n"}; + "Get and print the specified field with all possible DBR_* types\n" + "Example: dbtgf aitest\n" + "Example: dbtgf aitest.VAL\n"}; static void dbtgfCallFunc(const iocshArgBuf *args) { dbtgf(args[0].sval);} /* dbtpf */ @@ -258,7 +303,10 @@ static const iocshArg dbtpfArg0 = { "record name",iocshArgStringRecord}; static const iocshArg dbtpfArg1 = { "value",iocshArgString}; static const iocshArg * const dbtpfArgs[2] = {&dbtpfArg0,&dbtpfArg1}; static const iocshFuncDef dbtpfFuncDef = {"dbtpf",2,dbtpfArgs, - "Database Test Put Field.\n"}; + "Database Test Put Field.\n" + "Put the given value to the given PV, then get the value\n" + "for all possible DBR_* types\n\n" + "Example: dbtpf aitest 5.0\n"}; static void dbtpfCallFunc(const iocshArgBuf *args) { dbtpf(args[0].sval,args[1].sval);} @@ -273,14 +321,21 @@ static void dbiorCallFunc(const iocshArgBuf *args) /* dbhcr */ static const iocshFuncDef dbhcrFuncDef = {"dbhcr",0,0, - "Database Report Device Config.\n"}; + "Database Hardware Configuration Report.\n" + "Produce a report of all hardware links.\n" + "The produced report will probably not be in the sort order desired.\n" + "Use the UNIX sort command:\n" + "dbhcr > report\n" + "sort report > report.sorted\n"}; static void dbhcrCallFunc(const iocshArgBuf *args) { dbhcr();} /* gft */ static const iocshArg gftArg0 = { "record name",iocshArgStringRecord}; static const iocshArg * const gftArgs[1] = {&gftArg0}; static const iocshFuncDef gftFuncDef = {"gft",1,gftArgs, - "Report dbChannel info and value.\n"}; + "Report dbChannel info and value.\n" + "Example: gft aitest\n" + "Example: gft aitest.VAL\n"}; static void gftCallFunc(const iocshArgBuf *args) { gft(args[0].sval);} /* pft */ @@ -288,7 +343,8 @@ static const iocshArg pftArg0 = { "record name",iocshArgStringRecord}; static const iocshArg pftArg1 = { "value",iocshArgString}; static const iocshArg * const pftArgs[2] = {&pftArg0,&pftArg1}; static const iocshFuncDef pftFuncDef = {"pft",2,pftArgs, - "dbChannel put value.\n"}; + "dbChannel put value.\n" + "Example: pft aitest 5.0\n"}; static void pftCallFunc(const iocshArgBuf *args) { pft(args[0].sval,args[1].sval);} @@ -297,9 +353,11 @@ static const iocshArg dbtpnArg0 = { "record name",iocshArgStringRecord}; static const iocshArg dbtpnArg1 = { "value",iocshArgString}; static const iocshArg * const dbtpnArgs[2] = {&dbtpnArg0,&dbtpnArg1}; static const iocshFuncDef dbtpnFuncDef = {"dbtpn",2,dbtpnArgs, - "Database Put Notify\n" + "Database Test Process Notify\n" "Without value, begin async. processing and get\n" - "With value, begin put, process, and get\n"}; + "With value, begin put, process, and get\n" + "Example: dbtpn aitest\n" + "Example: dbtpn aitest 5.0\n"}; static void dbtpnCallFunc(const iocshArgBuf *args) { dbtpn(args[0].sval,args[1].sval);} @@ -314,9 +372,8 @@ static const iocshArg dbPutAttrArg1 = { "attribute name",iocshArgString}; static const iocshArg dbPutAttrArg2 = { "value",iocshArgString}; static const iocshArg * const dbPutAttrArgs[] = {&dbPutAttrArg0, &dbPutAttrArg1, &dbPutAttrArg2}; -static const iocshFuncDef dbPutAttrFuncDef = - {"dbPutAttribute",3,dbPutAttrArgs, - "Set/Create record attribute.\n"}; +static const iocshFuncDef dbPutAttrFuncDef = {"dbPutAttribute",3,dbPutAttrArgs, + "Set/Create record attribute.\n"}; static void dbPutAttrCallFunc(const iocshArgBuf *args) { dbPutAttribute(args[0].sval,args[1].sval,args[2].sval);} @@ -325,7 +382,8 @@ static const iocshArg tpnArg0 = { "record name",iocshArgStringRecord}; static const iocshArg tpnArg1 = { "value",iocshArgString}; static const iocshArg * const tpnArgs[2] = {&tpnArg0,&tpnArg1}; static const iocshFuncDef tpnFuncDef = {"tpn",2,tpnArgs, - "Begin async. process and get.\n"}; + "Test Process Notify.\n\n" + "Example: tpn aitest 5.0\n"}; static void tpnCallFunc(const iocshArgBuf *args) { tpn(args[0].sval,args[1].sval);} @@ -334,16 +392,25 @@ static const iocshArg dblsrArg0 = { "record name",iocshArgStringRecord}; static const iocshArg dblsrArg1 = { "interest level",iocshArgInt}; static const iocshArg * const dblsrArgs[2] = {&dblsrArg0,&dblsrArg1}; static const iocshFuncDef dblsrFuncDef = {"dblsr",2,dblsrArgs, - "Database Lockset report.\n"}; + "Database Lockset report.\n" + "Generate a report showing the lock set to which each record belongs.\n" + "interest level 0 - Show lock set information only.\n" + " 1 - Show each record in the lock set.\n" + " 2 - Show each record and all database links in the lock set.\n\n" + "Example: dblsr aitest 2\n"}; static void dblsrCallFunc(const iocshArgBuf *args) { dblsr(args[0].sval,args[1].ival);} /* dbLockShowLocked */ static const iocshArg dbLockShowLockedArg0 = { "interest level",iocshArgInt}; static const iocshArg * const dbLockShowLockedArgs[1] = {&dbLockShowLockedArg0}; -static const iocshFuncDef dbLockShowLockedFuncDef = - {"dbLockShowLocked",1,dbLockShowLockedArgs, - "Show Locksets which are currently locked.\n"}; +static const iocshFuncDef dbLockShowLockedFuncDef = { + "dbLockShowLocked",1,dbLockShowLockedArgs, + "Show Locksets which are currently locked.\n" + "interest level argument is passed to epicsMutexShow to adjust reported\n" + "information.\n\n" + "Example: dbLockShowLocked 0\n" +}; static void dbLockShowLockedCallFunc(const iocshArgBuf *args) { dbLockShowLocked(args[0].ival);} @@ -351,10 +418,9 @@ static void dbLockShowLockedCallFunc(const iocshArgBuf *args) static const iocshArg scanOnceSetQueueSizeArg0 = { "size",iocshArgInt}; static const iocshArg * const scanOnceSetQueueSizeArgs[1] = {&scanOnceSetQueueSizeArg0}; -static const iocshFuncDef scanOnceSetQueueSizeFuncDef = - {"scanOnceSetQueueSize",1,scanOnceSetQueueSizeArgs, - "Change size of Scan once queue.\n" - "Must be called before iocInit().\n"}; +static const iocshFuncDef scanOnceSetQueueSizeFuncDef = {"scanOnceSetQueueSize",1,scanOnceSetQueueSizeArgs, + "Change size of Scan once queue.\n" + "Must be called before iocInit().\n"}; static void scanOnceSetQueueSizeCallFunc(const iocshArgBuf *args) { scanOnceSetQueueSize(args[0].ival); @@ -364,9 +430,8 @@ static void scanOnceSetQueueSizeCallFunc(const iocshArgBuf *args) static const iocshArg scanOnceQueueShowArg0 = { "reset",iocshArgInt}; static const iocshArg * const scanOnceQueueShowArgs[1] = {&scanOnceQueueShowArg0}; -static const iocshFuncDef scanOnceQueueShowFuncDef = - {"scanOnceQueueShow",1,scanOnceQueueShowArgs, - "Show details and statitics of scan once queue processing.\n"}; +static const iocshFuncDef scanOnceQueueShowFuncDef = {"scanOnceQueueShow",1,scanOnceQueueShowArgs, + "Show details and statitics of scan once queue processing.\n"}; static void scanOnceQueueShowCallFunc(const iocshArgBuf *args) { scanOnceQueueShow(args[0].ival); @@ -376,7 +441,8 @@ static void scanOnceQueueShowCallFunc(const iocshArgBuf *args) static const iocshArg scanpplArg0 = { "rate",iocshArgDouble}; static const iocshArg * const scanpplArgs[1] = {&scanpplArg0}; static const iocshFuncDef scanpplFuncDef = {"scanppl",1,scanpplArgs, - "print periodic scan lists.\n"}; + "Print info for records with periodic scan.\n" + "If rate == 0.0, all periods are shown.\n"}; static void scanpplCallFunc(const iocshArgBuf *args) { scanppl(args[0].dval);} @@ -408,10 +474,9 @@ static void scanpiolCallFunc(const iocshArgBuf *args) { scanpiol();} static const iocshArg callbackSetQueueSizeArg0 = { "bufsize",iocshArgInt}; static const iocshArg * const callbackSetQueueSizeArgs[1] = {&callbackSetQueueSizeArg0}; -static const iocshFuncDef callbackSetQueueSizeFuncDef = - {"callbackSetQueueSize",1,callbackSetQueueSizeArgs, - "Change depth of queue for callback workers.\n" - "Must be called before iocInit().\n"}; +static const iocshFuncDef callbackSetQueueSizeFuncDef = {"callbackSetQueueSize",1,callbackSetQueueSizeArgs, + "Change depth of queue for callback workers.\n" + "Must be called before iocInit().\n"}; static void callbackSetQueueSizeCallFunc(const iocshArgBuf *args) { callbackSetQueueSize(args[0].ival); @@ -421,9 +486,8 @@ static void callbackSetQueueSizeCallFunc(const iocshArgBuf *args) static const iocshArg callbackQueueShowArg0 = { "reset", iocshArgInt}; static const iocshArg * const callbackQueueShowArgs[1] = {&callbackQueueShowArg0}; -static const iocshFuncDef callbackQueueShowFuncDef = - {"callbackQueueShow",1,callbackQueueShowArgs, - "Show status of callback thread processing queue.\n"}; +static const iocshFuncDef callbackQueueShowFuncDef = {"callbackQueueShow",1,callbackQueueShowArgs, + "Show status of callback thread processing queue.\n"}; static void callbackQueueShowCallFunc(const iocshArgBuf *args) { callbackQueueShow(args[0].ival); @@ -434,11 +498,10 @@ static const iocshArg callbackParallelThreadsArg0 = { "no of threads", iocshArgI static const iocshArg callbackParallelThreadsArg1 = { "priority", iocshArgString}; static const iocshArg * const callbackParallelThreadsArgs[2] = {&callbackParallelThreadsArg0,&callbackParallelThreadsArg1}; -static const iocshFuncDef callbackParallelThreadsFuncDef = - {"callbackParallelThreads",2,callbackParallelThreadsArgs, - "Configure multiple workers for a given callback queue priority level.\n" - "priority may be omitted or \"*\" to act on all priorities\n" - "or one of LOW, MEDIUM, or HIGH.\n"}; +static const iocshFuncDef callbackParallelThreadsFuncDef = {"callbackParallelThreads",2,callbackParallelThreadsArgs, + "Configure multiple workers for a given callback queue priority level.\n" + "priority may be omitted or \"*\" to act on all priorities\n" + "or one of LOW, MEDIUM, or HIGH.\n"}; static void callbackParallelThreadsCallFunc(const iocshArgBuf *args) { callbackParallelThreads(args[0].ival, args[1].sval); @@ -447,8 +510,8 @@ static void callbackParallelThreadsCallFunc(const iocshArgBuf *args) /* dbStateCreate */ static const iocshArg dbStateArgName = { "name", iocshArgString }; static const iocshArg * const dbStateCreateArgs[] = { &dbStateArgName }; -static const iocshFuncDef dbStateCreateFuncDef = { "dbStateCreate", 1, dbStateCreateArgs, - "Allocate new state name for \"state\" filter.\n"}; +static const iocshFuncDef dbStateCreateFuncDef = {"dbStateCreate", 1, dbStateCreateArgs, + "Allocate new state name for \"state\" filter.\n"}; static void dbStateCreateCallFunc (const iocshArgBuf *args) { dbStateCreate(args[0].sval); @@ -456,8 +519,8 @@ static void dbStateCreateCallFunc (const iocshArgBuf *args) /* dbStateSet */ static const iocshArg * const dbStateSetArgs[] = { &dbStateArgName }; -static const iocshFuncDef dbStateSetFuncDef = { "dbStateSet", 1, dbStateSetArgs, - "Change state to set for \"state\" filter.\n"}; +static const iocshFuncDef dbStateSetFuncDef = {"dbStateSet", 1, dbStateSetArgs, + "Change state to set for \"state\" filter.\n"}; static void dbStateSetCallFunc (const iocshArgBuf *args) { dbStateId sid = dbStateFind(args[0].sval); @@ -468,8 +531,8 @@ static void dbStateSetCallFunc (const iocshArgBuf *args) /* dbStateClear */ static const iocshArg * const dbStateClearArgs[] = { &dbStateArgName }; -static const iocshFuncDef dbStateClearFuncDef = { "dbStateClear", 1, dbStateClearArgs, - "Change state to clear for \"state\" filter.\n" }; +static const iocshFuncDef dbStateClearFuncDef = {"dbStateClear", 1, dbStateClearArgs, + "Change state to clear for \"state\" filter.\n"}; static void dbStateClearCallFunc (const iocshArgBuf *args) { dbStateId sid = dbStateFind(args[0].sval); @@ -481,8 +544,8 @@ static void dbStateClearCallFunc (const iocshArgBuf *args) /* dbStateShow */ static const iocshArg dbStateShowArg1 = { "level", iocshArgInt }; static const iocshArg * const dbStateShowArgs[] = { &dbStateArgName, &dbStateShowArg1 }; -static const iocshFuncDef dbStateShowFuncDef = { "dbStateShow", 2, dbStateShowArgs, - "Show set/clear status of named state. (cf. \"state\" filter)\n" }; +static const iocshFuncDef dbStateShowFuncDef = {"dbStateShow", 2, dbStateShowArgs, + "Show set/clear status of named state. (cf. \"state\" filter)\n"}; static void dbStateShowCallFunc (const iocshArgBuf *args) { dbStateId sid = dbStateFind(args[0].sval); @@ -494,8 +557,8 @@ static void dbStateShowCallFunc (const iocshArgBuf *args) /* dbStateShowAll */ static const iocshArg dbStateShowAllArg0 = { "level", iocshArgInt }; static const iocshArg * const dbStateShowAllArgs[] = { &dbStateShowAllArg0 }; -static const iocshFuncDef dbStateShowAllFuncDef = { "dbStateShowAll", 1, dbStateShowAllArgs, - "Show set/clear status of all named states. (cf. \"state\" filter)\n" }; +static const iocshFuncDef dbStateShowAllFuncDef = {"dbStateShowAll", 1, dbStateShowAllArgs, + "Show set/clear status of all named states. (cf. \"state\" filter)\n"}; static void dbStateShowAllCallFunc (const iocshArgBuf *args) { dbStateShowAll(args[0].ival); diff --git a/modules/database/src/ioc/dbStatic/dbStaticIocRegister.c b/modules/database/src/ioc/dbStatic/dbStaticIocRegister.c index 4ff7e2e66..91f1ed144 100644 --- a/modules/database/src/ioc/dbStatic/dbStaticIocRegister.c +++ b/modules/database/src/ioc/dbStatic/dbStaticIocRegister.c @@ -24,7 +24,8 @@ static const iocshArg argRecType = { "recordTypeName", iocshArgString}; /* dbDumpPath */ static const iocshArg * const dbDumpPathArgs[] = {&argPdbbase}; static const iocshFuncDef dbDumpPathFuncDef = {"dbDumpPath",1,dbDumpPathArgs, - "Dump .db/.dbd file search path.\n"}; + "Dump .db/.dbd file search path.\n" + "Example: dbDumpPath pdbbase\n"}; static void dbDumpPathCallFunc(const iocshArgBuf *args) { dbDumpPath(*iocshPpdbbase); @@ -99,7 +100,8 @@ static void dbDumpDeviceCallFunc(const iocshArgBuf *args) static const iocshArg * const dbDumpDriverArgs[] = { &argPdbbase}; static const iocshFuncDef dbDumpDriverFuncDef = {"dbDumpDriver",1,dbDumpDriverArgs, "Dump device support information.\n" - "Example: dbDumpDriver pdbbase\n"}; + "Example: dbDumpDriver pdbbase\n" + "If the last argument(s) are missing, dump all device support information.\n",}; static void dbDumpDriverCallFunc(const iocshArgBuf *args) { dbDumpDriver(*iocshPpdbbase); @@ -124,7 +126,8 @@ static const iocshArg * const dbDumpRegistrarArgs[] = { &argPdbbase}; static const iocshFuncDef dbDumpRegistrarFuncDef = {"dbDumpRegistrar",1,dbDumpRegistrarArgs, "Dump list of registered functions including ones for subroutine records,\n" "and ones that can be invoked from iocsh.\n" - "Example: dbDumpRegistrar pdbbase\n"}; + "Example: dbDumpRegistrar pdbbase\n" + "If last argument(s) are missing, dump all registered functions\n"}; static void dbDumpRegistrarCallFunc(const iocshArgBuf *args) { dbDumpRegistrar(*iocshPpdbbase); @@ -134,7 +137,8 @@ static void dbDumpRegistrarCallFunc(const iocshArgBuf *args) static const iocshArg * const dbDumpFunctionArgs[] = { &argPdbbase}; static const iocshFuncDef dbDumpFunctionFuncDef = {"dbDumpFunction",1,dbDumpFunctionArgs, "Dump list of registered subroutine functions.\n" - "Example: dbDumpFunction pddbase\n"}; + "Example: dbDumpFunction pddbase\n" + "If last argument(s) are missing, dump all registered subroutine functions\n"}; static void dbDumpFunctionCallFunc(const iocshArgBuf *args) { dbDumpFunction(*iocshPpdbbase); @@ -144,7 +148,8 @@ static void dbDumpFunctionCallFunc(const iocshArgBuf *args) static const iocshArg * const dbDumpVariableArgs[] = { &argPdbbase}; static const iocshFuncDef dbDumpVariableFuncDef = {"dbDumpVariable",1,dbDumpVariableArgs, "Dump list of variables used in the database.\n" - "Example: dbDumpVariable pddbase\n"}; + "Example: dbDumpVariable pddbase\n" + "If last argument(s) are missing, dump all variables.\n"}; static void dbDumpVariableCallFunc(const iocshArgBuf *args) { dbDumpVariable(*iocshPpdbbase); @@ -159,7 +164,8 @@ static const iocshFuncDef dbDumpBreaktableFuncDef = { 2, dbDumpBreaktableArgs, "Dump the given break table\n" - "Example: dbDumpBreaktable pdbbase typeKdegC\n", + "Example: dbDumpBreaktable pdbbase typeKdegC\n" + "If last argument(s) are missing, dump all breakpoint tables.\n", }; static void dbDumpBreaktableCallFunc(const iocshArgBuf *args) { @@ -176,7 +182,8 @@ static const iocshFuncDef dbPvdDumpFuncDef = { dbPvdDumpArgs, "Dump the various buckets of the process variable directory.\n" "If verbose is greater than 0, also print the process variables in each bucket.\n" - "Example: dbPvdDump pdbbase 1\n", + "Example: dbPvdDump pdbbase 1\n" + "If the last argument(s) are missing, dump all buckets as though verbose is 0.\n", }; static void dbPvdDumpCallFunc(const iocshArgBuf *args) { diff --git a/modules/database/src/ioc/misc/miscIocRegister.c b/modules/database/src/ioc/misc/miscIocRegister.c index 1b472114a..920104520 100644 --- a/modules/database/src/ioc/misc/miscIocRegister.c +++ b/modules/database/src/ioc/misc/miscIocRegister.c @@ -38,7 +38,7 @@ static void iocBuildCallFunc(const iocshArgBuf *args) /* iocRun */ static const iocshFuncDef iocRunFuncDef = {"iocRun",0,NULL, "Bring the IOC out of its initial quiescent state to the running state.\n" - "See more: iocBuild, iocPause"}; + "See more: iocBuild, iocPause\n"}; static void iocRunCallFunc(const iocshArgBuf *args) { iocshSetError(iocRun()); @@ -47,7 +47,7 @@ static void iocRunCallFunc(const iocshArgBuf *args) /* iocPause */ static const iocshFuncDef iocPauseFuncDef = {"iocPause",0,NULL, "Brings a running IOC to a quiescent state with all record processing frozen.\n" - "See more: iocBuild, iocRub, iocInit"}; + "See more: iocBuild, iocRub, iocInit\n"}; static void iocPauseCallFunc(const iocshArgBuf *args) { iocshSetError(iocPause()); diff --git a/modules/libcom/src/iocsh/iocsh.cpp b/modules/libcom/src/iocsh/iocsh.cpp index 31703560f..4667a857d 100644 --- a/modules/libcom/src/iocsh/iocsh.cpp +++ b/modules/libcom/src/iocsh/iocsh.cpp @@ -1451,7 +1451,7 @@ static const iocshFuncDef onFuncDef = {"on", 1, onArgs, " continue (default) - Ignores error and continue with next commands.\n" " break - Return to caller without executing futher commands.\n" " halt - Suspend process.\n" - " wait - stall process for [value] seconds, the continue.\n"}; + " wait - stall process for [value] seconds, then continue.\n"}; static void onCallFunc(const iocshArgBuf *args) { iocshContext *context = (iocshContext *) epicsThreadPrivateGet(iocshContextId); diff --git a/modules/libcom/src/iocsh/libComRegister.c b/modules/libcom/src/iocsh/libComRegister.c index 079bdc7ac..f5469396c 100644 --- a/modules/libcom/src/iocsh/libComRegister.c +++ b/modules/libcom/src/iocsh/libComRegister.c @@ -191,7 +191,9 @@ static const iocshArg * const epicsEnvShowArgs[1] = {&epicsEnvShowArg0}; static const iocshFuncDef epicsEnvShowFuncDef = {"epicsEnvShow",1,epicsEnvShowArgs, "Show environment variables on your system\n" " (default) - show all environment variables\n" - " name - show value of specific environment variable\n"}; + " name - show value of specific environment variable\n" + "Example: epicsEnvShow\n" + "Example: epicsEnvShow PATH"}; static void epicsEnvShowCallFunc(const iocshArgBuf *args) { epicsEnvShow (args[0].sval); @@ -258,10 +260,11 @@ static void eltcCallFunc(const iocshArgBuf *args) /* errlogInit */ static const iocshArg errlogInitArg0 = { "bufSize",iocshArgInt}; static const iocshArg * const errlogInitArgs[1] = {&errlogInitArg0}; -static const iocshFuncDef errlogInitFuncDef = - {"errlogInit",1,errlogInitArgs, - "Initialize error log client buffer size\n" - " bufSize - size of circular buffer (default = 1280 bytes)\n"}; +static const iocshFuncDef errlogInitFuncDef = { + "errlogInit",1,errlogInitArgs, + "Initialize error log client buffer size\n" + " bufSize - size of circular buffer (default = 1280 bytes)\n" +}; static void errlogInitCallFunc(const iocshArgBuf *args) { errlogInit(args[0].ival); @@ -272,11 +275,12 @@ static const iocshArg errlogInit2Arg0 = { "bufSize",iocshArgInt}; static const iocshArg errlogInit2Arg1 = { "maxMsgSize",iocshArgInt}; static const iocshArg * const errlogInit2Args[] = {&errlogInit2Arg0, &errlogInit2Arg1}; -static const iocshFuncDef errlogInit2FuncDef = - {"errlogInit2", 2, errlogInit2Args, - "Initialize error log client buffer size and maximum message size\n" - " bufSize - size of circular buffer (default = 1280 bytes)\n" - " maxMsgSize - maximum size of error message (default = 256 bytes)\n"}; +static const iocshFuncDef errlogInit2FuncDef = { + "errlogInit2", 2, errlogInit2Args, + "Initialize error log client buffer size and maximum message size\n" + " bufSize - size of circular buffer (default = 1280 bytes)\n" + " maxMsgSize - maximum size of error message (default = 256 bytes)\n" +}; static void errlogInit2CallFunc(const iocshArgBuf *args) { errlogInit2(args[0].ival, args[1].ival); @@ -311,9 +315,8 @@ static void iocLogPrefixCallFunc(const iocshArgBuf *args) /* epicsThreadShowAll */ static const iocshArg epicsThreadShowAllArg0 = { "level",iocshArgInt}; static const iocshArg * const epicsThreadShowAllArgs[1] = {&epicsThreadShowAllArg0}; -static const iocshFuncDef epicsThreadShowAllFuncDef = - {"epicsThreadShowAll",1,epicsThreadShowAllArgs, - "Display info about all threads\n"}; +static const iocshFuncDef epicsThreadShowAllFuncDef = {"epicsThreadShowAll",1,epicsThreadShowAllArgs, + "Display info about all threads\n"}; static void epicsThreadShowAllCallFunc(const iocshArgBuf *args) { epicsThreadShowAll(args[0].ival); @@ -368,9 +371,8 @@ static void threadCallFunc(const iocshArgBuf *args) /* taskwdShow */ static const iocshArg taskwdShowArg0 = { "level",iocshArgInt}; static const iocshArg * const taskwdShowArgs[1] = {&taskwdShowArg0}; -static const iocshFuncDef taskwdShowFuncDef = - {"taskwdShow",1,taskwdShowArgs, - "Show number of tasks and monitors registered\n"}; +static const iocshFuncDef taskwdShowFuncDef = {"taskwdShow",1,taskwdShowArgs, + "Show number of tasks and monitors registered\n"}; static void taskwdShowCallFunc(const iocshArgBuf *args) { taskwdShow(args[0].ival); @@ -381,11 +383,12 @@ static const iocshArg epicsMutexShowAllArg0 = { "onlyLocked",iocshArgInt}; static const iocshArg epicsMutexShowAllArg1 = { "level",iocshArgInt}; static const iocshArg * const epicsMutexShowAllArgs[2] = {&epicsMutexShowAllArg0,&epicsMutexShowAllArg1}; -static const iocshFuncDef epicsMutexShowAllFuncDef = - {"epicsMutexShowAll",2,epicsMutexShowAllArgs, - "Display information about all epicsMutex semaphores\n" - " onlyLocked - non-zero to show only locked semaphores\n" - " level - desired information level to report\n"}; +static const iocshFuncDef epicsMutexShowAllFuncDef = { + "epicsMutexShowAll",2,epicsMutexShowAllArgs, + "Display information about all epicsMutex semaphores\n" + " onlyLocked - non-zero to show only locked semaphores\n" + " level - desired information level to report\n" +}; static void epicsMutexShowAllCallFunc(const iocshArgBuf *args) { epicsMutexShowAll(args[0].ival,args[1].ival); @@ -394,9 +397,8 @@ static void epicsMutexShowAllCallFunc(const iocshArgBuf *args) /* epicsThreadSleep */ static const iocshArg epicsThreadSleepArg0 = { "seconds",iocshArgDouble}; static const iocshArg * const epicsThreadSleepArgs[1] = {&epicsThreadSleepArg0}; -static const iocshFuncDef epicsThreadSleepFuncDef = - {"epicsThreadSleep",1,epicsThreadSleepArgs, - "Pause execution of IOC shell for seconds\n"}; +static const iocshFuncDef epicsThreadSleepFuncDef = {"epicsThreadSleep",1,epicsThreadSleepArgs, + "Pause execution of IOC shell for seconds\n"}; static void epicsThreadSleepCallFunc(const iocshArgBuf *args) { epicsThreadSleep(args[0].dval); @@ -451,18 +453,18 @@ static void epicsThreadResumeCallFunc(const iocshArgBuf *args) static const iocshArg generalTimeReportArg0 = { "interest_level", iocshArgInt}; static const iocshArg * const generalTimeReportArgs[1] = { &generalTimeReportArg0 }; static const iocshFuncDef generalTimeReportFuncDef = {"generalTimeReport",1,generalTimeReportArgs, - "Display time providers and their priority levels" - " for current and event times\n"}; + "Display time providers information for given interest level.\n" + "interest level 0 - List providers and their priorities.\n" + " 1 - Additionally show current time obtained from each provider.\n"}; static void generalTimeReportCallFunc(const iocshArgBuf *args) { generalTimeReport(args[0].ival); } /* installLastResortEventProvider */ -static const iocshFuncDef installLastResortEventProviderFuncDef = {"installLastResortEventProvider", 0, NULL, - "Installs the optional Last Resort event provider" - " at priority 999,\nwhich returns the current time" - " for every event number\n"}; +static const iocshFuncDef installLastResortEventProviderFuncDef = {"installLastResortEventProvider",0,NULL, + "Installs the optional Last Resort event provider at priority 999,\n" + "which returns the current time for every event number\n"}; static void installLastResortEventProviderCallFunc(const iocshArgBuf *args) { installLastResortEventProvider();