#include <string.h>
#include <unistd.h>
#include <time.h>
+#include <iostream>
#include <rmr/RIC_message_types.h>
+
+#include "msg_component.hpp"
+#include "message.hpp"
+#include "alarm.hpp"
+
#ifndef RIC_ALARM
// this _should_ come from the message types header, but if not ensure we have something
constexpr int ric_alarm_value = 110;
#define RIC_ALARM ric_alarm_value
#endif
-#include <iostream>
-
-#include "msg_component.hpp"
-#include "message.hpp"
-#include "alarm.hpp"
-
extern const char* __progname; // runtime lib supplied since we don't get argv[0]
namespace xapp {
now()
);
- //action = std::string( wbuf );
return used;
}
ensure the object reference is cleaned up, and ensuring that the source
object references are removed.
*/
-Alarm& xapp::Alarm::operator=( Alarm&& soi ) {
+Alarm& xapp::Alarm::operator=( Alarm&& soi ) noexcept {
if( this != &soi ) { // cannot do self assignment
// anything that needs to be freed/delted from soi, must be done here
whid = new_whid;
}
-const void xapp::Alarm::Dump() {
+void xapp::Alarm::Dump() const {
fprintf( stderr, "Alarm: prob id: %d\n", problem_id );
fprintf( stderr, "Alarm: meid: %s\n", me_id.c_str() );
fprintf( stderr, "Alarm: app: %s\n", app_id.c_str() );
/*
Return the enpoint address string we have.
*/
-const std::string xapp::Alarm::Get_endpoint( ) {
+std::string xapp::Alarm::Get_endpoint( ) const {
return endpoint;
}
problem ID. Info and addional_info are user supplied data that is just passed
through.
*/
-bool xapp::Alarm::Raise( int new_severity, int problem, const std::string& info ) {
+bool xapp::Alarm::Raise( int new_severity, int problem, const std::string& cinfo ) {
Set_severity( new_severity );
problem_id = problem;
- this->info = info;
+ info = cinfo;
Raise();
}
-bool xapp::Alarm::Raise( int new_severity, int problem, const std::string& info, const std::string& additional_info ) {
+bool xapp::Alarm::Raise( int new_severity, int problem, const std::string& cinfo, const std::string& additional_info ) {
Set_severity( new_severity );
problem_id = problem;
- this->info = info;
+ info = cinfo;
this->add_info = additional_info;
Raise();
problem ID. Info and addional_info are user supplied data that is just passed
through.
*/
-bool xapp::Alarm::Clear( int new_severity, int problem, const std::string& info ) {
+bool xapp::Alarm::Clear( int new_severity, int problem, const std::string& cinfo ) {
Set_severity( new_severity );
problem_id = problem;
- this->info = info;
+ info = cinfo;
Clear();
}
-bool xapp::Alarm::Clear( int new_severity, int problem, const std::string& info, const std::string& additional_info ) {
+bool xapp::Alarm::Clear( int new_severity, int problem, const std::string& cinfo, const std::string& additional_info ) {
Set_severity( new_severity );
problem_id = problem;
- this->info = info;
+ info = cinfo;
this->add_info = additional_info;
Clear();