Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #include <packml_msgs/Status.h>
00020
00021 namespace packml_msgs
00022 {
00023
00024 bool isStandardState(int state)
00025 {
00026
00027 switch (state) {
00028 case State::ABORTED:
00029 case State::ABORTING:
00030 case State::CLEARING:
00031 case State::COMPLETE:
00032 case State::COMPLETING:
00033 case State::EXECUTE:
00034 case State::HELD:
00035 case State::HOLDING:
00036 case State::IDLE:
00037 case State::OFF:
00038 case State::RESETTING:
00039 case State::STARTING:
00040 case State::STOPPED:
00041 case State::STOPPING:
00042 case State::SUSPENDED:
00043 case State::SUSPENDING:
00044 case State::UNHOLDING:
00045 case State::UNSUSPENDING:
00046 return true;
00047 break;
00048 default:
00049 return false;
00050 break;
00051 }
00052 }
00053
00054 Status initStatus(std::string node_name)
00055 {
00056 Status status;
00057 status.header.frame_id = node_name;
00058 status.state.val = packml_msgs::State::UNDEFINED;
00059 status.sub_state = packml_msgs::State::UNDEFINED;
00060 status.mode.val = packml_msgs::Mode::UNDEFINED;
00061
00062 status.error = 0;
00063 status.sub_error = 0;
00064 return status;
00065 }
00066
00067
00068
00069
00070 }
00071
00072 #ifndef UTILS_H
00073 #define UTILS_H
00074
00075 #endif // UTILS_H