• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java DataSourceClient类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: subscribe

import org.md2k.datakitapi.source.datasource.DataSourceClient; //导入依赖的package包/类
public void subscribe(String platformType, final String dataSourceType) throws DataKitException {
    DataSourceClient dataSourceClient = findDataSourceClient(platformType, dataSourceType);
    dataKitAPI.subscribe(dataSourceClient, new OnReceiveListener() {
        @Override
        public void onReceived(DataType dataType) {
            try {
                DataTypeDoubleArray dataTypeDoubleArray = (DataTypeDoubleArray) dataType;
                CSVDataPoint csvDataPoint = new CSVDataPoint(dataSourceTypeTOChannel.get(dataSourceType), dataTypeDoubleArray.getDateTime(), dataTypeDoubleArray.getSample()[0]);
                streamProcessorWrapper.addDataPoint(csvDataPoint);
            } catch (Exception ignored) {

            }
        }
    });

}
 
开发者ID:MD2Korg,项目名称:mCerebrum-StreamProcessor,代码行数:17,代码来源:DataKitManager.java


示例2: findDataSourceClient

import org.md2k.datakitapi.source.datasource.DataSourceClient; //导入依赖的package包/类
protected DataSourceClient findDataSourceClient(String platformType, String platformId, String dataSourceType) {
    PlatformBuilder platformBuilder = new PlatformBuilder().setType(platformType).setId(platformId);
    DataSourceBuilder dataSourceBuilder = new DataSourceBuilder();
    if (dataSourceType != null && dataSourceType.length() != 1)
        dataSourceBuilder.setType(dataSourceType);
    dataSourceBuilder.setPlatform(platformBuilder.build());
    ArrayList<DataSourceClient> dataSourceClientArrayList = null;
    try {
        dataSourceClientArrayList = dataKitAPI.find(dataSourceBuilder);
    } catch (DataKitException e) {
        LocalBroadcastManager.getInstance(context).sendBroadcast(new Intent(Constants.INTENT_STOP));
        return null;
    }
    if (dataSourceClientArrayList.size() != 1)
        return null;
    return dataSourceClientArrayList.get(0);
}
 
开发者ID:MD2Korg,项目名称:mCerebrum-StreamProcessor,代码行数:18,代码来源:DataKitManager.java


示例3: register

import org.md2k.datakitapi.source.datasource.DataSourceClient; //导入依赖的package包/类
public PendingResult<DataSourceClient> register(final DataSourceBuilder dataSourceBuilder) throws DataKitException {
    PendingResult<DataSourceClient> pendingResult = new PendingResult<DataSourceClient>() {
        @Override
        public DataSourceClient await() {
            try {
                registerData = null;
                lock();
                DataSource dataSource = prepareDataSource(dataSourceBuilder);
                Bundle bundle = new Bundle();
                bundle.putParcelable(DataSource.class.getSimpleName(), dataSource);
                prepareAndSend(bundle, MessageType.REGISTER);
                semaphoreReceive.tryAcquire(WAIT_TIME, TimeUnit.MILLISECONDS);
            } catch (Exception e) {
                registerData = null;
            } finally {
                unlock();
            }
            return registerData;
        }
    };
    return pendingResult;
}
 
开发者ID:MD2Korg,项目名称:mCerebrum-DataKitAPI,代码行数:23,代码来源:DataKitAPIExecute.java


示例4: unregister

import org.md2k.datakitapi.source.datasource.DataSourceClient; //导入依赖的package包/类
public PendingResult<Status> unregister(final DataSourceClient dataSourceClient) throws DataKitException {
    PendingResult<Status> pendingResult = new PendingResult<Status>() {
        @Override
        public Status await() {
            try {
                unregisterData = null;
                lock();
                Bundle bundle = new Bundle();
                bundle.putInt(Constants.RC_DSID, dataSourceClient.getDs_id());
                prepareAndSend(bundle, MessageType.UNREGISTER);
                semaphoreReceive.tryAcquire(WAIT_TIME, TimeUnit.MILLISECONDS);
            } catch (Exception e) {
                unregisterData = null;
            } finally {
                unlock();
            }
            return unregisterData;
        }
    };
    return pendingResult;
}
 
