-- Code snippet ... some logic has been removed, please dont attempt to
compile
You can look at the API calls and determine how they best fit your needs.
Best of luck,
Jason
--------------
## I added '##' comments to places you may want to look at
if (symbol_list == NULL) {
printf("symbol_status_cbCB - symbol_list passed is NULL\n");
} else {
if (symbol_list->count > 0) {
for (i = 0; i < symbol_list->count; i++) {
// Is the Status being set Marginal or Critical
if (symbol_list->symbols[i].symbol_status == ovwMarginalStatus ||
symbol_list->symbols[i].symbol_status == ovwCriticalStatus) {
// Is this a symbol on the Ack Submap
ack_submap_id = get_ack_submap_id(map);
if (ack_submap_id != symbol_list->symbols[i].submap_id) {
## Check symbol label against string
if (strstr(symbol_list->symbols[i].symbol_label,
ICU_STRING)
!= NULL) {
// Is this symbol attmepting to be cleared
if (strstr(symbol_list->symbols[i].symbol_label,
CLEARED_SYMBOL_STRING)
== NULL) {
// Save off new_symbol_status
new_object_status = symbol_list->symbols[i].symbol_status;
// Change the Symbol Name while the clear Ack is occuring
// so we know not to attempt to change statuses when
// setting the final status
## I dont like using malloc, but anyway ... create new
string
original_symbol_label =
strdup(symbol_list->symbols[i].symbol_label);
cleared_symbol_label =
(char *)
malloc(strlen(symbol_list->symbols[i].symbol_label) +
1 + strlen(CLEARED_SYMBOL_STRING));
strcpy(cleared_symbol_label,
symbol_list->symbols[i].symbol_labe
l);
strcat(cleared_symbol_label, CLEARED_SYMBOL_STRING);
## Set the symbol label
ret = OVwSetSymbolLabel(map,
symbol_list->symbols[i].symbol_id,
cleared_symbol_label);
## Always check return status
if (ret != 0) {
printf("symbol_status_cbCB - OVwSetSymbolLabel failed:
%s\n",
OVwErrorMsg(OVwError()));
}
## Change parent objects status
// Set the Status of this Symbols Object to ovwNormalStatus
to clear
// the Acked Status above, if any.
ret = OVwSetStatusOnSymbol(map,
symbol_list->symbols[i].symbol_id,
ovwNormalStatus);
if (ret != 0) {
printf("symbol_status_cbCB - OVwSetStatusOnObject 1
failed: %s
\n",
OVwErrorMsg(OVwError()));
}
## If you have gotten to this point, tell me why I set
'Normal Status' then set to new_object_status?
// Set the status of this Symbols Object to the original
status
ret = OVwSetStatusOnSymbol(map,
symbol_list->symbols[i].symbol_id,
new_object_status);
if (ret != 0) {
printf("symbol_status_cb - OVwSetStatusOnObject 2 failed:
%s\n
",
OVwErrorMsg(OVwError()));
}
## Remove added tag to symbol.
// Set the Symbol Label back by removing the cleared
// symbol string
ret = OVwSetSymbolLabel(map,
symbol_list->symbols[i].symbol_id,
original_symbol_label);
if (ret != 0) {
printf("symbol_status_cbCB - OVwSetSymbolLabel failed:
%s\n",
OVwErrorMsg(OVwError()));
}
} // End of if Cleared Symbol string
} // End of If ICU
} // End of Ack Supmap if
} // End Symbol Status if
} // End Symbol for loop
} // End Symbol list count if
} // End symbol_list is NULL
Jason Allison
Principal Engineer
ARINC Incorporated
Office: (410) 266-2006
FAX: (410) 573-3026
-----Original Message-----
From: jeff.ctr.vandenbussche@faa.gov
[mailto:jeff.ctr.vandenbussche@faa.gov]
Sent: Tuesday, November 05, 2002 9:23 AM
To: bernard.baudoux@fortisbank.com
Cc: 'nv-l@lists.tivoli.com'
Subject: RE: [nv-l] Changing label of node
Bernard,
Thanks for your reply. I guess I should have clarified this. I would like
to be able to do this automated, not manually.
Any suggestions?
Thanks,
Jeff
<bernard.baudoux@fort
isbank.com> To: Jeff CTR
Vandenbussche/ACT/CNTR/FAA@FAA
cc:
"'nv-l@lists.tivoli.com'" <nv-l@lists.tivoli.com>
11/05/02 04:29 AM Subject: RE: [nv-l]
Changing label of node
Hello Jeff,
to modify the label of a symbol in Netview you can do as follows:
right click on the given symbol, then left click on 'Edit',
'Modify/Describe', 'Symbol'.
Then a window "Symbol Description" is displayed and there you can write
anything you want as a label.
Beware this applies only to the symbol on which you have right clicked.
If there are other instances of that symbol you must repeat this as many
times as necessary.
Hope this helps,
Bernard Baudoux,
Fortis Banque.
> -----Original Message-----
> From: jeff.ctr.vandenbussche@faa.gov
[SMTP:jeff.ctr.vandenbussche@faa.gov]
> Sent: lundi 4 novembre 2002 22:34
> To: nv-l@lists.tivoli.com
> Subject: [nv-l] Changing label of node
>
> Does anyone have any ideas how to change the label of a node on the IPMap
> to anything other than is in the /etc/host file. I have 2 boxes node1
and
> node2 that are either "primary" or "redundant", and would like to be able
> to change the label on my home map (X.X.X.X Segment1) to reflect this
> state. Please let me know.
>
> Thanks,
>
> Jeff
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: nv-l-unsubscribe@lists.tivoli.com
> For additional commands, e-mail: nv-l-help@lists.tivoli.com
>
> *NOTE*
> This is not an Offical Tivoli Support forum. If you need immediate
> assistance from Tivoli please call the IBM Tivoli Software Group
> help line at 1-800-TIVOLI8(848-6548)
This email and any attached files are confidential and may be legally
privileged.
If you are not the intended recipient, any disclosure, reproduction,
copying, distribution, or other dissemination or use of this communication
is strictly prohibited.
If you have received this transmission in error please notify the sender
immediately and then delete this email.
Email transmission cannot be guaranteed to be secure or error free as
information could be intercepted, corrupted, lost, destroyed, arrive late
or
incomplete, or contain viruses.
The sender therefore is in no way liable for any errors or omissions in the
content of this message, which may arise as a result of email transmission.
If verification is required, please request a hard copy.
---------------------------------------------------------------------
To unsubscribe, e-mail: nv-l-unsubscribe@lists.tivoli.com
For additional commands, e-mail: nv-l-help@lists.tivoli.com
*NOTE*
This is not an Offical Tivoli Support forum. If you need immediate
assistance from Tivoli please call the IBM Tivoli Software Group
help line at 1-800-TIVOLI8(848-6548)
|