Merge ~bhill/epics-base:camonitor-server-relative-ts-bug into ~epics-core/epics-base/+git/epics-base:3.16

Proposed by Bruce Hill
Status: Rejected
Rejected by: Ralph Lange
Proposed branch: ~bhill/epics-base:camonitor-server-relative-ts-bug
Merge into: ~epics-core/epics-base/+git/epics-base:3.16
Diff against target: 30 lines (+6/-6)
1 file modified
src/ca/client/tools/tool_lib.c (+6/-6)
Reviewer Review Type Date Requested Status
Ralph Lange Approve
Review via email: mp+341085@code.launchpad.net

Description of the change

tsFirst needs to get initialized from the first server side
timestamp instead of the client side tsNow.

Discovered when I added a -P option to show SLAC pulseId which is in the
lower 17 bits of nsec on the server side but is just nsec on the client side.

Tested and working here at SLAC since Nov 2017.

To post a comment you must log in.
Revision history for this message
Ralph Lange (ralph-lange) wrote :

Correctly found and fixed the bug.
Thanks a lot!

Should be re-targeted to 3.14 branch.

review: Approve
Revision history for this message
Ralph Lange (ralph-lange) wrote :

3.14 re-targeting should probably be done on a new branch/merge proposal.

Revision history for this message
Ralph Lange (ralph-lange) wrote :

Unmerged commits

f7b1c40... by Bruce Hill

Fixed camonitor server side relative timestamps bug

tsFirst needs to get initialized from the first server side
timestamp instead of the client side tsNow.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/src/ca/client/tools/tool_lib.c b/src/ca/client/tools/tool_lib.c
index 72044bd..29b252e 100644
--- a/src/ca/client/tools/tool_lib.c
+++ b/src/ca/client/tools/tool_lib.c
@@ -414,6 +414,12 @@ char *dbr2str (const void *value, unsigned type)
414 ptsNewS = &((struct TYPE *)value)->stamp; \414 ptsNewS = &((struct TYPE *)value)->stamp; \
415 ptsNewC = &tsNow; \415 ptsNewC = &tsNow; \
416 \416 \
417 if (!tsInitS) \
418 { \
419 tsFirst = *ptsNewS; \
420 tsInitS = 1; \
421 } \
422 \
417 switch (tsType) { \423 switch (tsType) { \
418 case relative: \424 case relative: \
419 ptsRefC = &tsStart; \425 ptsRefC = &tsStart; \
@@ -506,12 +512,6 @@ void print_time_val_sts (pv* pv, unsigned long reqElems)
506 epicsTimeGetCurrent(&tsNow);512 epicsTimeGetCurrent(&tsNow);
507 epicsTimeToStrftime(timeText, TIMETEXTLEN, timeFormatStr, &tsNow);513 epicsTimeToStrftime(timeText, TIMETEXTLEN, timeFormatStr, &tsNow);
508514
509 if (!tsInitS)
510 {
511 tsFirst = tsNow;
512 tsInitS = 1;
513 }
514
515 if (pv->nElems <= 1 && fieldSeparator == ' ') printf("%-30s", pv->name);515 if (pv->nElems <= 1 && fieldSeparator == ' ') printf("%-30s", pv->name);
516 else printf("%s", pv->name);516 else printf("%s", pv->name);
517 printf("%c", fieldSeparator);517 printf("%c", fieldSeparator);

Subscribers

People subscribed via source and target branches