ImuModule
public class ImuModule extends LoadableModule
Fields
Name | Description |
---|---|
public static final String SESSION_FILE_EXTENSION
|
File extension for downloaded Imu session. |
Constructors
ImuModule
public ImuModule(ConnectedJacquardTag tag)
Parameters
Name | Description |
---|---|
ConnectedJacquardTag tag
|
Methods
startImuSession
public Signal<String> startImuSession()
Starts IMU Session.
ReturnValue
Name | Description |
---|---|
Signal<String>
|
sessionId if successful. |
getCurrentSessionId
public Signal<String> getCurrentSessionId()
Reads current session id stored on the tag. Returns empty string if no session id found.
ReturnValue
Name | Description |
---|---|
Signal<String>
|
getCurrentDataCollectionMode
public Signal<DataCollectionMode> getCurrentDataCollectionMode()
Returns currentDataCollectionModeand null if mode is not found or error occurred.
ReturnValue
Name | Description |
---|---|
Signal<DataCollectionMode>
|
startImuStreaming
public Signal<ImuStream> startImuStreaming()
Starts collecting Imu samples.
ReturnValue
Name | Description |
---|---|
Signal<ImuStream>
|
Stream of ImuStream |
startImuStreaming
public Signal<ImuStream> startImuStreaming(DataCollectionMetadata metadata, ImuConfiguration imuConfig)
Starts collecting Imu samples with providedDataCollectionMetadata
Parameters
Name | Description |
---|---|
DataCollectionMetadata metadata
|
|
ImuConfiguration imuConfig
|
ReturnValue
Name | Description |
---|---|
Signal<ImuStream>
|
Stream of ImuStream |
stopImuStreaming
public Signal<Boolean> stopImuStreaming()
Stops imu streaming.
ReturnValue
Name | Description |
---|---|
Signal<Boolean>
|
stopImuSession
public Signal<Boolean> stopImuSession()
Stops currently active imu session.
ReturnValue
Name | Description |
---|---|
Signal<Boolean>
|
getDataCollectionStatus
public Signal<DataCollectionStatus> getDataCollectionStatus()
Gives you current imu data collection status.
ReturnValue
Name | Description |
---|---|
Signal<DataCollectionStatus>
|
getImuSessionsList
public Signal<List<ImuSessionInfo>> getImuSessionsList()
Returns a list of imu sessions present on ujt.
ReturnValue
Name | Description |
---|---|
Signal<List<ImuSessionInfo>>
|
downloadImuData
public Signal<
Starts downloading of imu session.
Parameters
Name | Description |
---|---|
String sessionId
|
ReturnValue
Name | Description |
---|---|
Signal<
|
Pair<Progress, File> pair.first : Download progress. pair.second : File object when progress is 100% |
downloadImuData
public Signal<
Starts downloading of imu session.
Parameters
Name | Description |
---|---|
ImuSessionInfo info
|
ReturnValue
Name | Description |
---|---|
Signal<
|
Pair<Progress, File> pair.first : Download progress. pair.second : File object when progress is 100% |
parseImuData
public static Signal<ImuSessionData> parseImuData(String path)
Parses raw imu samples file.
Parameters
Name | Description |
---|---|
String path
|
ReturnValue
Name | Description |
---|---|
Signal<ImuSessionData>
|
erase
public Signal<Boolean> erase(ImuSessionInfo selectedTrialData)
Erase imu session.
Parameters
Name | Description |
---|---|
ImuSessionInfo selectedTrialData
|
ReturnValue
Name | Description |
---|---|
Signal<Boolean>
|
erase
public Signal<Boolean> erase(String sessionId)
Erase imu session.
Parameters
Name | Description |
---|---|
String sessionId
|
ReturnValue
Name | Description |
---|---|
Signal<Boolean>
|
eraseAll
public Signal<Boolean> eraseAll()
Erases all imu sessions present on ujt.
ReturnValue
Name | Description |
---|---|
Signal<Boolean>
|
destroy
public void destroy()
Release resources.
ReturnValue
Name | Description |
---|---|
void
|
getVidPidMid
public Module getVidPidMid()
ReturnValue
Name | Description |
---|---|
Module
|
IMU loadable module can be accessed using this class.