@@ -75,13 +75,6 @@ typedef struct
7575*/
7676void print_app (int i );
7777
78- /**
79- @brief Updates the last heartbeat time for the specified application.
80-
81- @param i Index of the application.
82- */
83- void update_heartbeat_time (int i );
84-
8578/**
8679 @brief Finds the index of an application with the specified process ID.
8780
@@ -91,35 +84,40 @@ void update_heartbeat_time(int i);
9184int find_pid (int pid );
9285
9386/**
94- @brief Gets the elapsed time since the last heartbeat received from the specified application .
87+ @brief Gets direct access to the applications array for other modules .
9588
96- @param i Index of the application.
97- @return Elapsed time in seconds.
89+ @return Pointer to the applications array.
9890*/
99- time_t get_heartbeat_time ( int i );
91+ Application_t * apps_get_array ( void );
10092
10193/**
102- @brief Checks if it is time to expect a heartbeat from the specified application .
94+ @brief Gets direct access to the application state for other modules .
10395
104- @param i Index of the application.
105- @return true if it is time to expect a heartbeat, false otherwise.
96+ @return Pointer to the application state structure.
10697*/
107- bool is_timeup ( int i );
98+ AppState_t * apps_get_state ( void );
10899
109100/**
110- @brief Sets the flag indicating that the specified application has sent its first heartbeat .
101+ @brief Gets the total number of applications found in the ini file .
111102
112- @param i Index of the application .
103+ @return Total number of applications .
113104*/
114- void set_first_heartbeat ( int i );
105+ int get_app_count ( );
115106
116107/**
117- @brief Gets the flag indicating whether the specified application has sent its first heartbeat .
108+ @brief Gets the name of the application at the specified index .
118109
119110 @param i Index of the application.
120- @return true if the application has sent its first heartbeat, false otherwise .
111+ @return Name of the application.
121112*/
122- bool get_first_heartbeat (int i );
113+ char * get_app_name (int i );
114+
115+ /**
116+ @brief Gets the UDP port number specified in the ini file.
117+
118+ @return UDP port number.
119+ */
120+ int get_udp_port ();
123121
124122/**
125123 @brief Sets the path to the ini file.
@@ -143,85 +141,4 @@ bool is_ini_updated();
143141*/
144142int read_ini_file ();
145143
146- /**
147- @brief Checks if the specified application is currently running.
148-
149- @param i Index of the application.
150- @return true if the application is running, false otherwise.
151- */
152- bool is_application_running (int i );
153-
154- /**
155- @brief Checks if the specified application has been started.
156-
157- @param i Index of the application.
158- @return true if the application has been started, false otherwise.
159- */
160- bool is_application_started (int i );
161-
162- /**
163- @brief Checks if it is time to start the specified application based on the start delay.
164-
165- @param i Index of the application.
166- @return true if it is time to start the application, false otherwise.
167- */
168- bool is_application_start_time (int i );
169-
170- /**
171- @brief Starts the specified application.
172-
173- @param i Index of the application.
174- */
175- void start_application (int i );
176-
177- /**
178- @brief Stops the specified application by killing its process.
179-
180- @param i Index of the application.
181- */
182- void kill_application (int i );
183-
184- /**
185- @brief Restarts the specified application.
186-
187- @param i Index of the application.
188- */
189- void restart_application (int i );
190-
191- /**
192- @brief Gets the total number of applications found in the ini file.
193-
194- @return Total number of applications.
195- */
196- int get_app_count ();
197-
198- /**
199- @brief Gets the name of the application at the specified index.
200-
201- @param i Index of the application.
202- @return Name of the application.
203- */
204- char * get_app_name (int i );
205-
206- /**
207- @brief Gets the UDP port number specified in the ini file.
208-
209- @return UDP port number.
210- */
211- int get_udp_port ();
212-
213- /**
214- @brief Gets direct access to the applications array for other modules.
215-
216- @return Pointer to the applications array.
217- */
218- Application_t * apps_get_array (void );
219-
220- /**
221- @brief Gets direct access to the application state for other modules.
222-
223- @return Pointer to the application state structure.
224- */
225- AppState_t * apps_get_state (void );
226-
227- #endif // APPS_H
144+ #endif // APPS_H
0 commit comments