VeriStand .NET API Reference

IProject.SendToolMessage Method (String, String, Byte[], UInt32, Byte[])

Sends a message or command to a Workspace tool for an NI VeriStand project, as well as data required by the case that handles the command. You can use this method with any Workspace tool that registers to receive the command you specify.

This instance sends data to a tool as a byte array of 8-bit unsigned integer values. You also can use the other instance of SendToolMessage to send data as a string of human-readable characters.

Namespace: NationalInstruments.VeriStand.ClientAPI
Assembly: NationalInstruments.VeriStand.ClientAPI (in NationalInstruments.VeriStand.ClientAPI.dll) Version: 2013.0.0.0 (2013.0.0.0)
Visual Basic (Declaration)
Function SendToolMessage ( _
	tool_path As String, _
	command As String, _
	data As Byte(), _
	timeout As UInteger, _
	<OutAttribute> ByRef response As Byte() _
) As Error
C#
Error SendToolMessage(
	string tool_path,
	string command,
	byte[] data,
	uint timeout,
	out byte[] response
)
Visual C++
Error^ SendToolMessage(
	String^ tool_path, 
	String^ command, 
	array<unsigned char>^ data, 
	unsigned int timeout, 
	[OutAttribute] array<unsigned char>^% response
)

Parameters

tool_path
Type: System.String
The path to the tool VI.
command
Type: System.String
The message or command to send to the tool.
data
Type: System.Byte
The data to send to the tool.
timeout
Type: System.UInt32
The time in milliseconds to wait for a response from the tool before returning an error.
response
Type: System.Byte %
Returns the response from the tool to command.

Return Value

Returns an Error object. If no error occurs, the Code property of the Error object is 0.

See Also

Log in to get a better experience