NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How to access ReportText from SequenceContext?

Given a SequenceContext ( TS::SequenceContext * ) how can I access the step's report text?  In other code ( CVI ), I can use the tTestData * from the standard prototype adapter and call testData->replaceStringFuncPtr( &testData->outBuffer, "string to put in report" );  Basically, how do I get access to the equivalent of testData->outBuffer which is really Step.Result.ReportText?  Thanks.

-G-
0 Kudos
Message 1 of 3
(3,926 Views)

The best way to address this is simply path the string you want to put into ReportText as parameter from your CVI module.

In the module adapter of the step, configure that return string to be "forwarded" into Step.Result.ReportText.

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 3
(3,904 Views)

Norbert, can you explain why using a parameter would be advantageous over passing Step.Result.ReportText as a C string buffer?  I am trying to eliminate the passing of anything to the code module if there's a way to access it from the SequenceContext * or something similar.  Basically, I modified the default template for a Visual C++ multiple numeric limit test to look like so:

 

void function

(

TS::SequenceContext * const seq_contxt, // sequence context
//double                                 rslts[], // test results
char                                      rpt_txt[ 1024 ], // report text buffer
bool &                                   has_error, // error flag buffer
long &                                   error_code, // error code buffer
char                                      error_msg[ 1024 ] // error message buffer

)

 

If I can access the report text or the error details ( all in Step.Result ) without passing them that'd be ideal assuming there isn't 20 pointers of indirection involved.

-G-
0 Kudos
Message 3 of 3
(3,897 Views)