Classes | Defines | Functions | Variables
main.cpp File Reference
#include <cstdio>
#include <cstdarg>
#include <getopt.h>
#include <execinfo.h>
#include <csignal>
#include <sys/mman.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <fcntl.h>
#include <pthread.h>
#include <numeric>
#include "ros_ethercat_model/ros_ethercat.hpp"
#include <std_msgs/Float64.h>
#include <diagnostic_updater/DiagnosticStatusWrapper.h>
Include dependency graph for main.cpp:

Go to the source code of this file.

Classes

class  RTLoopHistory

Defines

#define CLOCK_PRIO   0
#define CONTROL_PRIO   0

Functions

static void cleanupPidFile (const char *interface)
void * controlLoop (void *)
void * diagnosticLoop (void *args)
string generatePIDFilename (const char *interface)
static int lock_fd (int fd)
int main (int argc, char *argv[])
static double now ()
static void publishDiagnostics (RealtimePublisher< diagnostic_msgs::DiagnosticArray > &publisher)
void quitRequested (int sig)
static int setupPidFile (const char *interface)
static void * terminate_control (RealtimePublisher< diagnostic_msgs::DiagnosticArray > *publisher, RealtimePublisher< std_msgs::Float64 > *rtpublisher, const char *message, const char *data=NULL)
static void timespecInc (struct timespec &tick, int nsec)
void Usage (const string &msg="")

Variables

static pthread_t controlThread
static pthread_attr_t controlThreadAttr
struct {
   bool   allow_unprogrammed_
   char *   interface_
   double   period
   char *   program_
   char *   rosparam_
   bool   stats_
g_options
static int g_quit = 0
string g_robot_desc
struct {
   accumulator_set< double, stats
< tag::max, tag::mean > >   cm_acc
   accumulator_set< double, stats
< tag::max, tag::mean > >   ec_acc
   double   halt_rt_loop_frequency
   accumulator_set< double, stats
< tag::max, tag::mean > >   jitter_acc
   int   last_overrun
   int   last_severe_overrun
   accumulator_set< double, stats
< tag::max, tag::mean > >   loop_acc
   double   overrun_cm
   double   overrun_ec
   double   overrun_loop_sec
   int   overruns
   int   recent_overruns
   double   rt_loop_frequency
   bool   rt_loop_not_making_timing
g_stats
static const char * PIDDIR = "/var/tmp/run/"
static const int SEC_2_NSEC = 1e+9
static const int SEC_2_USEC = 1e6

Define Documentation

#define CLOCK_PRIO   0

Definition at line 567 of file main.cpp.

#define CONTROL_PRIO   0

Definition at line 568 of file main.cpp.


Function Documentation

static void cleanupPidFile ( const char *  interface) [static]

Definition at line 561 of file main.cpp.

void* controlLoop ( void *  )

Definition at line 262 of file main.cpp.

void* diagnosticLoop ( void *  args)

Definition at line 198 of file main.cpp.

string generatePIDFilename ( const char *  interface)

Definition at line 474 of file main.cpp.

static int lock_fd ( int  fd) [static]

Definition at line 459 of file main.cpp.

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

Definition at line 573 of file main.cpp.

static double now ( ) [inline, static]

Definition at line 191 of file main.cpp.

static void publishDiagnostics ( RealtimePublisher< diagnostic_msgs::DiagnosticArray > &  publisher) [static]

Definition at line 115 of file main.cpp.

void quitRequested ( int  sig)

Definition at line 454 of file main.cpp.

static int setupPidFile ( const char *  interface) [static]

Definition at line 481 of file main.cpp.

static void* terminate_control ( RealtimePublisher< diagnostic_msgs::DiagnosticArray > *  publisher,
RealtimePublisher< std_msgs::Float64 > *  rtpublisher,
const char *  message,
const char *  data = NULL 
) [static]

Definition at line 250 of file main.cpp.

static void timespecInc ( struct timespec &  tick,
int  nsec 
) [static]

Definition at line 212 of file main.cpp.

void Usage ( const string &  msg = "")

Definition at line 72 of file main.cpp.


Variable Documentation

Definition at line 65 of file main.cpp.

accumulator_set<double, stats<tag::max, tag::mean> > cm_acc

Definition at line 98 of file main.cpp.

pthread_t controlThread [static]

Definition at line 570 of file main.cpp.

pthread_attr_t controlThreadAttr [static]

Definition at line 571 of file main.cpp.

accumulator_set<double, stats<tag::max, tag::mean> > ec_acc

Definition at line 97 of file main.cpp.

struct { ... } g_options [static]
int g_quit = 0 [static]

Definition at line 91 of file main.cpp.

string g_robot_desc

Definition at line 70 of file main.cpp.

struct { ... } g_stats [static]

Definition at line 111 of file main.cpp.

char* interface_

Definition at line 63 of file main.cpp.

accumulator_set<double, stats<tag::max, tag::mean> > jitter_acc

Definition at line 100 of file main.cpp.

Definition at line 103 of file main.cpp.

Definition at line 104 of file main.cpp.

accumulator_set<double, stats<tag::max, tag::mean> > loop_acc

Definition at line 99 of file main.cpp.

double overrun_cm

Definition at line 107 of file main.cpp.

double overrun_ec

Definition at line 106 of file main.cpp.

Definition at line 105 of file main.cpp.

int overruns

Definition at line 101 of file main.cpp.

double period

Definition at line 67 of file main.cpp.

const char* PIDDIR = "/var/tmp/run/" [static]

Definition at line 472 of file main.cpp.

char* program_

Definition at line 62 of file main.cpp.

Definition at line 102 of file main.cpp.

char* rosparam_

Definition at line 64 of file main.cpp.

Definition at line 112 of file main.cpp.

Definition at line 110 of file main.cpp.

const int SEC_2_NSEC = 1e+9 [static]

Definition at line 92 of file main.cpp.

const int SEC_2_USEC = 1e6 [static]

Definition at line 93 of file main.cpp.

bool stats_

Definition at line 66 of file main.cpp.



ros_ethercat_loop
Author(s): Manos Nikolaidis
autogenerated on Thu Aug 27 2015 14:47:18