/** @file * @brief This file contains the declaration of the class associated with the user-defined * application for the Esmacat slave project */ #ifndef MY_APP_H #define MY_APP_H /***************************************************************************************** * INCLUDES ****************************************************************************************/ #include #include "application.h" //Include the header file for the Esmacat slave you plan to use for e.g. Analog Input slave //#include "esmacat_analog_input.h" #include "ethercat_arduino_shield_by_esmacat.h" using namespace std; /***************************************************************************************** * CLASSES ****************************************************************************************/ /** * @brief Description of your custom application class * * Your custom application class my_app inherits the class 'esmacat_application' * Write functions to override the parent functions of 'esmacat_application' * Declare an object of your slave class (e.g. ecat_ai) * Declare any other variables you might want to add * Define the constructor for initialization */ class my_app : public esmacat_application { private: void assign_slave_sequence(); /** identify sequence of slaves and their types*/ void configure_slaves(); /** setup the slave*/ void init(); /** code to be executed in the first iteration of the loop */ void loop(); /** control loop*/ /** < create a Esmacat slave object for the EASE with Touch LCD shield */ esmacat_ethercat_arduino_shield_by_esmacat ease_touch_lcd_shield; /** < create a Esmacat slave object for the EASE with Motor shield */ esmacat_ethercat_arduino_shield_by_esmacat ease_motor_shield; // Declaring the required variables uint32_t servo_postion; uint32_t dc_speed; uint32_t stepper_speed; uint32_t motor_select; uint32_t prev_servo, prev_dc, prev_stepper; public: /** A constructor- sets initial values for class members */ my_app() {} }; #endif // MY_APP_H