YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
DeviceTemplate.cpp
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2023 Istituto Italiano di Tecnologia (IIT)
3 * SPDX-License-Identifier: BSD-3-Clause
4 */
5
6#ifndef _USE_MATH_DEFINES
7#define _USE_MATH_DEFINES
8#endif
9
10#include "DeviceTemplate.h"
11
13#include <yarp/os/LogStream.h>
14
15#include <cmath>
16
17using namespace yarp::os;
18using namespace yarp::dev;
19
20
22
23
28
30{
31 if (!parseParams(config)) { return false; }
32
33 yCInfo(DEVICETEMPLATE) << "Open";
34 return true;
35}
36
38{
39 yCInfo(DEVICETEMPLATE) << "Close";
40 return true;
41}
const yarp::os::LogComponent & DEVICETEMPLATE()
bool parseParams(const yarp::os::Searchable &config) override
Parse the DeviceDriver parameters.
bool open(yarp::os::Searchable &config) override
Open the DeviceDriver.
bool close() override
Close the DeviceDriver.
@ TraceType
Definition Log.h:92
A base class for nested structures that can be searched.
Definition Searchable.h:31
#define yCInfo(component,...)
#define YARP_LOG_COMPONENT(name,...)
For streams capable of holding different kinds of content, check what they actually have.
An interface to the operating system, including Port based communication.