Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ofxaddons
ofxCloudLib
Commits
7183e188
Commit
7183e188
authored
Dec 14, 2017
by
artificiel
Browse files
ClientConnector: desactivation du oscParameterSync
semble causer des problemes vs threading
parent
8cde156f
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/ofxCloudLib/ClientConnector.cpp
View file @
7183e188
...
@@ -46,10 +46,10 @@ void ClientConnector::threadedFunction()
...
@@ -46,10 +46,10 @@ void ClientConnector::threadedFunction()
xyz_receiver_
.
receive
(
fresh_mesh
);
xyz_receiver_
.
receive
(
fresh_mesh
);
if
(
fresh_mesh
.
getNumVertices
())
{
if
(
fresh_mesh
.
getNumVertices
())
{
fresh_mesh
.
removeVertex
(
0
);
fresh_mesh
.
removeVertex
(
0
);
TS_START
(
"Client::send channel thread"
);
aggregated_
.
send
(
std
::
move
(
fresh_mesh
));
TS_STOP
(
"Client::send channel thread"
);
}
}
TS_START
(
"Client::send channel thread"
);
aggregated_
.
send
(
std
::
move
(
fresh_mesh
));
TS_STOP
(
"Client::send channel thread"
);
// std::cout << "NEW CLOUD IN THREAD " << client_name_ << "#" << cloud_counter_ << std::endl;
// std::cout << "NEW CLOUD IN THREAD " << client_name_ << "#" << cloud_counter_ << std::endl;
}
else
{
}
else
{
...
@@ -164,7 +164,7 @@ void ClientConnector::handle_connection()
...
@@ -164,7 +164,7 @@ void ClientConnector::handle_connection()
if
(
res
)
{
if
(
res
)
{
if
(
sync_active_
)
osc_sync_
.
update
();
//SYNC
if (sync_active_) osc_sync_.update();
// xyz_receiver_.update();
// xyz_receiver_.update();
...
@@ -185,7 +185,9 @@ void ClientConnector::handle_connection()
...
@@ -185,7 +185,9 @@ void ClientConnector::handle_connection()
// std::cout << " tokens:" << t << std::endl;
// std::cout << " tokens:" << t << std::endl;
}
}
lock
();
lock
();
if
(
message
.
size
()
==
0
)
{
if
(
message
.
size
()
==
0
)
{
std
::
cout
<<
"TCP erreur: message vide"
<<
std
::
endl
;
std
::
cout
<<
"TCP erreur: message vide"
<<
std
::
endl
;
}
else
if
(
message
[
0
]
==
"zero"
)
{
}
else
if
(
message
[
0
]
==
"zero"
)
{
...
@@ -201,7 +203,7 @@ void ClientConnector::handle_connection()
...
@@ -201,7 +203,7 @@ void ClientConnector::handle_connection()
}
}
}
else
if
(
message
[
0
]
==
"parameter"
)
{
}
else
if
(
message
[
0
]
==
"parameter"
)
{
osc_sync_
.
setup
((
ofParameterGroup
&
)
gui_
.
getParameter
(),
6666
,
client_name_
,
6667
);
//SYNC
osc_sync_.setup((ofParameterGroup &)gui_.getParameter(), 6666, client_name_, 6667);
// de l'extérieur??
// de l'extérieur??
...
@@ -209,7 +211,7 @@ void ClientConnector::handle_connection()
...
@@ -209,7 +211,7 @@ void ClientConnector::handle_connection()
cropper_parameters_
.
update_parameter_from_strings
(
message
);
cropper_parameters_
.
update_parameter_from_strings
(
message
);
}
}
osc_sync_
.
setup
((
ofParameterGroup
&
)
gui_
.
getParameter
(),
6666
,
client_name_
,
OSCCLIENT_SYNCPORT
);
//SYNC
osc_sync_.setup((ofParameterGroup &)gui_.getParameter(), 6666, client_name_, OSCCLIENT_SYNCPORT);
}
else
if
(
message
[
0
]
==
"sync_ready"
)
{
}
else
if
(
message
[
0
]
==
"sync_ready"
)
{
...
@@ -259,8 +261,7 @@ void ClientConnector::handle_connection()
...
@@ -259,8 +261,7 @@ void ClientConnector::handle_connection()
ofToString
(
depth_receiver_
.
getPort
());
ofToString
(
depth_receiver_
.
getPort
());
send
(
"hello from server"
);
send
(
"hello from server"
);
send
(
info
);
send
(
info
);
osc_sync_
.
setup
((
ofParameterGroup
&
)
gui_
.
getParameter
(),
6666
,
//SYNC osc_sync_.setup((ofParameterGroup &)gui_.getParameter(), 6666, client_name_, OSCCLIENT_SYNCPORT);
client_name_
,
OSCCLIENT_SYNCPORT
);
// osc_sync_.setup((ofParameterGroup&)gui_.getParameter(),osc_port_,client_name_,OSCCLIENT_SYNCPORT);
// osc_sync_.setup((ofParameterGroup&)gui_.getParameter(),osc_port_,client_name_,OSCCLIENT_SYNCPORT);
send
(
"sync : "
+
ofToString
(
osc_port_
));
send
(
"sync : "
+
ofToString
(
osc_port_
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment