-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add variable server session specific logging
- Loading branch information
Showing
23 changed files
with
407 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,3 +42,4 @@ trickops_logs/ | |
*.gcda | ||
*.dSYM | ||
coverage.info | ||
*.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
/* | ||
PURPOSE: | ||
(Custom log file writable by message_publish.) | ||
ASSUMPTIONS AND LIMITATIONS: | ||
(()) | ||
PROGRAMMERS: | ||
(((Jackie Deans) (LinCom) (4/23) (--) (CACI)) | ||
*/ | ||
|
||
#ifndef MESSAGE_CUSTOM_FILE_HH | ||
#define MESSAGE_CUSTOM_FILE_HH | ||
|
||
#include <string> | ||
#include <iostream> | ||
#include <fstream> | ||
#include <vector> | ||
#include "trick/MessageFile.hh" | ||
|
||
namespace Trick { | ||
|
||
/** | ||
* MessageCustomFile writes all messages its level to the given file | ||
*/ | ||
class MessageCustomFile : public MessageFile { | ||
|
||
public: | ||
|
||
/** | ||
@brief The constructor. | ||
*/ | ||
MessageCustomFile() ; | ||
// static int openCustomMessageFile(std::string filename, std::string subscriber_name = ""); | ||
// static int shutdown_all(); | ||
|
||
/** | ||
@brief Output message to the file. | ||
*/ | ||
virtual void update( unsigned int level , std::string header , std::string message ); | ||
|
||
/** | ||
* @brief Get the level | ||
* | ||
*/ | ||
virtual int get_level(); | ||
|
||
virtual void set_name(std::string name); | ||
virtual void set_file_name(std::string file_name); | ||
|
||
|
||
/** | ||
@brief Register this object with the memory manager. | ||
*/ | ||
// virtual void register_with_mm(); | ||
// virtual void unregister_with_mm(); | ||
|
||
int this_level; | ||
|
||
protected: | ||
|
||
static int level_counter; | ||
// static std::vector<MessageCustomFile *>& all_instances(); | ||
|
||
|
||
} ; | ||
|
||
} | ||
|
||
#endif | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
/* | ||
PURPOSE: | ||
(Track custom log files.) | ||
ASSUMPTIONS AND LIMITATIONS: | ||
(()) | ||
PROGRAMMERS: | ||
(((Jackie Deans) (CACI) (4/23) (--) ()) | ||
*/ | ||
|
||
#ifndef MESSAGE_CUSTOM_MANAGER_HH | ||
#define MESSAGE_CUSTOM_MANAGER_HH | ||
|
||
#include <string> | ||
#include <iostream> | ||
#include <fstream> | ||
#include <vector> | ||
#include "trick/MessageCustomFile.hh" | ||
#include "trick/MessageSubscriber.hh" | ||
|
||
|
||
namespace Trick { | ||
|
||
/** | ||
* MessageCustomFile writes all messages its level to the given file | ||
*/ | ||
class MessageCustomManager : public MessageSubscriber { | ||
|
||
public: | ||
|
||
/** | ||
@brief The constructor. | ||
*/ | ||
MessageCustomManager() ; | ||
virtual ~MessageCustomManager() ; | ||
|
||
|
||
// int shutdown_all(); | ||
virtual int open_custom_message_file(std::string file_name, std::string subscriber_name, int level = -1); | ||
|
||
/** | ||
@brief Output message to the file. | ||
*/ | ||
virtual void update( unsigned int level , std::string header , std::string message ); | ||
|
||
int restart(); | ||
|
||
protected: | ||
std::vector<MessageCustomFile *> custom_message_files; | ||
} ; | ||
|
||
} | ||
|
||
#endif | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
/* | ||
PURPOSE: | ||
(Trick runtime simulation executive parameter definition.) | ||
REFERENCE: | ||
(((Bailey, R.W, and Paddock, E.J.) (Trick Simulation Environment) | ||
(NASA:JSC #37943) | ||
(JSC / Engineering Directorate / Automation and Robotics Division) | ||
(June 1994) (--))) | ||
ASSUMPTIONS AND LIMITATIONS: | ||
((Only 64 levels of nested input data file inclusion.)) | ||
PROGRAMMERS: | ||
(((Robert W. Bailey) (LinCom) (4/92) (--) (Realtime)) | ||
((Robert W. Bailey) (LinCom) (6/1/91) (Trick-CR-00000) (Initial Release))) | ||
*/ | ||
|
||
#ifndef MESSAGE_HS_FILE_HH | ||
#define MESSAGE_HS_FILE_HH | ||
|
||
#include <string> | ||
#include <iostream> | ||
#include <fstream> | ||
#include "trick/MessageFile.hh" | ||
|
||
namespace Trick { | ||
|
||
/** | ||
* MessageHSFile writes all messages of levels 0-99 to the send_hs file | ||
*/ | ||
class MessageHSFile : public MessageFile { | ||
|
||
public: | ||
/** | ||
@brief The constructor. | ||
*/ | ||
MessageHSFile() ; | ||
|
||
/** | ||
@brief Output message to the file. | ||
*/ | ||
virtual void update( unsigned int level , std::string header , std::string message ); | ||
|
||
} ; | ||
|
||
} | ||
|
||
#endif | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.