Aria  2.8.0
ArDataLogger Class Reference

This class will log data, but you have to use it through an ArConfig right now. More...

#include <ArDataLogger.h>

Public Member Functions

void addString (const char *name, ArTypes::UByte2 maxLen, ArFunctor2< char *, ArTypes::UByte2 > *functor)
 Adds a string to the list of options in the raw format.
 
void addToConfig (ArConfig *config)
 Adds the data logger information to the config.
 
 ArDataLogger (ArRobot *robot, const char *fileName=NULL)
 Constructor. More...
 
ArFunctor3< const char *, ArTypes::UByte2, ArFunctor2< char *, ArTypes::UByte2 > * > * getAddStringFunctor (void)
 Gets the functor for adding a string (for ArStringInfoGroup)
 
 ~ArDataLogger ()
 Destructor.
 

Protected Member Functions

void connectCallback (void)
 
bool processFile (char *errorBuffer, size_t errorBufferLen)
 
void userTask (void)
 

Protected Attributes

bool myAddedToConfig
 
ArFunctor3C< ArDataLogger, const char *, ArTypes::UByte2, ArFunctor2< char *, ArTypes::UByte2 > * > myAddStringFunctor
 
bool myAddToConfigAtConnect
 
int myAnalogCount
 
bool * myAnalogEnabled
 
int myAnalogVoltageCount
 
bool * myAnalogVoltageEnabled
 
ArConfigmyConfig
 
char myConfigFileName [512]
 
bool myConfigLogging
 
int myConfigLogInterval
 
ArFunctorC< ArDataLoggermyConnectCB
 
int myDigInCount
 
bool * myDigInEnabled
 
int myDigOutCount
 
bool * myDigOutEnabled
 
FILE * myFile
 
ArTime myLastLogged
 
bool myLogBatteryInfo
 
bool myLogChargeState
 
bool myLogCorrectedEncoderPose
 
bool myLogEncoderPose
 
bool myLogEncoders
 
bool myLogFaultFlags
 
bool myLogFlags
 
bool myLogLatVel
 
bool myLogLeftStalled
 
bool myLogLeftVel
 
bool myLogPose
 
bool myLogRightStalled
 
bool myLogRightVel
 
bool myLogRotVel
 
bool myLogStallBits
 
bool myLogStateOfCharge
 
bool myLogTransVel
 
bool myLogVoltage
 
ArTypes::UByte2 myMaxMaxLength
 
ArMutex myMutex
 
char myOpenedFileName [512]
 
std::string myPermanentFileName
 
ArRetFunctor2C< bool, ArDataLogger, char *, size_t > myProcessFileCB
 
ArRobotmyRobot
 
std::vector< ArStringInfoHolder * > myStrings
 
int myStringsCount
 
std::vector< bool * > myStringsEnabled
 
ArFunctorC< ArDataLoggermyUserTaskCB
 

Detailed Description

This class will log data, but you have to use it through an ArConfig right now.

This class doesn't log anything by default, but can be set up to log all sorts of data. Note that if you do an addString after you do an addToConfig it'll automatically be enabled (since right now we don't want to change config after loading since the values would wind up wierd).

Constructor & Destructor Documentation

◆ ArDataLogger()

ArDataLogger::ArDataLogger ( ArRobot robot,
const char *  fileName = NULL 
)

Constructor.

Parameters
robotthe robot to log information from
fileNameif NULL then the file name is detered by the config, if not NULL then the file name data is put into, if the filename is used then the data log file is opened in append mode not in write mode, so it'll append to whats there (if you want to separate this by runs you need to do it on your own by removing or moving the file)

The documentation for this class was generated from the following files: