当前位置: 首页>>代码示例>>Java>>正文


Java DataTypeFloat类代码示例

本文整理汇总了Java中org.md2k.datakitapi.datatype.DataTypeFloat的典型用法代码示例。如果您正苦于以下问题:Java DataTypeFloat类的具体用法?Java DataTypeFloat怎么用?Java DataTypeFloat使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


DataTypeFloat类属于org.md2k.datakitapi.datatype包,在下文中一共展示了DataTypeFloat类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: updatePlot

import org.md2k.datakitapi.datatype.DataTypeFloat; //导入依赖的package包/类
void updatePlot(Intent intent) {
    float[] sample=new float[1];
    String[] legends;
    DataSource dataSource= intent.getParcelableExtra("datasource");
    ArrayList<HashMap<String, String>> hm = dataSource.getDataDescriptors();
    getmChart().getDescription().setText(dataSourceType);
    getmChart().getDescription().setPosition(1f,1f);
    getmChart().getDescription().setEnabled(true);
    getmChart().getDescription().setTextColor(Color.WHITE);
    legends=new String[hm.size()];
    for(int i=0;i<hm.size();i++){
        legends[i] = hm.get(i).get(METADATA.NAME);
    }
    String curDataSourceType = dataSource.getType();
    if(!curDataSourceType.equals(dataSourceType)) return;
    DataType data = intent.getParcelableExtra("data");
    if (data instanceof DataTypeFloat) {
        sample = new float[]{((DataTypeFloat) data).getSample()};
    } else if (data instanceof DataTypeFloatArray) {
        sample = ((DataTypeFloatArray) data).getSample();
    } else if (data instanceof DataTypeDoubleArray) {
        double[] samples = ((DataTypeDoubleArray) data).getSample();
        sample=new float[samples.length];
        for (int i = 0; i < samples.length; i++) {
            sample[i]= (float) samples[i];
        }
    }
    addEntry(sample, legends,600);
}
 
开发者ID:MD2Korg,项目名称:mCerebrum-PhoneSensor,代码行数:30,代码来源:ActivityPlot.java

示例2: createDataSourceBuilder

import org.md2k.datakitapi.datatype.DataTypeFloat; //导入依赖的package包/类
public DataSourceBuilder createDataSourceBuilder(Platform platform) {
    DataSourceBuilder dataSourceBuilder = new DataSourceBuilder();
    dataSourceBuilder = dataSourceBuilder.setPlatform(platform);
    dataSourceBuilder = dataSourceBuilder.setType(dataSourceType);
    dataSourceBuilder = dataSourceBuilder.setDataDescriptors(createDataDescriptors());
    dataSourceBuilder = dataSourceBuilder.setMetadata(METADATA.FREQUENCY, frequency);
    dataSourceBuilder = dataSourceBuilder.setMetadata(METADATA.NAME, "Pace");
    dataSourceBuilder = dataSourceBuilder.setMetadata(METADATA.UNIT, "ms/m");
    dataSourceBuilder = dataSourceBuilder.setMetadata(METADATA.DESCRIPTION, "Current pace of the Band in ms/m");
    dataSourceBuilder = dataSourceBuilder.setMetadata(METADATA.DATA_TYPE, DataTypeFloat.class.getName());
    return dataSourceBuilder;
}
 
开发者ID:MD2Korg,项目名称:mCerebrum-MicrosoftBand,代码行数:13,代码来源:Pace.java

示例3: createDataSourceBuilder

import org.md2k.datakitapi.datatype.DataTypeFloat; //导入依赖的package包/类
public DataSourceBuilder createDataSourceBuilder(Platform platform) {
    DataSourceBuilder dataSourceBuilder = new DataSourceBuilder();
    dataSourceBuilder = dataSourceBuilder.setPlatform(platform);
    dataSourceBuilder = dataSourceBuilder.setType(dataSourceType);
    dataSourceBuilder = dataSourceBuilder.setDataDescriptors(createDataDescriptors());
    dataSourceBuilder = dataSourceBuilder.setMetadata(METADATA.FREQUENCY, frequency);
    dataSourceBuilder = dataSourceBuilder.setMetadata(METADATA.NAME, "Skin Temperature");
    dataSourceBuilder = dataSourceBuilder.setMetadata(METADATA.UNIT, "degree celsius");
    dataSourceBuilder = dataSourceBuilder.setMetadata(METADATA.DESCRIPTION, "Provides the current skin temperature of the wearer in degrees Celsius");
    dataSourceBuilder = dataSourceBuilder.setMetadata(METADATA.DATA_TYPE, DataTypeFloat.class.getName());
    return dataSourceBuilder;
}
 
开发者ID:MD2Korg,项目名称:mCerebrum-MicrosoftBand,代码行数:13,代码来源:SkinTemperature.java

示例4: createDataSourceBuilder

import org.md2k.datakitapi.datatype.DataTypeFloat; //导入依赖的package包/类
public DataSourceBuilder createDataSourceBuilder(Platform platform) {
    DataSourceBuilder dataSourceBuilder = new DataSourceBuilder();
    dataSourceBuilder = dataSourceBuilder.setPlatform(platform);
    dataSourceBuilder = dataSourceBuilder.setType(dataSourceType);
    dataSourceBuilder = dataSourceBuilder.setDataDescriptors(createDataDescriptors());
    dataSourceBuilder = dataSourceBuilder.setMetadata(METADATA.FREQUENCY, frequency);
    dataSourceBuilder = dataSourceBuilder.setMetadata(METADATA.NAME, "Speed");
    dataSourceBuilder = dataSourceBuilder.setMetadata(METADATA.UNIT, "cm/s");
    dataSourceBuilder = dataSourceBuilder.setMetadata(METADATA.DESCRIPTION, "Current speed of the Band in cm/s");
    dataSourceBuilder = dataSourceBuilder.setMetadata(METADATA.DATA_TYPE, DataTypeFloat.class.getName());
    return dataSourceBuilder;
}
 
开发者ID:MD2Korg,项目名称:mCerebrum-MicrosoftBand,代码行数:13,代码来源:Speed.java


注:本文中的org.md2k.datakitapi.datatype.DataTypeFloat类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。