This callback is invoked whenever the model writes to stdout or stderr.
Namespace:
Quanser.TargetsAssembly: Quanser.Targets (in Quanser.Targets.dll)
Syntax
Visual Basic (Declaration) |
---|
Function ConsoleOutput ( _ target As Target, _ model_output As Target..::.ModelOutput, _ context As Object, _ model As String, _ text As String _ ) As Integer |
C# |
---|
int ConsoleOutput( Target target, Target..::.ModelOutput model_output, Object context, string model, string text ) |
Visual C++ |
---|
int ConsoleOutput( Target^ target, Target..::.ModelOutput^ model_output, Object^ context, String^ model, String^ text ) |
JavaScript |
---|
function consoleOutput(target, model_output, context, model, text); |
Parameters
- target
- Type: Quanser.Targets..::.Target
The target instance.
- model_output
- Type: Quanser.Targets..::.Target..::.ModelOutput
The instance referring to the standard output of the model.
- context
- Type: System..::.Object
The context passed to the GetModelOutput(IModelOutput, Object) method.
- model
- Type: System..::.String
The name of the model.
- text
- Type: System..::.String
The most recent text written by the model to stdout or stderr.
Return Value
Return zero if successful. Otherwise return a negative error code.Remarks
This callback is invoked when the model writes to stdout or stderr. However, these streams are buffered for efficiency, so an fflush(stdout) or fflush(stderr) is required to force the output to be received before the buffer is full.
This method should return zero. Returning a negative error code will cause the GetModelOutput(IModelOutput, Object) method to return with that error code.