init_accls.cpp File Reference

This file contains the function definitions needed to initialize the accelerometers. More...

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/ioctl.h>
#include <fcntl.h>
#include <signal.h>
#include <curses.h>
#include <string.h>
#include <time.h>
#include "init_accls.h"
#include "lowerleg_struct.h"
Include dependency graph for init_accls.cpp:

Defines

#define EXIT_ON_ERROR(res, comment)   if (res != XRV_OK) { printw("Error %d occurred in " comment ": %s\n",res,xsensResultText(res)); exit(1); }

Functions

int doHardwareScan (xsens::Cmt3 &cmt3, CmtDeviceId deviceIds[])
void doMtSettings (xsens::Cmt3 &cmt3, CmtOutputMode &mode, CmtOutputSettings &settings, CmtDeviceId deviceIds[])
void writeHeaders (unsigned long mtCount, CmtOutputMode &mode, CmtOutputSettings &settings, int &temperatureOffset, int &screenSensorOffset)
int calcScreenOffset (CmtOutputMode &mode, CmtOutputSettings &settings, int screenSensorOffset)
int write_accl_headers (FILE *filep_acc, tibia tib, femur fem, unsigned long mtCount, CmtDeviceId deviceIds[256], char *datestr)

Detailed Description

This file contains the function definitions needed to initialize the accelerometers.

The accelerometers are initialized according to the settings needed for experiments


Define Documentation

#define EXIT_ON_ERROR (   res,
  comment 
)    if (res != XRV_OK) { printw("Error %d occurred in " comment ": %s\n",res,xsensResultText(res)); exit(1); }

Referenced by doHardwareScan(), and doMtSettings().


Function Documentation

int calcScreenOffset ( CmtOutputMode &  mode,
CmtOutputSettings &  settings,
int  screenSensorOffset 
)
int doHardwareScan ( xsens::Cmt3 &  cmt3,
CmtDeviceId  deviceIds[] 
)

References EXIT_ON_ERROR.

void doMtSettings ( xsens::Cmt3 &  cmt3,
CmtOutputMode &  mode,
CmtOutputSettings &  settings,
CmtDeviceId  deviceIds[] 
)

References EXIT_ON_ERROR.

int write_accl_headers ( FILE *  filep_acc,
tibia  tib,
femur  fem,
unsigned long  mtCount,
CmtDeviceId  deviceIds[256],
char *  datestr 
)

References tibia::accelerometers, tibia::accl_count, conv_accl_id(), sensor::label_id, and sensor::LINK_label.

Here is the call graph for this function:

void writeHeaders ( unsigned long  mtCount,
CmtOutputMode &  mode,
CmtOutputSettings &  settings,
int &  temperatureOffset,
int &  screenSensorOffset 
)
 All Data Structures Files Functions Variables Typedefs Defines