OMAPI  1.8
Open Movement Public API
record.c File Reference
#include <unistd.h>
#include <time.h>
#include <stdlib.h>
#include <stdio.h>
#include <stdbool.h>
#include <string.h>
#include "omapi.h"

Go to the source code of this file.

Data Structures

struct  deviceInfo_tag
 

Macros

#define Sleep(millis)   sleep((millis) / 1000)
 
#define ID_NAND
 

Typedefs

typedef struct deviceInfo_tag deviceInfo_t
 

Enumerations

enum  devicestatus_t { DEVICE_DISCONNECTED = 0, DEVICE_CONNECTED, DEVICE_ERROR, DEVICE_DONE }
 

Functions

int record_setup (int deviceId)
 
int record (const char *outfile)
 
int record_main (int argc, char *argv[])
 

Variables

deviceInfo_tdeviceInfo = NULL
 
int startDays = 1
 
int startHour = 0
 
int durationDays = 8
 
int endHour = 0
 
int minBatt = 85
 
int debugMode = 0
 

Detailed Description

Open Movement API Example: Batch clear and set devices to record.

Author
Dan Jackson
Date
2012

A command-line tool to batch setup all connected devices to record, time synchronization. Session identifiers is set to the device id. The pairing of session identifiers and their assigned device identifiers is written to an output file (if specified). The time is synchronized with the PC at setup time.

Remarks
Makes use of API initialization and device discovery, Device status, Device settings and meta-data, Return codes, Date/time type

Definition in file record.c.

Macro Definition Documentation

◆ ID_NAND

#define ID_NAND

Definition at line 102 of file record.c.

◆ Sleep

#define Sleep (   millis)    sleep((millis) / 1000)

Definition at line 49 of file record.c.

Typedef Documentation

◆ deviceInfo_t

typedef struct deviceInfo_tag deviceInfo_t

Enumeration Type Documentation

◆ devicestatus_t

Enumerator
DEVICE_DISCONNECTED 
DEVICE_CONNECTED 
DEVICE_ERROR 
DEVICE_DONE 

Definition at line 62 of file record.c.

Function Documentation

◆ record()

int record ( const char *  outfile)

Definition at line 345 of file record.c.

◆ record_main()

int record_main ( int  argc,
char *  argv[] 
)

Definition at line 434 of file record.c.

◆ record_setup()

int record_setup ( int  deviceId)

Definition at line 161 of file record.c.

Variable Documentation

◆ debugMode

int debugMode = 0

Definition at line 98 of file record.c.

◆ deviceInfo

deviceInfo_t* deviceInfo = NULL

Definition at line 71 of file record.c.

◆ durationDays

int durationDays = 8

Definition at line 96 of file record.c.

◆ endHour

int endHour = 0

Definition at line 96 of file record.c.

◆ minBatt

int minBatt = 85

Definition at line 97 of file record.c.

◆ startDays

int startDays = 1

Definition at line 95 of file record.c.

◆ startHour

int startHour = 0

Definition at line 95 of file record.c.