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 <controller_manager/controller_manager.h>
#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 571 of file main.cpp.

#define CONTROL_PRIO   0

Definition at line 572 of file main.cpp.


Function Documentation

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

Definition at line 565 of file main.cpp.

void* controlLoop ( void *  )

Definition at line 267 of file main.cpp.

void* diagnosticLoop ( void *  args)

Definition at line 200 of file main.cpp.

string generatePIDFilename ( const char *  interface)

Definition at line 478 of file main.cpp.

static int lock_fd ( int  fd) [static]

Definition at line 463 of file main.cpp.

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

Definition at line 577 of file main.cpp.

static double now ( ) [inline, static]

Definition at line 193 of file main.cpp.

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

Definition at line 117 of file main.cpp.

void quitRequested ( int  sig)

Definition at line 458 of file main.cpp.

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

Definition at line 485 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 255 of file main.cpp.

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

Definition at line 217 of file main.cpp.

void Usage ( const string &  msg = "")

Definition at line 74 of file main.cpp.


Variable Documentation

Definition at line 67 of file main.cpp.

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

Definition at line 100 of file main.cpp.

pthread_t controlThread [static]

Definition at line 574 of file main.cpp.

pthread_attr_t controlThreadAttr [static]

Definition at line 575 of file main.cpp.

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

Definition at line 99 of file main.cpp.

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

Definition at line 93 of file main.cpp.

string g_robot_desc

Definition at line 72 of file main.cpp.

struct { ... } g_stats [static]

Definition at line 113 of file main.cpp.

char* interface_

Definition at line 65 of file main.cpp.

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

Definition at line 102 of file main.cpp.

Definition at line 105 of file main.cpp.

Definition at line 106 of file main.cpp.

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

Definition at line 101 of file main.cpp.

double overrun_cm

Definition at line 109 of file main.cpp.

double overrun_ec

Definition at line 108 of file main.cpp.

Definition at line 107 of file main.cpp.

int overruns

Definition at line 103 of file main.cpp.

double period

Definition at line 69 of file main.cpp.

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

Definition at line 476 of file main.cpp.

char* program_

Definition at line 64 of file main.cpp.

Definition at line 104 of file main.cpp.

char* rosparam_

Definition at line 66 of file main.cpp.

Definition at line 114 of file main.cpp.

Definition at line 112 of file main.cpp.

const int SEC_2_NSEC = 1e+9 [static]

Definition at line 94 of file main.cpp.

const int SEC_2_USEC = 1e6 [static]

Definition at line 95 of file main.cpp.

bool stats_

Definition at line 68 of file main.cpp.



ros_ethercat_loop
Author(s): Manos Nikolaidis
autogenerated on Thu Jul 4 2019 20:01:57