本文整理汇总了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);
}
示例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;
}
示例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;
}
示例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;
}