03-03-2014 04:07 PM
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.
03-04-2014 03:55 AM
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
03-04-2014 08:54 AM
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.