Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Networking with osc #122

Open
wants to merge 373 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
373 commits
Select commit Hold shift + click to select a range
964756b
src/networking/oscreceiver.h: Adding comment for include. Adding set_…
dvzrv Jun 1, 2017
64c5e72
src/networking/oscsender.h: Adding comment for include. Updating add_…
dvzrv Jun 1, 2017
c988b9a
src/networking/oschandler.h: Adding include ssr_global.h for MessageL…
dvzrv Jun 1, 2017
58be8ea
src/networking/oscreceiver.h: Splitting add_server_to_client_methods(…
dvzrv Jun 2, 2017
92470da
src/networking/oschandler.h: Adding anonymous namespace for some bool…
dvzrv Jun 3, 2017
4c1646f
src/networking/oscsender.h: Removing anonymous namespace and function…
dvzrv Jun 3, 2017
89d4f79
src/networking/oscreceiver.cpp: Fixing linewraps. Improving readabili…
dvzrv Jun 3, 2017
30b547b
src/networking/oschandler.*: Adding public definition and implementat…
dvzrv Jun 4, 2017
c948656
src/networking/oscsender.*: Replacing all calls to is_server() and is…
dvzrv Jun 4, 2017
7bdfc6d
src/networking/oscreceiver.cpp: Using is_server() and is_client() in …
dvzrv Jun 4, 2017
181d625
src/networking/oscsender.cpp, src/networking/oscsender.cpp: Renaming …
dvzrv Jun 5, 2017
da910cc
src/networking/oscreceiver.cpp: Minor fixes in comments. TODO for exc…
dvzrv Jun 5, 2017
d50da83
src/networking/oscreceiver.cpp: Minor fixes in comments.
dvzrv Jun 5, 2017
941d654
src/networking/oscsender.cpp: Erasing source from _new_sources once t…
dvzrv Jun 5, 2017
a60d262
Merge branch 'networking-with-osc' of github.com:dvzrv/ssr into netwo…
dvzrv Jun 5, 2017
d12b118
src/networking/oscsender.*: Adding private member for setting the /po…
dvzrv Jun 5, 2017
f91e370
src/publisher.h: Adding set_source_file_channel() to public Publisher…
dvzrv Jun 5, 2017
60f4c9c
src/networking/oscreceiver.cpp: Adding callback function for /source/…
dvzrv Jun 5, 2017
89fd1f5
src/networking/oscreceiver.cpp: Making VERBOSE output of /update call…
dvzrv Jun 5, 2017
f00c516
src/networking/oscreceiver.cpp: Capturing *this for callbacks, that n…
dvzrv Jun 5, 2017
16e8fcd
src/networking/oscreceiver.cpp: Changing VERBOSE output to 'Added cal…
dvzrv Jun 5, 2017
2c77126
src/networking/oscreceiver.cpp: Ordering all callback handlers alphab…
dvzrv Jun 5, 2017
10147c2
src/networking/oscreceiver.cpp: Moving call to add_processing_methods…
dvzrv Jun 5, 2017
fef26e9
src/networking/oscreceiver.cpp: Adding various TODOs. Fixing errernou…
dvzrv Jun 6, 2017
1a22195
src/networking/oscreceiver.h: Using std::strings for hostname and por…
dvzrv Jun 6, 2017
4079bf1
src/networking/*: Adding callback handlers for /subscribe {Fss,Tssi}.…
dvzrv Jun 6, 2017
8e58d47
src/networking/*: Changing OscSender's _server_address to _server of …
dvzrv Jun 16, 2017
8a3c30a
src/networking/*: Removing _client_addresses from OscSender and repla…
dvzrv Jun 16, 2017
49612ff
src/networking/*: Renaming set_message_level() to set_client_message_…
dvzrv Jun 17, 2017
cb6f8f7
src/networking/oscsender.*: Using _server.message_level() instead of …
dvzrv Jun 17, 2017
535f8e1
src/ssr_global.h: Adding GUI_SERVER to MessageLevel enum class for me…
dvzrv Jun 17, 2017
9ee4df3
src/networking/oscsender.cpp: Changing all MessageLevel checks for cl…
dvzrv Jun 17, 2017
2f8d25e
src/networking/*: Renaming OscSender::server_is(std::string& hostname…
dvzrv Jun 17, 2017
19084d7
src/networking/oscreceiver.*: Renaming add_poll_methods() to add_serv…
dvzrv Jun 17, 2017
37c323b
src/networking/oscsender.cpp: Fixing line breaks and indents.
dvzrv Jun 17, 2017
f6435bd
src/networking/oschandler.cpp: Removing obsolete TODO.
dvzrv Jun 17, 2017
d80e052
src/networking/oscsender.cpp: Fixing broken string line wrap in VERBOSE.
dvzrv Jun 17, 2017
15fe3dd
src/networking/*: Implementing from_is() functionality in OscHandler,…
dvzrv Jun 17, 2017
0f1f811
src/networking/*: Adding client_has_message_level() to OscSender (and…
dvzrv Jun 17, 2017
ad0b562
src/networking/oscreceiver.cpp: Removing obsolete TODOs.
dvzrv Jun 18, 2017
c1d4b38
src/publisher.h: Adding set_source_file_name() to public Publisher in…
dvzrv Jun 18, 2017
651da3b
src/networking/oschandler.cpp: Fix missing return statement in ssr::O…
dvzrv Jun 18, 2017
f102eaf
src/networking/oscreceiver.cpp: Adding client callbacks for /cpu_load…
dvzrv Jun 18, 2017
38c49db
src/networking/oscreceiver.h: Remove obsolete todo.
dvzrv Jun 18, 2017
5d23744
src/ssr_global.h: Removing unused field THIN_CLIENT from enum class M…
dvzrv Jun 18, 2017
159107d
src/networking/oscreceiver.cpp: Making callback for /update/source/mu…
dvzrv Jun 19, 2017
b785d0e
src/networking/oscsender.cpp: Moving check for file_name_or_port_numb…
dvzrv Jun 19, 2017
86ecfff
supercollider/workflows.scd: Adding workflow example for 'sclang is a…
dvzrv Jun 21, 2017
ac12dd1
supercollider/tests.scd: Adding tests for server and client (subscrib…
dvzrv Jun 24, 2017
a3b020b
supercollider/tests.scd: Adding separate function to add n sources. A…
dvzrv Jun 28, 2017
1d44008
src/networking/oscreceiver.cpp: Switching to setting initial gain of …
dvzrv Jun 28, 2017
ffb473c
src/networking/oscsender.cpp: Wrapping all VERBOSE output information…
dvzrv Jun 29, 2017
de68cce
src/networking/*: Adding functionality to discard inactive clients au…
dvzrv Jul 10, 2017
d25f975
src/networking/*: Let calls to increment_client_alive_counter in OSCR…
dvzrv Jul 11, 2017
8eddc1f
src/ssr_global.h: Extending MessageLevel by MAX_VALUE.
dvzrv Jul 11, 2017
7f2abb4
src/configuration.*: Adding function to retrieve a valid network port…
dvzrv Jul 12, 2017
82cfa57
src/networking/oschandler.cpp: Adding exit with EXIT_FAILURE, in case…
dvzrv Jul 12, 2017
e2eabb5
src/networking/oscreceiver.cpp: Adding check, if id > 0 to all source…
dvzrv Jul 13, 2017
927bf47
Revert "Merge remote-tracking branch 'origin/gitignore-entries' into …
dvzrv Jul 25, 2017
df44f14
src/networking/oscreceiver.cpp: Using the linear scale, instead of lo…
dvzrv Jul 25, 2017
80d9d3e
supercollider/workflows.scd: Adding Sensors2OSC example, setting refe…
dvzrv Jul 27, 2017
195fef2
supercollider/workflows.scd: Fixing input creation and source volume.…
dvzrv Aug 18, 2017
f57b696
data/ssr.conf.example: Adding networking configuration.
dvzrv Mar 27, 2017
06c9e74
src/configuration.h: Adding struct members for networking mode.
dvzrv Mar 27, 2017
a7bf9c8
src/configuration.h: Turning network_clients field into a multimap to…
dvzrv Mar 28, 2017
13ede39
src/configuration.cpp: First version of functionality to parse networ…
dvzrv Mar 28, 2017
3122871
src/configuration.cpp: Renaming trim to remove_whitespace. Moving cur…
dvzrv Mar 28, 2017
94beaba
src/configuration.cpp: parse_network_clients removing printouts of na…
dvzrv Mar 28, 2017
3b0e427
src/configuration.cpp: Using the multimap of client information by re…
dvzrv May 14, 2017
fc0ae5f
data/ssr.conf.example: Fixing the example string used for clients.
dvzrv May 14, 2017
0d94cca
src/configuration.cpp: Dropping network-port-{send,receive} in favor …
dvzrv May 21, 2017
74e5142
src/configuration.h: Dropping network_port_{send,receive} in favor of…
dvzrv May 21, 2017
9f1a8c8
data/ssr.conf.example: Dropping NETWORK_PORT_{SEND,RECEIVE} in favor …
dvzrv May 21, 2017
cac6fcd
src/configuration.*: Adding function to retrieve a valid network port…
dvzrv Jul 12, 2017
79b2a26
Merging latest changes regarding includes (thread,chrono) and conf.re…
dvzrv Dec 15, 2018
e8ed336
src/networking/oschandler.*: Adding first attempt of OSC network inte…
dvzrv Mar 29, 2017
fef9496
src/networking/*: Adding current stage of work. Added class for sendi…
dvzrv Apr 3, 2017
a434c17
configure.ac: Adding check for liblo headers.
dvzrv Apr 3, 2017
0e6236f
src/Makefile.am: Adding files in src/networking.
dvzrv Apr 3, 2017
198d456
src/controller.h: Adding first batch of conditionals for osc interface.
dvzrv Apr 3, 2017
83b3835
src/networking/oscsender.h: Added reference to controller as private …
dvzrv Apr 4, 2017
1b1aeba
src/networking/oschandler.cpp: Adding controller to initializer list …
dvzrv Apr 4, 2017
a7d5e4b
src/networking/oscreceiver.cpp: Unifying callback function for creati…
dvzrv Apr 4, 2017
a788092
src/networking/oscsender.cpp: Adding reference to controller and hand…
dvzrv Apr 4, 2017
a927664
src/controller.h: Extending messages for starting OSC interface by po…
dvzrv Apr 5, 2017
6831522
src/networking/oschandler.cpp: Adding documentation. Adding stop() an…
dvzrv Apr 5, 2017
b33fdfd
src/networking/oschandler.h: Updating documentation. Adding mode() de…
dvzrv Apr 5, 2017
606a90f
src/networking/oscreceiver.cpp: Removing superfluous implementations.…
dvzrv Apr 5, 2017
bf67f58
src/networking/oscreceiver.h: Updating documentation.
dvzrv Apr 5, 2017
81f46a0
src/networking/oscsender.cpp: Updating documentation. Implementing po…
dvzrv Apr 5, 2017
8e168a6
src/networking/oscsender.h: Updating documentation. Adding declaratio…
dvzrv Apr 5, 2017
f7bdd21
src/controller.h: Updating VERBOSE2 messages for starting osc interfa…
dvzrv Apr 7, 2017
f99e4b4
src/networking/oscreceiver.cpp: Updating OSCReceiver methods to be pa…
dvzrv Apr 7, 2017
7548d11
src/networking/oscreceiver.h: Changing constructor parameters to be m…
dvzrv Apr 7, 2017
90b427f
src/networking/oscsender.cpp: Adding methods for sending OSC messages…
dvzrv Apr 7, 2017
fe8d00e
src/networking/oscsender.h: Adding bool and thread include for poll_a…
dvzrv Apr 7, 2017
0c7f71a
src/networking/oschandler.cpp: Merging client and server constructor.…
dvzrv Apr 7, 2017
c2ea971
src/networking/oschandler.h: Removing explicit client constructor for…
dvzrv Apr 7, 2017
4e3cfe2
src/networking/oscreceiver.cpp: Be more specific about the naming of …
dvzrv Apr 11, 2017
ce5a2ed
src/networking/oscsender.h: Adding new private functions is_client, i…
dvzrv Apr 11, 2017
9599f9a
src/networking/oscsender.cpp: Adding implementation for is_client, is…
dvzrv Apr 11, 2017
849171f
src/networking/oscreceiver.cpp: Adding callback functions for client …
dvzrv Apr 12, 2017
a215b47
src/networking/oscsender.h: Cleanup and adding TODO.
dvzrv Apr 12, 2017
e42e99d
src/networking/oscsender.cpp: Adding documentation for set_loudspeake…
dvzrv Apr 12, 2017
3b6337a
src/networking/oscreceiver.h: Adding TODO.
dvzrv Apr 12, 2017
4fc7bab
src/networking/oscsender.h: Adding more todos.
dvzrv May 10, 2017
e8f9600
src/networking/oschandler.cpp: Fixing accidental std::multimap initia…
dvzrv May 10, 2017
cb9a3a5
src/networking/oschandler.cpp: Fixing type definition of std::multima…
dvzrv May 10, 2017
1189248
src/networking/oschandler.cpp: Fixing accidental additional comma in …
dvzrv May 10, 2017
28967ac
src/networking/oschandler.cpp: Add TODO to fix initializer list warni…
dvzrv May 10, 2017
06a876d
src/networking/oschandler.cpp: Fix start/stop functionality. The clas…
dvzrv May 10, 2017
eddee2d
src/networking/oscsender.cpp: Adding public function to add a lo::Add…
dvzrv May 10, 2017
032d50d
src/networking/oscsender.h: Adding add_client() to the public interface.
dvzrv May 10, 2017
419c50a
src/networking/oschandler.cpp: Fixing ordering in constructor initial…
dvzrv May 10, 2017
f621afa
src/networking/oschandler.cpp: Fixing broken operands of accessing me…
dvzrv May 10, 2017
e9a9864
src/networking/oschandler.cpp: Removing accidental copies of send_to_…
dvzrv May 10, 2017
6c0e5ea
src/networking/oscsender.h: Fixing naming typo of send_to_all_clients…
dvzrv May 10, 2017
7e79dc1
src/networking/oscreceiver.cpp: Fixing typo for oscreceiver.h include.
dvzrv May 10, 2017
44c5c31
src/networking/oscreceiver.cpp: Fixing non-escaped linebreaks in VERB…
dvzrv May 11, 2017
2f2c391
src/networking/oschandler.h: Fix header guard.
dvzrv May 11, 2017
580f785
src/networking/oscreceiver.h: Fix header guard. Remove redundant _mod…
dvzrv May 11, 2017
ef45045
src/networking/oscsender.h: Fix header guard.
dvzrv May 11, 2017
37aa3ec
src/networking/oscreceiver.cpp: Fix Constructor definition (OscHandle…
dvzrv May 11, 2017
643ec51
src/networking/oscreceiver.cpp: Using apf::string::A2S() in VERBOSE o…
dvzrv May 11, 2017
f48100d
src/networking/oscreceiver.cpp: Using apf::str::A2S to convert member…
dvzrv May 11, 2017
aee92c9
src/networking/oscreceiver.cpp: Using several if clauses, instead of …
dvzrv May 11, 2017
191ef7d
src/networking/oscreceiver.cpp: Adding namespaces to apf functions in…
dvzrv May 11, 2017
a33d902
src/networking/oscsender.h: Removing unused member _mode. Moving memb…
dvzrv May 12, 2017
9d3ba25
src/networking/oscsender.cpp: Adding publisher.h apf/{stringtools,mat…
dvzrv May 12, 2017
38ca305
src/networking/oscsender.h: Changing std::thread pointer to object ty…
dvzrv May 12, 2017
1dc41b5
src/networking/oscsender.cpp: Using a detached std::thread for pollin…
dvzrv May 12, 2017
3f07df2
configure.ac: Adding linker flag for liblo.
dvzrv May 12, 2017
ce1fda1
configure.ac: Adding liblo libs to LIBS, by checking with pkg-config.…
dvzrv May 12, 2017
73ac865
src/networking/oscreceiver.cpp: Moving _receiver.stop() to the OscRec…
dvzrv May 12, 2017
ffc64da
src/networking/oscsender.h: Removing redundant lo/lo.h include.
dvzrv May 12, 2017
b6bfce8
src/networking/oschandler.cpp: Adding VERBOSE message to constructor.
dvzrv May 13, 2017
0ee234f
src/networking/oscreceiver.cpp: Adding VERBOSE message to constructor…
dvzrv May 13, 2017
dcc794e
src/networking/oscsender.cpp: Adding VERBOSE message to constructor. …
dvzrv May 13, 2017
ebcda0c
src/networking/oschandler.cpp: Adding further VERBOSE messages to con…
dvzrv May 13, 2017
bf979e8
src/networking/oscreceiver.cpp: Adding VERBOSE message to constructur…
dvzrv May 13, 2017
c98b403
src/networking/oscsender.cpp: Clarifying VERBOSE messages. Adding lea…
dvzrv May 13, 2017
2bb729e
src/networking/*: Using std::string compare() for all string based if…
dvzrv May 14, 2017
c886738
src/networking/oscsender.*: Making _client_addresses a vector of poin…
dvzrv May 14, 2017
d7b53e3
src/networking/oschandler.cpp: Adding VERBOSE message before adding c…
dvzrv May 14, 2017
be39415
src/controller.h: Updating _osc_interface initialization to use _conf…
dvzrv May 21, 2017
02a0e81
src/networking/oschandler.h: Adding lo::ServerThread to OscHandler, t…
dvzrv May 21, 2017
1ce818e
src/networking/oschandler.cpp: Changing constructor to initialize Ser…
dvzrv May 21, 2017
59d8301
src/networking/oscreceiver.h: Removing lo::ServerThread member from O…
dvzrv May 21, 2017
38ef6c0
src/networking/oscreceiver.cpp: Removing usage of port_in in construc…
dvzrv May 21, 2017
61bcea1
src/networking/oscsender.h: Removing lo::ServerThread as member of Os…
dvzrv May 21, 2017
d50157b
src/networking/oscsender.cpp: Removing port_out argument from constru…
dvzrv May 21, 2017
0200518
src/networking/oschandler.h: Making access to lo::ServerThread non-st…
dvzrv May 21, 2017
1379d47
src/networking/oschandler.cpp: Making ssr::OscHandler::server() non-s…
dvzrv May 21, 2017
45c472e
src/networking/oscreceiver.cpp: Fixing initializer list in constructo…
dvzrv May 21, 2017
01a12f8
src/networking/oschandler.h: Adding global int _message_level, defini…
dvzrv May 28, 2017
994fa0a
src/networking/oschandler.cpp: Adding implementations of OscReceiver'…
dvzrv May 28, 2017
e79797b
src/networking/oscreceiver.h: Adding functions add_client() and remov…
dvzrv May 28, 2017
ab0480e
src/networking/oscreceiver.cpp: Adding callback function for /subscri…
dvzrv May 28, 2017
282f225
src/networking/oscsender.h: Creating anonymous namespace for _message…
dvzrv May 28, 2017
ad7219a
src/networking/oscsender.cpp: Adding implementations for server_is_de…
dvzrv May 28, 2017
2367dd8
src/networking/oscclient.*: Adding class definition and implementatio…
dvzrv May 28, 2017
02969e6
src/Makefile.am: Adding src/networking/oscclient.{h,cpp}.
dvzrv May 28, 2017
8b2c641
src/networking/oscclient.h: Adding function to retrieve lo::Address f…
dvzrv May 29, 2017
1a0fa21
src/networking/oscclient.cpp: Adding implementation for address().
dvzrv May 29, 2017
3c0da39
src/networking/oscsender.cpp: Fixing documentation for constructor an…
dvzrv May 29, 2017
24df018
src/networking/oscclient.h: Adding bool for active state. Adding publ…
dvzrv May 30, 2017
a1d658b
src/networking/oscclient.cpp: Extending constructor to set _active st…
dvzrv May 30, 2017
70fdfb5
src/networking/oscclient.h: Shortening member names of enum class Mes…
dvzrv May 31, 2017
c9ba518
src/networking/oscclient.cpp: Adding VERBOSE message to constructor. …
dvzrv May 31, 2017
fa4cdea
src/networking/oscclient.h: Adding definition of activate().
dvzrv May 31, 2017
a414469
src/networking/oscclient.cpp: Adding implementation of activate(). De…
dvzrv May 31, 2017
935ddf6
src/networking/oschandler.h: Renaming remove_client() friend function…
dvzrv May 31, 2017
b341bf8
src/networking/oschandler.cpp: Changing implementation of remove_clie…
dvzrv May 31, 2017
d555638
src/networking/oscreceiver.h: Changing definition of remove_client() …
dvzrv May 31, 2017
cfa64ef
src/networking/oscsender.h: Adding OscClient by including oscclient.h…
dvzrv May 31, 2017
0afaab3
src/networking/oscsender.cpp: Replacing calls to remove_all_client_ad…
dvzrv May 31, 2017
ed5333b
src/networking/oscclient.h: Adding GUI_CLIENT to MessageLevel enum.
dvzrv May 31, 2017
8823dc9
src/networking/oscsender.cpp: Removing unneeded calls through this po…
dvzrv May 31, 2017
c3d0eab
src/networking/oscsender.cpp: Adding check for size to is_complete_so…
dvzrv Jun 1, 2017
9953866
src/networking/oschandler.h: Removing definition of _message_level an…
dvzrv Jun 1, 2017
3d7c37c
src/networking/oscsender.h: Adding MessageLevel type _message_level t…
dvzrv Jun 1, 2017
5a1f74d
src/networking/oscsender.cpp: Unifying use of compare for is_client()…
dvzrv Jun 1, 2017
9c2535c
src/ssr_global.h: Adding enum class MessageLevel for easier include.
dvzrv Jun 1, 2017
cdfa31f
src/networking/oscclient.h: Adding include for ssr_global.h for VERBO…
dvzrv Jun 1, 2017
0d5f5b9
src/networking/oscreceiver.h: Adding comment for include. Adding set_…
dvzrv Jun 1, 2017
a59a95e
src/networking/oscsender.h: Adding comment for include. Updating add_…
dvzrv Jun 1, 2017
f6ff6a5
src/networking/oschandler.h: Adding include ssr_global.h for MessageL…
dvzrv Jun 1, 2017
1885a08
src/networking/oscreceiver.h: Splitting add_server_to_client_methods(…
dvzrv Jun 2, 2017
c90d857
src/networking/oschandler.h: Adding anonymous namespace for some bool…
dvzrv Jun 3, 2017
8bba979
src/networking/oscsender.h: Removing anonymous namespace and function…
dvzrv Jun 3, 2017
ebcf35c
src/networking/oscreceiver.cpp: Fixing linewraps. Improving readabili…
dvzrv Jun 3, 2017
9331db6
src/networking/oschandler.*: Adding public definition and implementat…
dvzrv Jun 4, 2017
e9dd3da
src/networking/oscsender.*: Replacing all calls to is_server() and is…
dvzrv Jun 4, 2017
ddcf7e3
src/networking/oscreceiver.cpp: Using is_server() and is_client() in …
dvzrv Jun 4, 2017
6005596
src/networking/oscsender.cpp, src/networking/oscsender.cpp: Renaming …
dvzrv Jun 5, 2017
3570ed4
src/networking/oscreceiver.cpp: Minor fixes in comments. TODO for exc…
dvzrv Jun 5, 2017
d239eff
src/networking/oscsender.cpp: Erasing source from _new_sources once t…
dvzrv Jun 5, 2017
0f6ea8c
src/networking/oscsender.*: Adding private member for setting the /po…
dvzrv Jun 5, 2017
2ad7515
src/publisher.h: Adding set_source_file_channel() to public Publisher…
dvzrv Jun 5, 2017
a6605f0
src/networking/oscreceiver.cpp: Adding callback function for /source/…
dvzrv Jun 5, 2017
1a6ebab
src/networking/oscreceiver.cpp: Making VERBOSE output of /update call…
dvzrv Jun 5, 2017
50eac35
src/networking/oscreceiver.cpp: Capturing *this for callbacks, that n…
dvzrv Jun 5, 2017
d186620
src/networking/oscreceiver.cpp: Changing VERBOSE output to 'Added cal…
dvzrv Jun 5, 2017
976dbda
src/networking/oscreceiver.cpp: Ordering all callback handlers alphab…
dvzrv Jun 5, 2017
e2e041f
src/networking/oscreceiver.cpp: Moving call to add_processing_methods…
dvzrv Jun 5, 2017
ec48974
src/networking/oscreceiver.cpp: Adding various TODOs. Fixing errernou…
dvzrv Jun 6, 2017
408cd90
src/networking/oscreceiver.h: Using std::strings for hostname and por…
dvzrv Jun 6, 2017
394d79f
src/networking/*: Adding callback handlers for /subscribe {Fss,Tssi}.…
dvzrv Jun 6, 2017
7a81d3c
src/networking/*: Changing OscSender's _server_address to _server of …
dvzrv Jun 16, 2017
ec7244e
src/networking/*: Removing _client_addresses from OscSender and repla…
dvzrv Jun 16, 2017
b917545
src/networking/*: Renaming set_message_level() to set_client_message_…
dvzrv Jun 17, 2017
fae6c39
src/networking/oscsender.*: Using _server.message_level() instead of …
dvzrv Jun 17, 2017
0d020e4
src/ssr_global.h: Adding GUI_SERVER to MessageLevel enum class for me…
dvzrv Jun 17, 2017
ee00790
src/networking/oscsender.cpp: Changing all MessageLevel checks for cl…
dvzrv Jun 17, 2017
a817281
src/networking/*: Renaming OscSender::server_is(std::string& hostname…
dvzrv Jun 17, 2017
ab13fd9
src/networking/oscreceiver.*: Renaming add_poll_methods() to add_serv…
dvzrv Jun 17, 2017
c7562b9
src/networking/oscsender.cpp: Fixing line breaks and indents.
dvzrv Jun 17, 2017
d4f6f7d
src/networking/oschandler.cpp: Removing obsolete TODO.
dvzrv Jun 17, 2017
fbc2852
src/networking/oscsender.cpp: Fixing broken string line wrap in VERBOSE.
dvzrv Jun 17, 2017
cd3dcb9
src/networking/*: Implementing from_is() functionality in OscHandler,…
dvzrv Jun 17, 2017
c5b0682
src/networking/*: Adding client_has_message_level() to OscSender (and…
dvzrv Jun 17, 2017
34df06e
src/networking/oscreceiver.cpp: Removing obsolete TODOs.
dvzrv Jun 18, 2017
26ba4ea
src/publisher.h: Adding set_source_file_name() to public Publisher in…
dvzrv Jun 18, 2017
17b813a
src/networking/oschandler.cpp: Fix missing return statement in ssr::O…
dvzrv Jun 18, 2017
d6b90d1
src/networking/oscreceiver.cpp: Adding client callbacks for /cpu_load…
dvzrv Jun 18, 2017
a465024
src/networking/oscreceiver.h: Remove obsolete todo.
dvzrv Jun 18, 2017
66e8bd5
src/ssr_global.h: Removing unused field THIN_CLIENT from enum class M…
dvzrv Jun 18, 2017
aa39998
src/networking/oscreceiver.cpp: Making callback for /update/source/mu…
dvzrv Jun 19, 2017
46dd7c2
src/networking/oscsender.cpp: Moving check for file_name_or_port_numb…
dvzrv Jun 19, 2017
7add407
src/networking/oscreceiver.cpp: Switching to setting initial gain of …
dvzrv Jun 28, 2017
1b93585
src/networking/oscsender.cpp: Wrapping all VERBOSE output information…
dvzrv Jun 29, 2017
eb98369
src/networking/*: Adding functionality to discard inactive clients au…
dvzrv Jul 10, 2017
cbefee9
src/networking/*: Let calls to increment_client_alive_counter in OSCR…
dvzrv Jul 11, 2017
a76e690
src/ssr_global.h: Extending MessageLevel by MAX_VALUE.
dvzrv Jul 11, 2017
34669e6
src/networking/oschandler.cpp: Adding exit with EXIT_FAILURE, in case…
dvzrv Jul 12, 2017
3bb0b96
src/networking/oscreceiver.cpp: Adding check, if id > 0 to all source…
dvzrv Jul 13, 2017
9fd8b02
src/networking/oscreceiver.cpp: Using the linear scale, instead of lo…
dvzrv Jul 25, 2017
4f62cd4
Merge branch 'networking-with-osc' of github:dvzrv/ssr into networkin…
dvzrv Dec 15, 2018
af9c2c9
supercollider/workflows.scd: Adding workflow example for 'sclang is a…
dvzrv Jun 21, 2017
74d944a
supercollider/workflows.scd: Adding Sensors2OSC example, setting refe…
dvzrv Jul 27, 2017
ebc1eb4
supercollider/workflows.scd: Fixing input creation and source volume.…
dvzrv Aug 18, 2017
c6754c0
Merge branch 'sclang-workflows' of github:dvzrv/ssr into sclang-workf…
dvzrv Dec 15, 2018
b05baf0
Merge branch 'configuration-client-server' into networking-with-osc
dvzrv Dec 15, 2018
965bf52
supercollider/tests.scd: Adding tests for server and client (subscrib…
dvzrv Jun 24, 2017
406a06b
supercollider/tests.scd: Adding separate function to add n sources. A…
dvzrv Jun 28, 2017
29fed64
Merge branch 'osc-tests' of github:dvzrv/ssr into osc-tests
dvzrv Dec 15, 2018
11e1cf1
Merge branch 'osc-tests' into networking-with-osc
dvzrv Dec 15, 2018
2c9ec30
src/networking/*: Removing dead code (which also fails to compile).
dvzrv Dec 16, 2018
5410521
src/networking/oscsender.cpp: Turning std::string into C-string for s…
dvzrv Dec 16, 2018
31dd677
Merge branch 'sclang-workflows' into networking-with-osc
dvzrv Dec 16, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,14 @@ PKG_CHECK_MODULES([LIBXML], [libxml-2.0 >= 2.0],
LIBS="$LIBS $LIBXML_LIBS"
])

dnl Checking for liblo
PKG_CHECK_MODULES([LIBLO], [liblo >= 0.28],
[
PKG_FLAGS="$PKG_FLAGS $LIBLO_CFLAGS"
LIBS="$LIBS $LIBLO_LIBS"
]
)

dnl by the way, AC_HELP_STRING is deprecated, use AS_HELP_STRING instead!

ENABLE_EXPLICIT([debugging],[debugging symbols, asserts, ...])
Expand Down Expand Up @@ -521,6 +529,20 @@ ENABLE_FORCED([ip-interface], [network (TCP/IP) interface (needs Asio, https://t
AC_CHECK_HEADER([asio.hpp], , [have_ip_interface=no])
])

ENABLE_FORCED([osc-interface], [network OSC interface],
[
AC_CHECK_HEADER([lo/lo.h], , [have_osc_interface=no])
AC_CHECK_HEADER([lo/lo_cpp.h], , [have_osc_interface=no])
AC_MSG_RESULT([$have_osc_interface])
])

ENABLE_FORCED([osc-interface], [network OSC interface],
[
AC_CHECK_HEADER([lo/lo.h], , [have_osc_interface=no])
AC_CHECK_HEADER([lo/lo_cpp.h], , [have_osc_interface=no])
AC_MSG_RESULT([$have_osc_interface])
])

ENABLE_FORCED([ecasound], [Ecasound soundfile playback/recording],
[
dnl Checking for libecasoundc. It does not provide pkg-config and installs
Expand Down Expand Up @@ -763,6 +785,7 @@ echo "| VRPN ................................ : $have_vrpn"
echo "|"
echo "| Build with Ecasound support ............ : $have_ecasound"
echo "| Build with IP interface ................ : $have_ip_interface"
echo "| Build with OSC interface ............... : $have_osc_interface"
echo "| Build with GUI ......................... : $gui_string"
echo "|"
echo "| Enable debugging/optimization .......... : $have_debugging/$have_optimization"
Expand Down
11 changes: 11 additions & 0 deletions data/ssr.conf.example
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,17 @@
# carriage return: 13)
#END_OF_MESSAGE_CHARACTER = 10

############################ Networking configuration ##########################

# networking mode: client, server (default: client)
#NETWORK_MODE = server

# networking port for sending (default: 50001)
#OSC_PORT = 50001

# networking clients, comma-separated by hostname:port
#NETWORK_CLIENTS = "client:50001, client:50001"

############################## Verbosity Level #################################

# Set the level of system information
Expand Down
14 changes: 14 additions & 0 deletions src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,20 @@ SSRSOURCES += \
network/server.h
endif

if ENABLE_OSC_INTERFACE
AM_CPPFLAGS += -I$(srcdir)/networking

SSRSOURCES += \
networking/oscclient.cpp \
networking/oscclient.h \
networking/oschandler.cpp \
networking/oschandler.h \
networking/oscreceiver.cpp \
networking/oscreceiver.h \
networking/oscsender.cpp \
networking/oscsender.h
endif

if ENABLE_GUI
AM_CPPFLAGS += -I$(srcdir)/gui

Expand Down
147 changes: 146 additions & 1 deletion src/configuration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
#include <stdio.h>
#include <thread> // std::this_thread::sleep_for
#include <chrono> // std::chrono::seconds
#include <sstream> // for parse_network_clients

#include "configuration.h"
#include "posixpathtools.h"
Expand Down Expand Up @@ -108,6 +109,100 @@ namespace // anonymous
}
}

/**
* Function to retrieve a valid port from a char.
* Returns an ephemeral port according to IANA suggestions
* @param port a const char* holding a number
* @return An ephemeral port according to IANA suggestions
*/
int ssr::get_valid_network_port(const char* port)
{
int port_number = atoi(port);
bool valid_port = true;
if (port_number < 1024 && port_number > 0)
{
ERROR("Port number is in the range of well-known ports!");
valid_port = false;
}
else if(port_number < 0)
{
ERROR("Port number must not be negative!");
valid_port = false;
}
else if (port_number < 49152 || port_number > 65535)
{
ERROR("Port number is not in the range of ephemeral ports suggested by IANA!");
valid_port = false;
}
if (!valid_port)
{
WARNING("Using standard port.");
port_number = 50001;
}
return port_number;
}

/* Function to remove all whitespaces from a string.
* If the string is " " it will return an empty string.
* @param str a reference to a std::string
* @return a std::string without whitespaces
*/
std::string ssr::remove_whitespace(const std::string& str)
{
if (str == " ") return "";
size_t first = str.find_first_not_of(' ');
if (std::string::npos == first)
{
return str;
}
size_t last = str.find_last_not_of(' ');
return str.substr(first, (last - first + 1));
}

/**
* Function to retrieves tuples of key value pairs from a comma-separated
* string and stores it in a multimap. The tuples should be of the form
* client:port, client2:port2, etc..
* @param input a const char* holding a comma-separated list of clients:port
* tuples
* @param clients reference to a std::multimap<std::string, int> to store
* information on client and port in.
* @return CONFIG_SUCCESS on successful completion
*/
static int parse_network_clients(const char* input,
std::multimap<std::string, int>& clients)
{
std::istringstream iss(input);
std::string name;
int port;
std::string token;

while (std::getline(iss, token, ',')) {
size_t pos = token.find(':');
std::string port_temp = ssr::remove_whitespace(token.substr(pos+1));
name = ssr::remove_whitespace(token.substr(0, pos));

if (!name.empty())
{
// if no port supplied, insert standard
if ( port_temp.empty() || port_temp == name )
{
port = 50001;
}
else
{
port = std::stoi(port_temp);
}
clients.insert(make_pair(name, port));
}
}
VERBOSE("Read the following clients:");
for (const auto& client: clients) {
VERBOSE(client.first << ":" << client.second);
}
return CONFIG_SUCCESS;
}

/** parse command line options and configuration file(s)
* @param argc number of command line arguments.
* @param argv the arguments themselves.
Expand Down Expand Up @@ -157,6 +252,10 @@ ssr::conf_struct ssr::configuration(int& argc, char* argv[])
conf.renderer_params.set("decay_exponent", 1.0f); // 1 / r^1
conf.renderer_params.set("amplitude_reference_distance", 3.0f); // meters

// default network settings, also stated in data/ssr.conf.example
conf.network_mode = "client";
conf.osc_port = 50001;

conf.auto_rotate_sources = true;

// for WFS renderer
Expand Down Expand Up @@ -240,6 +339,14 @@ ssr::conf_struct ssr::configuration(int& argc, char* argv[])
" --no-auto-rotation\n"
" Don't auto-rotate sound sources' orientation toward "
"the reference\n"
" -N --network-mode=VALUE\n"
" Which network mode to use: client or server "
"(default: client)\n"
" -C --network-clients=VALUE\n"
" List of network clients and their ports (e.g. "
"client1:50001, client2:50001)\n"
" -p --osc-port=VALUE\n"
" Port to use for OSC communication (default: 50001)\n"

#ifdef ENABLE_IP_INTERFACE
" -i, --ip-server[=PORT]\n"
Expand Down Expand Up @@ -323,6 +430,9 @@ ssr::conf_struct ssr::configuration(int& argc, char* argv[])
{"master-volume-correction", required_argument, nullptr, 0},
{"auto-rotation", no_argument, nullptr, 0 },
{"no-auto-rotation", no_argument, nullptr, 0 },
{"network-mode", required_argument, nullptr, 'N'},
{"network-clients", required_argument, nullptr, 'C'},
{"osc-port", required_argument, nullptr, 'p'},
{"ip-server", optional_argument, nullptr, 'i'},
{"no-ip-server", no_argument, nullptr, 'I'},
{"end-of-message-character", required_argument, nullptr, 0},
Expand All @@ -341,7 +451,7 @@ ssr::conf_struct ssr::configuration(int& argc, char* argv[])
};
// one colon: required argument; two colons: optional argument
// if first character is '-', non-option arguments return 1 (see case 1 below)
const char *optstring = "-c:fgGhi::In:o:r:s:t:TvV?";
const char *optstring = "-c:C:fgGhi::IN:n:o:p:r:s:t:TvV?";

int opt;
int longindex = 0;
Expand Down Expand Up @@ -441,6 +551,9 @@ ssr::conf_struct ssr::configuration(int& argc, char* argv[])
+ std::string(optarg) + "\"!");
}
break;
case 'C':
parse_network_clients(optarg, conf.network_clients);
break;

case 'f':
conf.freewheeling = true;
Expand Down Expand Up @@ -478,13 +591,26 @@ ssr::conf_struct ssr::configuration(int& argc, char* argv[])
conf.ip_server = false;
break;

case 'N':
//TODO: check if correct string
if (!strcasecmp(optarg, "client") || !strcasecmp(optarg, "server"))
{
conf.network_mode = optarg;
}
else {
ERROR("'"<< optarg << "' is not understood as option for network-mode.");
}
break;
case 'n':
conf.renderer_params.set("name", optarg);
break;

case 'o':
conf.renderer_params.set("ambisonics_order", atoi(optarg));
break;
case 'p':
conf.osc_port = get_valid_network_port(optarg);
break;

case 'r':
conf.audio_recorder_file_name = optarg;
Expand Down Expand Up @@ -558,6 +684,7 @@ static int is_comment_or_empty(const char *line){
return (*line == '#') || (!*line);
}


/******************************************************************************/

/* This function takes a line from the configuration file and splits
Expand Down Expand Up @@ -790,6 +917,24 @@ int ssr::load_config_file(const char *filename, conf_struct& conf){
if (!strcasecmp(value, "on")) conf.gui = true;
else conf.gui = false;
}
else if (!strcmp(key, "NETWORK_MODE"))
{
if (!strcasecmp(value, "client") || !strcasecmp(value, "server"))
{
conf.network_mode = value;
}
else {
ERROR("'"<< value << "' is not understood as option for network-mode.");
}
}
else if (!strcmp(key, "NETWORK_CLIENTS"))
{
parse_network_clients(value, conf.network_clients);
}
else if (!strcmp(key, "OSC_PORT"))
{
conf.osc_port = get_valid_network_port(value);
}
else if (!strcmp(key, "NETWORK_INTERFACE"))
{
#ifdef ENABLE_IP_INTERFACE
Expand Down
7 changes: 7 additions & 0 deletions src/configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#ifndef SSR_CONFIGURATION_H
#define SSR_CONFIGURATION_H

#include <map>
#include <string>

#include "apf/parameter_map.h"
Expand Down Expand Up @@ -57,6 +58,10 @@ struct conf_struct
std::string output_port_prefix; ///< e.g. "alsa_pcm:playback"
std::string path_to_gui_images; ///< dto.
std::string path_to_scene_menu; ///< path to scene_menu.conf
std::string network_mode; ///< network mode (client or server)
///< list of network clients and ports
std::multimap<std::string, int> network_clients;
int osc_port; ///< osc communication port
int end_of_message_character; ///< ASCII
bool auto_rotate_sources; ///< Automatic orientation of sources

Expand All @@ -79,6 +84,8 @@ conf_struct configuration(int& argc, char* argv[]);
// static int parse(const char *line, char *key, char *value);
// static int is_comment_or_empty(const char *line);
int load_config_file(const char *filename, conf_struct& conf);
std::string remove_whitespace(const std::string& str);
int get_valid_network_port(const char* port);

} // namespace ssr

Expand Down
32 changes: 32 additions & 0 deletions src/controller.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@
#include "server.h"
#endif

#ifdef ENABLE_OSC_INTERFACE
#include "oschandler.h"
#endif

#include "tracker.h"
#ifdef ENABLE_INTERSENSE
#include "trackerintersense.h"
Expand Down Expand Up @@ -253,6 +257,11 @@ class Controller : public Publisher
#ifdef ENABLE_IP_INTERFACE
std::unique_ptr<Server> _network_interface;
#endif

#ifdef ENABLE_OSC_INTERFACE
std::unique_ptr<OscHandler> _osc_interface;
#endif

std::unique_ptr<Tracker> _tracker;

/// check if audio player is running and start it if necessary
Expand Down Expand Up @@ -331,6 +340,16 @@ Controller<Renderer>::Controller(int argc, char* argv[])
}
#endif

// throw error, if OSC interface is about to be used, but not compiled in
#ifndef ENABLE_OSC_INTERFACE
if (_conf.network_mode == "client" || _conf.network_mode == "server")
{
throw std::logic_error(_conf.exec_name
+ " was compiled without OSC support!\n"
"Type '" + _conf.exec_name + " --help' for more information.");
}
#endif

#ifndef ENABLE_GUI
if (_conf.gui)
{
Expand Down Expand Up @@ -403,6 +422,19 @@ Controller<Renderer>::Controller(int argc, char* argv[])
_network_interface->start();
}
#endif // ENABLE_IP_INTERFACE

// if OSC is compiled in and network-mode set, start OSC handler
#ifdef ENABLE_OSC_INTERFACE
if (_conf.network_mode == "client" || _conf.network_mode == "server")
{
VERBOSE2("Starting OSC interface as "<< _conf.network_mode <<
" on port " <<
std::to_string(_conf.osc_port) << ".");
_osc_interface.reset(new OscHandler(*this, _conf.osc_port,
_conf.network_mode, _conf.network_clients));
_osc_interface->start();
}
#endif
}

template<typename Renderer>
Expand Down
Loading