Merge 7.0 commit 'ca9c95' into PSI-7.0
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -506,62 +506,62 @@ long dbtgf(const char *pname)
|
||||
ret_options=0;
|
||||
|
||||
dbr_type = DBR_STRING;
|
||||
no_elements = MIN(addr.no_elements,((sizeof(buffer))/MAX_STRING_SIZE));
|
||||
no_elements = MIN(addr.no_elements,(sizeof(buffer)/MAX_STRING_SIZE));
|
||||
status = dbGetField(&addr,dbr_type,pbuffer,&ret_options,&no_elements,NULL);
|
||||
printBuffer(status,dbr_type,pbuffer,0L,0L,no_elements,pMsgBuff,tab_size);
|
||||
|
||||
dbr_type = DBR_CHAR;
|
||||
no_elements = MIN(addr.no_elements,((sizeof(buffer))/sizeof(epicsInt8)));
|
||||
no_elements = MIN(addr.no_elements,(sizeof(buffer)/(sizeof(epicsInt8))));
|
||||
status = dbGetField(&addr,dbr_type,pbuffer,&ret_options,&no_elements,NULL);
|
||||
printBuffer(status,dbr_type,pbuffer,0L,0L,no_elements,pMsgBuff,tab_size);
|
||||
|
||||
dbr_type = DBR_UCHAR;
|
||||
no_elements = MIN(addr.no_elements,((sizeof(buffer))/sizeof(epicsUInt8)));
|
||||
no_elements = MIN(addr.no_elements,(sizeof(buffer)/(sizeof(epicsUInt8))));
|
||||
status = dbGetField(&addr,dbr_type,pbuffer,&ret_options,&no_elements,NULL);
|
||||
printBuffer(status,dbr_type,pbuffer,0L,0L,no_elements,pMsgBuff,tab_size);
|
||||
|
||||
dbr_type = DBR_SHORT;
|
||||
no_elements = MIN(addr.no_elements,((sizeof(buffer))/sizeof(epicsInt16)));
|
||||
no_elements = MIN(addr.no_elements,(sizeof(buffer)/(sizeof(epicsInt16))));
|
||||
status = dbGetField(&addr,dbr_type,pbuffer,&ret_options,&no_elements,NULL);
|
||||
printBuffer(status,dbr_type,pbuffer,0L,0L,no_elements,pMsgBuff,tab_size);
|
||||
|
||||
dbr_type = DBR_USHORT;
|
||||
no_elements = MIN(addr.no_elements,((sizeof(buffer))/sizeof(epicsUInt16)));
|
||||
no_elements = MIN(addr.no_elements,(sizeof(buffer)/(sizeof(epicsUInt16))));
|
||||
status = dbGetField(&addr,dbr_type,pbuffer,&ret_options,&no_elements,NULL);
|
||||
printBuffer(status,dbr_type,pbuffer,0L,0L,no_elements,pMsgBuff,tab_size);
|
||||
|
||||
dbr_type = DBR_LONG;
|
||||
no_elements = MIN(addr.no_elements,((sizeof(buffer))/sizeof(epicsInt32)));
|
||||
no_elements = MIN(addr.no_elements,(sizeof(buffer)/(sizeof(epicsInt32))));
|
||||
status = dbGetField(&addr,dbr_type,pbuffer,&ret_options,&no_elements,NULL);
|
||||
printBuffer(status,dbr_type,pbuffer,0L,0L,no_elements,pMsgBuff,tab_size);
|
||||
|
||||
dbr_type = DBR_ULONG;
|
||||
no_elements = MIN(addr.no_elements,((sizeof(buffer))/sizeof(epicsUInt32)));
|
||||
no_elements = MIN(addr.no_elements,(sizeof(buffer)/(sizeof(epicsUInt32))));
|
||||
status = dbGetField(&addr,dbr_type,pbuffer,&ret_options,&no_elements,NULL);
|
||||
printBuffer(status,dbr_type,pbuffer,0L,0L,no_elements,pMsgBuff,tab_size);
|
||||
|
||||
dbr_type = DBR_INT64;
|
||||
no_elements = MIN(addr.no_elements,((sizeof(buffer))/sizeof(epicsInt64)));
|
||||
no_elements = MIN(addr.no_elements,(sizeof(buffer)/(sizeof(epicsInt64))));
|
||||
status = dbGetField(&addr,dbr_type,pbuffer,&ret_options,&no_elements,NULL);
|
||||
printBuffer(status,dbr_type,pbuffer,0L,0L,no_elements,pMsgBuff,tab_size);
|
||||
|
||||
dbr_type = DBR_UINT64;
|
||||
no_elements = MIN(addr.no_elements,((sizeof(buffer))/sizeof(epicsUInt64)));
|
||||
no_elements = MIN(addr.no_elements,(sizeof(buffer)/(sizeof(epicsUInt64))));
|
||||
status = dbGetField(&addr,dbr_type,pbuffer,&ret_options,&no_elements,NULL);
|
||||
printBuffer(status,dbr_type,pbuffer,0L,0L,no_elements,pMsgBuff,tab_size);
|
||||
|
||||
dbr_type = DBR_FLOAT;
|
||||
no_elements = MIN(addr.no_elements,((sizeof(buffer))/sizeof(epicsFloat32)));
|
||||
no_elements = MIN(addr.no_elements,(sizeof(buffer)/(sizeof(epicsFloat32))));
|
||||
status = dbGetField(&addr,dbr_type,pbuffer,&ret_options,&no_elements,NULL);
|
||||
printBuffer(status,dbr_type,pbuffer,0L,0L,no_elements,pMsgBuff,tab_size);
|
||||
|
||||
dbr_type = DBR_DOUBLE;
|
||||
no_elements = MIN(addr.no_elements,((sizeof(buffer))/sizeof(epicsFloat64)));
|
||||
no_elements = MIN(addr.no_elements,(sizeof(buffer)/(sizeof(epicsFloat64))));
|
||||
status = dbGetField(&addr,dbr_type,pbuffer,&ret_options,&no_elements,NULL);
|
||||
printBuffer(status,dbr_type,pbuffer,0L,0L,no_elements,pMsgBuff,tab_size);
|
||||
|
||||
dbr_type = DBR_ENUM;
|
||||
no_elements = MIN(addr.no_elements,((sizeof(buffer))/sizeof(epicsEnum16)));
|
||||
no_elements = MIN(addr.no_elements,(sizeof(buffer)/(sizeof(epicsEnum16))));
|
||||
status = dbGetField(&addr,dbr_type,pbuffer,&ret_options,&no_elements,NULL);
|
||||
printBuffer(status,dbr_type,pbuffer,0L,0L,no_elements,pMsgBuff,tab_size);
|
||||
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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());
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#include "freeList.h"
|
||||
#include "caeventmask.h"
|
||||
#include "db_field_log.h"
|
||||
#include "chfPlugin.h"
|
||||
#include "epicsExit.h"
|
||||
@@ -60,7 +61,7 @@ static db_field_log* filter(void* pvt, dbChannel *chan, db_field_log *pfl) {
|
||||
myStruct *my = (myStruct*) pvt;
|
||||
epicsInt32 i = my->i;
|
||||
|
||||
if (pfl->ctx == dbfl_context_read)
|
||||
if (pfl->ctx == dbfl_context_read || (pfl->mask & DBE_PROPERTY))
|
||||
return pfl;
|
||||
|
||||
if (i++ == 0)
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#include "freeList.h"
|
||||
#include "caeventmask.h"
|
||||
#include "db_field_log.h"
|
||||
#include "chfPlugin.h"
|
||||
#include "dbState.h"
|
||||
@@ -94,7 +95,7 @@ static db_field_log* filter(void* pvt, dbChannel *chan, db_field_log *pfl) {
|
||||
myStruct *my = (myStruct*) pvt;
|
||||
int actstate;
|
||||
|
||||
if (pfl->ctx == dbfl_context_read)
|
||||
if (pfl->ctx == dbfl_context_read || (pfl->mask & DBE_PROPERTY))
|
||||
return pfl;
|
||||
|
||||
actstate = dbStateGet(my->id);
|
||||
|
||||
@@ -36,7 +36,7 @@ The desired output needs to be in engineering units.
|
||||
|
||||
The first field that determines where the desired output originates is the
|
||||
output mode select (OMSL) field, which can have two possible values:
|
||||
C<losed_loop> or C<supervisory>. If C<supervisory> is specified, the value
|
||||
C<closed_loop> or C<supervisory>. If C<supervisory> is specified, the value
|
||||
in the VAL field can be set externally via dbPuts at run-time. If
|
||||
C<closed_loop> is specified, the VAL field's value is obtained from the
|
||||
address specified in the Desired Output Link (DOL) field which can be a
|
||||
|
||||
@@ -57,6 +57,14 @@
|
||||
else \
|
||||
flags |= F_BADLNK
|
||||
|
||||
#ifdef __GNUC__
|
||||
# pragma GCC diagnostic push
|
||||
# pragma GCC diagnostic ignored "-Wformat-security"
|
||||
/* Intentionally passing non-const format string to epicsSnprintf() below.
|
||||
* Older GCC does not allow pragma GCC within function body.
|
||||
*/
|
||||
#endif
|
||||
|
||||
static void doPrintf(printfRecord *prec)
|
||||
{
|
||||
const char *pfmt = prec->fmt;
|
||||
@@ -314,6 +322,9 @@ static void doPrintf(printfRecord *prec)
|
||||
prec->len = pval - prec->val;
|
||||
}
|
||||
|
||||
#ifdef __GNUC__
|
||||
# pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
static long init_record(struct dbCommon *pcommon, int pass)
|
||||
{
|
||||
|
||||
@@ -37,7 +37,7 @@ int epicsNtpGetTime(char *ntpIp, struct timespec *now)
|
||||
sockfd = socket( AF_INET, SOCK_DGRAM, IPPROTO_UDP ); // Create a UDP socket.
|
||||
|
||||
if ( sockfd < 0 ) {
|
||||
perror( "epicsNtpGetTime" );
|
||||
perror( "epicsNtpGetTime creating socket" );
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -51,24 +51,29 @@ int epicsNtpGetTime(char *ntpIp, struct timespec *now)
|
||||
|
||||
// Call up the server using its IP address and port number.
|
||||
if ( connect( sockfd, ( struct sockaddr * ) &serv_addr, sizeof( serv_addr) ) < 0 ) {
|
||||
perror( "epicsNtpGetTime" );
|
||||
perror( "epicsNtpGetTime connecting socket" );
|
||||
close( sockfd );
|
||||
return -1;
|
||||
}
|
||||
|
||||
// Send it the NTP packet it wants. If n == -1, it failed.
|
||||
n = write( sockfd, ( char* ) &packet, sizeof( ntp_packet ) );
|
||||
if ( n < 0 ) {
|
||||
perror( "epicsNtpGetTime" );
|
||||
perror( "epicsNtpGetTime sending NTP request" );
|
||||
close( sockfd );
|
||||
return -1;
|
||||
}
|
||||
|
||||
// Wait and receive the packet back from the server. If n == -1, it failed.
|
||||
// Wait and receive the packet back from the server. If n == -1, it failed.
|
||||
n = read( sockfd, ( char* ) &packet, sizeof( ntp_packet ) );
|
||||
if ( n < 0 ) {
|
||||
perror( "epicsNtpGetTime" );
|
||||
perror( "epicsNtpGetTime reading NTP reply" );
|
||||
close( sockfd );
|
||||
return -1;
|
||||
}
|
||||
|
||||
close( sockfd );
|
||||
|
||||
// These two fields contain the time-stamp seconds as the packet left the NTP server.
|
||||
// The number of seconds correspond to the seconds passed since 1900.
|
||||
// ntohl() converts the bit/byte order from the network's to host's "endianness".
|
||||
|
||||
@@ -359,7 +359,6 @@ void epicsStdCall asPutMemberPvt(ASMEMBERPVT asMemberPvt,void *userPvt)
|
||||
if(!asActive) return;
|
||||
if(!pasgmember) return;
|
||||
pasgmember->userPvt = userPvt;
|
||||
return;
|
||||
}
|
||||
|
||||
long epicsStdCall asAddClient(ASCLIENTPVT *pasClientPvt,ASMEMBERPVT asMemberPvt,
|
||||
|
||||
@@ -25,8 +25,8 @@
|
||||
|
||||
namespace {
|
||||
|
||||
static epicsThreadOnceId epicsSigletonOnceFlag ( EPICS_THREAD_ONCE_INIT );
|
||||
static epicsMutex * pEPICSSigletonMutex = 0;
|
||||
epicsThreadOnceId epicsSigletonOnceFlag ( EPICS_THREAD_ONCE_INIT );
|
||||
epicsMutex * pEPICSSigletonMutex = 0;
|
||||
|
||||
extern "C" void SingletonMutexOnce ( void * /* pParm */ )
|
||||
{
|
||||
|
||||
@@ -34,8 +34,6 @@ void ellAdd (ELLLIST *pList, ELLNODE *pNode)
|
||||
|
||||
pList->node.previous = pNode;
|
||||
pList->count++;
|
||||
|
||||
return;
|
||||
}
|
||||
/****************************************************************************
|
||||
*
|
||||
@@ -65,8 +63,6 @@ void ellConcat (ELLLIST *pDstList, ELLLIST *pAddList)
|
||||
pAddList->count = 0;
|
||||
pAddList->node.next = NULL;
|
||||
pAddList->node.previous = NULL;
|
||||
|
||||
return;
|
||||
}
|
||||
/****************************************************************************
|
||||
*
|
||||
@@ -86,8 +82,6 @@ void ellDelete (ELLLIST *pList, ELLNODE *pNode)
|
||||
pNode->previous->next = pNode->next;
|
||||
|
||||
pList->count--;
|
||||
|
||||
return;
|
||||
}
|
||||
/****************************************************************************
|
||||
*
|
||||
@@ -136,8 +130,6 @@ void ellExtract (ELLLIST *pSrcList, ELLNODE *pStartNode, ELLNODE *pEndNode, ELLL
|
||||
}
|
||||
pSrcList->count -= count;
|
||||
pDstList->count += count;
|
||||
|
||||
return;
|
||||
}
|
||||
/****************************************************************************
|
||||
*
|
||||
@@ -194,8 +186,6 @@ void ellInsert (ELLLIST *plist, ELLNODE *pPrev, ELLNODE *pNode)
|
||||
pNode->next->previous = pNode;
|
||||
|
||||
plist->count++;
|
||||
|
||||
return;
|
||||
}
|
||||
/****************************************************************************
|
||||
*
|
||||
|
||||
@@ -271,7 +271,6 @@ void errSymTestPrint(long errNum)
|
||||
if ( message[0] == '\0' ) return;
|
||||
printf("module %hu number %hu message=\"%s\"\n",
|
||||
modnum, errnum, message);
|
||||
return;
|
||||
}
|
||||
|
||||
/****************************************************************
|
||||
|
||||
@@ -38,13 +38,38 @@ typedef ERRSYMTAB *ERRSYMTAB_ID;
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/** \brief Lookup message from error/status code.
|
||||
* \param status Input code
|
||||
* \param pBuf Output string buffer
|
||||
* \param bufLength Length of output buffer in bytes. Must be non-zero.
|
||||
*
|
||||
* Handles EPICS message codes, and "errno" codes.
|
||||
*
|
||||
* Copies in a mesage for any status code. Unknown status codes
|
||||
* are printed numerically.
|
||||
*/
|
||||
LIBCOM_API void errSymLookup(long status, char *pBuf, size_t bufLength);
|
||||
/** \brief Lookup message from error/status code.
|
||||
* \param status Input code
|
||||
* \returns A statically allocated message string. Never NULL.
|
||||
*
|
||||
* Handles EPICS message codes, and "errno" codes.
|
||||
*
|
||||
* For any unknown status codes, a generic "Unknown code" message is returned.
|
||||
*
|
||||
* \since 3.16.1
|
||||
*/
|
||||
LIBCOM_API const char* errSymMsg(long status);
|
||||
LIBCOM_API void errSymTest(epicsUInt16 modnum, epicsUInt16 begErrNum,
|
||||
epicsUInt16 endErrNum);
|
||||
LIBCOM_API void errSymTestPrint(long errNum);
|
||||
LIBCOM_API int errSymBld(void);
|
||||
LIBCOM_API int errSymbolAdd(long errNum, const char *name);
|
||||
/** @brief Define new custom error code and associate message string.
|
||||
* @param errNum New error code. Caller is reponsible for avoiding reuse of existing codes.
|
||||
* @param message New message. Pointer stored. Caller must not free pointed storage.
|
||||
* @return 0 on success
|
||||
*/
|
||||
LIBCOM_API int errSymbolAdd(long errNum, const char *message);
|
||||
LIBCOM_API void errSymDump(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -206,7 +206,6 @@ LIBCOM_API void fdManager::process (double delay)
|
||||
this->pTimerQueue->process(epicsTime::getCurrent());
|
||||
}
|
||||
this->processInProg = false;
|
||||
return;
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
@@ -38,10 +38,9 @@ public:
|
||||
// exceptions
|
||||
//
|
||||
class noFunctionSpecified {};
|
||||
class doubleDelete {};
|
||||
|
||||
LIBCOM_API fdRegForOldFdmgr (const SOCKET fdIn, const fdRegType type,
|
||||
const bool onceOnly, fdManager &manager, pCallBackFDMgr pFunc, void *pParam);
|
||||
LIBCOM_API fdRegForOldFdmgr (SOCKET fdIn, fdRegType type,
|
||||
bool onceOnly, fdManager &manager, pCallBackFDMgr pFunc, void *pParam);
|
||||
LIBCOM_API ~fdRegForOldFdmgr ();
|
||||
|
||||
private:
|
||||
@@ -66,7 +65,6 @@ public:
|
||||
// exceptions
|
||||
//
|
||||
class noFunctionSpecified {};
|
||||
class doubleDelete {};
|
||||
private:
|
||||
epicsTimer &timer;
|
||||
oldFdmgr &fdmgr;
|
||||
@@ -116,11 +114,7 @@ LIBCOM_API fdRegForOldFdmgr::fdRegForOldFdmgr
|
||||
}
|
||||
|
||||
LIBCOM_API fdRegForOldFdmgr::~fdRegForOldFdmgr ()
|
||||
{
|
||||
if (this->pFunc==NULL) {
|
||||
throwWithLocation ( doubleDelete () );
|
||||
}
|
||||
}
|
||||
{}
|
||||
|
||||
LIBCOM_API void fdRegForOldFdmgr::callBack ()
|
||||
{
|
||||
|
||||
@@ -83,7 +83,6 @@ LIBCOM_API void epicsStdCall
|
||||
pfl->lock = epicsMutexMustCreate();
|
||||
*ppvt = (void *)pfl;
|
||||
VALGRIND_CREATE_MEMPOOL(pfl, REDZONE, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
LIBCOM_API void * epicsStdCall freeListCalloc(void *pvt)
|
||||
|
||||
@@ -56,7 +56,6 @@ void epicsStdCall gphInitPvt(gphPvt **ppvt, int size)
|
||||
pgphPvt->paplist = callocMustSucceed(size, sizeof(ELLLIST *), "gphInitPvt");
|
||||
pgphPvt->lock = epicsMutexMustCreate();
|
||||
*ppvt = pgphPvt;
|
||||
return;
|
||||
}
|
||||
|
||||
GPHENTRY * epicsStdCall gphFindParse(gphPvt *pgphPvt, const char *name, size_t len, void *pvtid)
|
||||
@@ -171,7 +170,6 @@ void epicsStdCall gphDelete(gphPvt *pgphPvt, const char *name, void *pvtid)
|
||||
}
|
||||
|
||||
epicsMutexUnlock(pgphPvt->lock);
|
||||
return;
|
||||
}
|
||||
|
||||
void epicsStdCall gphFreeMem(gphPvt *pgphPvt)
|
||||
|
||||
@@ -142,6 +142,7 @@ const char *initHookName(int state)
|
||||
"initHookAfterInterruptAccept",
|
||||
"initHookAtEnd"
|
||||
};
|
||||
STATIC_ASSERT(NELEMENTS(stateName)==initHookAtEnd+1);
|
||||
if (state < 0 || state >= NELEMENTS(stateName)) {
|
||||
return "Not an initHookState";
|
||||
}
|
||||
|
||||
@@ -8,42 +8,44 @@
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
|
||||
/**
|
||||
* \file initHooks.h
|
||||
/** @page inithooks IOC lifecycle callback hooks.
|
||||
*
|
||||
* \author Benjamin Franksen (BESSY)
|
||||
* \author Marty Kraimer (ANL)
|
||||
* initHookRegister() allows external code to be called at certains points (initHookState)
|
||||
* during IOC startup and shutdown.
|
||||
*
|
||||
* \brief Facility to call functions during iocInit()
|
||||
* The overall states (see getIocState() ) of an IOC are:
|
||||
*
|
||||
* The initHooks facility allows application functions to be called at various
|
||||
* stages/states during IOC initialization, pausing, restart and shutdown.
|
||||
*
|
||||
* All registered application functions will be called whenever the IOC
|
||||
* initialization, pause/resume or shutdown process reaches a new state.
|
||||
* - Void
|
||||
* - From process start until iocInit()
|
||||
* - After iocShutdown()
|
||||
* - Building
|
||||
* - Transiant state during iocInit()
|
||||
* - Built
|
||||
* - Transiant state during iocInit()
|
||||
* - Running
|
||||
* - After iocInit() or iocRun()
|
||||
* - Paused
|
||||
* - After iocPause()
|
||||
*
|
||||
* The following C++ example shows how to use this facility:
|
||||
*
|
||||
* \code{.cpp}
|
||||
* #include <initHooks.h>
|
||||
* #include <epicsExport.h>
|
||||
* static void myHookFunction(initHookState state)
|
||||
* {
|
||||
* switch (state) {
|
||||
* case initHookAfterInitRecSup:
|
||||
* ...
|
||||
* break;
|
||||
* case initHookAfterDatabaseRunning:
|
||||
* ...
|
||||
* break;
|
||||
* default:
|
||||
* break;
|
||||
* if(state == initHookAfterDatabaseRunning) {
|
||||
* // a good point for driver worker threads to be started.
|
||||
* }
|
||||
* }
|
||||
*
|
||||
* // A static constructor registers hook function at startup:
|
||||
* static int myHookStatus = initHookRegister(myHookFunction);
|
||||
* static void myRegistrar(void) {
|
||||
* initHookRegister(&myHookFunction);
|
||||
* }
|
||||
* extern "C" {
|
||||
* epicsExportRegistrar(myRegistrar);
|
||||
* }
|
||||
* // in some .dbd file add "registrar(myRegistrar)".
|
||||
* \endcode
|
||||
*
|
||||
* An arbitrary number of functions can be registered.
|
||||
*/
|
||||
|
||||
|
||||
@@ -69,41 +71,73 @@ extern "C" {
|
||||
* if the IOC is later paused and restarted.
|
||||
*/
|
||||
typedef enum {
|
||||
// iocInit() begins
|
||||
initHookAtIocBuild = 0, /**< Start of iocBuild() / iocInit() */
|
||||
initHookAtBeginning, /**< Database sanity checks passed */
|
||||
initHookAfterCallbackInit, /**< Callbacks, generalTime & taskwd init */
|
||||
initHookAfterCaLinkInit, /**< CA links init */
|
||||
initHookAfterInitDrvSup, /**< Driver support init */
|
||||
initHookAfterInitRecSup, /**< Record support init */
|
||||
initHookAfterInitDevSup, /**< Device support init pass 0 */
|
||||
initHookAfterInitDatabase, /**< Records and locksets init */
|
||||
initHookAfterInitDevSup, /**< Device support init pass 0 (also autosave pass 0) */
|
||||
initHookAfterInitDatabase, /**< Records and locksets init (also autosave pass 1) */
|
||||
initHookAfterFinishDevSup, /**< Device support init pass 1 */
|
||||
initHookAfterScanInit, /**< Scan, AS, ProcessNotify init */
|
||||
initHookAfterInitialProcess, /**< Records with PINI = YES processsed */
|
||||
initHookAfterCaServerInit, /**< RSRV init */
|
||||
initHookAfterIocBuilt, /**< End of iocBuild() */
|
||||
|
||||
// iocInit() continues, and iocRun() begins
|
||||
initHookAtIocRun, /**< Start of iocRun() */
|
||||
initHookAfterDatabaseRunning, /**< Scan tasks and CA links running */
|
||||
initHookAfterCaServerRunning, /**< RSRV running */
|
||||
initHookAfterIocRunning, /**< End of iocRun() / iocInit() */
|
||||
// iocInit() or iocRun() ends
|
||||
|
||||
// iocPause() begins
|
||||
initHookAtIocPause, /**< Start of iocPause() */
|
||||
initHookAfterCaServerPaused, /**< RSRV paused */
|
||||
initHookAfterDatabasePaused, /**< CA links and scan tasks paused */
|
||||
initHookAfterIocPaused, /**< End of iocPause() */
|
||||
// iocPause() ends
|
||||
|
||||
initHookAtShutdown, /**< Start of iocShutdown() (unit tests only) */
|
||||
initHookAfterCloseLinks, /**< Links disabled/deleted */
|
||||
initHookAfterStopScan, /**< Scan tasks stopped. Prior to UNRELEASED, triggered only by unittest code. */
|
||||
initHookAfterStopCallback, /**< Callback tasks stopped */
|
||||
initHookAfterStopLinks, /**< CA links stopped. Prior to UNRELEASED, triggered only by unittest code. */
|
||||
initHookBeforeFree, /**< Resource cleanup about to happen */
|
||||
initHookAfterShutdown, /**< End of iocShutdown() */
|
||||
// iocShutdown() begins
|
||||
/** \brief Start of iocShutdown() (unit tests only)
|
||||
* \since 7.0.3.1 Added
|
||||
*/
|
||||
initHookAtShutdown,
|
||||
/** \brief Links disabled/deleted
|
||||
* \since 7.0.3.1 Added
|
||||
*/
|
||||
initHookAfterCloseLinks,
|
||||
/** \brief Scan tasks stopped.
|
||||
* \since UNRELEASED Triggered during normal IOC shutdown
|
||||
* \since 7.0.3.1 Added, triggered only by unittest code.
|
||||
*/
|
||||
initHookAfterStopScan,
|
||||
/** \brief Callback tasks stopped
|
||||
* \since 7.0.3.1 Added
|
||||
*/
|
||||
initHookAfterStopCallback,
|
||||
/** \brief CA links stopped.
|
||||
* \since UNRELEASED Triggered during normal IOC shutdown
|
||||
* \since 7.0.3.1 Added, triggered only by unittest code.
|
||||
*/
|
||||
initHookAfterStopLinks,
|
||||
/** \brief Resource cleanup about to happen
|
||||
* \since 7.0.3.1 Added
|
||||
*/
|
||||
initHookBeforeFree,
|
||||
/** \brief End of iocShutdown()
|
||||
* \since 7.0.3.1 Added
|
||||
*/
|
||||
initHookAfterShutdown,
|
||||
// iocShutdown() ends
|
||||
|
||||
/* Deprecated states: */
|
||||
initHookAfterInterruptAccept, /**< After initHookAfterDatabaseRunning */
|
||||
initHookAtEnd, /**< Before initHookAfterIocRunning */
|
||||
/** Only announced once. Deprecated in favor of initHookAfterDatabaseRunning */
|
||||
initHookAfterInterruptAccept,
|
||||
/** Only announced once. Deprecated in favor of initHookAfterIocRunning */
|
||||
initHookAtEnd,
|
||||
} initHookState;
|
||||
|
||||
/** \brief Type for application callback functions
|
||||
|
||||
@@ -84,9 +84,10 @@ static struct iocshVariable *iocshVariableHead;
|
||||
static char iocshVarID[] = "iocshVar";
|
||||
extern "C" { static void varCallFunc(const iocshArgBuf *); }
|
||||
static epicsMutexId iocshTableMutex;
|
||||
static epicsThreadOnceId iocshOnceId = EPICS_THREAD_ONCE_INIT;
|
||||
static epicsThreadPrivateId iocshContextId;
|
||||
|
||||
static void iocshInit (void);
|
||||
|
||||
/*
|
||||
* I/O redirection
|
||||
*/
|
||||
@@ -121,20 +122,6 @@ struct iocshRedirect {
|
||||
};
|
||||
} // namespace
|
||||
|
||||
/*
|
||||
* Set up module variables
|
||||
*/
|
||||
static void iocshOnce (void *)
|
||||
{
|
||||
iocshTableMutex = epicsMutexMustCreate ();
|
||||
iocshContextId = epicsThreadPrivateCreate();
|
||||
}
|
||||
|
||||
static void iocshInit (void)
|
||||
{
|
||||
epicsThreadOnce (&iocshOnceId, iocshOnce, NULL);
|
||||
}
|
||||
|
||||
/*
|
||||
* Lock the table mutex
|
||||
*/
|
||||
@@ -157,19 +144,18 @@ iocshTableUnlock (void)
|
||||
/*
|
||||
* Register a command
|
||||
*/
|
||||
void epicsStdCall iocshRegister (const iocshFuncDef *piocshFuncDef,
|
||||
static
|
||||
void iocshRegisterImpl (const iocshFuncDef *piocshFuncDef,
|
||||
iocshCallFunc func)
|
||||
{
|
||||
struct iocshCommand *l, *p, *n;
|
||||
int i;
|
||||
|
||||
iocshTableLock ();
|
||||
for (l = NULL, p = iocshCommandHead ; p != NULL ; l = p, p = p->next) {
|
||||
i = strcmp (piocshFuncDef->name, p->def.pFuncDef->name);
|
||||
if (i == 0) {
|
||||
p->def.pFuncDef = piocshFuncDef;
|
||||
p->def.func = func;
|
||||
iocshTableUnlock ();
|
||||
return;
|
||||
}
|
||||
if (i < 0)
|
||||
@@ -179,7 +165,6 @@ void epicsStdCall iocshRegister (const iocshFuncDef *piocshFuncDef,
|
||||
"iocshRegister");
|
||||
if (!registryAdd(iocshCmdID, piocshFuncDef->name, (void *)n)) {
|
||||
free (n);
|
||||
iocshTableUnlock ();
|
||||
errlogPrintf ("iocshRegister failed to add %s\n", piocshFuncDef->name);
|
||||
return;
|
||||
}
|
||||
@@ -193,10 +178,15 @@ void epicsStdCall iocshRegister (const iocshFuncDef *piocshFuncDef,
|
||||
}
|
||||
n->def.pFuncDef = piocshFuncDef;
|
||||
n->def.func = func;
|
||||
iocshTableUnlock ();
|
||||
}
|
||||
|
||||
|
||||
void epicsStdCall iocshRegister (const iocshFuncDef *piocshFuncDef,
|
||||
iocshCallFunc func)
|
||||
{
|
||||
iocshTableLock ();
|
||||
iocshRegisterImpl (piocshFuncDef, func);
|
||||
iocshTableUnlock ();
|
||||
}
|
||||
/*
|
||||
* Retrieves a previously registered function with the given name.
|
||||
*/
|
||||
@@ -1455,7 +1445,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);
|
||||
@@ -1527,24 +1517,25 @@ static void exitCallFunc(const iocshArgBuf *)
|
||||
{
|
||||
}
|
||||
|
||||
static void localRegister (void)
|
||||
static void iocshOnce (void *)
|
||||
{
|
||||
iocshRegister(&commentFuncDef,commentCallFunc);
|
||||
iocshRegister(&exitFuncDef,exitCallFunc);
|
||||
iocshRegister(&helpFuncDef,helpCallFunc);
|
||||
iocshRegister(&iocshCmdFuncDef,iocshCmdCallFunc);
|
||||
iocshRegister(&iocshLoadFuncDef,iocshLoadCallFunc);
|
||||
iocshRegister(&iocshRunFuncDef,iocshRunCallFunc);
|
||||
iocshRegister(&onFuncDef, onCallFunc);
|
||||
iocshTableMutex = epicsMutexMustCreate ();
|
||||
iocshContextId = epicsThreadPrivateCreate();
|
||||
epicsMutexMustLock (iocshTableMutex);
|
||||
iocshRegisterImpl(&commentFuncDef,commentCallFunc);
|
||||
iocshRegisterImpl(&exitFuncDef,exitCallFunc);
|
||||
iocshRegisterImpl(&helpFuncDef,helpCallFunc);
|
||||
iocshRegisterImpl(&iocshCmdFuncDef,iocshCmdCallFunc);
|
||||
iocshRegisterImpl(&iocshLoadFuncDef,iocshLoadCallFunc);
|
||||
iocshRegisterImpl(&iocshRunFuncDef,iocshRunCallFunc);
|
||||
iocshRegisterImpl(&onFuncDef, onCallFunc);
|
||||
iocshTableUnlock();
|
||||
}
|
||||
|
||||
static void iocshInit (void)
|
||||
{
|
||||
static epicsThreadOnceId iocshOnceId = EPICS_THREAD_ONCE_INIT;
|
||||
epicsThreadOnce (&iocshOnceId, iocshOnce, NULL);
|
||||
}
|
||||
|
||||
} /* extern "C" */
|
||||
|
||||
/*
|
||||
* Register local commands on application startup
|
||||
*/
|
||||
class IocshRegister {
|
||||
public:
|
||||
IocshRegister() { localRegister(); }
|
||||
};
|
||||
static IocshRegister iocshRegisterObj;
|
||||
|
||||
@@ -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> seconds\n"};
|
||||
static const iocshFuncDef epicsThreadSleepFuncDef = {"epicsThreadSleep",1,epicsThreadSleepArgs,
|
||||
"Pause execution of IOC shell for <seconds> 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();
|
||||
|
||||
@@ -711,8 +711,6 @@ static void freeLogClient(struct iocLogClient *pclient)
|
||||
epicsSocketDestroy ( pclient->insock );
|
||||
|
||||
free (pclient);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -559,7 +559,7 @@ void epicsStdCall iocLogPrefix(const char * prefix)
|
||||
|
||||
if (logClientPrefix) {
|
||||
/* No error message if the new prefix is identical to the old one */
|
||||
if (strcmp(logClientPrefix, prefix))
|
||||
if (strcmp(logClientPrefix, prefix)!=0)
|
||||
printf (ERL_WARNING " iocLogPrefix: The prefix was already set to "
|
||||
"\"%s\" and can't be changed.\n", logClientPrefix);
|
||||
return;
|
||||
|
||||
@@ -72,7 +72,7 @@ static void trans ( MAC_HANDLE *handle, MAC_ENTRY *entry, int level,
|
||||
static void refer ( MAC_HANDLE *handle, MAC_ENTRY *entry, int level,
|
||||
const char **rawval, char **value, char *valend );
|
||||
|
||||
static void cpy2val( const char *src, char **value, char *valend );
|
||||
static void cpy2val( const char *src, char **value, const char *valend );
|
||||
static char *Strdup( const char *string );
|
||||
|
||||
|
||||
@@ -948,8 +948,6 @@ static void trans( MAC_HANDLE *handle, MAC_ENTRY *entry, int level,
|
||||
still there to be seen) */
|
||||
*rawval = ( *r == '\0' ) ? r - 1 : r;
|
||||
*value = v;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1110,14 +1108,13 @@ cleanup:
|
||||
|
||||
*rawval = r;
|
||||
*value = v;
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* Copy a string, honoring the 'end of destination string' pointer
|
||||
* Returns with **value pointing to the '\0' terminator
|
||||
*/
|
||||
static void cpy2val(const char *src, char **value, char *valend)
|
||||
static void cpy2val(const char *src, char **value, const char *valend)
|
||||
{
|
||||
char *v = *value;
|
||||
while ((v < valend) && (*v = *src++)) { v++; }
|
||||
|
||||
@@ -15,13 +15,10 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "dbDefs.h"
|
||||
#include "epicsTypes.h"
|
||||
#include "osiSock.h"
|
||||
|
||||
#ifndef NELEMENTS
|
||||
#define NELEMENTS(A) (sizeof(A)/sizeof(A[0]))
|
||||
#endif /*NELEMENTS*/
|
||||
|
||||
/*
|
||||
* addrArrayToUL ()
|
||||
*/
|
||||
|
||||
@@ -503,7 +503,7 @@ long devUnregisterAddress(
|
||||
return S_dev_addressNotFound;
|
||||
}
|
||||
|
||||
if (strcmp(pOwnerName,pRange->pOwnerName)) {
|
||||
if (strcmp(pOwnerName,pRange->pOwnerName)!=0) {
|
||||
s = S_dev_addressOverlap;
|
||||
errPrintf (
|
||||
s,
|
||||
|
||||
@@ -275,18 +275,12 @@ void epicsThread::setPriority (unsigned int priority) throw ()
|
||||
|
||||
bool epicsThread::priorityIsEqual (const epicsThread &otherThread) const throw ()
|
||||
{
|
||||
if ( epicsThreadIsEqual (this->id, otherThread.id) ) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
return epicsThreadIsEqual (this->id, otherThread.id)!=0;
|
||||
}
|
||||
|
||||
bool epicsThread::isSuspended () const throw ()
|
||||
{
|
||||
if ( epicsThreadIsSuspended (this->id) ) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
return epicsThreadIsSuspended (this->id)!=0;
|
||||
}
|
||||
|
||||
bool epicsThread::operator == (const epicsThread &rhs) const throw ()
|
||||
|
||||
@@ -44,8 +44,9 @@ void epicsTime::throwError(int code)
|
||||
}
|
||||
|
||||
|
||||
epicsTime::epicsTime ( const epicsTimeStamp & replace ) {
|
||||
ts = replace;
|
||||
epicsTime::epicsTime ( const epicsTimeStamp & replace )
|
||||
:ts(replace)
|
||||
{
|
||||
if(ts.nsec >= nSecPerSec)
|
||||
throw std::logic_error("epicsTimeStamp has overflow in nano-seconds field");
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ static void thread_hook(epicsThreadId pthreadInfo)
|
||||
/* Set the name of the thread's process. Limited to 16 characters. */
|
||||
char comm[16];
|
||||
|
||||
if (strcmp(pthreadInfo->name, "_main_")) {
|
||||
if (strcmp(pthreadInfo->name, "_main_") != 0) {
|
||||
snprintf(comm, sizeof(comm), "%s", pthreadInfo->name);
|
||||
prctl(PR_SET_NAME, comm, 0l, 0l, 0l);
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#define nDigitsDottedIP 4u
|
||||
#define chunkSize 8u
|
||||
|
||||
#define makeMask(NBITS) ( ( 1u << ( (unsigned) NBITS) ) - 1u )
|
||||
#define makeMask(NBITS) ( ( 1u << ( (unsigned) (NBITS)) ) - 1u )
|
||||
|
||||
/*
|
||||
* sockAddrAreIdentical()
|
||||
|
||||
@@ -210,7 +210,7 @@ extern "C" epicsTimerQueueId epicsStdCall
|
||||
epicsSingleton < timerQueueActiveMgr > :: reference ref =
|
||||
timerQueueMgrEPICS.getReference ();
|
||||
epicsTimerQueueActiveForC & tmr =
|
||||
ref->allocate ( ref, okToShare ? true : false, threadPriority );
|
||||
ref->allocate ( ref, okToShare != 0, threadPriority );
|
||||
return &tmr;
|
||||
}
|
||||
catch ( ... ) {
|
||||
|
||||
@@ -24,6 +24,11 @@
|
||||
#include "epicsTimer.h"
|
||||
#include "compilerDependencies.h"
|
||||
|
||||
#if __cplusplus<201103L
|
||||
# define final
|
||||
# define override
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG
|
||||
# define debugPrintf(ARGSINPAREN) printf ARGSINPAREN
|
||||
#else
|
||||
@@ -34,12 +39,12 @@ template < class T > class epicsGuard;
|
||||
|
||||
class timer : public epicsTimer, public tsDLNode < timer > {
|
||||
public:
|
||||
void destroy ();
|
||||
void start ( class epicsTimerNotify &, const epicsTime & );
|
||||
void start ( class epicsTimerNotify &, double delaySeconds );
|
||||
void cancel ();
|
||||
expireInfo getExpireInfo () const;
|
||||
void show ( unsigned int level ) const;
|
||||
void destroy () override;
|
||||
void start ( class epicsTimerNotify &, const epicsTime & ) override final;
|
||||
void start ( class epicsTimerNotify &, double delaySeconds ) override final;
|
||||
void cancel () override final;
|
||||
expireInfo getExpireInfo () const override final;
|
||||
void show ( unsigned int level ) const override final;
|
||||
void * operator new ( size_t size, tsFreeList < timer, 0x20 > & );
|
||||
epicsPlacementDeleteOperator (( void *, tsFreeList < timer, 0x20 > & ))
|
||||
protected:
|
||||
@@ -62,9 +67,9 @@ private:
|
||||
friend class timerQueue;
|
||||
};
|
||||
|
||||
struct epicsTimerForC : public epicsTimerNotify, public timer {
|
||||
struct epicsTimerForC final : public epicsTimerNotify, public timer {
|
||||
public:
|
||||
void destroy ();
|
||||
void destroy () override final;
|
||||
protected:
|
||||
epicsTimerForC ( timerQueue &, epicsTimerCallback, void *pPrivateIn );
|
||||
~epicsTimerForC ();
|
||||
@@ -73,7 +78,7 @@ protected:
|
||||
private:
|
||||
epicsTimerCallback pCallBack;
|
||||
void * pPrivate;
|
||||
expireStatus expire ( const epicsTime & currentTime );
|
||||
expireStatus expire ( const epicsTime & currentTime ) override final;
|
||||
epicsTimerForC & operator = ( const epicsTimerForC & );
|
||||
// Visual C++ .net appears to require operator delete if
|
||||
// placement operator delete is defined? I smell a ms rat
|
||||
@@ -90,10 +95,10 @@ class timerQueue : public epicsTimerQueue {
|
||||
public:
|
||||
timerQueue ( epicsTimerQueueNotify ¬ify );
|
||||
virtual ~timerQueue ();
|
||||
epicsTimer & createTimer ();
|
||||
epicsTimer & createTimer () override final;
|
||||
epicsTimerForC & createTimerForC ( epicsTimerCallback pCallback, void *pArg );
|
||||
double process ( const epicsTime & currentTime );
|
||||
void show ( unsigned int level ) const;
|
||||
void show ( unsigned int level ) const override final;
|
||||
private:
|
||||
tsFreeList < timer, 0x20 > timerFreeList;
|
||||
tsFreeList < epicsTimerForC, 0x20 > timerForCFreeList;
|
||||
@@ -133,9 +138,9 @@ public:
|
||||
typedef epicsSingleton < timerQueueActiveMgr > :: reference RefMgr;
|
||||
timerQueueActive ( RefMgr &, bool okToShare, unsigned priority );
|
||||
void start ();
|
||||
epicsTimer & createTimer ();
|
||||
epicsTimer & createTimer () override final;
|
||||
epicsTimerForC & createTimerForC ( epicsTimerCallback pCallback, void *pArg );
|
||||
void show ( unsigned int level ) const;
|
||||
void show ( unsigned int level ) const override final;
|
||||
bool sharingOK () const;
|
||||
unsigned threadPriority () const;
|
||||
protected:
|
||||
@@ -150,9 +155,9 @@ private:
|
||||
bool okToShare;
|
||||
int exitFlag; // use atomic ops
|
||||
bool terminateFlag;
|
||||
void run ();
|
||||
void reschedule ();
|
||||
double quantum ();
|
||||
void run () override final;
|
||||
void reschedule () override final;
|
||||
double quantum () override final;
|
||||
void _printLastChanceExceptionMessage (
|
||||
const char * pExceptionTypeName,
|
||||
const char * pExceptionContext );
|
||||
@@ -161,7 +166,7 @@ private:
|
||||
timerQueueActive & operator = ( const timerQueueActive & );
|
||||
};
|
||||
|
||||
class timerQueueActiveMgr {
|
||||
class timerQueueActiveMgr final {
|
||||
public:
|
||||
typedef epicsSingleton < timerQueueActiveMgr > :: reference RefThis;
|
||||
timerQueueActiveMgr ();
|
||||
@@ -181,10 +186,10 @@ extern epicsSingleton < timerQueueActiveMgr > timerQueueMgrEPICS;
|
||||
class timerQueuePassive : public epicsTimerQueuePassive {
|
||||
public:
|
||||
timerQueuePassive ( epicsTimerQueueNotify & );
|
||||
epicsTimer & createTimer ();
|
||||
epicsTimer & createTimer () override final;
|
||||
epicsTimerForC & createTimerForC ( epicsTimerCallback pCallback, void *pArg );
|
||||
void show ( unsigned int level ) const;
|
||||
double process ( const epicsTime & currentTime );
|
||||
void show ( unsigned int level ) const override final;
|
||||
double process ( const epicsTime & currentTime ) override final;
|
||||
protected:
|
||||
timerQueue queue;
|
||||
~timerQueuePassive ();
|
||||
@@ -193,7 +198,7 @@ protected:
|
||||
timerQueuePassive & operator = ( const timerQueuePassive & );
|
||||
};
|
||||
|
||||
struct epicsTimerQueuePassiveForC :
|
||||
struct epicsTimerQueuePassiveForC final :
|
||||
public epicsTimerQueueNotify, public timerQueuePassive {
|
||||
public:
|
||||
epicsTimerQueuePassiveForC (
|
||||
@@ -208,15 +213,15 @@ private:
|
||||
epicsTimerQueueNotifyQuantum pSleepQuantumCallback;
|
||||
void * pPrivate;
|
||||
static epicsSingleton < tsFreeList < epicsTimerQueuePassiveForC, 0x10 > > pFreeList;
|
||||
void reschedule ();
|
||||
double quantum ();
|
||||
void reschedule () override final;
|
||||
double quantum () override final;
|
||||
};
|
||||
|
||||
struct epicsTimerQueueActiveForC : public timerQueueActive,
|
||||
struct epicsTimerQueueActiveForC final : public timerQueueActive,
|
||||
public tsDLNode < epicsTimerQueueActiveForC > {
|
||||
public:
|
||||
epicsTimerQueueActiveForC ( RefMgr &, bool okToShare, unsigned priority );
|
||||
void release ();
|
||||
void release () override final;
|
||||
void * operator new ( size_t );
|
||||
void operator delete ( void * );
|
||||
protected:
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
#include "epicsUnitTest.h"
|
||||
#include "epicsString.h"
|
||||
@@ -198,10 +199,22 @@ void testStrTok(void)
|
||||
static
|
||||
void testEpicsStrPrintEscaped(void)
|
||||
{
|
||||
const char *filename = "testEpicsStrPrintEscaped";
|
||||
const char *filename;
|
||||
FILE *testFile;
|
||||
FILE *readOnly;
|
||||
|
||||
#ifdef __rtems__
|
||||
/* ensure there is a writable area */
|
||||
mkdir( "/tmp", S_IRWXU );
|
||||
filename = "/tmp/testEpicsStrPrintEscaped";
|
||||
#else
|
||||
filename = "testEpicsStrPrintEscaped";
|
||||
#endif
|
||||
|
||||
|
||||
// Avoid printing to stdout by redirecting everything to a file
|
||||
FILE *testFile = fopen(filename, "a");
|
||||
FILE *readOnly = fopen(filename, "r");
|
||||
testFile = fopen(filename, "a");
|
||||
readOnly = fopen(filename, "r");
|
||||
|
||||
testDiag("testEpicsStrPrintEscaped()");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user