开发者ID:MD2Korg,项目名称:mCerebrum-DataKitAPI,代码行数:22,代码来源:DataKitAPIExecute.java


示例5: subscribe

import org.md2k.datakitapi.source.datasource.DataSourceClient; //导入依赖的package包/类
public Status subscribe(final DataSourceClient dataSourceClient, OnReceiveListener onReceiveListener) throws DataKitException {
    try {
        subscribeData = null;
        lock();
        ds_idOnReceiveListenerHashMap.put(dataSourceClient.getDs_id(), onReceiveListener);
        Bundle bundle = new Bundle();
        bundle.putInt(Constants.RC_DSID, dataSourceClient.getDs_id());
        bundle.putString(Constants.PACKAGE_NAME, context.getPackageName());
        prepareAndSend(bundle, MessageType.SUBSCRIBE);
        semaphoreReceive.tryAcquire(WAIT_TIME, TimeUnit.MILLISECONDS);
    } catch (Exception e) {
        Log.e(TAG, "Subscribe error..." + dataSourceClient.getDs_id());
        subscribeData = null;
    } finally {
        unlock();
    }
    return subscribeData;
}
 
开发者ID:MD2Korg,项目名称:mCerebrum-DataKitAPI,代码行数:19,代码来源:DataKitAPIExecute.java


示例6: find

import org.md2k.datakitapi.source.datasource.DataSourceClient; //导入依赖的package包/类
public PendingResult<ArrayList<DataSourceClient>> find(final DataSourceBuilder dataSourceBuilder) throws DataKitException {
    PendingResult<ArrayList<DataSourceClient>> pendingResult = new PendingResult<ArrayList<DataSourceClient>>() {
        @Override
        public ArrayList<DataSourceClient> await() {
            try {
                findData = null;
                lock();
                final DataSource dataSource = dataSourceBuilder.build();
                Bundle bundle = new Bundle();
                bundle.putParcelable(DataSource.class.getSimpleName(), dataSource);
                prepareAndSend(bundle, MessageType.FIND);
                semaphoreReceive.tryAcquire(WAIT_TIME, TimeUnit.MILLISECONDS);
            } catch (Exception e) {
                findData = null;
            } finally {
                unlock();
            }
            return findData;
        }
    };
    return pendingResult;
}
 
开发者ID:MD2Korg,项目名称:mCerebrum-DataKitAPI,代码行数:23,代码来源:DataKitAPIExecute.java


示例7: query

import org.md2k.datakitapi.source.datasource.DataSourceClient; //导入依赖的package包/类
public PendingResult<ArrayList<DataType>> query(final DataSourceClient dataSourceClient, final long starttimestamp, final long endtimestamp) throws DataKitException {
    return new PendingResult<ArrayList<DataType>>() {
        @Override
        public ArrayList<DataType> await() {
            try {
                queryData = null;
                lock();
                Bundle bundle = new Bundle();
                bundle.putInt(Constants.RC_DSID, dataSourceClient.getDs_id());
                bundle.putLong(Constants.RC_STARTTIMESTAMP, starttimestamp);
                bundle.putLong(Constants.RC_ENDTIMESTAMP, endtimestamp);
                prepareAndSend(bundle, MessageType.QUERY);
                semaphoreReceive.tryAcquire(WAIT_TIME, TimeUnit.MILLISECONDS);
            } catch (Exception e) {
                queryData = null;
            } finally {
                unlock();
            }
            return queryData;
        }
    };
}
 
开发者ID:MD2Korg,项目名称:mCerebrum-DataKitAPI,代码行数:23,代码来源:DataKitAPIExecute.java


