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

Gesture interface merge #181

Open
wants to merge 73 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
9719499
add gesture component
gfrolov Jul 20, 2015
c7a1fd5
update cmake build for common (include gesture and registeredstringmap)
gfrolov Jul 20, 2015
e60a4c0
changes to device component
gfrolov Jul 20, 2015
48f2c7c
add definitions for gesture report, state, and pre-defined set
gfrolov Jul 20, 2015
fc912f7
add gesture interface definition to pluginkit
gfrolov Jul 20, 2015
661830c
update plugin kit cmake build
gfrolov Jul 20, 2015
ccc8f3a
add client callback method definitions for gesture report
gfrolov Jul 20, 2015
ee9e34f
add defns for gesture report type
gfrolov Jul 20, 2015
27b9e08
add client side gesture remote factory
gfrolov Jul 20, 2015
893d818
update cmake build for client/
gfrolov Jul 20, 2015
2dd88cf
add a sample gesture plugin
gfrolov Jul 20, 2015
53ae6ca
add osvr server config for sample gesture plugin
gfrolov Jul 20, 2015
d5f50ee
add a sample gesture client app
gfrolov Jul 20, 2015
97ef4fd
simplify reading from buffer
gfrolov Jul 20, 2015
e004f57
revert to using m_parentSet instead of overriding recordParent
gfrolov Jul 20, 2015
17f77ac
fix a couple typos
gfrolov Jul 20, 2015
275d288
fix class name, a typo
gfrolov Jul 21, 2015
b6fe7a2
update gesture interface to send gesture ID
gfrolov Jul 30, 2015
885f3ce
send gesture data with ID instead of string in component
gfrolov Jul 30, 2015
e537a97
change gesture report to use ID instead of string
gfrolov Jul 30, 2015
2f38f83
update report field for callback
gfrolov Jul 30, 2015
e3fe871
change sample gesture plugin to use updated pluginkit api
gfrolov Jul 30, 2015
83e37b4
move the handling of registeredstringmap to systemcomponent to keep o…
gfrolov Aug 10, 2015
31ee758
add accessor for system component to client context. this will allow …
gfrolov Aug 10, 2015
2923bbf
move RegisteredStringMap out of gesture component
gfrolov Aug 10, 2015
e71c6fc
move RegisteredStringMap out of remote factory and use system compone…
gfrolov Aug 10, 2015
4ac55ec
add accessor to parent (RegistrationContext)
gfrolov Aug 10, 2015
dafdf8d
add ClientKit methods to convert ID to string from RegisteredStringMap
gfrolov Aug 10, 2015
6acdcfd
add accessor for SystemComponent
gfrolov Aug 10, 2015
31607bc
move ID out of RegisteredStringMap to a separate place
gfrolov Aug 10, 2015
cfe1ff7
remove unnecessary destructor, change pointer type, and minor correct…
gfrolov Aug 11, 2015
1fcbf16
add getter/setter to SystemComponent to let gesture(and other compone…
gfrolov Aug 11, 2015
d178815
use deviceInitOpts to give SystemComponent ptr to GestureComponent, r…
gfrolov Aug 11, 2015
886b506
minor changes to sample gesture plugin
gfrolov Aug 11, 2015
c44d480
use raw ptr instead of shared one in ClientContext
gfrolov Aug 11, 2015
1408746
missed clang format on these
gfrolov Aug 11, 2015
d31ca38
use regular ptr instead of the shared
gfrolov Aug 11, 2015
c71e467
set SystemComponent for RegistrationContext
gfrolov Aug 11, 2015
f958d27
print gesture name in the client app
gfrolov Aug 11, 2015
2577b38
remove unnecessary includes
gfrolov Aug 11, 2015
e8583b0
minor cleanup of unused stuff
gfrolov Sep 2, 2015
1d4524e
changes to the typesafe ID class
gfrolov Sep 2, 2015
0e6831b
remove unused ClientInterfacePtr
gfrolov Sep 2, 2015
630994a
update includes for gesture remote factory
gfrolov Sep 4, 2015
1652bd3
add accessor for sys component to joint client context
gfrolov Sep 4, 2015
7403fd6
misc comment updates
gfrolov Sep 4, 2015
83a61c3
add gesture remote factory to remote handler
gfrolov Sep 4, 2015
14825b0
clang-format
rpavlik Sep 15, 2015
39b99e5
Move and fix the sample config for a gesture server.
rpavlik Sep 15, 2015
31014b7
Fix usage error in ClientReportTypes
rpavlik Sep 15, 2015
9303d20
Fix GestureInterfaceC.h annotations, parameters, and doc.
rpavlik Sep 15, 2015
f8e19d6
Substantial simplification of the gesture example
rpavlik Sep 15, 2015
db4a545
Gesture clientkit method name changes and some doc cleanups
rpavlik Sep 15, 2015
c0aa2ed
Fix configuring of pluginhost - can't put jsoncpp as a public lib.
rpavlik Sep 16, 2015
ac6218b
Substantially overhaul the type-safe ID template.
rpavlik Sep 16, 2015
2909103
Work on fixing StringID usages.
rpavlik Sep 16, 2015
832efd5
Fix build
rpavlik Sep 17, 2015
6501182
Use the StringBufferBuilder in ClientKit.
rpavlik Sep 17, 2015
b0af05d
Work on registered string map
rpavlik Sep 17, 2015
8f86845
Some generation of gesture-related files.
rpavlik Sep 21, 2015
de03a08
Use generated gesture define header.
rpavlik Sep 21, 2015
685bdf9
Gesture and System component changes.
rpavlik Sep 21, 2015
e994a6d
Add missing file.
rpavlik Sep 21, 2015
a0c1d2d
remove unused timestamp param and use updated function names
gfrolov Sep 23, 2015
152d6f2
use updated function names
gfrolov Sep 23, 2015
58e1746
minor gesture sample plugin update
gfrolov Sep 23, 2015
943f656
use updated function names
gfrolov Sep 23, 2015
08330f3
use sysComponent reference for GestureComponent constructor
gfrolov Sep 23, 2015
508c7ac
disable assignment operator due to reference members which generates …
gfrolov Sep 23, 2015
af47f61
remove unused timestamp variable
gfrolov Sep 23, 2015
6a18aad
add SystemComponent accessor to AnalysisClientContext
Mar 10, 2016
0d41b05
use RemoteHandlerInternals instead of InterfaceList
Mar 10, 2016
78de904
remove duplicate method, use updated path for include
Mar 10, 2016
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
Prev Previous commit
Next Next commit
revert to using m_parentSet instead of overriding recordParent
gfrolov authored and Georgiy Frolov committed Mar 9, 2016
commit e004f57533de22cab7cf1e768a5e22332cc65d14
4 changes: 2 additions & 2 deletions inc/osvr/Common/DeviceComponent.h
Original file line number Diff line number Diff line change
@@ -45,7 +45,7 @@ namespace common {

/// @brief Called (only) by BaseDevice when being added: effectively
/// records a "parent pointer" that does not convey ownership.
virtual void recordParent(Parent &dev);
void recordParent(Parent &dev);

/// @brief Called during mainloop
void update();
@@ -75,9 +75,9 @@ namespace common {
/// @brief Implementation-specific (optional) stuff to do during
/// mainloop
virtual void m_update();
Parent *m_parent;

private:
Parent *m_parent;
MessageHandlerList<BaseDeviceMessageHandleTraits> m_messageHandlers;
};
} // namespace common
2 changes: 0 additions & 2 deletions inc/osvr/Common/GestureComponent.h
Original file line number Diff line number Diff line change
@@ -84,8 +84,6 @@ namespace common {
static OSVR_COMMON_EXPORT shared_ptr<GestureComponent>
create(OSVR_ChannelCount numSensor = 1);

void recordParent(Parent &dev);

/// @brief Message from server to client, containing Gesture data.
messages::GestureRecord gestureRecord;

26 changes: 10 additions & 16 deletions src/osvr/Common/GestureComponent.cpp
Original file line number Diff line number Diff line change
@@ -125,21 +125,6 @@ namespace common {
m_gestureNameMap.registerStringID(OSVR_GESTURE_CLOSED_HAND);
}

void GestureComponent::recordParent(Parent &dev) {
BOOST_ASSERT_MSG(nullptr == m_parent,
"recordParent should only be called once!");
m_parent = &dev;
m_parentSet();

// add a ping handler to re-send gesture map everytime the new
// connection(ping) occurs
m_commonComponent =
m_getParent().addComponent(osvr::common::CommonComponent::create());
OSVR_TimeValue now;
osvrTimeValueGetNow(&now);
m_commonComponent->registerPingHandler([&] { m_sendGestureMap(now); });
}

void GestureComponent::sendGestureData(OSVR_GestureState gestureState,
std::string const &gestureName,
OSVR_ChannelCount sensor,
@@ -196,7 +181,7 @@ namespace common {
GestureComponent::m_handleGestureMapRecord(void *userdata,
vrpn_HANDLERPARAM p) {
auto self = static_cast<GestureComponent *>(userdata);
auto bufReader = readExternalBuffer(p.buffer, p.payload_len);
auto bufReader = readExternalBuffer(p.buffer, p.payload_len);

messages::GestureMapRecord::MessageSerialization msg;
deserialize(bufReader, msg);
@@ -226,6 +211,15 @@ namespace common {
}

void GestureComponent::m_parentSet() {

// add a ping handler to re-send gesture map everytime the new
// connection(ping) occurs
m_commonComponent =
m_getParent().addComponent(osvr::common::CommonComponent::create());
OSVR_TimeValue now;
osvrTimeValueGetNow(&now);
m_commonComponent->registerPingHandler([&] { m_sendGestureMap(now); });

m_getParent().registerMessageType(gestureRecord);
m_getParent().registerMessageType(gestureMapRecord);
}