本文整理汇总了C++中rdata函数的典型用法代码示例。如果您正苦于以下问题:C++ rdata函数的具体用法?C++ rdata怎么用?C++ rdata使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了rdata函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: pinmode
String pinmode()
{
int pin=str2int(rdata("pin ?"));
int mode=str2int(rdata("mode ?"));
pinMode(pin,mode);
return "";
}
开发者ID:bhramoss,项目名称:code,代码行数:7,代码来源:recipe-577520.c
示例2: pulsein
String pulsein()
{
int pin=str2int(rdata("pin ?"));
int value=str2int(rdata("value ?"));
int timeout=str2int(rdata("timeout ?"));
return pulseIn(pin, value, timeout);
}
开发者ID:bhramoss,项目名称:code,代码行数:7,代码来源:recipe-577520.c
示例3: AddPoint
RcppExport SEXP AddPoint(SEXP x,SEXP d) {
try {
Rcpp::XPtr< flann::Index<flann::L2<float> > > index(x);
Rcpp::NumericVector rdata(d);
int colNum = rdata.size();
flann::Matrix<float> input(new float[colNum], 1, colNum);
for (int i = 0; i < colNum; i++) {
input[0][i] = rdata(i);
}
index->addPoints(input);
return R_NilValue; // -Wall
} catch( std::exception &ex ) { // or use END_RCPP macro
forward_exception_to_r( ex );
} catch(...) {
::Rf_error( "c++ exception (unknown reason)" );
}
return R_NilValue; // -Wall
}
开发者ID:rforge,项目名称:clusterds,代码行数:25,代码来源:FLANN.cpp
示例4: rattr
static void rattr(unsigned verb, SkStream& s, BMLW& rec, SkXMLWriter& writer)
{
int data = verb & 31;
verb >>= 5;
int nameIndex, valueIndex;
switch (verb) {
case kAttr_Value_Value_Verb:
nameIndex = rec.fNextName; // record before the ++
set(rec.fNames, rec.fNextName++, s, data);
valueIndex = rec.fNextValue; // record before the ++
set(rec.fValues, rec.fNextValue++, s, 31);
break;
case kAttr_Value_Index_Verb:
nameIndex = rec.fNextName; // record before the ++
set(rec.fNames, rec.fNextName++, s, data);
valueIndex = rbyte(s);
break;
case kAttr_Index_Value_Verb:
nameIndex = rdata(s, data);
valueIndex = rec.fNextValue; // record before the ++
set(rec.fValues, rec.fNextValue++, s, 31);
break;
case kAttr_Index_Index_Verb:
nameIndex = rdata(s, data);
valueIndex = rbyte(s);
break;
default:
SkDEBUGFAIL("bad verb");
return;
}
writer.addAttribute(rec.fNames[nameIndex], rec.fValues[valueIndex]);
}
开发者ID:ghub,项目名称:NVprSDK,代码行数:34,代码来源:SkBML_XMLParser.cpp
示例5: analogwrite
String analogwrite()
{
int pin=str2int(rdata("pin ?"));
int value=str2int(rdata("value ?"));
analogWrite(pin, value);
return "";
}
开发者ID:bhramoss,项目名称:code,代码行数:7,代码来源:recipe-577520.c
示例6: shiftin
String shiftin()
{
int dataPin=str2int(rdata("dataPin ?"));
int clockPin=str2int(rdata("clockPin ?"));
int bitOrder=str2int(rdata("bitOrder ?"));
return shiftIn(dataPin, clockPin, bitOrder);
}
开发者ID:bhramoss,项目名称:code,代码行数:7,代码来源:recipe-577520.c
示例7: digitalwrite
String digitalwrite()
{
int pin=str2int(rdata("pin ?"));
int value=str2int(rdata("value ?"));
digitalWrite(pin,value);
return "";
}
开发者ID:bhramoss,项目名称:code,代码行数:7,代码来源:recipe-577520.c
示例8: CreateCenters
RcppExport SEXP CreateCenters(SEXP d) {
try {
Rcpp::NumericVector rdata(d);
int colNum = rdata.size();
flann::Matrix<float> input(new float[colNum], 1, colNum);
for (int i = 0; i < colNum; i++) {
input[0][i] = rdata(i);
}
flann::Index<flann::L2<float> >* index = new flann::Index<flann::L2<float> >(input,flann::KDTreeSingleIndexParams());
index->buildIndex();
Rcpp::XPtr< flann::Index<flann::L2<float> > > p(index, true);
return p; // -Wall
} catch( std::exception &ex ) { // or use END_RCPP macro
forward_exception_to_r( ex );
} catch(...) {
::Rf_error( "c++ exception (unknown reason)" );
}
return R_NilValue; // -Wall
}
开发者ID:rforge,项目名称:clusterds,代码行数:26,代码来源:FLANN.cpp
示例9: tones
String tones()
{
int pin=str2int(rdata("pin ?"));
int frequency=str2int(rdata("frequency ?"));
int duration=str2int(rdata("duration ?"));
tone(pin, frequency, duration);
return "";
}
开发者ID:bhramoss,项目名称:code,代码行数:8,代码来源:recipe-577520.c
示例10: shiftout
String shiftout()
{
int dataPin=str2int(rdata("dataPin ?"));
int clockPin=str2int(rdata("clockPin ?"));
int bitOrder=str2int(rdata("bitOrder ?"));
int value=str2int(rdata("value ?"));
shiftOut(dataPin, clockPin, bitOrder, value);
return "";
}
开发者ID:bhramoss,项目名称:code,代码行数:9,代码来源:recipe-577520.c
示例11: init
void
init() /* everything for 1st time run */
{
rdata(); /* read data from orig. file */
linkdata();
poof();
}
开发者ID:losinggeneration,项目名称:kos,代码行数:7,代码来源:init.c
示例12: equalizeHistogram
void equalizeHistogram ()
{
real_array_type rdata( boost::extents[getSizeX()][getSizeY()] );
Abstract2dData::getRealSpaceData(&rdata);
SingleParticle2dx::Utilities::DataContainerFunctions::equalizeHistogram(&rdata);
Abstract2dData::setFourierSpaceData(&rdata);
}
开发者ID:C-CINA,项目名称:2dx,代码行数:7,代码来源:Abstract2dData.hpp
示例13: r64
u64 r64 (addr address)
{
u64 x;
rdata(address, &x, sizeof(x));
return x;
}
开发者ID:taysom,项目名称:tau,代码行数:7,代码来源:kmem.c
示例14: init
/* everything for 1st time run */
void
init(void)
{
rdata(); /* read data from orig. file */
linkdata();
poof();
}
开发者ID:AhmadTux,项目名称:DragonFlyBSD,代码行数:8,代码来源:init.c
示例15: loop
void loop()
{
cmdlck = "";
cmd = rdata("?");
cmdlck = cmd;
sprintln(funcparser(cmd));
}
开发者ID:bhramoss,项目名称:code,代码行数:7,代码来源:recipe-577520.c
示例16: rdata
void SingleParticle2dx::DataStructures::Particle::flipXYAxis()
{
real_array_type rdata( boost::extents[getSizeX()][getSizeY()] );
getRealSpaceData(&rdata);
SingleParticle2dx::Utilities::DataContainerFunctions::applyMirrorXY(&rdata);
setFourierSpaceData(&rdata);
}
开发者ID:C-CINA,项目名称:2dx,代码行数:7,代码来源:Particle.cpp
示例17: r32
u32 r32 (addr address)
{
u32 x;
rdata(address, &x, sizeof(x));
return x;
}
开发者ID:taysom,项目名称:tau,代码行数:7,代码来源:kmem.c
示例18: while
char *annexe_stockdata(char *dirname, t_llist **llist,\
t_opts opts, DIR *dir)
{
struct dirent *sfile;
char *path;
while ((sfile = readdir(dir)) != NULL)
{
path = ft_strjoin(dirname, "/");
if (rdata(path, &(*llist), sfile->d_name, opts) == -1)
{
ft_putendl_fd("ERROR - ADD DATA", 2);
return (NULL);
}
if (opts.rr == 1)
{
if (((*llist) = stockrec(*llist, path, opts)) == NULL)
{
ft_putendl(ft_strjoin(path, sfile->d_name));
return (NULL);
}
}
}
return (path);
}
开发者ID:Zatrof,项目名称:42,代码行数:25,代码来源:annexe_stockdata2.c
示例19: r16
u16 r16 (addr address)
{
u16 x;
rdata(address, &x, sizeof(x));
return x;
}
开发者ID:taysom,项目名称:tau,代码行数:7,代码来源:kmem.c
示例20: raddr
addr raddr (addr address)
{
addr x;
rdata(address, &x, sizeof(x));
return x;
}
开发者ID:taysom,项目名称:tau,代码行数:7,代码来源:kmem.c
注:本文中的rdata函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论