Rename DSL: deviceSpec => deviceAttachmentSpec
This language is used broadly to specify how to attach (and thus also how to detach) devices to/from Salmanoff. The next bit of work we'll do is split off the DSL parsing from the management of the list of parsed binary attached spec objects. We'll be creating a PipeDeviceAttachmentParser, and later on when we support URDF, we'll create a URDFDeviceAttachmentParser.
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
#include <dlfcn.h>
|
||||
#include <xcb/xcb.h>
|
||||
#include <user/senseApiDesc.h>
|
||||
#include <user/senseDeviceSpec.h>
|
||||
#include <user/deviceAttachmentSpec.h>
|
||||
#include <xcbXorg/xcbXorg.h>
|
||||
#include "xcbWindow.h"
|
||||
|
||||
@@ -55,9 +55,9 @@ std::string WindowSelector::stringify() const
|
||||
}
|
||||
|
||||
AttachedWindow::AttachedWindow(
|
||||
const std::shared_ptr<smo::device::SenseDeviceSpec>& spec
|
||||
const std::shared_ptr<smo::device::DeviceAttachmentSpec>& spec
|
||||
)
|
||||
: deviceSpec(spec)
|
||||
: deviceAttachmentSpec(spec)
|
||||
{
|
||||
// Validate required function pointers are available
|
||||
if (!xcbXorg.fns.getOrCreateConnection ||
|
||||
@@ -106,7 +106,7 @@ AttachedWindow::AttachedWindow(
|
||||
}
|
||||
|
||||
void AttachedWindow::parseWindowSelector(
|
||||
const smo::device::SenseDeviceSpec& spec
|
||||
const smo::device::DeviceAttachmentSpec& spec
|
||||
)
|
||||
{
|
||||
// Default match type
|
||||
@@ -148,7 +148,7 @@ void AttachedWindow::parseWindowSelector(
|
||||
}
|
||||
}
|
||||
|
||||
int AttachedWindow::getRequiredParamAsInt(const smo::device::SenseDeviceSpec& spec,
|
||||
int AttachedWindow::getRequiredParamAsInt(const smo::device::DeviceAttachmentSpec& spec,
|
||||
const std::string& paramName)
|
||||
{
|
||||
auto it = std::find_if(
|
||||
@@ -296,7 +296,7 @@ static int xcbWindow_finalizeInd(void)
|
||||
}
|
||||
|
||||
static int xcbWindow_attachDeviceReq(
|
||||
const std::shared_ptr<smo::device::SenseDeviceSpec>& desc
|
||||
const std::shared_ptr<smo::device::DeviceAttachmentSpec>& desc
|
||||
)
|
||||
{
|
||||
g_attachedWindows.emplace_back(
|
||||
@@ -309,12 +309,12 @@ static int xcbWindow_attachDeviceReq(
|
||||
}
|
||||
|
||||
static int xcbWindow_detachDeviceReq(
|
||||
const std::shared_ptr<smo::device::SenseDeviceSpec>& spec
|
||||
const std::shared_ptr<smo::device::DeviceAttachmentSpec>& spec
|
||||
)
|
||||
{
|
||||
auto it = std::find_if(g_attachedWindows.begin(), g_attachedWindows.end(),
|
||||
[&spec](const std::unique_ptr<xcb_window::AttachedWindow>& window) {
|
||||
return window->getDeviceSpec() == spec;
|
||||
return window->getDeviceAttachmentSpec() == spec;
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user