Aria: Aria Class Reference

- Main Page
- Classes
- Files
- Related Pages

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# Aria Class Reference

`#include <ariaInternal.h>`

List of all members.

## Detailed Description

This class performs global initialization and deinitialization.

## Public Types
enum | SigHandleMethod { SIGHANDLE_SINGLE, SIGHANDLE_THREAD, SIGHANDLE_NONE }
## Static Public Member Functions
static void | addExitCallback (ArFunctor *functor, int position=50)
| Adds a functor to by called before program exit by Aria::exit().
static void | addInitCallBack (ArFunctor *cb, ArListPos::Pos position)
| Adds a callback to call when Aria is initialized using init().
static void | addLogOptionsCB (ArFunctor *functor, int position=50)
| Adds a callback for when we log options.
static void | addParseArgsCB (ArRetFunctor< bool > *functor, int position=50)
| Adds a callback for when we parse arguments.
static void | addRobot (ArRobot *robot)
| Add a robot to the global list of robots.
static void | addUninitCallBack (ArFunctor *cb, ArListPos::Pos position)
| Adds a callback to call when Aria is uninititialized using uninit().
static void | callExitCallbacks (void)
| Internal, calls the exit callbacks.
static void | delRobot (ArRobot *robot)
| Remove a robot from the global list of robots.
static bool | deviceConnectionAddCreator (const char *deviceConnectionType, ArRetFunctor3< ArDeviceConnection *, const char *, const char *, const char * > *creator)
| Adds a type of deviceConnection for Aria to be able to create.
static ArDeviceConnection * | deviceConnectionCreate (const char *deviceConnectionType, const char *port, const char *defaultInfo, const char *prefix="Aria::deviceConnectionCreate")
| Creates a deviceConnection of the given type.
static const char * | deviceConnectionGetTypes (void)
| Gets a list of the possible deviceConnection types.
static void | exit (int exitCode=0)
| Shutdown all Aria processes/threads, call exit callbacks, and exit the program.
static void | exitOld (int exitCode=0)
| Force an exit of all Aria processes/threads (the old way).
static ArRobot * | findRobot (char *name)
| Finds a robot in the global list of robots, by name.
static ArConfig * | getConfig (void)
| Gets the ArConfig for this program.
static const char * | getDirectory (void)
| Gets the directory that ARIA resides in.
static ArStringInfoGroup * | getInfoGroup (void)
| Gets the ArStringInfoGroup for this program.
static ArJoyHandler * | getJoyHandler (void)
| Get a pointer to the joystick handler if one has been set with setJoyHandler().
static ArKeyHandler * | getKeyHandler (void)
| Gets a pointer to the global key handler, if one has been set with setKeyHandler().
static int | getMaxNumLasers (void)
| Gets the maximum number of lasers to use.
static ArRobotJoyHandler * | getRobotJoyHandler (void)
| Gets the robot joystick handler if one has been set.
static std::list< ArRobot * > * | getRobotList ()
| Get a copy of the global robot list.
static bool | getRunning (void)
| Sees if Aria is still running (mostly for the thread in main).
static void | init (SigHandleMethod method=SIGHANDLE_THREAD, bool initSockets=true, bool sigHandleExitNotShutdown=true)
| Initialize Aria global data struture and perform OS-specific initialization, including adding OS signal handlers on Linux, initializing sockets library on Windows, etc.
static bool | laserAddCreator (const char *laserType, ArRetFunctor2< ArLaser *, int, const char * > *creator)
| Adds a type of laser for Aria to be able to create.
static ArLaser * | laserCreate (const char *laserType, int laserNumber, const char *prefix="Aria::laserCreate")
| Creates a laser of the given type.
static const char * | laserGetTypes (void)
| Gets a list of the possible laser types.
static void | logOptions (void)
| Logs all the options for the program (Calls all the callbacks added with addLogOptionsCB()).
static bool | parseArgs (void)
| Parses the arguments for the program (calls all the callbacks added with addParseArgsCB()).
static void | remExitCallback (ArFunctor *functor)
| Removes a functor to by called before program exit by Aria::exit().
static void | setDirectory (const char *directory)
| Sets the directory that ARIA resides in, to override default.
static void | setExitCallbacksLogLevel (ArLog::LogLevel level)
| Sets the log level for the exit callbacks.
static void | setJoyHandler (ArJoyHandler *joyHandler)
| Sets the joystick handler, so that other classes can find it using getJoyHandler().
static void | setKeyHandler (ArKeyHandler *keyHandler)
| Sets the key handler, so that other classes can find it using getKeyHandler().
static void | setMaxNumLasers (int maxNumLasers)
| Sets the maximum number of lasers to use.
static void | setParseArgLogLevel (ArLog::LogLevel level)
| Sets the log level for the parsing function.
static void | setRobotJoyHandler (ArRobotJoyHandler *robotJoyHandler)
| Sets the robot joystick handler, so that other classes can find it.
static void | shutdown ()
| Shutdown all Aria processes/threads.
static void | signalHandlerCB (int sig)
| Internal, the callback for the signal handling.
static void | uninit ()
| Performs OS-specific deinitialization, used by shutdown() and exit().
## Static Protected Attributes
static ArConfig | ourConfig
static std::map< std::string, ArRetFunctor3< ArDeviceConnection *, const char *, const char *, const char * > *, ArStrCaseCmpOp > | ourDeviceConnectionCreatorMap
static std::string | ourDeviceConnectionTypes
static std::string | ourDirectory
static std::multimap< int, ArFunctor * > | ourExitCallbacks
static ArLog::LogLevel | ourExitCallbacksLogLevel
static ArMutex | ourExitCallbacksMutex
static bool | ourExiting
static ArStringInfoGroup | ourInfoGroup
static std::list< ArFunctor * > | ourInitCBs
static bool | ourInited
static ArJoyHandler * | ourJoyHandler
static ArKeyHandler * | ourKeyHandler
static std::map< std::string, ArRetFunctor2< ArLaser *, int, const char * > *, ArStrCaseCmpOp > | ourLaserCreatorMap
static std::string | ourLaserTypes
static std::multimap< int, ArFunctor * > | ourLogOptionsCBs
static int | ourMaxNumLasers
static std::multimap< int, ArRetFunctor< bool > * > | ourParseArgCBs
static ArLog::LogLevel | ourParseArgsLogLevel
static ArRobotJoyHandler * | ourRobotJoyHandler
static std::list< ArRobot * > | ourRobots
static bool | ourRunning
static bool | ourShuttingDown
static ArMutex | ourShuttingDownMutex
static bool | ourSigHandleExitNotShutdown
static ArGlobalFunctor1< int > | ourSignalHandlerCB
static std::list< ArFunctor * > | ourUninitCBs

## Member Enumeration Documentation

enum Aria::SigHandleMethod

Enumerator:

  SIGHANDLE_SINGLE | Setup signal handlers in a global, non-thread way.
  SIGHANDLE_THREAD | Setup a dedicated signal handling thread.
  SIGHANDLE_NONE | Do no signal handling.

The documentation for this class was generated from the following file:

- ariaInternal.h