示例8: queryFromPrimaryKey

import org.md2k.datakitapi.source.datasource.DataSourceClient; //导入依赖的package包/类
public PendingResult<ArrayList<RowObject>> queryFromPrimaryKey(final DataSourceClient dataSourceClient, final long lastSyncedValue, final int limit) throws DataKitException {
    return new PendingResult<ArrayList<RowObject>>() {
        @Override
        public ArrayList<RowObject> await() {
            try {
                queryPrimaryKeyData = null;
                lock();
                Bundle bundle = new Bundle();
                bundle.putInt(Constants.RC_DSID, dataSourceClient.getDs_id());
                bundle.putLong(Constants.RC_LAST_KEY, lastSyncedValue);
                bundle.putInt(Constants.RC_LIMIT, limit);
                prepareAndSend(bundle, MessageType.QUERYPRIMARYKEY);
                semaphoreReceive.tryAcquire(WAIT_TIME, TimeUnit.MILLISECONDS);

            } catch (Exception e) {
                queryPrimaryKeyData = null;
            } finally {
                unlock();
            }
            return queryPrimaryKeyData;
        }
    };
}
 
开发者ID:MD2Korg,项目名称:mCerebrum-DataKitAPI,代码行数:24,代码来源:DataKitAPIExecute.java


示例9: createPrivacyList

import org.md2k.datakitapi.source.datasource.DataSourceClient; //导入依赖的package包/类
private void createPrivacyList() {
    if(!isActive()) return;
    listPrivacyListDsId.clear();
    int id;
    for (int i = 0; i < privacyData.getPrivacyTypes().size(); i++) {
        for (int j = 0; j < privacyData.getPrivacyTypes().get(i).getDatasource().size(); j++) {
            ArrayList<DataSourceClient> dataSourceClients = routingManager.find(privacyData.getPrivacyTypes().get(i).getDatasource().get(j));
            for (int k = 0; k < dataSourceClients.size(); k++) {
                Log.d(TAG,"id="+dataSourceClients.get(k).getDs_id());
                id = dataSourceClients.get(k).getDs_id();
                listPrivacyListDsId.put(id, true);
            }
        }
    }
    listPrivacyListDsId.remove(dsIdPrivacy);
}
 
开发者ID:MD2Korg,项目名称:mCerebrum-DataKit,代码行数:17,代码来源:PrivacyManager.java


示例10: findDataSource

import org.md2k.datakitapi.source.datasource.DataSourceClient; //导入依赖的package包/类
public synchronized ArrayList<DataSourceClient> findDataSource(SQLiteDatabase db, DataSource dataSource) {
        ArrayList<DataSourceClient> dataSourceClients = new ArrayList<>();
        SQLiteQueryBuilder queryBuilder = new SQLiteQueryBuilder();
        queryBuilder.setTables(TABLE_NAME);
        String[] columns = new String[]{C_DS_ID, C_DATASOURCE};
        String selection = prepareSelection(dataSource);
        String[] selectionArgs = prepareSelectionArgs(dataSource);
        Cursor mCursor = db.query(TABLE_NAME, columns, selection, selectionArgs, null, null, null);
        try {
            if (mCursor.moveToFirst()) {
                do {
                    byte[] bytes = mCursor.getBlob(mCursor.getColumnIndex(C_DATASOURCE));
                    DataSource curDataSource = fromBytes(bytes);
                    DataSourceClient dataSourceClient = new DataSourceClient(mCursor.getInt(mCursor.getColumnIndex(C_DS_ID)),
                            curDataSource, new Status(Status.DATASOURCE_EXIST));
//                    DataSourceClient dataSourceClient = new DataSourceClient(mCursor.getInt(mCursor.getColumnIndex(C_DS_ID)),
//                            DataSource.fromBytes(mCursor.getBlob(mCursor.getColumnIndex(C_DATASOURCE))), new Status(Status.DATASOURCE_EXIST));
                    dataSourceClients.add(dataSourceClient);
                } while (mCursor.moveToNext());
            }
            mCursor.close();
        }catch (Exception ignored){

        }
        return dataSourceClients;
    }
 
开发者ID:MD2Korg,项目名称:mCerebrum-DataKit,代码行数:27,代码来源:DatabaseTable_DataSource.java


示例11: readWakeupTimeFromDataKit

import org.md2k.datakitapi.source.datasource.DataSourceClient; //导入依赖的package包/类
private void readWakeupTimeFromDataKit() {
    DataKitAPI dataKitAPI = DataKitAPI.getInstance(modelManager.getContext());
    wakeupOffset = -1;
    try {
        ArrayList<DataSourceClient> dataSourceClients = dataKitAPI.find(new DataSourceBuilder().setType(DataSourceType.WAKEUP));
        if (dataSourceClients.size() > 0) {
            ArrayList<DataType> dataTypes = dataKitAPI.query(dataSourceClients.get(0), 1);
            if (dataTypes.size() != 0) {
                DataTypeLong dataTypeLong = (DataTypeLong) dataTypes.get(0);
                wakeupOffset = dataTypeLong.getSample();
            }
        }
    } catch (Exception ignored) {

    }
}
 
开发者ID:MD2Korg,项目名称:mCerebrum-Study,代码行数:17,代码来源:DayStartEndInfoManager.java


示例12: readSleepTimeFromDataKit

import org.md2k.datakitapi.source.datasource.DataSourceClient; //导入依赖的package包/类
private void readSleepTimeFromDataKit() {
    DataKitAPI dataKitAPI = DataKitAPI.getInstance(modelManager.getContext());
    sleepOffset = -1;
    try {
        ArrayList<DataSourceClient> dataSourceClients = dataKitAPI.find(new DataSourceBuilder().setType(DataSourceType.SLEEP));
        if (dataSourceClients.size() > 0) {
            ArrayList<DataType> dataTypes = dataKitAPI.query(dataSourceClients.get(0), 1);
            if (dataTypes.size() != 0) {
                DataTypeLong dataTypeLong = (DataTypeLong) dataTypes.get(0);
                sleepOffset = dataTypeLong.getSample();
            }
        }
    } catch (DataKitException e) {
        LocalBroadcastManager.getInstance(modelManager.getContext()).sendBroadcast(new Intent(Constants.INTENT_RESTART));
    }
}
 
开发者ID:MD2Korg,项目名称:mCerebrum-Study,代码行数:17,代码来源:DayStartEndInfoManager.java


示例13: writeToDataKit

import org.md2k.datakitapi.source.datasource.DataSourceClient; //导入依赖的package包/类
private boolean writeToDataKit() {
    try {
        DataKitAPI dataKitAPI = DataKitAPI.getInstance(modelManager.getContext());
        if (!isValid()) return false;
        Gson gson = new Gson();
        JsonObject sample = new JsonParser().parse(gson.toJson(dayTypeNew)).getAsJsonObject();
        DataSourceClient dataSourceClient = dataKitAPI.register(createDataSourceBuilder());
        DataTypeJSONObject dataTypeJSONObject = new DataTypeJSONObject(DateTime.getDateTime(), sample);
        dataKitAPI.insert(dataSourceClient, dataTypeJSONObject);
        dayTypeDB = dayTypeNew;
    } catch (DataKitException e) {
        LocalBroadcastManager.getInstance(modelManager.getContext()).sendBroadcast(new Intent(Constants.INTENT_RESTART));
        return false;
    }
    return true;
}
 
开发者ID:MD2Korg,项目名称:mCerebrum-Study,代码行数:17,代码来源:DayTypeManager.java


示例14: readFromDataKit

import org.md2k.datakitapi.source.datasource.DataSourceClient; //导入依赖的package包/类
private StudyInfo readFromDataKit() {
    StudyInfo studyInfo = null;
    try {
        DataKitAPI dataKitAPI = DataKitAPI.getInstance(modelManager.getContext());

        DataSourceClient dataSourceClient = dataKitAPI.register(createDataSourceBuilder());
        ArrayList<DataType> dataTypes = dataKitAPI.query(dataSourceClient, 1);
        if (dataTypes.size() != 0) {
            DataTypeJSONObject dataTypeJSONObject = (DataTypeJSONObject) dataTypes.get(0);
            Gson gson = new Gson();
            studyInfo = gson.fromJson(dataTypeJSONObject.getSample().toString(), StudyInfo.class);
        }
    } catch (Exception ignored) {
        LocalBroadcastManager.getInstance(modelManager.getContext()).sendBroadcast(new Intent(Constants.INTENT_RESTART));
    }
    return studyInfo;
}
 
开发者ID:MD2Korg,项目名称:mCerebrum-Study,代码行数:18,代码来源:StudyInfoManager.java


示例15: writeToDataKit

import org.md2k.datakitapi.source.datasource.DataSourceClient; //导入依赖的package包/类
private boolean writeToDataKit() {
    try {
        DataKitAPI dataKitAPI = DataKitAPI.getInstance(modelManager.getContext());
        Log.d(TAG, "StudyInfoManager...writeToDataKit()");
        Gson gson = new Gson();
        JsonObject sample = new JsonParser().parse(gson.toJson(studyInfoFile)).getAsJsonObject();

        DataSourceClient dataSourceClient = dataKitAPI.register(createDataSourceBuilder());
        DataTypeJSONObject dataTypeJSONObject = new DataTypeJSONObject(DateTime.getDateTime(), sample);
        dataKitAPI.insert(dataSourceClient, dataTypeJSONObject);
        studyInfoDB = studyInfoFile;
        return true;
    } catch (DataKitException e) {
        LocalBroadcastManager.getInstance(modelManager.getContext()).sendBroadcast(new Intent(Constants.INTENT_RESTART));
        return false;
    }
}
 
开发者ID:MD2Korg,项目名称:mCerebrum-Study,代码行数:18,代码来源:StudyInfoManager.java


示例16: writeToDataKit

import org.md2k.datakitapi.source.datasource.DataSourceClient; //导入依赖的package包/类
private boolean writeToDataKit(){
    try {
        DataKitAPI dataKitAPI = DataKitAPI.getInstance(modelManager.getContext());
        if (isInDatabase) return false;
        if (userInfo == null) return false;
        if (userInfo.getUser_id() == null) return false;
        if (userInfo.getUser_id().length() == 0) return false;
        Gson gson = new Gson();
        JsonObject sample = new JsonParser().parse(gson.toJson(userInfo)).getAsJsonObject();

        DataSourceClient dataSourceClient = dataKitAPI.register(createDataSourceBuilder());
        DataTypeJSONObject dataTypeJSONObject = new DataTypeJSONObject(DateTime.getDateTime(), sample);
        dataKitAPI.insert(dataSourceClient, dataTypeJSONObject);
        isInDatabase = true;
        return true;
    } catch (DataKitException e) {
        LocalBroadcastManager.getInstance(modelManager.getContext()).sendBroadcast(new Intent(Constants.INTENT_RESTART));
        return false;
    }
}
 
开发者ID:MD2Korg,项目名称:mCerebrum-Study,代码行数:21,代码来源:UserInfoManager.java


示例17: readFromDataKit

import org.md2k.datakitapi.source.datasource.DataSourceClient; //导入依赖的package包/类
private PrivacyData readFromDataKit() {
    PrivacyData privacyData = null;
    try {
        DataKitAPI dataKitAPI = DataKitAPI.getInstance(modelManager.getContext());
        ArrayList<DataSourceClient> dataSourceClients = dataKitAPI.find(createDataSourceBuilder());
        if (dataSourceClients.size() > 0) {
            ArrayList<DataType> dataTypes = dataKitAPI.query(dataSourceClients.get(0), 1);
            if (dataTypes.size() != 0) {
                try {
                    DataTypeJSONObject dataTypeJSONObject = (DataTypeJSONObject) dataTypes.get(0);
                    Gson gson = new Gson();
                    privacyData = gson.fromJson(dataTypeJSONObject.getSample().toString(), PrivacyData.class);
                } catch (Exception ignored) {
                    privacyData = null;
                    LocalBroadcastManager.getInstance(modelManager.getContext()).sendBroadcast(new Intent(Constants.INTENT_RESTART));
                }
            }
        }
    } catch (DataKitException e) {
        privacyData=null;
        LocalBroadcastManager.getInstance(modelManager.getContext()).sendBroadcast(new Intent(Constants.INTENT_RESTART));
    }
    return privacyData;
}
 
开发者ID:MD2Korg,项目名称:mCerebrum-Study,代码行数:25,代码来源:PrivacyControlManager.java


示例18: unsubscribe

import org.md2k.datakitapi.source.datasource.DataSourceClient; //导入依赖的package包/类
private void unsubscribe(final String platformId) throws DataKitException {
    DataSourceClient dataSourceClientMBAccel = findDataSourceClient(PlatformType.MICROSOFT_BAND, platformId, DataSourceType.ACCELEROMETER);
    DataSourceClient dataSourceClientMBGyro = findDataSourceClient(PlatformType.MICROSOFT_BAND, platformId, DataSourceType.GYROSCOPE);

    DataSourceClient dataSourceClientMSAccel = findDataSourceClient(PlatformType.MOTION_SENSE, platformId, DataSourceType.ACCELEROMETER);
    DataSourceClient dataSourceClientMSGyro = findDataSourceClient(PlatformType.MOTION_SENSE, platformId, DataSourceType.GYROSCOPE);

    DataSourceClient dataSourceClientAW = findDataSourceClient(PlatformType.AUTOSENSE_WRIST, platformId, null);

    if (dataSourceClientMBAccel != null && dataSourceClientMBGyro != null) {
        dataKitAPI.unsubscribe(dataSourceClientMBAccel);
        dataKitAPI.unsubscribe(dataSourceClientMBGyro);

    } else if (dataSourceClientAW != null) {
        unsubscribe(PlatformType.AUTOSENSE_WRIST, platformId, DataSourceType.ACCELEROMETER_X);
        unsubscribe(PlatformType.AUTOSENSE_WRIST, platformId, DataSourceType.ACCELEROMETER_Y);
        unsubscribe(PlatformType.AUTOSENSE_WRIST, platformId, DataSourceType.ACCELEROMETER_Z);
        unsubscribe(PlatformType.AUTOSENSE_WRIST, platformId, DataSourceType.GYROSCOPE_X);
        unsubscribe(PlatformType.AUTOSENSE_WRIST, platformId, DataSourceType.GYROSCOPE_Y);
        unsubscribe(PlatformType.AUTOSENSE_WRIST, platformId, DataSourceType.GYROSCOPE_Z);

    } else if (dataSourceClientMSAccel != null && dataSourceClientMSGyro != null) {
        dataKitAPI.unsubscribe(dataSourceClientMSAccel);
        dataKitAPI.unsubscribe(dataSourceClientMSGyro);

    }
}
 
开发者ID:MD2Korg,项目名称:mCerebrum-StreamProcessor,代码行数:28,代码来源:DataKitManager.java


示例19: subscribeForThreeTuple

import org.md2k.datakitapi.source.datasource.DataSourceClient; //导入依赖的package包/类
private void subscribeForThreeTuple(DataSourceClient dataSourceClient, final String platformId, final String dataSourceId, final int[] convertedAxis, final int[] convertedSign) throws DataKitException {
    dataKitAPI.subscribe(dataSourceClient, new OnReceiveListener() {
        @Override
        public void onReceived(DataType dataType) {
            try {
                DataTypeDoubleArray dataTypeDoubleArray = (DataTypeDoubleArray) dataType;
                CSVDataPoint csvDataPointx = null;
                CSVDataPoint csvDataPointy = null;
                CSVDataPoint csvDataPointz = null;

                if (DataSourceType.ACCELEROMETER.equals(dataSourceId)) {
                    csvDataPointx = new CSVDataPoint(dataSourceTypeTOChannel.get(platformId + "_" + DataSourceType.ACCELEROMETER_X), dataTypeDoubleArray.getDateTime(), convertedSign[0] * dataTypeDoubleArray.getSample()[convertedAxis[0]]);
                    csvDataPointy = new CSVDataPoint(dataSourceTypeTOChannel.get(platformId + "_" + DataSourceType.ACCELEROMETER_Y), dataTypeDoubleArray.getDateTime(), convertedSign[1] * dataTypeDoubleArray.getSample()[convertedAxis[1]]);
                    csvDataPointz = new CSVDataPoint(dataSourceTypeTOChannel.get(platformId + "_" + DataSourceType.ACCELEROMETER_Z), dataTypeDoubleArray.getDateTime(), convertedSign[2] * dataTypeDoubleArray.getSample()[convertedAxis[2]]);
                } else if (DataSourceType.GYROSCOPE.equals(dataSourceId)) {
                    csvDataPointx = new CSVDataPoint(dataSourceTypeTOChannel.get(platformId + "_" + DataSourceType.GYROSCOPE_X), dataTypeDoubleArray.getDateTime(), convertedSign[0] * dataTypeDoubleArray.getSample()[convertedAxis[0]]);
                    csvDataPointy = new CSVDataPoint(dataSourceTypeTOChannel.get(platformId + "_" + DataSourceType.GYROSCOPE_Y), dataTypeDoubleArray.getDateTime(), convertedSign[1] * dataTypeDoubleArray.getSample()[convertedAxis[1]]);
                    csvDataPointz = new CSVDataPoint(dataSourceTypeTOChannel.get(platformId + "_" + DataSourceType.GYROSCOPE_Z), dataTypeDoubleArray.getDateTime(), convertedSign[2] * dataTypeDoubleArray.getSample()[convertedAxis[2]]);
                }
                streamProcessorWrapper.addDataPoint(csvDataPointx);
                streamProcessorWrapper.addDataPoint(csvDataPointy);
                streamProcessorWrapper.addDataPoint(csvDataPointz);
            } catch (Exception ignored) {

            }
        }
    });
}
 
开发者ID:MD2Korg,项目名称:mCerebrum-StreamProcessor,代码行数:29,代码来源:DataKitManager.java


示例20: find

import org.md2k.datakitapi.source.datasource.DataSourceClient; //导入依赖的package包/类
public synchronized ArrayList<DataSourceClient> find(DataSourceBuilder dataSourceBuilder) throws DataKitException {
    if (!dataKitAPIExecute.isConnected())
        throw new DataKitNotFoundException(new Status(Status.ERROR_BOUND));
    if (dataSourceBuilder == null)
        throw new DataKitException(new Status(Status.DATA_INVALID).getStatusMessage());
    ArrayList<DataSourceClient> dataSourceClients = dataKitAPIExecute.find(dataSourceBuilder).await();
    if (dataSourceClients == null || !dataKitAPIExecute.isConnected())
        throw new DataKitNotFoundException(new Status(Status.ERROR_BOUND));
    else return dataSourceClients;
}
 
开发者ID:MD2Korg,项目名称:mCerebrum-DataKitAPI,代码行数:11,代码来源:DataKitAPI.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java TextImpl类代码示例发布时间:2022-05-23
下一篇:
Java PlayerPickupArrowEvent类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap