Vinci Matlab Interface
4.01.0
|
This class provides the basic functionality for starting a new Vinci instance, connecting to an existing Vinci instance and exchanging data with the connected instance of Vinci. More...
Public Member Functions | |
function | Connect (in vinciPortOrBinaryPath, in useDebugBinary) |
Creates a new Vinci.Connect instance. | |
function | onetimeTimeout (in obj, in timeout) |
function | timeoutSetter (in obj, in timeout) |
function | sendMessageToTarget (in obj, in target, in message) |
Sends an xml message to a target object in Vinci and receives an answer. | |
function | sendMessageToTargetNoAnswer (in obj, in target, in message) |
Sends an xml message to a target object in Vinci. | |
function | sendMessageNoAnswer (in obj, in message) |
Sends a generic xml message to Vinci. | |
function | sendMessage (in obj, in message, in sendAnswer) |
Sends a generic xml message to Vinci and receives an answer. | |
function | sendRawMessage (in obj, in metadata, in data, in sendAnswer) |
Sends a raw data message to Vinci. | |
function | closeVinci (in obj, in force) |
function | killVinci (in obj) |
function | exitCommunication (in obj, in bReStartMgr) |
function | closeSockets (in obj) |
Public Attributes | |
Property | timeout |
The time (in milliseconds) Matlab waits for answers from Vinci. |
This class provides the basic functionality for starting a new Vinci instance, connecting to an existing Vinci instance and exchanging data with the connected instance of Vinci.
This class is most often passed to instances of other classes and is used internally by these objects.
A new instance of the class can be constructed in three different ways.
vc = Vinci.Connect() starts a new instance of Vinci and connects to this instance. Connect determines the name of the vinci executable automatically.
vc = Vinci.Connect(binaryname, debugmode) creates a new instance of Vinci using the executable named by 'binaryname'. The parameter 'debugmode' is optional and should be set to true if the executable is a debug version and false otherwise. If the parameter is not supplied, Connect tries to guess whether or not the debug mode should be activated. In most cases, 'debugmode' can be ignored.
vc = Vinci.Connect(portnumber, debugmode) attaches to an already running instance of Vinci. 'portnumber' is the tcp port mentioned in the Vinci Log View in the text line:
"opened TCPServer (port: <portnumber>))"
The parameter 'debugmode' is optional and works as described above. In most cases, you can savely ignore it. It is important to note that you must start Vinci with the commandline parameter -S to be able to connect to it from Matlab.
function Connect | ( | in | vinciPortOrBinaryPath, |
in | useDebugBinary | ||
) |
Creates a new Vinci.Connect instance.
vinciPortOrBinaryPath | optional. Either a string or an integer. If an integer is given, Matlab will try to connect to a running Vinci instance listening on the port given by the integer. If a string is given, the string names the path to the Vinci binary. If non is given, Matlab tries to identify the name of the Vinci binary automatically. |
useDebugBinary | optional. Whether the debug or release version of Vinci is used. In most cases, this parameter can be ignored. Matlab will automatically guess the mode. |
obj | A Vinci.VinciConnect object. |
function closeSockets | ( | in | obj | ) |
function closeVinci | ( | in | obj, |
in | force | ||
) |
function exitCommunication | ( | in | obj, |
in | bReStartMgr | ||
) |
function killVinci | ( | in | obj | ) |
function onetimeTimeout | ( | in | obj, |
in | timeout | ||
) |
function sendMessage | ( | in | obj, |
in | message, | ||
in | sendAnswer | ||
) |
Sends a generic xml message to Vinci and receives an answer.
obj | The Vinci.Connect instance. |
message | A string. A generic xml message, which the Vinci.Connect instance sends to Vinci. |
sendAnswer | optional. A boolean. If false , Matlab tells Vinci to not send an answer. The default is true . |
answer | If sendAnswer is true , Vinci's answer is returned as a string. Else, an empty cell array is returned. |
function sendMessageNoAnswer | ( | in | obj, |
in | message | ||
) |
Sends a generic xml message to Vinci.
obj | The Vinci.Connect instance. |
message | A string. A generic xml message, which the Vinci.Connect instance sends to Vinci. |
function sendMessageToTarget | ( | in | obj, |
in | target, | ||
in | message | ||
) |
Sends an xml message to a target object in Vinci and receives an answer.
obj | The Vinci.Connect instance. |
target | A string. The name of the target. |
message | A string. The message, which the Vinci.Connect instance sends to the target. Must be a valid xml string. |
answer | A string. The answer returned by Vinci. |
function sendMessageToTargetNoAnswer | ( | in | obj, |
in | target, | ||
in | message | ||
) |
Sends an xml message to a target object in Vinci.
obj | The Vinci.Connect instance. |
target | A string. The name of the target. |
message | A string. The message, which the Vinci.Connect instance sends to the target. Must be a valid xml string. |
function sendRawMessage | ( | in | obj, |
in | metadata, | ||
in | data, | ||
in | sendAnswer | ||
) |
Sends a raw data message to Vinci.
obj | The Vinci.Connect object. |
metadata | An string. Metadata about the message as an xml string. |
data | An int8 array. The raw data, which should be send to Vinci. |
sendAnswer | optional. A boolean. If false , Matlab tells Vinci to not send an answer. The default is true . The default is true . |
answer | If sendAnswer is true , Vinci's answer is returned as a string. Else, an empty cell array is returned. |
function timeoutSetter | ( | in | obj, |
in | timeout | ||
) |
Property timeout |