Go to the source code of this file.
Data Structures | |
struct | GDATALOGGERVARIABLE |
struct | GDATALOGGER |
struct | GDATALOGGERIPC_SHM |
Macros | |
#define | GDATALOGGER_MAXVARIABLES 150 |
#define | QUEUE_MAXDESTINATIONS 4 |
#define | QUEUE_DESTINATION_FILE QUEUE_READ_GATE_0 |
#define | QUEUE_DESTINATION_IPC QUEUE_READ_GATE_1 |
#define | QUEUE_DESTINATION_USER1 QUEUE_READ_GATE_2 |
#define | QUEUE_DESTINATION_USER2 QUEUE_READ_GATE_3 |
#define | GDATALOGGER_IPC_MAXQUEUESIZE 1000 |
#define | GDATALOGGER_IPC_FLAGIDDLE 0 |
#define | GDATALOGGER_IPC_FLAGREQUESTDATA 1 |
#define | GDATALOGGER_IPC_FLAGDATAAVAILABLE 2 |
#define | GDATALOGGER_IPC_FLAGNOTEXIST 3 |
#define | GDATALOGGER_IPC_FLAGTIMEOUT 4 |
#define | GDATALOGGER_IPC_STATEFILE "/gdatalogger.shm" |
Typedefs | |
typedef struct GDATALOGGERVARIABLE * | PGDATALOGGERVARIABLE |
typedef struct GDATALOGGER * | PGDATALOGGER |
Functions | |
int | gDataLogger_Init (PGDATALOGGER pgDataLogger, char *filename, char *dirname) |
int | gDataLogger_DeclareVariable (PGDATALOGGER pgDataLogger, char *varname, char *varunit, int nrows, int ncols, int queuesize) |
int | gDataLogger_InsertVariable (PGDATALOGGER pgDataLogger, char *varname, double *varvalue) |
int | gDataLogger_IPC_RetrieveVariable (char *varname, char *varunit, double *pbuffer, int *bufferlen) |
int | gDataLogger_MatfileUpdate (PGDATALOGGER pgDataLogger) |
int | gDataLogger_IPCUpdate (PGDATALOGGER pgDataLogger) |
int | gDataLogger_Close (PGDATALOGGER pgDataLogger) |
#define GDATALOGGER_IPC_FLAGDATAAVAILABLE 2 |
Definition at line 41 of file gdatalogger.h.
Referenced by gDataLogger_IPC_RetrieveVariable(), and gDataLogger_IPCUpdate().
#define GDATALOGGER_IPC_FLAGIDDLE 0 |
Definition at line 39 of file gdatalogger.h.
Referenced by gDataLogger_Init(), and gDataLogger_IPC_RetrieveVariable().
#define GDATALOGGER_IPC_FLAGNOTEXIST 3 |
Definition at line 42 of file gdatalogger.h.
Referenced by gDataLogger_IPC_RetrieveVariable(), and gDataLogger_IPCUpdate().
#define GDATALOGGER_IPC_FLAGREQUESTDATA 1 |
Definition at line 40 of file gdatalogger.h.
Referenced by gDataLogger_IPC_RetrieveVariable(), and gDataLogger_IPCUpdate().
#define GDATALOGGER_IPC_FLAGTIMEOUT 4 |
Definition at line 43 of file gdatalogger.h.
Referenced by gDataLogger_IPC_RetrieveVariable().
#define GDATALOGGER_IPC_MAXQUEUESIZE 1000 |
Definition at line 38 of file gdatalogger.h.
#define GDATALOGGER_IPC_STATEFILE "/gdatalogger.shm" |
Definition at line 56 of file gdatalogger.h.
Referenced by gDataLogger_Close(), and gDataLogger_Init().
#define GDATALOGGER_MAXVARIABLES 150 |
Definition at line 13 of file gdatalogger.h.
Referenced by gDataLogger_DeclareVariable(), and gDataLogger_Init().
#define QUEUE_DESTINATION_FILE QUEUE_READ_GATE_0 |
Definition at line 33 of file gdatalogger.h.
Referenced by gDataLogger_InsertVariable(), and gDataLogger_MatfileUpdate().
#define QUEUE_DESTINATION_IPC QUEUE_READ_GATE_1 |
Definition at line 34 of file gdatalogger.h.
Referenced by gDataLogger_IPCUpdate().
#define QUEUE_DESTINATION_USER1 QUEUE_READ_GATE_2 |
Definition at line 35 of file gdatalogger.h.
#define QUEUE_DESTINATION_USER2 QUEUE_READ_GATE_3 |
Definition at line 36 of file gdatalogger.h.
#define QUEUE_MAXDESTINATIONS 4 |
Definition at line 32 of file gdatalogger.h.
Referenced by gDataLogger_DeclareVariable().
typedef struct GDATALOGGER* PGDATALOGGER |
typedef struct GDATALOGGERVARIABLE* PGDATALOGGERVARIABLE |
int gDataLogger_Close | ( | PGDATALOGGER | pgDataLogger | ) |
Definition at line 362 of file gdatalogger.c.
References GDATALOGGERVARIABLE::CircularQueue, GDATALOGGER_IPC_STATEFILE, gDataLogger_MatfileUpdate(), gDataLoggerIPC_SHM_fd, gDataLoggerIPC_SHM_flagmodeserver, gMATLABDataFile_Close(), gMATLABDataFile_SaveVector(), GDATALOGGER::GMatlabDataFileConfig, GDATALOGGERVARIABLE::GMatlabDataFileIndex, GDATALOGGERVARIABLE::HasBeenWritten, GDATALOGGER::m_NumberOfVariables, GDATALOGGERVARIABLE::Nc, GDATALOGGERVARIABLE::Nr, TRUE, GDATALOGGERVARIABLE::VariableName, GDATALOGGER::Variables, and GDATALOGGERVARIABLE::VariableUnit.
Referenced by datalogger_close().
int gDataLogger_DeclareVariable | ( | PGDATALOGGER | pgDataLogger, |
char * | varname, | ||
char * | varunit, | ||
int | nrows, | ||
int | ncols, | ||
int | queuesize | ||
) |
Definition at line 173 of file gdatalogger.c.
References GDATALOGGERVARIABLE::CircularQueue, GDATALOGGERVARIABLE::CircularQueueControl, FALSE, GDATALOGGER_MAXVARIABLES, GDATALOGGERVARIABLE::GMatlabDataFileIndex, gQUEUE_Init(), GDATALOGGER::m_NumberOfVariables, GDATALOGGERVARIABLE::Nc, GDATALOGGERVARIABLE::Nr, QUEUE_MAXDESTINATIONS, TRUE, GDATALOGGERVARIABLE::VariableName, GDATALOGGER::Variables, and GDATALOGGERVARIABLE::VariableUnit.
Referenced by datalogger_init().
int gDataLogger_Init | ( | PGDATALOGGER | pgDataLogger, |
char * | filename, | ||
char * | dirname | ||
) |
Definition at line 42 of file gdatalogger.c.
References GDATALOGGERVARIABLE::CircularQueue, FALSE, GDATALOGGERIPC_SHM::Flag, GDATALOGGER_IPC_FLAGIDDLE, GDATALOGGER_IPC_STATEFILE, GDATALOGGER_MAXVARIABLES, gDataLoggerIPC_SHM_fd, gDataLoggerIPC_SHM_flagmodeserver, gMATLABDataFile_OpenWrite(), GDATALOGGER::GMatlabDataFileConfig, GDATALOGGERVARIABLE::GMatlabDataFileIndex, GDATALOGGERVARIABLE::HasBeenWritten, GDATALOGGER::m_NumberOfVariables, GDATALOGGERVARIABLE::Nc, GDATALOGGERVARIABLE::Nr, status, TRUE, GDATALOGGERVARIABLE::VariableName, GDATALOGGER::Variables, and GDATALOGGERVARIABLE::VariableUnit.
Referenced by datalogger_init().
int gDataLogger_InsertVariable | ( | PGDATALOGGER | pgDataLogger, |
char * | varname, | ||
double * | varvalue | ||
) |
Definition at line 199 of file gdatalogger.c.
References GDATALOGGERVARIABLE::CircularQueue, GDATALOGGERVARIABLE::CircularQueueControl, FALSE, GQUEUECONTROL::FlagFull, gDataLogger_MatfileUpdate(), gQUEUE_RequestWriteIndex(), GDATALOGGERVARIABLE::HasBeenWritten, GDATALOGGER::m_NumberOfVariables, GDATALOGGERVARIABLE::Nc, GDATALOGGERVARIABLE::Nr, QUEUE_DESTINATION_FILE, TRUE, GDATALOGGERVARIABLE::VariableName, and GDATALOGGER::Variables.
Referenced by datalogger_init(), datalogger_set_Ts(), and datalogger_update().
int gDataLogger_IPC_RetrieveVariable | ( | char * | varname, |
char * | varunit, | ||
double * | pbuffer, | ||
int * | bufferlen | ||
) |
Definition at line 319 of file gdatalogger.c.
References GDATALOGGERIPC_SHM::Flag, GDATALOGGER_IPC_FLAGDATAAVAILABLE, GDATALOGGER_IPC_FLAGIDDLE, GDATALOGGER_IPC_FLAGNOTEXIST, GDATALOGGER_IPC_FLAGREQUESTDATA, GDATALOGGER_IPC_FLAGTIMEOUT, GDATALOGGERIPC_SHM::QueueData, GDATALOGGERIPC_SHM::QueueSize, GDATALOGGERIPC_SHM::VariableName, and GDATALOGGERIPC_SHM::VariableUnit.
int gDataLogger_IPCUpdate | ( | PGDATALOGGER | pgDataLogger | ) |
Definition at line 274 of file gdatalogger.c.
References GDATALOGGERVARIABLE::CircularQueue, GDATALOGGERVARIABLE::CircularQueueControl, FALSE, GDATALOGGERIPC_SHM::Flag, GDATALOGGER_IPC_FLAGDATAAVAILABLE, GDATALOGGER_IPC_FLAGNOTEXIST, GDATALOGGER_IPC_FLAGREQUESTDATA, gDataLoggerIPC_SHM_flagmodeserver, gQUEUE_GetNumberOfUnreadData(), gQUEUE_RequestReadIndex(), GDATALOGGER::m_NumberOfVariables, QUEUE_DESTINATION_IPC, GDATALOGGERIPC_SHM::QueueData, GDATALOGGERIPC_SHM::QueueSize, TRUE, GDATALOGGERVARIABLE::VariableName, GDATALOGGERIPC_SHM::VariableName, GDATALOGGER::Variables, GDATALOGGERVARIABLE::VariableUnit, and GDATALOGGERIPC_SHM::VariableUnit.
Referenced by datalogger_update_IPC().
int gDataLogger_MatfileUpdate | ( | PGDATALOGGER | pgDataLogger | ) |
Definition at line 245 of file gdatalogger.c.
References GDATALOGGERVARIABLE::CircularQueue, GDATALOGGERVARIABLE::CircularQueueControl, FALSE, gMATLABDataFile_SaveVector(), GDATALOGGER::GMatlabDataFileConfig, GDATALOGGERVARIABLE::GMatlabDataFileIndex, gQUEUE_GetNumberOfUnreadData(), gQUEUE_RequestReadIndex(), GDATALOGGER::m_NumberOfVariables, QUEUE_DESTINATION_FILE, TRUE, GDATALOGGERVARIABLE::VariableName, and GDATALOGGER::Variables.
Referenced by datalogger_close(), datalogger_write_file(), gDataLogger_Close(), and gDataLogger_InsertVariable().