Commit b9faf8ae authored by Claes Sjofors's avatar Claes Sjofors

Merge branch 'develop' into 5.4.0

parents 1ee04328 94c01676
...@@ -194,7 +194,7 @@ static void AddTransports() ...@@ -194,7 +194,7 @@ static void AddTransports()
{ {
sts = gdh_ObjidToPointer(objid, &objref); sts = gdh_ObjidToPointer(objid, &objref);
sprintf(tp[tpcount].path, "rs_remote_qcom"); sprintf(tp[tpcount].path, "rs_remote_qcom");
tp[tpcount].id = ((pwr_sClass_RemnodeQCom *) objref)->MyQueue; tp[tpcount].id = ((pwr_sClass_RemnodeQCom *) objref)->ReceiveQueue;
tp[tpcount].disable = &((pwr_sClass_RemnodeQCom *) objref)->Disable; tp[tpcount].disable = &((pwr_sClass_RemnodeQCom *) objref)->Disable;
tp[tpcount].restart_limit = &((pwr_sClass_RemnodeQCom *) objref)->RestartLimit; tp[tpcount].restart_limit = &((pwr_sClass_RemnodeQCom *) objref)->RestartLimit;
tp[tpcount].restarts = &((pwr_sClass_RemnodeQCom *) objref)->RestartCount; tp[tpcount].restarts = &((pwr_sClass_RemnodeQCom *) objref)->RestartCount;
......
...@@ -611,7 +611,7 @@ int ccm_varname_parse( ...@@ -611,7 +611,7 @@ int ccm_varname_parse(
} }
sscanf( elementstr, "%d", element); sscanf( elementstr, "%d", element);
*s = '\0'; *s = '\0';
if ( (*element < 0) || (*element > 1000) ) if ( (*element < 0) || (*element > 5000) )
{ {
return 0; return 0;
} }
......
...@@ -12,302 +12,68 @@ ...@@ -12,302 +12,68 @@
# #
# -------------------------------------------------------------------------- # --------------------------------------------------------------------------
main() function int print_channels( int fp, string chanclass, string sigclass)
string channel;
string signal; string signal;
string attr; string attr;
string sigchancon;
string elem;
string ioconnect;
string str;
int idx;
int sigcnt = 0;
int i;
string channel;
string sdescr; string sdescr;
string cdescr; string cdescr;
string sigchancon;
string volume;
string outfilename;
string tmpfilename;
string lvolname;
string cmd;
int found; int found;
int fp;
string msg;
string path = "$pwrp_doc/";
string fileend = "_iolist.csv";
string tmpname = "tmp";
int cntr=0;
int cntr_tot=0;
# Write excuse
printf("This will take some time, please wait...\n");
# Create temporary file name and output file name
volume = GetCurrentVolume();
lvolname = tolower(volume);
outfilename = path + lvolname + fileend;
tmpfilename = path + tmpname + fileend;
# Open temporary file
fp = fopen(tmpfilename,"w");
# Get all ChanDi
channel = GetClassListAttrRef( "ChanDi");
while ( channel != "")
found = 0;
signal = GetClassListAttrRef( "Di");
while ( signal != "")
attr = signal + ".SigChanCon";
sigchancon = GetAttribute( attr);
if ( sigchancon == channel)
found = 1;
break;
endif
signal = GetNextAttrRef( "Di", signal);
endwhile
if ( !found)
signal = "-";
sdescr = "-";
else
attr = signal + ".Description";
sdescr = GetAttribute( attr);
endif
attr = channel + ".Description";
cdescr = GetAttribute( attr);
# Write to temporary file
fprintf(fp, "%s;%s;\"%s\";\"%s\"\n", channel, signal, sdescr, cdescr);
# Write alive info to screen
cntr++;
cntr_tot++;
if (cntr >= 100)
cntr = 0;
printf("Writing line %d\n", cntr_tot);
endif
channel = GetNextAttrRef( "ChanDi", channel);
endwhile
# Get all ChanDo
channel = GetClassListAttrRef( "ChanDo");
while ( channel != "")
found = 0;
signal = GetClassListAttrRef( "Do");
while ( signal != "")
attr = signal + ".SigChanCon";
sigchancon = GetAttribute( attr);
if ( sigchancon == channel)
found = 1;
break;
endif
signal = GetNextAttrRef( "Do", signal);
endwhile
if ( !found)
signal = "-";
sdescr = "-";
else
attr = signal + ".Description";
sdescr = GetAttribute( attr);
endif
attr = channel + ".Description";
cdescr = GetAttribute( attr);
# Write to temporary file
fprintf(fp, "%s;%s;\"%s\";\"%s\"\n", channel, signal, sdescr, cdescr);
# Write alive info to screen
cntr++;
cntr_tot++;
if (cntr >= 100)
cntr = 0;
printf("Writing line %d\n", cntr_tot);
endif
channel = GetNextAttrRef( "ChanDo", channel);
endwhile
# Get all ChanAi
channel = GetClassListAttrRef( "ChanAi");
while ( channel != "")
found = 0;
signal = GetClassListAttrRef( "Ai");
while ( signal != "")
attr = signal + ".SigChanCon";
sigchancon = GetAttribute( attr);
if ( sigchancon == channel)
found = 1;
break;
endif
signal = GetNextAttrRef( "Ai", signal);
endwhile
if ( !found)
signal = "-";
sdescr = "-";
else
attr = signal + ".Description";
sdescr = GetAttribute( attr);
endif
attr = channel + ".Description";
cdescr = GetAttribute( attr);
# Write to temporary file
fprintf(fp, "%s;%s;\"%s\";\"%s\"\n", channel, signal, sdescr, cdescr);
# Write alive info to screen
cntr++;
cntr_tot++;
if (cntr >= 100)
cntr = 0;
printf("Writing line %d\n", cntr_tot);
endif
channel = GetNextAttrRef( "ChanAi", channel);
endwhile
# Get all ChanAo
channel = GetClassListAttrRef( "ChanAo");
while ( channel != "")
found = 0;
signal = GetClassListAttrRef( "Ao");
while ( signal != "")
attr = signal + ".SigChanCon";
sigchancon = GetAttribute( attr);
if ( sigchancon == channel)
found = 1;
break;
endif
signal = GetNextAttrRef( "Ao", signal);
endwhile
if ( !found)
signal = "-";
sdescr = "-";
else
attr = signal + ".Description";
sdescr = GetAttribute( attr);
endif
attr = channel + ".Description"; sigcnt = 0;
cdescr = GetAttribute( attr);
# Write to temporary file
fprintf(fp, "%s;%s;\"%s\";\"%s\"\n", channel, signal, sdescr, cdescr);
# Write alive info to screen
cntr++;
cntr_tot++;
if (cntr >= 100)
cntr = 0;
printf("Writing line %d\n", cntr_tot);
endif
channel = GetNextAttrRef( "ChanAo", channel);
endwhile signal = GetClassListAttrRef( sigclass);
while ( signal != "")
attr = signal + ".SigChanCon";
sigchancon = GetAttribute( attr);
# Get all ChanCo
channel = GetClassListAttrRef( "ChanCo");
while ( channel != "")
found = 0;
signal = GetClassListAttrRef( "Co");
while ( signal != "")
attr = signal + ".SigChanCon";
sigchancon = GetAttribute( attr);
if ( sigchancon == channel)
found = 1;
break;
endif
signal = GetNextAttrRef( "Co", signal);
endwhile
if ( !found)
signal = "-";
sdescr = "-";
else
attr = signal + ".Description";
sdescr = GetAttribute( attr);
endif
attr = channel + ".Description"; elem = element( 2, "-", sigchancon);
cdescr = GetAttribute( attr); if ( elem == "Class")
idx = strrchr( signal, ".");
str = extract( 1, idx, signal);
attr = str + "IoConnect";
# Write to temporary file ioconnect = GetAttribute( attr);
fprintf(fp, "%s;%s;\"%s\";\"%s\"\n", channel, signal, sdescr, cdescr); idx = strchr( sigchancon, ".");
str = extract( idx, 200, sigchancon);
sigchancon = ioconnect + str;
# Write alive info to screen
cntr++;
cntr_tot++;
if (cntr >= 100)
cntr = 0;
printf("Writing line %d\n", cntr_tot);
endif endif
channel = GetNextAttrRef( "ChanCo", channel); signals[sigcnt] = signal;
sigchancons[sigcnt] = sigchancon;
sigcnt++;
endwhile signal = GetNextAttrRef( sigclass, signal);
endwhile
# Get all ChanAo # Get all channels of this class
channel = GetClassListAttrRef( "ChanIi"); channel = GetClassListAttrRef( chanclass);
while ( channel != "") while ( channel != "")
found = 0; found = 0;
signal = GetClassListAttrRef( "Ii"); for ( i = 0; i < sigcnt; i++)
while ( signal != "") if ( sigchancons[i] == channel)
attr = signal + ".SigChanCon";
sigchancon = GetAttribute( attr);
if ( sigchancon == channel)
found = 1; found = 1;
break; break;
endif endif
endfor
signal = GetNextAttrRef( "Ii", signal);
endwhile
if ( !found) if ( !found)
signal = "-"; signal = "-";
sdescr = "-"; sdescr = "-";
else else
attr = signal + ".Description"; attr = signals[i] + ".Description";
sdescr = GetAttribute( attr); sdescr = GetAttribute( attr);
endif endif
...@@ -315,68 +81,51 @@ main() ...@@ -315,68 +81,51 @@ main()
cdescr = GetAttribute( attr); cdescr = GetAttribute( attr);
# Write to temporary file # Write to temporary file
fprintf(fp, "%s;%s;\"%s\";\"%s\"\n", channel, signal, sdescr, cdescr); fprintf( fp, "%s;%s;\"%s\";\"%s\"\n", channel, signals[i], sdescr, cdescr);
# Write alive info to screen
cntr++;
cntr_tot++;
if (cntr >= 100)
cntr = 0;
printf("Writing line %d\n", cntr_tot);
endif
channel = GetNextAttrRef( "ChanIi", channel);
channel = GetNextAttrRef( chanclass, channel);
endwhile endwhile
return 1;
endfunction
# Get all ChanAo main()
channel = GetClassListAttrRef( "ChanIo"); extern string signals[4000];
while ( channel != "") extern string sigchancons[4000];
string volume;
found = 0; string outfilename;
signal = GetClassListAttrRef( "Io"); string tmpfilename;
while ( signal != "") string lvolname;
string cmd;
attr = signal + ".SigChanCon"; int fp;
sigchancon = GetAttribute( attr); string msg;
if ( sigchancon == channel)
found = 1;
break;
endif
signal = GetNextAttrRef( "Io", signal);
endwhile
if ( !found)
signal = "-";
sdescr = "-";
else
attr = signal + ".Description";
sdescr = GetAttribute( attr);
endif
attr = channel + ".Description";
cdescr = GetAttribute( attr);
# Write to temporary file string path = "$pwrp_doc/";
fprintf(fp, "%s;%s;\"%s\";\"%s\"\n", channel, signal, sdescr, cdescr); string fileend = "_iolist.csv";
string tmpname = "tmp";
# Write alive info to screen # Write excuse
cntr++; printf("This will take some time, please wait...\n");
cntr_tot++;
if (cntr >= 100)
cntr = 0;
printf("Writing line %d\n", cntr_tot);
endif
channel = GetNextAttrRef( "ChanIo", channel); # Create temporary file name and output file name
volume = GetCurrentVolume();
lvolname = tolower(volume);
outfilename = path + lvolname + fileend;
tmpfilename = path + tmpname + fileend;
endwhile # Open temporary file
fp = fopen(tmpfilename,"w");
# Print all channnels
print_channels( fp, "ChanDi", "Di");
print_channels( fp, "ChanDo", "Do");
print_channels( fp, "ChanAi", "Ai");
print_channels( fp, "ChanAo", "Ao");
print_channels( fp, "ChanCo", "Co");
print_channels( fp, "ChanIi", "Ii");
print_channels( fp, "ChanIo", "Io");
# Close temporary file # Close temporary file
fclose(fp); fclose(fp);
...@@ -388,9 +137,11 @@ main() ...@@ -388,9 +137,11 @@ main()
system( cmd ); system( cmd );
# Write total no of lines to screen # Write total no of lines to screen
printf("Total %d lines written to file %s\n", cntr_tot, outfilename); printf("File %s created\n", outfilename);
msg = "File " + outfilename + " created"; msg = "File " + outfilename + " created";
MessageInfo( msg); MessageInfo( msg);
endmain delete signals[1000];
delete sigchancons[1000];
endmain
\ No newline at end of file
...@@ -2371,7 +2371,7 @@ pwr_tStatus lfu_SaveDirectoryVolume( ...@@ -2371,7 +2371,7 @@ pwr_tStatus lfu_SaveDirectoryVolume(
nodename_ptr, nodename_ptr); nodename_ptr, nodename_ptr);
if ( *components_ptr & pwr_mDistrComponentMask_ApplFile) if ( *components_ptr & pwr_mDistrComponentMask_ApplFile)
fprintf( file, "appl %s W "pwr_cNameAppl" $pwrp_load/\n", fprintf( file, "appl %s W "pwr_cNameAppl" $pwrp_load/\n",
nodename_ptr, "$pwrp_cnf/", nodename_ptr, *bus_number_ptr); nodename_ptr, "$pwrp_load/", nodename_ptr, *bus_number_ptr);
if ( *components_ptr & pwr_mDistrComponentMask_PwrpAliasFile) if ( *components_ptr & pwr_mDistrComponentMask_PwrpAliasFile)
fprintf( file, "appl %s W $pwrp_load/pwrp_alias.dat $pwrp_load/pwrp_alias.dat\n", fprintf( file, "appl %s W $pwrp_load/pwrp_alias.dat $pwrp_load/pwrp_alias.dat\n",
nodename_ptr); nodename_ptr);
...@@ -2382,7 +2382,7 @@ pwr_tStatus lfu_SaveDirectoryVolume( ...@@ -2382,7 +2382,7 @@ pwr_tStatus lfu_SaveDirectoryVolume(
if ( *components_ptr & pwr_mDistrComponentMask_XMLFiles) if ( *components_ptr & pwr_mDistrComponentMask_XMLFiles)
fprintf( file, "appl %s W $pwrp_load/*.xml\n", nodename_ptr); fprintf( file, "appl %s W $pwrp_load/*.xml\n", nodename_ptr);
if ( *components_ptr & pwr_mDistrComponentMask_XttHelpFile) { if ( *components_ptr & pwr_mDistrComponentMask_XttHelpFile) {
fprintf( file, "appl %s W $pwrp_cnf/%s/xtt_help.dat:$pwrp_cnf/xtt_help.dat $pwrp_load/xtt_help.dat\n", fprintf( file, "appl %s W $pwrp_load/%s/xtt_help.dat:$pwrp_load/xtt_help.dat $pwrp_load/xtt_help.dat\n",
nodename_ptr, nodename_ptr); nodename_ptr, nodename_ptr);
} }
if ( *components_ptr & pwr_mDistrComponentMask_XttResourceFile) { if ( *components_ptr & pwr_mDistrComponentMask_XttResourceFile) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment