 |
OMAPI
1.8
Open Movement Public API
|
Go to the documentation of this file.
69 deviceIds = (
int *)malloc(numDevices *
sizeof(
int));
75 if (result < numDevices) { numDevices = result; }
78 for (i = 0; i < numDevices; i++)
80 int deviceId = deviceIds[i];
87 printf(
"CLEARING #%d: SessionId = 0...\n", deviceId);
92 printf(
"CLEARING #%d: Metadata = <clear>...\n", deviceId);
97 printf(
"CLEARING #%d: Delays = <never-log>...\n", deviceId);
102 printf(
"CLEARING #%d: AccelConfig = <defaults>...\n", deviceId);
107 printf(
"CLEARING #%d: Clear data and commit...\n", deviceId);
136 printf(
"CLEAR: clear all attached devices.\n");
138 if (argc > 1 && strcmp(argv[1],
"ALL") == 0)
144 printf(
"Usage: clear ALL\n");
146 printf(
"Where: ALL: is a case-sensitive word 'ALL' to confirm clearing all attached devices.\n");
148 printf(
"Example: clear ALL\n");
#define OM_ACCEL_DEFAULT_RANGE
Default accelerometer range configuration is +/- 8 G.
int OmSetSessionId(int deviceId, unsigned int sessionId)
Sets the specified device's session identifier to be used at the next recording session.
#define OM_DATETIME_INFINITE
Special date/time value for "infinitely late".
const char * OmErrorString(int status)
Returns an error string for the specified API return code.
Device file-system is re-created and a new data file is created with the current metadata.
#define OM_FAILED(value)
Macro to check the specified return value for failure.
int OmSetLed(int deviceId, OM_LED_STATE ledState)
Sets the specified device's LED colour.
#define OM_ACCEL_DEFAULT_RATE
Default accelerometer rate configuration is 100Hz.
int OmSetAccelConfig(int deviceId, int rate, int range)
Sets the specified device's accelerometer configuration to be used at the next recording session.
#define OM_VERSION
A numeric code for current API version defined in this header file.
int OmShutdown(void)
Shuts down the Open Movement API.
int OmSetDelays(int deviceId, OM_DATETIME startTime, OM_DATETIME stopTime)
Sets the specified device's delayed activation start and stop times to use for a new recording sessio...
int OmGetDeviceIds(int *deviceIds, int maxDevices)
Obtains the device IDs of all connected devices.
int OmSetMetadata(int deviceId, const char *metadata, int size)
Sets the specified device's metadata scratch buffer to be used for the next recording session.
int OmStartup(int version)
Initializes the Open Movement API.
int OmEraseDataAndCommit(int deviceId, OM_ERASE_LEVEL eraseLevel)
Erases the specified device storage and commits the metadata and settings.
int clear_main(int argc, char *argv[])