genericsensorinterfaces.h
来自「一个语言识别引擎」· C头文件 代码 · 共 55 行
H
55 行
// -*- mode:C++; tab-width:4; c-basic-offset:4; indent-tabs-mode:nil -*-
/*
* Copyright (C) 2006 Lorenzo Natale
* CopyPolicy: Released under the terms of the GNU GPL v2.0.
*
*/
#ifndef __YARPTRACKERINTERFACES__
#define __YARPTRACKERINTERFACES__
#include <yarp/dev/DeviceDriver.h>
#include <yarp/sig/Vector.h>
/*! \file GenericSensorInterfaces.h define interfaces for a generic sensor*/
namespace yarp {
namespace dev {
class IGenericSensor;
}
}
/**
* @ingroup dev_iface_other
*
* A generic interface to sensors -- gyro, a/d converters etc.
*/
class yarp::dev::IGenericSensor
{
public:
virtual ~IGenericSensor(){}
/* Read a vector from the sensor.
* @param out a vector containing the sensor's last readings.
* @return true/false success/failure
**/
virtual bool read(yarp::sig::Vector &out)=0;
/* Get the number of channels of the sensor.
* @param nc pointer to storage, return value
* @return true/false success/failure
*/
virtual bool getChannels(int *nc)=0;
/* Calibrate the sensor, single channel.
* @param ch channel number
* @param v reset valure
* @return true/false success/failure
*/
virtual bool calibrate(int ch, double v)=0;
};
#endif
//
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?