![]() |
DUNE: Uniform Navigational Environment
2022.04.0
|
Device driver task.
Public Member Functions | |
Task (const std::string &name, Tasks::Context &ctx) | |
void | onUpdateParameters (void) |
void | onResourceInitialization (void) |
void | consume (const IMC::LoggingControl *msg) |
void | consume (const IMC::EstimatedState *msg) |
void | onRequestActivation (void) |
void | onRequestDeactivation (void) |
void | onActivation (void) |
void | onDeactivation (void) |
int | moveLogFiles (void) |
std::string | getStorageUsageLogs (void) |
int | set_cpu_governor (void) |
bool | init_gpio_strobe (void) |
bool | init_gpio_driver (void) |
bool | setGpioDirection (int gpio, bool isOut) |
bool | setGpio (CommandType mode, int gpio) |
void | updateStrobe (void) |
void | getInfoCamera (void) |
bool | setUpCamera (void) |
bool | pollForTriggerReady (void) |
bool | set_shutter_value (float value) |
bool | fireSoftwareTrigger (void) |
bool | getImage (void) |
int | sendImageThread (int cnt_thread) |
void | releaseRamCached (void) |
void | saveInfoExif (void) |
template<class T > | |
std::string | to_string (const T &t) |
void | triggerFrame (void) |
void | onMain (void) |
![]() | |
Task (const std::string &name, Context &context) | |
virtual | ~Task (void) |
const char * | getName (void) const |
const char * | getSystemName (void) const |
unsigned int | getSystemId (void) const |
unsigned int | getEntityId (void) const |
unsigned int | resolveEntity (const std::string &label) const |
std::string | resolveEntity (unsigned int id) const |
DebugLevel | getDebugLevel (void) const |
uint16_t | getActivationTime (void) const |
uint16_t | getDeactivationTime (void) const |
unsigned int | resolveSystemName (const std::string &name) const |
const char * | resolveSystemId (unsigned int id) const |
void | loadConfig (void) |
void | setPriority (unsigned int value) |
unsigned int | getPriority (void) const |
void | inf (const char *format,...) DUNE_PRINTF_FORMAT(2 |
void void | war (const char *format,...) DUNE_PRINTF_FORMAT(2 |
void void void | err (const char *format,...) DUNE_PRINTF_FORMAT(2 |
void void void void | cri (const char *format,...) DUNE_PRINTF_FORMAT(2 |
void void void void void | debug (const char *format,...) DUNE_PRINTF_FORMAT(2 |
void void void void void void | trace (const char *format,...) DUNE_PRINTF_FORMAT(2 |
void void void void void void void | spew (const char *format,...) DUNE_PRINTF_FORMAT(2 |
void void void void void void void void | dispatch (IMC::Message *msg, unsigned int flags=0) |
void | dispatch (IMC::Message &msg, unsigned int flags=0) |
void | dispatchReply (const IMC::Message &original, IMC::Message &msg, unsigned int flags=0) |
void | receive (const IMC::Message *msg) |
void | reserveEntities (void) |
void | resolveEntities (void) |
void | acquireResources (void) |
void | releaseResources (void) |
void | initializeResources (void) |
void | updateParameters (bool act_deact=true) |
void | writeParamsXML (std::ostream &os) const |
const char * | getEntityLabel (void) const |
void | setEntityLabel (const std::string &label) |
![]() | |
AbstractTask (void) | |
virtual | ~AbstractTask (void) |
![]() | |
Thread (void) | |
virtual | ~Thread (void) |
int | getProcessorUsage (void) |
![]() | |
Runnable (void) | |
virtual | ~Runnable (void) |
void | start (void) |
void | stop (void) |
void | join (void) |
void | stopAndJoin (void) |
void | setPriority (Scheduler::Policy policy, unsigned priority) |
unsigned | getPriority (void) |
State | getState (void) |
bool | isCreated (void) |
bool | isStopping (void) |
bool | isRunning (void) |
bool | isStarting (void) |
bool | isDead (void) |
Public Attributes | |
Arguments | m_args |
int | m_lat_deg |
int | m_lat_min |
double | m_lat_sec |
int | m_lon_deg |
int | m_lon_min |
double | m_lon_sec |
char | m_text_exif_timestamp [16] |
std::string | m_back_path_log |
std::string | m_back_path_main_log |
std::string | m_back_epoch |
std::string | m_back_time |
std::string | m_path_image |
std::string | m_back_path_image |
Path | m_log_dir |
Time::Counter< float > | m_cnt_fps |
Time::Counter< float > | m_clean_cached_ram |
Time::Counter< float > | m_update_cnt_frames |
int | m_thread_cnt |
long unsigned int | m_frame_cnt |
long unsigned int | m_frame_lost_cnt |
std::string | m_note_comment |
unsigned int | m_cnt_photos_by_folder |
unsigned | m_folder_number |
std::string | m_log_name |
bool | m_is_to_capture |
bool | m_is_strobe |
bool | m_is_on |
float | m_strobe_delay |
bool | m_isStartTask |
bool | m_isCapturing |
char | m_buffer [64] |
std::string | m_storage |
Time::Counter< float > | m_timeout_reading |
std::string | m_result |
bool | m_read_storage |
bool | m_read_path |
Additional Inherited Members | |
![]() | |
enum | State { StateStarting, StateRunning, StateStopping, StateDead, StateUnknown } |
![]() | |
void | setEntityState (IMC::EntityState::StateEnum state, Status::Code code) |
void | setEntityState (IMC::EntityState::StateEnum state, const std::string &description) |
IMC::EntityState::StateEnum | getEntityState (void) const |
unsigned int | reserveEntity (const std::string &label) |
template<typename E > | |
E * | reserveEntity (const std::string &label) |
Entities::BasicEntity * | getLocalEntity (const std::string &label) |
bool | stopping (void) |
bool | isActive (void) const |
bool | isActivating (void) const |
bool | isDeactivating (void) const |
void | waitForMessages (double timeout) |
void | consumeMessages (void) |
template<typename T > | |
Parameter & | param (const std::string &name, T &var) |
template<typename Y , typename T > | |
Parameter & | param (const std::string &name, T &var) |
template<typename T > | |
bool | paramChanged (T &var) |
void | paramActive (Parameter::Scope def_scope, Parameter::Visibility def_visibility, bool def_value=false) |
void | setParamSectionEditor (const std::string &name) |
template<typename M , typename T > | |
void | bind (T *task_obj, void(T::*consumer)(const M *)=&T::consume) |
template<typename T > | |
void | bind (T *task_obj, const std::vector< uint32_t > &list) |
template<typename T , typename M > | |
void | bind (T *task_obj, const std::vector< uint32_t > &list, void(T::*consumer)(const M *)=&T::consume) |
template<typename T > | |
void | bind (T *task_obj, const std::vector< std::string > &list) |
void | bind (unsigned int message_id, AbstractConsumer *consumer) |
void | requestActivation (void) |
void | requestDeactivation (void) |
void | activate (void) |
void | activationFailed (const std::string &reason) |
void | deactivate (void) |
void | deactivationFailed (const std::string &reason) |
virtual bool | onWriteParamsXML (std::ostream &os) const |
virtual void | onEntityReservation (void) |
virtual void | onEntityResolution (void) |
virtual void | onReportEntityState (void) |
virtual void | onResourceAcquisition (void) |
virtual void | onResourceRelease (void) |
virtual void | onQueryEntityParameters (const IMC::QueryEntityParameters *msg) |
virtual void | onSetEntityParameters (const IMC::SetEntityParameters *msg) |
virtual void | onPushEntityParameters (const IMC::PushEntityParameters *msg) |
virtual void | onPopEntityParameters (const IMC::PopEntityParameters *msg) |
![]() | |
void | startImpl (void) |
void | stopImpl (void) |
void | joinImpl (void) |
void | setPriorityImpl (Scheduler::Policy policy, unsigned priority) |
unsigned | getPriorityImpl (void) |
![]() | |
Context & | m_ctx |
std::vector< Entities::BasicEntity * > | m_entities |
|
inline |
References Vision::PointGrey::Arguments::channel_strobe, Vision::PointGrey::Arguments::copyright, Vision::PointGrey::Arguments::delay_capture, Vision::PointGrey::Arguments::disk_statistics, Vision::PointGrey::Arguments::gpio_drive_power, Vision::PointGrey::Arguments::gpio_strobe, Vision::PointGrey::Arguments::led_type, Vision::PointGrey::Arguments::lens_maker, Vision::PointGrey::Arguments::lens_model, Vision::PointGrey::Arguments::number_fs, Vision::PointGrey::Arguments::number_photos, Vision::PointGrey::Arguments::save_image_dir, Vision::PointGrey::Arguments::shutter_value, Vision::PointGrey::Arguments::split_photos, and Vision::PointGrey::Arguments::system_name.
|
inline |
|
inline |
References Vision::PointGrey::Arguments::system_name.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
References Vision::PointGrey::GPIO_LOW, and Vision::PointGrey::Arguments::gpio_strobe.
|
inline |
|
inlinevirtual |
Called when the task starts/resumes normal execution.
Reimplemented from DUNE::Tasks::Task.
References Vision::PointGrey::Arguments::led_type, Vision::PointGrey::Arguments::number_fs, and Vision::PointGrey::Arguments::shutter_value.
|
inlinevirtual |
Called when the task stops normal execution and enters an idleness state.
Reimplemented from DUNE::Tasks::Task.
References Vision::PointGrey::Arguments::disk_statistics, Vision::PointGrey::GPIO_LOW, and Vision::PointGrey::Arguments::gpio_strobe.
|
inlinevirtual |
|
inlinevirtual |
Called when an external activation request is received.
Derived classes that need to perform extra steps to prepare normal execution should replace the default behaviour of immediate activation with calls to activate() when the request is completed or activationFailed() if the request cannot be honoured.
Reimplemented from DUNE::Tasks::Task.
|
inlinevirtual |
Called when an external deactivation request is received.
Derived classes that need to perform extra steps to prepare normal execution should replace the default behaviour of immediate deactivation with calls to deactivate() when the request is completed or deactivationFailed() if the request cannot be honoured.
Reimplemented from DUNE::Tasks::Task.
|
inlinevirtual |
Called when the task is instructed to initialize resources acquired previously or whose initialization depends on run-time parameters.
Reimplemented from DUNE::Tasks::Task.
References Vision::PointGrey::Arguments::delay_capture, Vision::PointGrey::Arguments::disk_statistics, Vision::PointGrey::Arguments::gpio_drive_power, Vision::PointGrey::GPIO_LOW, Vision::PointGrey::Arguments::gpio_strobe, Vision::PointGrey::Arguments::number_fs, Vision::PointGrey::Arguments::number_photos, and Vision::PointGrey::Arguments::split_photos.
|
inlinevirtual |
Called when the task is instructed to update its run-time parameters.
Derived classes that need to compute auxiliary values based on run-time parameters should override this function.
Reimplemented from DUNE::Tasks::Task.
References Vision::PointGrey::Arguments::delay_capture, Vision::PointGrey::Arguments::number_fs, and Vision::PointGrey::Arguments::shutter_value.
|
inline |
|
inline |
|
inline |
|
inline |
References Vision::PointGrey::SaveImage::saveNewImage().
|
inline |
|
inline |
|
inline |
References Vision::PointGrey::GPIO_HIGH, and Vision::PointGrey::GPIO_LOW.
|
inline |
|
inline |
References Vision::PointGrey::Arguments::shutter_value.
|
inline |
|
inline |
|
inline |
Arguments Vision::PointGrey::Task::m_args |
Configuration parameters.
std::string Vision::PointGrey::Task::m_back_epoch |
Buffer to backup epoch.
std::string Vision::PointGrey::Task::m_back_path_image |
Buffer for backup of path to save image.
std::string Vision::PointGrey::Task::m_back_path_log |
Buffer to backup path log.
std::string Vision::PointGrey::Task::m_back_path_main_log |
Buffer to backup path to main system log.
std::string Vision::PointGrey::Task::m_back_time |
Buffer to backup time.
char Vision::PointGrey::Task::m_buffer[64] |
buffer for path to get storage usage of logs
Time::Counter<float> Vision::PointGrey::Task::m_clean_cached_ram |
Timer to control the cached ram.
Time::Counter<float> Vision::PointGrey::Task::m_cnt_fps |
Timer to control fps.
unsigned int Vision::PointGrey::Task::m_cnt_photos_by_folder |
Number of photos in folder.
unsigned Vision::PointGrey::Task::m_folder_number |
Number of folder.
long unsigned int Vision::PointGrey::Task::m_frame_cnt |
Number of frames captured.
long unsigned int Vision::PointGrey::Task::m_frame_lost_cnt |
Number of frames lost.
bool Vision::PointGrey::Task::m_is_on |
flag to control led - on
bool Vision::PointGrey::Task::m_is_strobe |
flag to control led - strobe
bool Vision::PointGrey::Task::m_is_to_capture |
Flag to control capture of image.
bool Vision::PointGrey::Task::m_isCapturing |
Control state of capture.
bool Vision::PointGrey::Task::m_isStartTask |
Flag to control init state.
int Vision::PointGrey::Task::m_lat_deg |
Latitude deg.
int Vision::PointGrey::Task::m_lat_min |
Latitude min.
double Vision::PointGrey::Task::m_lat_sec |
Latitude sec.
Path Vision::PointGrey::Task::m_log_dir |
Path to save image.
std::string Vision::PointGrey::Task::m_log_name |
Bufer for name log.
int Vision::PointGrey::Task::m_lon_deg |
Longitude deg.
int Vision::PointGrey::Task::m_lon_min |
Longitude min.
double Vision::PointGrey::Task::m_lon_sec |
Longitude sec.
std::string Vision::PointGrey::Task::m_note_comment |
Buffer for the note comment of user.
std::string Vision::PointGrey::Task::m_path_image |
Buffer for path to save image.
bool Vision::PointGrey::Task::m_read_path |
Flag to control read of path from LoggingControl.
bool Vision::PointGrey::Task::m_read_storage |
Flag to control reading of used storage.
std::string Vision::PointGrey::Task::m_result |
string for result output
std::string Vision::PointGrey::Task::m_storage |
Storage usage value.
float Vision::PointGrey::Task::m_strobe_delay |
Strobe delay.
char Vision::PointGrey::Task::m_text_exif_timestamp[16] |
Buffer for exif timestamp.
int Vision::PointGrey::Task::m_thread_cnt |
Id thread.
Time::Counter<float> Vision::PointGrey::Task::m_timeout_reading |
Timer to control reading of storage.
Time::Counter<float> Vision::PointGrey::Task::m_update_cnt_frames |
Timer to control the refresh of captured frames.