Critical Link MityCam SoC Firmware
1.0
Critical Link MityCam SoC Firmware
|
#include <ControlApplication.h>
Public Member Functions | |
tcControlApplication () | |
~tcControlApplication () | |
int | start () |
int | wait () |
int | execute () |
tcSensorBoard * | getSensorBoard () |
int | addCommandInterface (tcCommandInterface *apIface) |
addCommandInterface add a command interface More... | |
std::list< tcCommandInterface * > | getCommandInterface () |
std::list< tcIOChannel * > | getIOChannel () |
void | setSensorBoard (tcSensorBoard *apSensor, bool abSavable=false) |
void | setSensorBoard (int32 value, std::string *apData, bool abSavable=false) |
void | setCommandInterface (int32 value, std::string *data) |
void | setIOChannel (int32 value, std::string *data) |
int | addIOChannel (tcIOChannel *apCh) |
addIOChannel add an IO channel to the app More... | |
void | setStatusInterface (int32 value, std::string *data=NULL) |
bool | processCommandLineArguments (int32 argc, char **argv) |
void | setConfig (char *filename) |
void | setTEC (std::string &arTecData) |
void | setTEC (tcPIDControl *apTEC) |
Static Public Member Functions | |
static std::string | getexepath () |
get the path to the application exe file More... | |
static std::string | getPluginPath () |
locate the plugin directory More... | |
static void | registerSensorFactory (int anId, std::function< tcSensorBoard *(const char *)> apFunc) |
This class is a builder for the camera stack framework. It accepts flags by a number of means and creates the appropriate framework objects. Order of instantiation is important: 1) Create sensor object 2) Create an IO Channel (if applicable) 3) Create the CommandInterface for the IOChannel. 4) Create StatusReporters
The ControlApplication can then be start()'d to execute all appropriate threads. Following this, the user is free to retrieve handles on the objects if desired and perform other tasks. To block on the CameraStack's execution, call wait(). The function will return if all threads of operation are destroyed (such as when the CommandInterfaces are told to exit).
tcControlApplication::tcControlApplication | ( | ) |
tcControlApplication::~tcControlApplication | ( | ) |
int tcControlApplication::addCommandInterface | ( | tcCommandInterface * | apIface | ) |
addCommandInterface add a command interface
apIface |
int tcControlApplication::addIOChannel | ( | tcIOChannel * | apCh | ) |
addIOChannel add an IO channel to the app
apCh | IO channel based object |
int tcControlApplication::execute | ( | ) |
list< tcCommandInterface * > tcControlApplication::getCommandInterface | ( | ) |
Factory method to produce the CommandInterface objects from the flags and the SensorBoard.
|
static |
get the path to the application exe file
return the path to the application exe
list< tcIOChannel * > tcControlApplication::getIOChannel | ( | ) |
Returns a pointer to the list of IOChannel pointers.
|
static |
tcSensorBoard * tcControlApplication::getSensorBoard | ( | ) |
Factory method to produce the SensorBoard object.
bool tcControlApplication::processCommandLineArguments | ( | int32 | argc, |
char ** | argv | ||
) |
iterates through the command line arguments and sets the proper flags
argc | |
argv |
|
static |
void tcControlApplication::setCommandInterface | ( | int32 | value, |
std::string * | data | ||
) |
Instantiate a status interface and place it in the list.
value | - the flag signifying the status interface |
data | - optional pointer to data for the status interface to parse |
void tcControlApplication::setConfig | ( | char * | filename | ) |
Process a file for configuration.
filename | - the c string ot the filename to use. |
void tcControlApplication::setIOChannel | ( | int32 | value, |
std::string * | data | ||
) |
Instantiate an IO channel and place it in the list.
value | - the flag signifying the status interface |
data | - optional pointer to data for the status interface to parse |
NO_MITYVIEWER_IFACE
void SocCamera::tcControlApplication::setSensorBoard | ( | int32 | value, |
std::string * | apData, | ||
bool | abSavable = false |
||
) |
Instantiate a sensor.
value | - the flag signifying the status interface |
void tcControlApplication::setSensorBoard | ( | tcSensorBoard * | apSensor, |
bool | abSavable = false |
||
) |
Set a sensor as the sensor to use.
value | - the flag signifying the status interface |
void tcControlApplication::setStatusInterface | ( | int32 | value, |
std::string * | data = NULL |
||
) |
Instantiate a status interface and place it in the list.
value | - the flag signifying the status interface |
data | - optional pointer to data for the status interface to parse |
void SocCamera::tcControlApplication::setTEC | ( | std::string & | arTecData | ) |
void SocCamera::tcControlApplication::setTEC | ( | tcPIDControl * | apTEC | ) |
int tcControlApplication::start | ( | ) |
This function launches the appropriate threads of operation performing any necessary hand offs of objects. The function will returns when the CommandInterface objects are instantiated.
int tcControlApplication::wait | ( | ) |
This function blocks execution until all threads have finished.