adr2205/adr2205_driver.C File Reference

#include "adr2205.H"
#include "util.H"
#include "serial_io.H"
#include "data_queue.H"
#include "data_logger.H"
#include "queue_factory.H"
#include "cbmesg_logger.H"
#include "cb_time.H"
#include <libgen.h>
#include <csignal>
#include <iostream>
#include <unistd.h>
#include <sys/poll.h>
#include "conf.H"

Functions

void sig_handler (int sig)
bool read_conf (conf_t &conf_)
void reset_control_lines ()
void set_control_lines (control_line_data_t const &d)
void set_control_lines (steering_data_t const &s)
void output_control_lines (adr2205_t &adr2205, bool const unit_used[adr2205_t::MAX_UNITS])
void output_initial_controls (adr2205_t &adr2205, bool const unit_used[adr2205_t::MAX_UNITS])
bool filter_kill (bool k_sig, cbmesg_logger_t &msg_logger)
int main (int argc, char **argv)

Variables

unsigned LINE_ESTOP_PAUSE
unsigned LINE_ESTOP_KILL
unsigned LINE_ENGINE_ON
unsigned LINE_GENERATOR_ON
unsigned UNIT_ESTOP_PAUSE
unsigned UNIT_ESTOP_KILL
unsigned UNIT_ENGINE_ON
unsigned UNIT_GENERATOR_ON
unsigned LINE_LEFT_BLINKER
unsigned LINE_RIGHT_BLINKER
unsigned LINE_BRAKE_LIGHTS
unsigned LINE_SAFETY_LIGHTS
unsigned LINE_SAFETY_SIREN
unsigned LINE_ENGINE_STARTER
unsigned LINE_GENERATOR_STARTER
unsigned LINE_PARK
unsigned LINE_DRIVE
unsigned LINE_REVERSE
unsigned LINE_NEUTRAL
unsigned UNIT_LEFT_BLINKER
unsigned UNIT_RIGHT_BLINKER
unsigned UNIT_BRAKE_LIGHTS
unsigned UNIT_SAFETY_LIGHTS
unsigned UNIT_SAFETY_SIREN
unsigned UNIT_ENGINE_STARTER
unsigned UNIT_GENERATOR_STARTER
unsigned UNIT_PARK
unsigned UNIT_DRIVE
unsigned UNIT_REVERSE
unsigned UNIT_NEUTRAL
bool reverse_pause
bool reverse_kill
double time_to_change_gear = 1
unsigned kill_count_threshold = 2
unsigned kill_counter = 0
unsigned output [adr2205_t::MAX_UNITS]

Function Documentation

bool filter_kill ( bool  k_sig,
cbmesg_logger_t &  msg_logger 
)

References kill_count_threshold, and kill_counter.

Referenced by main().

int main ( int  argc,
char **  argv 
)
void output_control_lines ( adr2205_t adr2205,
bool const   unit_used[adr2205_t::MAX_UNITS] 
)
void output_initial_controls ( adr2205_t adr2205,
bool const   unit_used[adr2205_t::MAX_UNITS] 
)
bool read_conf ( conf_t &  conf_  ) 
void reset_control_lines (  ) 

References output.

Referenced by main(), and output_initial_controls().

void set_control_lines ( steering_data_t const &  s  ) 
void set_control_lines ( control_line_data_t const &  d  ) 
void sig_handler ( int  sig  ) 

References die.


Variable Documentation

unsigned kill_count_threshold = 2

Referenced by filter_kill().

unsigned kill_counter = 0

Referenced by filter_kill().

Referenced by read_conf(), and set_control_lines().

unsigned LINE_DRIVE

Referenced by read_conf(), and set_control_lines().

unsigned LINE_ENGINE_ON

Referenced by main(), and read_conf().

Referenced by read_conf(), and set_control_lines().

unsigned LINE_ESTOP_KILL

Referenced by main(), and read_conf().

unsigned LINE_ESTOP_PAUSE

Referenced by main(), and read_conf().

Referenced by main(), and read_conf().

Referenced by read_conf(), and set_control_lines().

Referenced by read_conf(), and set_control_lines().

unsigned LINE_NEUTRAL

Referenced by read_conf(), and set_control_lines().

unsigned LINE_PARK

Referenced by read_conf(), and set_control_lines().

unsigned LINE_REVERSE

Referenced by read_conf(), and set_control_lines().

Referenced by read_conf(), and set_control_lines().

Referenced by read_conf(), and set_control_lines().

Referenced by read_conf(), and set_control_lines().

unsigned output[adr2205_t::MAX_UNITS]

Referenced by main(), and read_conf().

Referenced by main(), and read_conf().

double time_to_change_gear = 1

Referenced by main(), and read_conf().

Referenced by main(), read_conf(), and set_control_lines().

unsigned UNIT_DRIVE

Referenced by read_conf(), and set_control_lines().

unsigned UNIT_ENGINE_ON

Referenced by main(), and read_conf().

Referenced by main(), read_conf(), and set_control_lines().

unsigned UNIT_ESTOP_KILL

Referenced by main(), and read_conf().

unsigned UNIT_ESTOP_PAUSE

Referenced by main(), and read_conf().

Referenced by main(), and read_conf().

Referenced by main(), read_conf(), and set_control_lines().

Referenced by main(), read_conf(), and set_control_lines().

unsigned UNIT_NEUTRAL

Referenced by read_conf(), and set_control_lines().

unsigned UNIT_PARK

Referenced by read_conf(), and set_control_lines().

unsigned UNIT_REVERSE

Referenced by read_conf(), and set_control_lines().

Referenced by main(), read_conf(), and set_control_lines().

Referenced by main(), read_conf(), and set_control_lines().

Referenced by main(), read_conf(), and set_control_lines().


Generated on Fri Apr 9 10:45:12 2010 for drivers by  doxygen 1.6.1