-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HRC swap to B-side electronics #1
base: master
Are you sure you want to change the base?
Conversation
open MAIL, "|mailx -s 'BRIT check email now' sot_red_alert\@cfa.harvard.edu"; | ||
#open MAIL, "|mailx -s BRIT msobolewska\@cfa.harvard.edu"; | ||
#open MAIL, "|mail msobolewska\@cfa.harvard.edu"; | ||
#open MAIL, "|more"; #debug | ||
open FILE, $afile; | ||
while (<FILE>) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto here, where does this while loop end?
my $afile = "./.aacccdptalert"; | ||
my $tfile = "./.aacccdptwait"; | ||
my $afile = ".aacccdptalert"; | ||
my $tfile = ".aacccdptwait"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if we are no longer sending alerts for high temperature ccd then do we need this function?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is to be decided. Similarly, we also no longer send alerts for tank pressure.
return $color; | ||
} | ||
|
||
|
||
sub send_tank_red { | ||
my $obstime = ${$hash{PMTANKP}}[0]; | ||
if (! time_curr($obstime)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these two lines are commented out in check_state_test.pm, what's the reason for the difference here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They are commented in check_state_test.pm so that we can test with old telemetry.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So they will be un-commented when we the changes are made?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In check_state_test we always had these lines commented, I think? The idea was to be able to test on fabricated
telemetry. In check_state.pm these lines are un-commented so that the alert checking happens only when real time data is flowing. In check_state_sim.pm (to be added for the SIMs) these lines will be un-commented, TEST in the subject and body of the messages will be replaced with SIM, and the mailing lists will be the same as in check_state.pm. Does is make sense?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've been using check_state_test.pm anytime we've had an anomaly and during recovery didn't need to send out alerts. check_state_no_alerts.pm is written in a way that still sends out alerts - I'm not sure what the original intention behind this was. It's fine for test to have the lines uncommented, will it still function if set during an anomaly? Or will we have to have a different way of not sending out alerts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did my best to look for typos/spelling but all the msids started to float together when I got to snap_format.pm - I think they look good though. Do you have a sample of the resulting snapshot page?
@@ -1208,18 +1425,16 @@ sub send_tank_yellow { | |||
if (! time_curr($obstime)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto comment under send_tank_yellow
return $color; | ||
} | ||
|
||
|
||
sub send_tank_red { | ||
my $obstime = ${$hash{PMTANKP}}[0]; | ||
if (! time_curr($obstime)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So they will be un-commented when we the changes are made?
snap_format.pm
Outdated
|
||
$s .= sprintf " OBSID %5d EPState %4s\n", | ||
${$h{COBSRQID}}[1], ${$h{EPSTATE}}[1]; | ||
$s .= sprintf "%52 sOBSID %5d EPState %4s\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it okay for the %52 and s to be separated?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No.. Thanks! Good catch.
Added:
|
This branch contains updates related to the HRC swap to B-side electronics. In summary:
I also removed a number of obsolete commented lines from the code to make the code easier to read.
The following files most likely can be removed from the package (please confirm):
check_state_alerts.pm
check_state_noalerts.pm
snaps2_alerts.par
snaps2_noalerts.par
Needs to be added:
tests
folder with test telemetry to work with the test package