DataStructures 1.6.16
A small compiled C library of data structures used in the NHP wrist center-out and other tasks.
Loading...
Searching...
No Matches
Utility Functions for Structured Data

Utilities, such as formatted printing or other handlers of the structured data. More...

Functions

void formatTimestampWithMillis (FILETIME ft, char *buffer, size_t bufferSize)
 Formats the timestamp into a string with milliseconds.
 
void printCursorDatum (CursorData *cursorData, const char *tag)
 Prints a cursor datum to the terminal.
 
void printStateDatum (StateData *stateData, const char *tag)
 Prints a state datum to the terminal.
 
void printTrialDatum (TrialData *trialData, const char *tag)
 Prints a trial datum to the terminal.
 
void updateLogData (LogData *logData, uint16_t set_index, StateData state, TrialData trial)
 Updates the log data structure with current values for logging.

 

Detailed Description

Utilities, such as formatted printing or other handlers of the structured data.

Function Documentation

◆ formatTimestampWithMillis()

void formatTimestampWithMillis ( FILETIME ft,
char * buffer,
size_t bufferSize )

Formats the timestamp into a string with milliseconds.

Parameters
ftFILETIME structure representing the timestamp.
bufferPointer to the buffer where the formatted timestamp will be stored.
bufferSizeSize of the buffer.

◆ printCursorDatum()

void printCursorDatum ( CursorData * cursorData,
const char * tag )

Prints a cursor datum to the terminal.

Parameters
cursorDataPointer to the CursorData structure to be printed.
tagNULL or string with identifier tag for labeling printed line.

◆ printStateDatum()

void printStateDatum ( StateData * stateData,
const char * tag )

Prints a state datum to the terminal.

Parameters
stateDataPointer to the StateData structure to be printed.
tagNULL or string with identifier tag for labeling printed line.

◆ printTrialDatum()

void printTrialDatum ( TrialData * trialData,
const char * tag )

Prints a trial datum to the terminal.

Parameters
trialDataPointer to the TrialData structure to be printed.
tagNULL or string with identifier tag for labeling printed line.

◆ updateLogData()

void updateLogData ( LogData * logData,
uint16_t set_index,
StateData state,
TrialData trial )

Updates the log data structure with current values for logging.

Parameters
logDataPointer to the LogData structure to be updated.
set_indexNew value for set_index field.
stateNew value for state field.
trialNew value for trial field.