Vinci Matlab Interface  4.01.0
Public Member Functions | Public Attributes
Connect Class Reference

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...

Inheritance diagram for Connect:
Inheritance graph
[legend]

List of all members.

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.

Detailed Description

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.


Constructor & Destructor Documentation

function Connect ( in  vinciPortOrBinaryPath,
in  useDebugBinary 
)

Creates a new Vinci.Connect instance.

Usage:
  • obj = Vinci.Connect()
  • obj = Vinci.Connect(vinciPort, [useDebugBinary])
  • obj = Vinci.Connect(binaryPath, [useDebugBinary])
Parameters:
vinciPortOrBinaryPathoptional. 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.
useDebugBinaryoptional. Whether the debug or release version of Vinci is used. In most cases, this parameter can be ignored. Matlab will automatically guess the mode.
Return values:
objA Vinci.VinciConnect object.

Member Function Documentation

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.

Usage:
  • answer = obj.sendMessage(message, [sendAnswer])
Parameters:
objThe Vinci.Connect instance.
messageA string. A generic xml message, which the Vinci.Connect instance sends to Vinci.
sendAnsweroptional. A boolean. If false, Matlab tells Vinci to not send an answer. The default is true.
Return values:
answerIf sendAnswer is true, Vinci's answer is returned as a string. Else, an empty cell array is returned.
See also:
sendMessageToTarget
sendMessageToTargetNoAnswer
sendMessageNoAnswer
sendRawMessage
function sendMessageNoAnswer ( in  obj,
in  message 
)

Sends a generic xml message to Vinci.

Usage:
  • obj.sendMessageNoAnswer(message)
Parameters:
objThe Vinci.Connect instance.
messageA string. A generic xml message, which the Vinci.Connect instance sends to Vinci.
See also:
sendMessageToTarget
sendMessageToTargetNoAnswer
sendMessage
sendRawMessage
function sendMessageToTarget ( in  obj,
in  target,
in  message 
)

Sends an xml message to a target object in Vinci and receives an answer.

Usage:
  • answer = obj.sendMessageToTarget(target, message)
Parameters:
objThe Vinci.Connect instance.
targetA string. The name of the target.
messageA string. The message, which the Vinci.Connect instance sends to the target. Must be a valid xml string.
Return values:
answerA string. The answer returned by Vinci.
See also:
sendMessageToTargetNoAnswer
sendMessage
sendMessageNoAnswer
sendRawMessage
function sendMessageToTargetNoAnswer ( in  obj,
in  target,
in  message 
)

Sends an xml message to a target object in Vinci.

Usage:
  • obj.sendMessageToTarget(target, message)
Parameters:
objThe Vinci.Connect instance.
targetA string. The name of the target.
messageA string. The message, which the Vinci.Connect instance sends to the target. Must be a valid xml string.
See also:
sendMessageToTarget
sendMessageNoAnswer
sendMessage
sendRawMessage
function sendRawMessage ( in  obj,
in  metadata,
in  data,
in  sendAnswer 
)

Sends a raw data message to Vinci.

Usage:
  • answer = obj.sendRawMessage(metadata, data, [sendAnswer])
Parameters:
objThe Vinci.Connect object.
metadataAn string. Metadata about the message as an xml string.
dataAn int8 array. The raw data, which should be send to Vinci.
sendAnsweroptional. A boolean. If false, Matlab tells Vinci to not send an answer. The default is true. The default is true.
Return values:
answerIf sendAnswer is true, Vinci's answer is returned as a string. Else, an empty cell array is returned.
See also:
sendMessageToTarget
sendMessageToTargetNoAnswer
sendMessageNoAnswer
sendMessage
function timeoutSetter ( in  obj,
in  timeout 
)

Member Data Documentation

Property timeout

The time (in milliseconds) Matlab waits for answers from Vinci.

If no answer is received during this period (this usually happens when Vinci was closed or crashed), Matlab will terminate the connection.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables