MCPcopy Create free account
hub / github.com/Atarity/Lightpack / getOSCTargetStr

Method getOSCTargetStr

Software/apiexamples/liOSC/OSC.py:1458–1467  ·  view source on GitHub ↗

Returns the OSCTarget matching the given address as a ('osc:// : [ ]', [' ', ...])' tuple. 'address' can be a (host, port) tuple, or a 'host' (string), in which case the first matching OSCTarget is returned Returns (None, []) if address not found.

(self, address)

Source from the content-addressed store, hash-verified

1456 self.targets[(host, port)] = val
1457
1458 def getOSCTargetStr(self, address):
1459 """Returns the OSCTarget matching the given address as a ('osc://<host>:<port>[<prefix>]', ['<filter-string>', ...])&#x27; tuple.
1460 'address' can be a (host, port) tuple, or a 'host' (string), in which case the first matching OSCTarget is returned
1461 Returns (None, []) if address not found.
1462 """
1463 (addr, (prefix, filters)) = self.getOSCTarget(address)
1464 if addr == None:
1465 return (None, [])
1466
1467 return ("osc://%s" % getUrlStr(addr, prefix), getFilterStr(filters))
1468
1469 def getOSCTargetStrings(self):
1470 """Returns a list of all OSCTargets as ('osc://<host>:<port>[<prefix>]', ['<filter-string>', ...])&#x27; tuples.

Callers 1

_subscribeMethod · 0.80

Calls 3

getOSCTargetMethod · 0.95
getUrlStrFunction · 0.85
getFilterStrFunction · 0.85

Tested by

no test coverage detected