| xPC Target™ | ![]() |
void xPCGetStateLog(int port, int first_sample, int num_samples, int decimation, int state_id, double *state_data);
port | Enter the value returned by either the function xPCOpenSerialPort or the function xPCOpenTcpIpPort. |
first_sample | Enter the index of the first sample to copy. |
num_samples | Enter the number of samples to copy from the output log. |
decimation | Select whether to copy all the sample values or every Nth value. |
state_id | Enter a state identification number. |
state_data | The log is stored in state_data, whose allocation is the responsibility of the caller. |
The xPCGetStateLog function gets the state log. It then copies the log into state_data. You get the data for each state signal in turn by specifying the state_id. State IDs range from 1 to (N-1), where N is the return value of xPCGetNumStates. Entering 1 for decimation copies all values. Entering N copies every Nth value. For first_sample, the sample indices range from 0 to (N-1), where N is the return value of xPCNumLogSamples. Use the xPCNumLogSamples function to get the maximum number of samples.
Note that the target application must be stopped before you get the number.
API functions xPCNumLogWraps, xPCNumLogSamples, xPCMaxLogSamples, xPCGetNumStates, xPCGetOutputLog, xPCGetTETLog, xPCGetTimeLog
Target object method getlog
Target object property StateLog
![]() | xPCGetSignalWidth | xPCGetStopTime | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |