If you think the Android project SensorDataCollector listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
Java Source Code
/*
* Copyright (c) 2014, the SenSee authors. Please see the AUTHORS file
* for details. /*fromwww.java2s.com*/
*
* Licensed under the GNU Public License, Version 3.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.gnu.org/copyleft/gpl.html
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/package sysnetlab.android.sdc.datastore;
import java.util.List;
import java.util.concurrent.BlockingQueue;
import android.widget.ProgressBar;
import sysnetlab.android.sdc.datacollector.Experiment;
publicabstractclass AbstractStore {
protected List<Channel> mChannels;
publicabstractclass Channel {
publicstaticfinalint READ_ONLY = 0x0001;
publicstaticfinalint WRITE_ONLY = 0x0002;
publicstaticfinalint CHANNEL_TYPE_CSV = 0x0001;
publicstaticfinalint CHANNEL_TYPE_BIN = 0x0002;
publicstaticfinalint CHANNEL_TYPE_PCM = 0x0004;
publicstaticfinalint CHANNEL_TYPE_WAV = 0x0008;
protectedboolean mDeferredClosing;
protected BlockingQueue<Integer> mBlockingQueue;
publicabstractboolean open();
publicabstractvoid write(String s);
publicabstractvoid write(byte[] buffer, int offset, int length);
publicabstractvoid write(byte[] buffer, int bufferOffset, int bufferLength, int fileOffset);
publicabstract String read();
publicabstractvoid reset();
publicabstractvoid close();
publicabstractint getType();
/**
* @return the channel description sufficiently to reconstruct a channel
* to read the data
*/publicabstract String describe();
publicabstractvoid setDeferredClosing(boolean defferedClosing);
publicabstractvoid setReadyToClose();
};
publicabstractvoid setupNewExperimentStorage(Experiment experiment);
publicabstractvoid writeExperimentMetaData(Experiment experiment);
publicabstract List<Experiment> listStoredExperiments();
publicabstract List<Experiment> listStoredExperiments(ProgressBar mProgressBar);
publicabstractint getCountExperiments();
publicabstract String getNewExperimentPath();
publicabstract Channel createChannel(String tag, int operationFlags, int channelType);
publicabstractvoid closeAllChannels();
}