Skip to content

Commit

Permalink
lots of small updates
Browse files Browse the repository at this point in the history
updated test server to include buttons to aid in test path created/renamed/deleted notifications :: added doxygen documentation for pretty much everything :: fixed a bug, ensured that the OSC port for detected servers defaults to the same port as the OSCQuery server if it's not explicitly supplied
  • Loading branch information
mrRay committed Jul 12, 2018
1 parent 1debf82 commit 57d8839
Show file tree
Hide file tree
Showing 17 changed files with 3,136 additions and 196 deletions.
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@ The OSCQuery protocol defines a way for machines to query the properties of [OSC
The proposal itself is small, relatively simple, and is posted here: https://github.com/mrRay/OSCQueryProposal

This repository contains a number of different targets:
* **VVOSCQueryProtocol.framework** is a Cocoa framework that provides classes which can be used to implement this protocol in software that already has an existing OSC implementation- it does so in a simple, generic and library-agnostic fashion. By itself, this framework does *NOT* send or receive OSC data, nor does it provide classes to let you create an OSC address space- this is all functionality that has already been implemented in a variety of other OSC libraries. Instead, this framework gives you the tools you need to add support for the OSCQuery protocol to whatever OSC implementation you're already working with.


This framework aims to provide classes that implement the OSCQuery protocol in software that already has an existing OSC implementation. It does so in a simple, generic, OSC-library-agnostic fashion, so adding support for OSCQuery is a matter of "adding some code" instead of "change all of my existing OSC code to use this weird new protocol".


* **VVOSCQueryProtocol.framework** is a Cocoa framework that provides classes which can be used to implement this protocol in software that already has an existing OSC implementation- it does so in a simple, generic and library-agnostic fashion, so adding support for OSCQuery is a matter of "adding some code" instead of "rip out all of my existing OSC code to use this weird new protocol/framework". By itself, this framework does *NOT* send or receive OSC data, nor does it provide classes to let you create an OSC address space- this is all functionality that has already been implemented in a variety of other OSC libraries. Instead, this framework gives you the tools you need to add support for the OSCQuery protocol to whatever OSC implementation you're already working with.
* **Utilities for Users**
* **OSCQuery Browser** is a GUI that lets you browse the contents of OSCQuery servers on the local network and send data to the various OSC nodes.
* **OSCQuery Helper** is a Cocoa app that lets you add OSCQuery support to other applications that already support OSC, but do not yet support OSCQuery.
Expand All @@ -32,4 +37,4 @@ VVOSCQueryProtocol is a framework: it contains a dynamic library and all the hea

**Documentation:**

The API for VVOSCQueryProtocol.framework is minimal, and the header files are clean and have a high signal to noise ratio- there are only two main classes (client & server!), and VVOSCQueryProtocol.h does a good job of introducing them and giving you a quick overview. Fancier documentation is coming soon...
The API for VVOSCQueryProtocol.framework is minimal, and the header files are clean and have a high signal to noise ratio- there are only two main classes (client & server!), and VVOSCQueryProtocol.h does a good job of introducing them and giving you a quick overview. The generated doxygen documentation is [available here](https://www.vidvox.net/rays_oddsnends/VVOSCQueryProtocol_Doxygen/html/index.html).
18 changes: 9 additions & 9 deletions VVOSCQueryBrowser/ServerUIController.m
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ - (void) awakeFromNib {


- (IBAction) urlFieldUsed:(id)sender {
//NSLog(@"%s",__func__);
NSLog(@"%s",__func__);
if (![NSThread isMainThread]) {
dispatch_async(dispatch_get_main_queue(), ^{ [self urlFieldUsed:sender]; });
return;
Expand Down Expand Up @@ -100,7 +100,7 @@ - (IBAction) urlFieldUsed:(id)sender {


- (void) newServerChosen:(VVOSCQueryRemoteServer*)n {
//NSLog(@"%s ... %@",__func__,n);
NSLog(@"%s ... %@",__func__,n);
if (![NSThread isMainThread]) {
dispatch_async(dispatch_get_main_queue(), ^{
[self newServerChosen:n];
Expand Down Expand Up @@ -160,20 +160,20 @@ - (void) remoteServerWentOffline:(VVOSCQueryRemoteServer *)remoteServer {
if (![NSThread isMainThread]) {
NSLog(@"\t\tERR: NOT MAIN THREAD, %s",__func__);
}

NSLog(@"%s",__func__);
if (remoteServer != server)
return;
server = nil;
//server = nil;
[urlField setStringValue:@"/"];
[self fullReloadData];
[rawJSONTextView setString:@""];
//[rawJSONTextView setString:@""];
}
- (void) remoteServer:(VVOSCQueryRemoteServer *)remoteServer websocketDeliveredJSONObject:(NSDictionary *)jsonObj {
NSLog(@"%s ... %@",__func__,jsonObj);
//NSLog(@"\t\tshould be checking for and handling PATH_CHANGED here, %s",__func__);
}
- (void) remoteServer:(VVOSCQueryRemoteServer *)remoteServer receivedOSCPacket:(const void *)packet sized:(size_t)packetSize {
//NSLog(@"%s ... %p, %ld",__func__,packet,packetSize);
NSLog(@"%s ... %p, %ld",__func__,packet,packetSize);



Expand Down Expand Up @@ -364,7 +364,7 @@ - (void)outlineViewItemDidCollapse:(NSNotification *)notification {


- (void) reloadRemoteNodes {
//NSLog(@"%s",__func__);
NSLog(@"%s",__func__);
// we're going to strip any queries out of the URL field and then sanitize the path
NSURL *url = [NSURL URLWithString:[urlField stringValue]];
NSString *pathString = [[url absoluteString] stringBySanitizingForOSCPath];
Expand All @@ -379,7 +379,7 @@ - (void) reloadRemoteNodes {
// convert the reply string to a JSON object (a dict)
NSData *urlReplyData = [urlReplyString dataUsingEncoding:NSUTF8StringEncoding];
NSDictionary *urlReplyDict = (urlReplyString==nil) ? nil : [NSJSONSerialization JSONObjectWithData:urlReplyData options:0 error:nil];
//NSLog(@"\t\turlReplyDict is %@",urlReplyDict);
NSLog(@"\t\turlReplyDict is %@",urlReplyDict);

[urlReplyRemoteNodes removeAllObjects];
RemoteNode *tmpNode = [[RemoteNode alloc] initWithParent:nil dict:urlReplyDict];
Expand All @@ -399,7 +399,7 @@ - (void) reloadRemoteNodes {
[rawJSONTextView setString:prettyString];
}
- (void) partialReloadData {
//NSLog(@"%s",__func__);
NSLog(@"%s",__func__);
[self reloadRemoteNodes];

// tell the outline view to reload its data
Expand Down
8 changes: 4 additions & 4 deletions VVOSCQueryProtocol.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
1A04695020EC251C002E591D /* MIDIOSCQueryHelperAppIcon.iconset in Resources */ = {isa = PBXBuildFile; fileRef = 1A04694F20EC251C002E591D /* MIDIOSCQueryHelperAppIcon.iconset */; };
1A04696020ECF845002E591D /* oscqueryhtml in Resources */ = {isa = PBXBuildFile; fileRef = 1A04695F20ECF845002E591D /* oscqueryhtml */; };
1A0B5F55203E0EC800948FDA /* ZWRObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A0B5F53203E0EC800948FDA /* ZWRObject.m */; };
1A0B5F56203E0EC800948FDA /* ZWRObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A0B5F54203E0EC800948FDA /* ZWRObject.h */; };
1A0B5F56203E0EC800948FDA /* ZWRObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A0B5F54203E0EC800948FDA /* ZWRObject.h */; settings = {ATTRIBUTES = (Public, ); }; };
1A0E2F361FD6D3CB00F0855D /* VVOSCQueryBrowserAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A0E2F351FD6D3CB00F0855D /* VVOSCQueryBrowserAppDelegate.m */; };
1A0E2F381FD6D3CB00F0855D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 1A0E2F371FD6D3CB00F0855D /* Assets.xcassets */; };
1A0E2F3B1FD6D3CB00F0855D /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1A0E2F391FD6D3CB00F0855D /* MainMenu.xib */; };
Expand Down Expand Up @@ -611,6 +611,8 @@
1A480FDC1FC89A9D00F86354 /* VVOSCQueryReply.m */,
1A480FDF1FC8A0EC00F86354 /* VVOSCQuery.h */,
1A480FE01FC8A0EC00F86354 /* VVOSCQuery.m */,
1A0B5F54203E0EC800948FDA /* ZWRObject.h */,
1A0B5F53203E0EC800948FDA /* ZWRObject.m */,
1A04695F20ECF845002E591D /* oscqueryhtml */,
1AF1087C1FCDD7F3004566A8 /* internal */,
);
Expand Down Expand Up @@ -712,8 +714,6 @@
1AF1087C1FCDD7F3004566A8 /* internal */ = {
isa = PBXGroup;
children = (
1A0B5F54203E0EC800948FDA /* ZWRObject.h */,
1A0B5F53203E0EC800948FDA /* ZWRObject.m */,
1A906E7E1FCC8D1700F0E412 /* NSNetServiceAdditions.h */,
1A906E7F1FCC8D1700F0E412 /* NSNetServiceAdditions.m */,
1AF108781FCDC509004566A8 /* NSStringAdditions.h */,
Expand Down Expand Up @@ -748,12 +748,12 @@
1A4D91B61FD41817007138A8 /* WSPPClient.hpp in Headers */,
1AF1087A1FCDC509004566A8 /* NSStringAdditions.h in Headers */,
1A336E901FC871870007877C /* VVOSCQueryServer.h in Headers */,
1A0B5F56203E0EC800948FDA /* ZWRObject.h in Headers */,
1A7C48F71FD586DB00AE4287 /* VVOSCQueryStringUtilities.hpp in Headers */,
1AF108581FCD7EF8004566A8 /* VVOSCQueryConstants.h in Headers */,
1AF108761FCD9DC0004566A8 /* CURLDL.h in Headers */,
1A906E801FCC8D1700F0E412 /* NSNetServiceAdditions.h in Headers */,
1A336E941FC871900007877C /* VVOSCQueryRemoteServer.h in Headers */,
1A0B5F56203E0EC800948FDA /* ZWRObject.h in Headers */,
1AB89C311FD1EE1B0094A66B /* WSPPServer.hpp in Headers */,
1AB4FB2C1FCC6C91005E3028 /* VVOSCQueryServerDetectorDomain.h in Headers */,
1A480FE51FCAD55D00F86354 /* VVOSCQueryServerDetector.h in Headers */,
Expand Down
Loading

0 comments on commit 57d8839

Please sign in to comment.