Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
batsim
batsim
Commits
07001767
Commit
07001767
authored
May 26, 2017
by
Millian Poquet
Browse files
[code] server cleanup: split into functions
parent
f05a526a
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
src/server.cpp
View file @
07001767
This diff is collapsed.
Click to expand it.
src/server.hpp
View file @
07001767
...
...
@@ -53,3 +53,157 @@ struct ServerData
* @return 0
*/
int
server_process
(
int
argc
,
char
*
argv
[]);
/**
* @brief Server SUBMITTER_HELLO handler
* @param[in,out] data The data associated with the server_process
* @param[in,out] task_data The data associated with the message the server received
*/
void
server_on_submitter_hello
(
ServerData
*
data
,
IPMessage
*
task_data
);
/**
* @brief Server SUBMITTER_BYE handler
* @param[in,out] data The data associated with the server_process
* @param[in,out] task_data The data associated with the message the server received
*/
void
server_on_submitter_bye
(
ServerData
*
data
,
IPMessage
*
task_data
);
/**
* @brief Server JOB_COMPLETED handler
* @param[in,out] data The data associated with the server_process
* @param[in,out] task_data The data associated with the message the server received
*/
void
server_on_job_completed
(
ServerData
*
data
,
IPMessage
*
task_data
);
/**
* @brief Server JOB_SUBMITTED handler
* @param[in,out] data The data associated with the server_process
* @param[in,out] task_data The data associated with the message the server received
*/
void
server_on_job_submitted
(
ServerData
*
data
,
IPMessage
*
task_data
);
/**
* @brief Server PSTATE_MODIFICATION handler
* @param[in,out] data The data associated with the server_process
* @param[in,out] task_data The data associated with the message the server received
*/
void
server_on_pstate_modification
(
ServerData
*
data
,
IPMessage
*
task_data
);
/**
* @brief Server WAITING_DONE handler
* @param[in,out] data The data associated with the server_process
* @param[in,out] task_data The data associated with the message the server received
*/
void
server_on_waiting_done
(
ServerData
*
data
,
IPMessage
*
task_data
);
/**
* @brief Server SCHED_READY handler
* @param[in,out] data The data associated with the server_process
* @param[in,out] task_data The data associated with the message the server received
*/
void
server_on_sched_ready
(
ServerData
*
data
,
IPMessage
*
task_data
);
/**
* @brief Server SCHED_WAIT_ANSWER handler
* @param[in,out] data The data associated with the server_process
* @param[in,out] task_data The data associated with the message the server received
*/
void
server_on_sched_wait_answer
(
ServerData
*
data
,
IPMessage
*
task_data
);
/**
* @brief Server SCHED_TELL_ME_ENERGY handler
* @param[in,out] data The data associated with the server_process
* @param[in,out] task_data The data associated with the message the server received
*/
void
server_on_sched_tell_me_energy
(
ServerData
*
data
,
IPMessage
*
task_data
);
/**
* @brief Server WAIT_QUERY handler
* @param[in,out] data The data associated with the server_process
* @param[in,out] task_data The data associated with the message the server received
*/
void
server_on_wait_query
(
ServerData
*
data
,
IPMessage
*
task_data
);
/**
* @brief Server SWITCHED_ON handler
* @param[in,out] data The data associated with the server_process
* @param[in,out] task_data The data associated with the message the server received
*/
void
server_on_switched_on
(
ServerData
*
data
,
IPMessage
*
task_data
);
/**
* @brief Server SWITCHED_OFF handler
* @param[in,out] data The data associated with the server_process
* @param[in,out] task_data The data associated with the message the server received
*/
void
server_on_switched_off
(
ServerData
*
data
,
IPMessage
*
task_data
);
/**
* @brief Server KILLING_DONE handler
* @param[in,out] data The data associated with the server_process
* @param[in,out] task_data The data associated with the message the server received
*/
void
server_on_killing_done
(
ServerData
*
data
,
IPMessage
*
task_data
);
/**
* @brief Server END_DYNAMIC_SUBMIT handler
* @param[in,out] data The data associated with the server_process
* @param[in,out] task_data The data associated with the message the server received
*/
void
server_on_end_dynamic_submit
(
ServerData
*
data
,
IPMessage
*
task_data
);
/**
* @brief Server JOB_SUBMITTED_BY_DP handler
* @param[in,out] data The data associated with the server_process
* @param[in,out] task_data The data associated with the message the server received
*/
void
server_on_submit_job
(
ServerData
*
data
,
IPMessage
*
task_data
);
/**
* @brief Server SCHED_REJECT_JOB handler
* @param[in,out] data The data associated with the server_process
* @param[in,out] task_data The data associated with the message the server received
*/
void
server_on_reject_job
(
ServerData
*
data
,
IPMessage
*
task_data
);
/**
* @brief Server SCHED_KILL_JOB handler
* @param[in,out] data The data associated with the server_process
* @param[in,out] task_data The data associated with the message the server received
*/
void
server_on_kill_jobs
(
ServerData
*
data
,
IPMessage
*
task_data
);
/**
* @brief Server SCHED_CALL_ME_LATER handler
* @param[in,out] data The data associated with the server_process
* @param[in,out] task_data The data associated with the message the server received
*/
void
server_on_call_me_later
(
ServerData
*
data
,
IPMessage
*
task_data
);
/**
* @brief Server SCHED_EXECUTE_JOB handler
* @param[in,out] data The data associated with the server_process
* @param[in,out] task_data The data associated with the message the server received
*/
void
server_on_execute_job
(
ServerData
*
data
,
IPMessage
*
task_data
);
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment