Jamoma API  0.6.0.a19
TTProtocol.cpp
Go to the documentation of this file.
1 /** @file
2  *
3  * @ingroup modularLibrary
4  *
5  * @brief A Protocol interface
6  *
7  * @details
8  *
9  * @author Laurent Garnier, Théo de la Hogue
10  *
11  * @copyright © 2011, Laurent Garnier, Théo de la Hogue @n
12  * This code is licensed under the terms of the "New BSD License" @n
13  * http://creativecommons.org/licenses/BSD/
14  */
15 
16 
17 #include "TTProtocol.h"
18 
19 #define thisTTClass TTProtocol
20 
21 /****************************************************************************************************/
22 
23 TTProtocol::TTProtocol(const TTValue& arguments) :
24 TTObjectBase(arguments),
25 mRunning(NO),
26 mSelectedApplication(kTTSymEmpty)
27 {
28  mApplicationManager = arguments[0];
29  mActivityInCallback = arguments[1];
30  mActivityOutCallback = arguments[2];
31 
33 
35  addAttributeProperty(Name, readOnly, YES);
36 
37  addAttribute(Version, kTypeSymbol);
38  addAttributeProperty(Version, readOnly, YES);
39 
40  addAttribute(Author, kTypeSymbol);
41  addAttributeProperty(Author, readOnly, YES);
42 
44  addAttributeProperty(Get, readOnly, YES);
45 
47  addAttributeProperty(Set, readOnly, YES);
48 
49  addAttribute(Listen, kTypeBoolean);
50  addAttributeProperty(Listen, readOnly, YES);
51 
52  addAttribute(Discover, kTypeBoolean);
53  addAttributeProperty(Discover, readOnly, YES);
54 
55  addAttribute(DiscoverAll, kTypeBoolean);
56  addAttributeProperty(DiscoverAll, readOnly, YES);
57 
58  addAttribute(Activity, kTypeBoolean);
59 
65 
67 
71 }
72 
74 {
75  TTValue v, applicationNames;
76  TTSymbol applicationName;
77  TTHashPtr applicationParameters;
78 
79  // for each distant application registered
80  mApplicationParameters.getKeys(applicationNames);
81  for (TTUInt32 i = 0; i < applicationNames.size(); i++) {
82 
83  applicationName = applicationNames[i];
84  mApplicationParameters.lookup(applicationName, v);
85  applicationParameters = TTHashPtr((TTPtr)v[0]);
86 
87  delete applicationParameters;
88  }
89 }
90 
92 {
93  mApplicationManager = value[0];
94  return kTTErrNone;
95 }
96 
97 TTErr TTProtocol::ApplicationRegister(const TTValue& inputValue, TTValue& outputValue)
98 {
99  TTObject application;
100  TTSymbol parameterName;
101  TTHashPtr applicationParameters;
102  TTValue v, parameterNames, out, none;
103  TTErr err;
104 
105  // update local application name
106  mApplicationManager.get("applicationLocalName", v);
107  mLocalApplicationName = v[0];
108 
109  if (inputValue.size() == 1) {
110 
111  if (inputValue[0].type() == kTypeSymbol) {
112 
113  mSelectedApplication = inputValue[0];
114 
115  // Check the application is not already registered
117 
118  if (err) {
119 
120  applicationParameters = new TTHash();
121 
122  // prepare parameters table
123  this->getParameterNames(parameterNames);
124  for (TTUInt32 i = 0; i < parameterNames.size(); i++) {
125  parameterName = parameterNames[i];
126  applicationParameters->append(parameterName, none);
127  }
128 
129  // add the parameters table into mApplicationParameters
130  v = TTValue((TTPtr)applicationParameters);
132 
133  // optionnaly format the application type depending on the protocol features
134  // (if the application is already registered into the application manager)
135  err = mApplicationManager.send("ApplicationFind", mSelectedApplication, out);
136 
137  if (!err) {
138 
139  application = out[0];
140 
141  // for none local application
143 
144  // setup the application type depending of the discovering feature of the protocol
145  if (mDiscover || mDiscoverAll)
146  application.set("type", kTTSym_mirror);
147  else
148  application.set("type", kTTSym_proxy);
149  }
150  }
151 
152  return kTTErrNone;
153  }
154  }
155  }
156 
157  return kTTErrGeneric;
158 }
159 
160 TTErr TTProtocol::ApplicationRename(const TTValue& inputValue, TTValue& outputValue)
161 {
162  if (inputValue.size() == 2) {
163 
164  if (inputValue[0].type() == kTypeSymbol && inputValue[1].type() == kTypeSymbol) {
165 
166  TTValue v;
167  TTErr err;
168 
169  TTSymbol oldApplicationName = inputValue[0];
170  TTSymbol newApplicationName = inputValue[1];
171 
172  // Check there is application registered under the old name
173  err = mApplicationParameters.lookup(oldApplicationName, v);
174 
175  if (!err) {
176 
177  mApplicationParameters.remove(oldApplicationName);
178  mApplicationParameters.append(newApplicationName, v);
179 
180  // update local application name
181  mApplicationManager.get("applicationLocalName", v);
182  mLocalApplicationName = v[0];
183 
184  return kTTErrNone;
185  }
186  }
187  }
188 
189  return kTTErrGeneric;
190 }
191 
192 TTErr TTProtocol::ApplicationUnregister(const TTValue& inputValue, TTValue& outputValue)
193 {
194  TTHashPtr applicationParameters;
195  TTValue v, none;
196  TTErr err;
197 
198  // update local application name
199  mApplicationManager.get("applicationLocalName", v);
200  mLocalApplicationName = v[0];
201 
202  if (inputValue.size() == 1) {
203 
204  if (inputValue[0].type() == kTypeSymbol) {
205 
206  mSelectedApplication = inputValue[0];
207 
208  // Check the application is registered
210 
211  if (!err) {
212 
213  Stop(mSelectedApplication, none);
214 
215  applicationParameters = TTHashPtr((TTPtr)v[0]);
216  delete applicationParameters;
217 
219  }
220  }
221  }
222 
223  return kTTErrGeneric;
224 }
225 
226 TTErr TTProtocol::ApplicationSelect(const TTValue& inputValue, TTValue& outputValue)
227 {
228  mSelectedApplication = inputValue[0];
229 
230  return kTTErrNone;
231 }
232 
234 {
236  return kTTErrNone;
237 }
238 
240 {
241  TTValue v;
242  TTHashPtr parameters;
243 
245 
246  parameters = TTHashPtr((TTPtr)v[0]);
247 
248  return parameters->lookup(parameterName, value);
249  }
250 
251  return kTTErrGeneric;
252 }
253 
255 {
256  TTValue v;
257  TTHashPtr parameters;
258 
260 
261  parameters = TTHashPtr((TTPtr)v[0]);
262 
263  if (!parameters->lookup(parameterName, v)) {
264 
265  parameters->remove(parameterName);
266  return parameters->append(parameterName, value);
267  }
268  }
269 
270  return kTTErrGeneric;
271 }
272 
274 {
275  // add all application names
276  return mApplicationParameters.getKeys(value);
277 }
278 
279 TTErr TTProtocol::isRegistered(const TTValue& inputValue, TTValue& outputValue)
280 {
281  TTSymbol applicationName;
282  TTValue v;
283 
284  applicationName = inputValue[0];
285 
286  outputValue = TTValue(mApplicationParameters.lookup(applicationName, v) == kTTErrNone);
287 
288  return kTTErrNone;
289 }
290 
292 {
293  TTValue inputValue, outputValue;
294  TTErr err;
295  TTSymbol returnedType;
296  TTValue returnedChildren;
297  TTValue returnedAttributes;
298 
299  if (!mRunning)
300  return kTTErrGeneric;
301 
302  // discover the local namespace
303  inputValue.append(address);
304 
305  outputValue.append((TTPtr)&returnedType);
306  outputValue.append((TTPtr)&returnedChildren);
307  outputValue.append((TTPtr)&returnedAttributes);
308 
309  err = mApplicationManager.send("ApplicationDiscover", inputValue, outputValue);
310 
311  // send result
312  return SendDiscoverAnswer(from, address, returnedType, returnedChildren, returnedAttributes, err);
313 }
314 
316 {
317  TTValue inputValue, outputValue;
318  TTNodePtr aNode;
319  TTErr err;
320 
321  if (!mRunning)
322  return kTTErrGeneric;
323 
324  // discover all the local namespace
325  inputValue = address;
326 
327  err = mApplicationManager.send("ApplicationDiscoverAll", inputValue, outputValue);
328 
329  aNode = TTNodePtr(TTPtr(outputValue[0]));
330 
331  // send result
332  return SendDiscoverAllAnswer(from, address, aNode, err);
333 }
334 
336 {
337  TTErr err;
338  TTValue returnedValue;
339 
340  if (!mRunning)
341  return kTTErrGeneric;
342 
343  // discover the namespace
344  if (address.getAttribute() == NO_ATTRIBUTE)
345  address = address.appendAttribute(kTTSym_value);
346 
347  err = mApplicationManager.send("ApplicationGet", address, returnedValue);
348 
349  return SendGetAnswer(from, address, returnedValue, err);
350 }
351 
353 {
354  TTValue v, none;
355  TTErr err;
356 
357  // set the an object in the namespace
358  if (address.getAttribute() == NO_ATTRIBUTE)
359  address = address.appendAttribute(kTTSym_value);
360 
361  v.append(address);
362  v.append((TTPtr)&newValue);
363  err = mApplicationManager.send("ApplicationSet", v);
364 
365  // TODO : test error and send notification if error
366  return err;
367 }
368 
370 {
371  TTValue v, none;
372  TTErr err;
373 
374  // listen an object or the namespace
375  if (address.getAttribute() == NO_ATTRIBUTE)
376  address = address.appendAttribute(kTTSym_value);
377 
378  v.append(mName); // the name of the protocol is needed for feed back notifications
379  v.append(from);
380  v.append(address);
381  v.append(enable);
382 
383  err = mApplicationManager.send("ApplicationListen", v);
384 
385  if (err && mRunning)
386  return SendListenAnswer(from, address, none, err);
387 
388  return kTTErrGeneric;
389 }
390 
392 {
393  TTValue v, none;
394  TTErr err;
395  TTValue dummy;
396 
397  if (address.getAttribute() == NO_ATTRIBUTE)
398  address = address.appendAttribute(kTTSym_value);
399 
400  v.append(from);
401  v.append(address);
402  v.append((TTPtr)&newValue);
403 
404  err = mApplicationManager.send("ApplicationListenAnswer", v);
405 
406  if (err && mRunning)
407  return SendListenAnswer(from, address, dummy, err);
408 
409  return kTTErrGeneric;
410 }
411 
413 {
414  TTValue dummy;
415 
416  return mActivityInCallback.send("notify", message, dummy);
417 }
418 
420 {
421  TTValue dummy;
422 
423  return mActivityOutCallback.send("notify", message, dummy);
424 }
425 
426 
427 
428 #if 0
429 #pragma mark -
430 #pragma mark Some Methods
431 #endif
432 
434 {
435  TTObject aProtocol;
436  TTSymbol anApplicationName;
437  TTAddress anAddress;
438  TTNodePtr aNode;
439  TTUInt8 flag;
440  TTObject anObserver;
441  TTValue v;
442 
443  // unpack baton
444  aProtocol = baton[0];
445  anApplicationName = baton[1];
446 
447  // unpack data (anAddress, aNode, flag, anObserver)
448  anAddress = data[0];
449  aNode = TTNodePtr((TTPtr)data[1]);
450  flag = data[2];
451  anObserver = data[3];
452 
453  if (flag == kAddressCreated) {
454 
455  if (aNode->getObject().valid())
456  v.append(aNode->getObject().name());
457  else
458  v.append(kTTSym_none);
459  }
460  else if (flag == kAddressDestroyed) {
461 
462  v.append(TTSymbol("delete"));
463  }
464 
465  if (TTProtocolPtr(aProtocol.instance())->mRunning)
466  return TTProtocolPtr(aProtocol.instance())->SendListenAnswer(anApplicationName, anAddress.appendAttribute(TTSymbol("life")), v);
467  else
468  return kTTErrGeneric;
469 }
470 
472 {
473  TTObject aProtocol;
474  TTSymbol anApplicationName;
475  TTAddress anAddress;
476 
477  // unpack baton
478  aProtocol = baton[0];
479  anApplicationName = baton[1];
480  anAddress = baton[2];
481 
482  if (TTProtocolPtr(aProtocol.instance())->mRunning)
483  return TTProtocolPtr(aProtocol.instance())->SendListenAnswer(anApplicationName, anAddress, data);
484  else
485  return kTTErrGeneric;
486 }
487 
489 {
490  TTValuePtr value;
491  TTObject aProtocol;
492  TTSymbol anApplicationName;
493  TTAddress anAddress;
494  TTSymbol attribute;
495 
496  // unpack baton
497  aProtocol = baton[0];
498  anApplicationName = baton[1];
499  anAddress = baton[2];
500 
501  // unpack data
502  attribute = data[0];
503  value = TTValuePtr((TTPtr)data[1]);
504 
505  // send a get request
506  if (TTProtocolPtr(aProtocol.instance())->mRunning)
507  return TTProtocolPtr(aProtocol.instance())->SendGetRequest(anApplicationName, anAddress.appendAttribute(attribute), *value);
508  else
509  return kTTErrGeneric;
510 }
511 
513 {
514  TTValuePtr value;
515  TTObject aProtocol;
516  TTSymbol anApplicationName;
517  TTAddress anAddress;
518  TTSymbol attribute;
519 
520  // unpack baton
521  aProtocol = baton[0];
522  anApplicationName = baton[1];
523  anAddress = baton[2];
524 
525  // unpack data
526  attribute = data[0];
527  value = TTValuePtr((TTPtr)data[1]);
528 
529  // send a set request
530  if (TTProtocolPtr(aProtocol.instance())->mRunning)
531  return TTProtocolPtr(aProtocol.instance())->SendSetRequest(anApplicationName, anAddress.appendAttribute(attribute), *value);
532  else
533  return kTTErrGeneric;
534 }
535 
537 {
538  TTValuePtr value;
539  TTObject aProtocol;
540  TTSymbol anApplicationName;
541  TTAddress anAddress;
542  TTSymbol message;
543 
544  // unpack baton
545  aProtocol = baton[0];
546  anApplicationName = baton[1];
547  anAddress = baton[2];
548 
549  // unpack data
550  message = data[0];
551  value = TTValuePtr((TTPtr)data[1]);
552 
553  // send a set request
554  if (TTProtocolPtr(aProtocol.instance())->mRunning)
555  return TTProtocolPtr(aProtocol.instance())->SendSetRequest(anApplicationName, anAddress.appendAttribute(message), *value);
556  else
557  return kTTErrGeneric;
558 }
559 
561 {
562  TTObject aProtocol;
563  TTSymbol anApplicationName;
564  TTAddress anAddress;
565  TTSymbol attribute;
566  TTBoolean enable;
567 
568  // unpack baton
569  aProtocol = baton[0];
570  anApplicationName = baton[1];
571  anAddress = baton[2];
572 
573  // unpack data
574  attribute = data[0];
575  enable = data[1];
576 
577  // send a listen request
578  if (TTProtocolPtr(aProtocol.instance())->mRunning)
579  return TTProtocolPtr(aProtocol.instance())->SendListenRequest(anApplicationName, anAddress.appendAttribute(attribute), enable);
580  else
581  return kTTErrGeneric;
582 }
583 
584 /***************************************************************************
585 
586  TTProtocolLib
587 
588  ***************************************************************************/
589 
590 void TTProtocolLib::getProtocolNames(TTValue& protocolNames)
591 {
592  protocolNames.clear();
593  protocolNames.append(TTSymbol("MIDI"));
594  protocolNames.append(TTSymbol("OSC"));
595  protocolNames.append(TTSymbol("WebSocket"));
596  /*
597  protocolNames.append(TTSymbol("MIDI"));
598  protocolNames.append(TTSymbol("CopperLan"));
599  protocolNames.append(TTSymbol("Serial"));
600  */
601 }
602 
bool TTBoolean
Boolean flag, same as Boolean on the Mac.
Definition: TTBase.h:167
virtual TTErr Stop(const TTValue &inputValue, TTValue &outputValue)=0
TTObject mApplicationManager
the application manager of the Modular framework.
Definition: TTProtocol.h:63
this flag means that a TTNode have been destroyed in the tree structure
Definition: TTAddressBase.h:56
TTErr ReceiveListenRequest(TTSymbol from, TTAddress address, TTBoolean enable)
Definition: TTProtocol.cpp:369
TTErr ApplicationUnregister(const TTValue &inputValue, TTValue &outputValue)
Unregister an application as a client of the protocol.
Definition: TTProtocol.cpp:192
TTErr send(const TTSymbol aName)
Send a message to this object with no arguments.
Definition: TTObject.cpp:135
virtual TTErr SendDiscoverAllAnswer(TTSymbol to, TTAddress address, TTNodePtr node, TTErr err=kTTErrNone)=0
TTAddress appendAttribute(TTSymbol anAttribute)
Return a new TTAddress with attribute part.
Definition: TTAddress.h:161
TTErr lookup(const TTSymbol key, TTValue &value)
Find the value for the given key.
Definition: TTHash.cpp:76
TTSymbol mSelectedApplication
internal symbol to select an application to access to its own parameters note : a protocol developper...
Definition: TTProtocol.h:87
#define addAttribute(name, type)
A convenience macro to be used by subclasses for registering attributes with a custom getter...
Definition: TTAttribute.h:29
We build a directory of TTNodes, and you can request a pointer for any TTNode, or add an observer to ...
Definition: TTNode.h:59
TTErr TTProtocolDirectoryCallback(const TTValue &baton, const TTValue &data)
Called when an application directory send a notification to registered application observers...
Definition: TTProtocol.cpp:433
The TTAddress class is used to represent a string and efficiently pass and compare that string...
Definition: TTAddress.h:29
Create and use Jamoma object instances.
Definition: TTObject.h:29
TTProtocol is the base class for all protocol protocol.
Definition: TTProtocol.h:60
TTObject & getObject()
Get the object binded by this node.
Definition: TTNode.cpp:468
size_type size() const noexcept
Return the number of elements.
TTErr ActivityOutMessage(const TTValue &message)
Definition: TTProtocol.cpp:419
TTErr getKeys(TTValue &hashKeys)
Get an array of all of the keys for the hash table.
Definition: TTHash.cpp:126
Base class for all first-class Jamoma objects.
Definition: TTObjectBase.h:109
TTErr registerAttribute(const TTSymbol name, const TTDataType type, void *address)
Register an attribute.
Maintain a collection of TTValue objects indexed by TTSymbol pointers.
Definition: TTHash.h:36
Symbol type.
Definition: TTBase.h:282
This is a special type used by TTAttribute to indicate that a value is a TTValue and is locally maint...
Definition: TTBase.h:286
TTErr ReceiveDiscoverRequest(TTSymbol from, TTAddress address)
Definition: TTProtocol.cpp:291
void append(const T &anElementValueToAppend)
Insert a single TTElement at the end.
Definition: TTValue.h:243
TTErr ApplicationSelect(const TTValue &inputValue, TTValue &outputValue)
Select an application to access to its own parameters value.
Definition: TTProtocol.cpp:226
virtual TTErr SendListenAnswer(TTSymbol to, TTAddress address, const TTValue &returnedValue, TTErr err=kTTErrNone)=0
void * TTPtr
A generic pointer.
Definition: TTBase.h:248
virtual ~TTProtocol()
Destructor.
Definition: TTProtocol.cpp:73
TTErr get(const TTSymbol aName, T &aReturnedValue) const
Get an attribute value for an object.
TTErr getApplicationParameters(TTSymbol parameterName, TTValue &value)
Internal accessor to get the parameter of an application.
Definition: TTProtocol.cpp:239
TTObject mActivityOutCallback
a callback to trace raw outputing messages.
Definition: TTProtocol.h:69
TTErr isRegistered(const TTValue &inputValue, TTValue &outputValue)
Is an application registered for this protocol ?
Definition: TTProtocol.cpp:279
TTProtocol(const TTValue &arguments)
Constructor.
Definition: TTProtocol.cpp:23
TTSymbol mLocalApplicationName
cache local application name
Definition: TTProtocol.h:66
TTErr TTProtocolGetAttributeCallback(const TTValue &baton, const TTValue &data)
Definition: TTProtocol.cpp:488
TTErr setApplicationParameters(TTSymbol parameterName, const TTValue &value)
Internal accessor to set the parameter of an application.
Definition: TTProtocol.cpp:254
A Protocol interface.
TTSymbol name() const
Return the name of this class.
Definition: TTObject.cpp:129
#define addAttributeProperty(attributeName, propertyName, initialValue)
A convenience macro to be used for registering properties of attributes.
Definition: TTAttribute.h:68
TTErr set(const TTSymbol aName, T aValue)
Set an attribute value for an object.
The TTSymbol class is used to represent a string and efficiently pass and compare that string...
Definition: TTSymbol.h:26
TTErr append(const TTSymbol key, const TTValue &value)
Insert an item into the hash table.
Definition: TTHash.cpp:70
TTErr setApplicationManager(const TTValue &value)
Set application manager.
Definition: TTProtocol.cpp:91
Boolean (1/0) or (true/false) flag.
Definition: TTBase.h:281
TTErr TTProtocolListenAttributeCallback(const TTValue &baton, const TTValue &data)
Definition: TTProtocol.cpp:560
TTSymbol & getAttribute()
Get the attribute part.
Definition: TTAddress.h:130
#define addMessageWithArguments(name)
A convenience macro to be used by subclasses for registering messages.
Definition: TTMessage.h:27
TTErr ApplicationRegister(const TTValue &inputValue, TTValue &outputValue)
Register an application as a client of the protocol.
Definition: TTProtocol.cpp:97
TTErr ApplicationSelectLocal()
Select the local application to access to its own parameters value.
Definition: TTProtocol.cpp:233
TTErr TTProtocolSetAttributeCallback(const TTValue &baton, const TTValue &data)
Definition: TTProtocol.cpp:512
virtual TTErr SendGetAnswer(TTSymbol to, TTAddress address, const TTValue &returnedValue, TTErr err=kTTErrNone)=0
TTErr TTProtocolSendMessageCallback(const TTValue &baton, const TTValue &data)
Definition: TTProtocol.cpp:536
TTSymbol mName
ATTRIBUTE : the name of the protocol to use.
Definition: TTProtocol.h:76
void clear()
Clear all values from the vector, leaving with size of 0.
Definition: TTValue.h:131
TTErr ReceiveListenAnswer(TTSymbol from, TTAddress address, const TTValue &newValue)
Definition: TTProtocol.cpp:391
TTHash mApplicationParameters
ATTRIBUTE : hash table containing hash table of parameters for each application registered for commun...
Definition: TTProtocol.h:71
TTObject mActivityInCallback
a callback to trace raw incoming messages.
Definition: TTProtocol.h:68
Something went wrong, but what exactly is not known. Typically used for context-specific problems...
Definition: TTBase.h:344
TTErr remove(const TTSymbol key)
Remove an item from the hash table.
Definition: TTHash.cpp:108
TTErr
Jamoma Error Codes Enumeration of error codes that might be returned by any of the TTBlue functions a...
Definition: TTBase.h:342
this flag means that a TTNode have been created in the tree structure
Definition: TTAddressBase.h:57
std::uint32_t TTUInt32
32 bit unsigned integer
Definition: TTBase.h:178
TTBoolean mRunning
ATTRIBUTE : is the Protocol reception thread enable ?
Definition: TTProtocol.h:84
TTErr ReceiveDiscoverAllRequest(TTSymbol from, TTAddress address)
Definition: TTProtocol.cpp:315
TTBoolean mDiscoverAll
ATTRIBUTE : is the Protocol allows to send discover all request ?
Definition: TTProtocol.h:83
#define addMessage(name)
A convenience macro to be used by subclasses for registering messages.
Definition: TTMessage.h:19
TTErr ApplicationRename(const TTValue &inputValue, TTValue &outputValue)
Rename an application.
Definition: TTProtocol.cpp:160
virtual TTErr SendDiscoverAnswer(TTSymbol to, TTAddress address, TTSymbol &returnedType, TTValue &returnedChildren, TTValue &returnedAttributes, TTErr err=kTTErrNone)=0
TTErr ActivityInMessage(const TTValue &message)
Definition: TTProtocol.cpp:412
TTObjectBase * instance() const
Return a direct pointer to the internal instance.
Definition: TTObject.cpp:105
No Error.
Definition: TTBase.h:343
TTErr ReceiveGetRequest(TTSymbol from, TTAddress address)
Definition: TTProtocol.cpp:335
TTErr TTProtocolAttributeCallback(const TTValue &baton, const TTValue &data)
Called when an application object attribute send a notification to registered application observers...
Definition: TTProtocol.cpp:471
virtual TTErr Scan(const TTValue &inputValue, TTValue &outputValue)=0
Scan to find remote applications and add them to the application manager.
virtual TTErr Run(const TTValue &inputValue, TTValue &outputValue)=0
TTErr ReceiveSetRequest(TTSymbol from, TTAddress address, const TTValue &newValue)
Definition: TTProtocol.cpp:352
TTBoolean valid() const
Determine if the object contained by this TTObject is truly ready for use.
Definition: TTObject.cpp:179
TTErr(TTObjectBase::* TTGetterMethod)(const TTAttribute &attribute, TTValue &value)
A type that can be used to store a pointer to a message for an object.
Definition: TTObjectBase.h:73
TTBoolean mDiscover
ATTRIBUTE : is the Protocol allows to send discover request ?
Definition: TTProtocol.h:82
[doxygenAppendixC_copyExample]
Definition: TTValue.h:34
TTErr getParameterNames(TTValue &value)
Get parameters needed by this protocol.
Definition: TTProtocol.h:139
TTErr getApplicationNames(TTValue &value)
Get the names of the registered applications.
Definition: TTProtocol.cpp:273
unsigned char TTUInt8
8 bit unsigned integer (char)
Definition: TTBase.h:174