summaryrefslogtreecommitdiff
path: root/cesar/maximus/networkclock/inc
diff options
context:
space:
mode:
Diffstat (limited to 'cesar/maximus/networkclock/inc')
-rw-r--r--cesar/maximus/networkclock/inc/ClockSciMsg.h212
-rw-r--r--cesar/maximus/networkclock/inc/INetworkClock.h104
-rw-r--r--cesar/maximus/networkclock/inc/NetworkClockEvt.h184
-rw-r--r--cesar/maximus/networkclock/inc/NetworkClockEvtList.h171
-rw-r--r--cesar/maximus/networkclock/inc/NetworkClockEvtListTest.h40
-rw-r--r--cesar/maximus/networkclock/inc/NetworkClockEvtTest.h34
-rw-r--r--cesar/maximus/networkclock/inc/NetworkClockProcessor.h238
-rw-r--r--cesar/maximus/networkclock/inc/NetworkClockProcessorTest.h64
8 files changed, 1047 insertions, 0 deletions
diff --git a/cesar/maximus/networkclock/inc/ClockSciMsg.h b/cesar/maximus/networkclock/inc/ClockSciMsg.h
new file mode 100644
index 0000000000..a404430591
--- /dev/null
+++ b/cesar/maximus/networkclock/inc/ClockSciMsg.h
@@ -0,0 +1,212 @@
+/************************************************************************
+ ClockSciMsg.h - Copyright buret
+
+Here you can write a license for your code, some comments or any other
+information you want to have in your generated code. To to this simply
+configure the "headings" directory in uml to point to a directory
+where you have your heading files.
+
+or you can just replace the contents of this file with your own.
+If you want to do this, this file is located at
+
+/usr/share/apps/umbrello/headings/heading.h
+
+-->Code Generators searches for heading files based on the file extension
+ i.e. it will look for a file name ending in ".h" to include in C++ header
+ files, and for a file name ending in ".java" to include in all generated
+ java code.
+ If you name the file "heading.<extension>", Code Generator will always
+ choose this file even if there are other files with the same extension in the
+ directory. If you name the file something else, it must be the only one with that
+ extension in the directory to guarantee that Code Generator will choose it.
+
+you can use variables in your heading files which are replaced at generation
+time. possible variables are : author, date, time, filename and filepath.
+just write %variable_name%
+
+This file was generated on %date% at %time%
+The original location of this file is /home/buret/eclipse/maximus/networkclock/inc/ClockSciMsg.h
+**************************************************************************/
+
+#ifndef CLOCKSCIMSG_H
+#define CLOCKSCIMSG_H
+
+#include "SciMsg.h"
+
+#include "networkclock_types.h"
+
+class INetworkClock;
+
+
+/**
+ * class ClockSciMsg
+ */
+
+class ClockSciMsg : public SciMsg
+{
+
+public:
+
+ // public attributes
+ //
+
+private:
+
+ // private attributes
+ //
+
+ // Get from specialized SCI msg header
+ //
+ Network_Clock_Type mSpecializedSciMsgType;
+ Network_Clock_Id mSpecializedSciMsgId;
+ Network_Clock_Tick mSpecializedSciMsgTick;
+
+ // Specialized SCI message header
+ //
+ Network_Clock_Header mSpecializedSciMsgHeader;
+
+ INetworkClock * mpNetworkClockProcessor;
+
+protected:
+
+ // protected attributes
+ //
+
+public:
+
+ // Constructors/Destructors
+ //
+
+ /**
+ * Constructor
+ */
+ ClockSciMsg ( INetworkClock * p_network_clock_processor );
+
+ /**
+ * Empty Destructor
+ */
+ virtual ~ClockSciMsg ( );
+
+ // public methods
+ //
+
+ /**
+ * @return SciMsg *
+ */
+ SciMsg * create ( ) const;
+
+ /**
+ * @return bool
+ */
+ bool dispatchMsg ( );
+
+ /**
+ * @return bool
+ */
+ bool identifySpecializedSciMsgHeader ( );
+
+ /**
+ * @return bool
+ */
+ bool checkCompatibility ( ) const;
+
+ void displaySpecializedSciMsgHeader ( ) const;
+
+ /**
+ * Display the specialized SCI message type.
+ */
+ void displaySpecializedSciMsgType ( int log_level ) const;
+
+ // public attribute accessor methods
+ //
+
+ // private attribute accessor methods
+ //
+
+ /**
+ * @return mSpecializedSciMsgType
+ */
+ Network_Clock_Type getSpecializedSciMsgType ( ) const;
+
+ /**
+ * @return bool
+ * @param type the new value of mSpecializedSciMsgType
+ */
+ bool setSpecializedSciMsgType ( const Network_Clock_Type type );
+
+ /**
+ * @return mSpecializedSciMsgId
+ */
+ Network_Clock_Id getSpecializedSciMsgId ( ) const;
+
+ /**
+ * @return bool
+ * @param id the new value of mSpecializedSciMsgId
+ */
+ bool setSpecializedSciMsgId ( const Network_Clock_Id id );
+
+ /**
+ * @return mSpecializedSciMsgTick
+ */
+ Network_Clock_Tick getSpecializedSciMsgTick ( ) const;
+
+ /**
+ * @return bool
+ * @param tick the new value of mSpecializedSciMsgTick
+ */
+ bool setSpecializedSciMsgTick ( const Network_Clock_Tick tick );
+
+ /**
+ * Set the value of mSpecializedSciMsgHeader.id
+ * @return bool
+ */
+ bool setId ( const Network_Clock_Id id );
+
+ /**
+ * Set the value of mSpecializedSciMsgHeader.tick_high
+ * @return bool
+ */
+ bool setTickHigh ( const uint32_t tick_high );
+
+ /**
+ * Set the value of mSpecializedSciMsgHeader.tick_low
+ * @return bool
+ */
+ bool setTickLow ( const uint32_t tick_low );
+
+ /**
+ * Get the value of mSpecializedSciMsgHeader
+ * @return the value of mSpecializedSciMsgHeader into a void pointer
+ */
+ void * returnSpecializedSciMsgHeader ( ) const;
+
+ /**
+ * @return mSpecializedSciMsgHeader
+ */
+ const Network_Clock_Header & getSpecializedSciMsgHeader ( ) const;
+
+ /**
+ * @return bool
+ * @param specialized_sci_msg_header
+ */
+ bool setSpecializedSciMsgHeader ( const Network_Clock_Header & specialized_sci_msg_header );
+
+ // protected attribute accessor methods
+ //
+
+private:
+
+ // private methods
+ //
+
+ void initAttributes ( ) ;
+
+protected:
+
+ // protected methods
+ //
+
+};
+
+
+#endif // CLOCKSCIMSG_H
diff --git a/cesar/maximus/networkclock/inc/INetworkClock.h b/cesar/maximus/networkclock/inc/INetworkClock.h
new file mode 100644
index 0000000000..9ec495a081
--- /dev/null
+++ b/cesar/maximus/networkclock/inc/INetworkClock.h
@@ -0,0 +1,104 @@
+/************************************************************************
+ INetworkClock.h - Copyright buret
+
+Here you can write a license for your code, some comments or any other
+information you want to have in your generated code. To to this simply
+configure the "headings" directory in uml to point to a directory
+where you have your heading files.
+
+or you can just replace the contents of this file with your own.
+If you want to do this, this file is located at
+
+/usr/share/apps/umbrello/headings/heading.h
+
+-->Code Generators searches for heading files based on the file extension
+ i.e. it will look for a file name ending in ".h" to include in C++ header
+ files, and for a file name ending in ".java" to include in all generated
+ java code.
+ If you name the file "heading.<extension>", Code Generator will always
+ choose this file even if there are other files with the same extension in the
+ directory. If you name the file something else, it must be the only one with that
+ extension in the directory to guarantee that Code Generator will choose it.
+
+you can use variables in your heading files which are replaced at generation
+time. possible variables are : author, date, time, filename and filepath.
+just write %variable_name%
+
+This file was generated on %date% at %time%
+The original location of this file is /home/buret/eclipse/maximus/common/interfaces/INetworkClock.h
+**************************************************************************/
+
+#ifndef INETWORKCLOCK_H
+#define INETWORKCLOCK_H
+
+#include "networkclock_types.h"
+#include "sci_types.h"
+
+class NetworkClockEvt;
+
+
+/**
+ * class INetworkClock
+ */
+
+class INetworkClock
+{
+
+public:
+
+ // Constructors/Destructors
+ //
+
+ /**
+ * Empty Constructor
+ */
+ INetworkClock ( ) { }
+
+ /**
+ * Empty Destructor
+ */
+ virtual ~INetworkClock ( ) { }
+
+ // public methods
+ //
+
+ /**
+ * @param evt_to_send
+ * @param tick_value
+ */
+ virtual void createEvt ( const Network_Clock_Tick tick_value, const NetworkClockEvt & evt_to_send ) = 0;
+
+ /**
+ * @return bool
+ * @param evt_to_insert
+ * @param tick_value
+ */
+ virtual bool insertEvt ( const Network_Clock_Tick tick_value, const NetworkClockEvt & evt_to_insert ) = 0;
+
+ /**
+ * @return bool
+ * @param evt_to_remove
+ * @param tick_value
+ */
+ virtual bool removeEvt ( const Network_Clock_Tick tick_value, const NetworkClockEvt & evt_to_remove ) = 0;
+
+ /**
+ * @return bool
+ * @param station_id
+ */
+ virtual bool removeEvts ( const Sci_Msg_Station_Id station_id ) = 0;
+
+ /**
+ * @return bool
+ */
+ virtual bool processNextEvt ( const Network_Clock_Tick max_tick_value = 0 ) = 0;
+
+ /**
+ * @return Network_Clock_Tick
+ */
+ virtual Network_Clock_Tick getCurrentTickValue ( ) const = 0;
+
+};
+
+
+#endif // INETWORKCLOCK_H
diff --git a/cesar/maximus/networkclock/inc/NetworkClockEvt.h b/cesar/maximus/networkclock/inc/NetworkClockEvt.h
new file mode 100644
index 0000000000..125e9333d5
--- /dev/null
+++ b/cesar/maximus/networkclock/inc/NetworkClockEvt.h
@@ -0,0 +1,184 @@
+/************************************************************************
+ NetworkClockEvt.h - Copyright buret
+
+Here you can write a license for your code, some comments or any other
+information you want to have in your generated code. To to this simply
+configure the "headings" directory in uml to point to a directory
+where you have your heading files.
+
+or you can just replace the contents of this file with your own.
+If you want to do this, this file is located at
+
+/usr/share/apps/umbrello/headings/heading.h
+
+-->Code Generators searches for heading files based on the file extension
+ i.e. it will look for a file name ending in ".h" to include in C++ header
+ files, and for a file name ending in ".java" to include in all generated
+ java code.
+ If you name the file "heading.<extension>", Code Generator will always
+ choose this file even if there are other files with the same extension in the
+ directory. If you name the file something else, it must be the only one with that
+ extension in the directory to guarantee that Code Generator will choose it.
+
+you can use variables in your heading files which are replaced at generation
+time. possible variables are : author, date, time, filename and filepath.
+just write %variable_name%
+
+This file was generated on %date% at %time%
+The original location of this file is /home/buret/eclipse/maximus/networkclock/inc/NetworkClockEvt.h
+**************************************************************************/
+
+#ifndef NETWORKCLOCKEVT_H
+#define NETWORKCLOCKEVT_H
+
+#include "networkclock_types.h"
+#include "phy_types.h"
+#include "sci_types.h"
+
+#include <iostream>
+#include <string>
+
+
+/**
+ * class NetworkClockEvt
+ */
+
+class NetworkClockEvt
+{
+
+public:
+
+ // public attributes
+ //
+
+private:
+
+ // private attributes
+ //
+
+ Sci_Msg_Station_Id mStationId;
+ Network_Clock_Type mNetworkClockType;
+ Network_Clock_Id mNetworkClockId;
+ void * mpData;
+
+protected:
+
+ // protected attributes
+ //
+
+public:
+
+ // Constructors/Destructors
+ //
+
+ /**
+ * Empty Constructor
+ */
+ NetworkClockEvt ( );
+
+ /**
+ * Constructor
+ */
+ NetworkClockEvt ( const Sci_Msg_Station_Id station_id,
+ const Network_Clock_Type network_clock_type,
+ const Network_Clock_Id id,
+ const void * p_data = NULL );
+
+ /**
+ * Copy Constructors
+ */
+ NetworkClockEvt ( const NetworkClockEvt & evt );
+
+ /**
+ * Empty Destructor
+ */
+ virtual ~NetworkClockEvt ( );
+
+ // public methods
+ //
+
+ bool operator== ( const NetworkClockEvt & evt ) const;
+
+ NetworkClockEvt & operator= ( const NetworkClockEvt & evt );
+
+ void displayEvt ( ) const;
+
+ // public attribute accessor methods
+ //
+
+ // private attribute accessor methods
+ //
+
+ /**
+ * Set the value of mStationId
+ * @return bool
+ * @param station_id the new value of mStationId
+ */
+ bool setStationId ( const Sci_Msg_Station_Id station_id );
+
+ /**
+ * Get the value of mStationId
+ * @return the value of mStationId
+ */
+ Sci_Msg_Station_Id getStationId ( ) const;
+
+ /**
+ * Set the value of mNetworkClockType
+ * @return bool
+ * @param type the new value of mNetworkClockType
+ */
+ bool setNetworkClockType ( const Network_Clock_Type type );
+
+ /**
+ * Get the value of mNetworkClockType
+ * @return the value of mNetworkClockType
+ */
+ Network_Clock_Type getNetworkClockType ( ) const;
+
+ /**
+ * Set the value of mNetworkClockId
+ * @return bool
+ * @param id the new value of mNetworkClockId
+ */
+ bool setNetworkClockId ( const Network_Clock_Id id );
+
+ /**
+ * Get the value of mNetworkClockId
+ * @return the value of mNetworkClockId
+ */
+ Network_Clock_Id getNetworkClockId ( ) const;
+
+ /**
+ * Set the value of mpData
+ * @return bool
+ * @param p_data the new value of mpData
+ */
+ bool setData ( const void * p_data );
+
+ /**
+ * Get the value of mpData
+ * @return the value of mpData
+ */
+ void * getData ( ) const;
+
+ // protected attribute accessor methods
+ //
+
+private:
+
+ // private methods
+ //
+
+ void initAttributes ( ) ;
+
+ std::string displayNetworkClockType ( ) const;
+
+protected:
+
+ // protected methods
+ //
+
+};
+
+
+#endif // NETWORKCLOCKEVT_H
diff --git a/cesar/maximus/networkclock/inc/NetworkClockEvtList.h b/cesar/maximus/networkclock/inc/NetworkClockEvtList.h
new file mode 100644
index 0000000000..24c324e442
--- /dev/null
+++ b/cesar/maximus/networkclock/inc/NetworkClockEvtList.h
@@ -0,0 +1,171 @@
+/************************************************************************
+ NetworkClockEvtList.h - Copyright buret
+
+Here you can write a license for your code, some comments or any other
+information you want to have in your generated code. To to this simply
+configure the "headings" directory in uml to point to a directory
+where you have your heading files.
+
+or you can just replace the contents of this file with your own.
+If you want to do this, this file is located at
+
+/usr/share/apps/umbrello/headings/heading.h
+
+-->Code Generators searches for heading files based on the file extension
+ i.e. it will look for a file name ending in ".h" to include in C++ header
+ files, and for a file name ending in ".java" to include in all generated
+ java code.
+ If you name the file "heading.<extension>", Code Generator will always
+ choose this file even if there are other files with the same extension in the
+ directory. If you name the file something else, it must be the only one with that
+ extension in the directory to guarantee that Code Generator will choose it.
+
+you can use variables in your heading files which are replaced at generation
+time. possible variables are : author, date, time, filename and filepath.
+just write %variable_name%
+
+This file was generated on %date% at %time%
+The original location of this file is /home/buret/eclipse/maximus/networkclock/inc/NetworkClockEvtList.h
+**************************************************************************/
+
+#ifndef NETWORKCLOCKEVTLIST_H
+#define NETWORKCLOCKEVTLIST_H
+
+#include "networkclock_types.h"
+#include "sci_types.h"
+
+#include <map> // for 'multimap'
+
+class NetworkClockEvt;
+
+typedef std::multimap<const Network_Clock_Tick, const NetworkClockEvt> EvtsList;
+
+
+/**
+ * class NetworkClockEvtList
+ */
+
+class NetworkClockEvtList
+{
+
+public:
+
+ // public attributes
+ //
+
+private:
+
+ // private attributes
+ //
+
+ EvtsList mListOfEvts;
+
+protected:
+
+ // protected attributes
+ //
+
+public:
+
+ // Constructors/Destructors
+ //
+
+ /**
+ * Empty Constructor
+ */
+ NetworkClockEvtList ( );
+
+ /**
+ * Empty Destructor
+ */
+ virtual ~NetworkClockEvtList ( );
+
+ // public methods
+ //
+
+ /**
+ * @return bool
+ * @param tick_value
+ * @param evt_to_insert
+ */
+ bool insertElement ( const Network_Clock_Tick tick_value, const NetworkClockEvt & evt_to_insert );
+
+ /**
+ * @return bool
+ * @param evt_to_remove
+ */
+ bool removeElement ( const NetworkClockEvt & evt_to_remove );
+
+ /**
+ * @return bool
+ * @param tick_value
+ * @param evt_to_remove
+ */
+ bool removeElement ( const Network_Clock_Tick tick_value, const NetworkClockEvt & evt_to_remove );
+
+ /**
+ * @return bool
+ * @param station_id
+ */
+ bool removeElement ( const Sci_Msg_Station_Id station_id );
+
+ /**
+ * @return bool
+ * @param evt_to_add
+ */
+ bool addElement ( const NetworkClockEvt & evt_to_add );
+
+ /**
+ * @return bool
+ * @param next_evt_to_process
+ */
+ bool getNextElement ( Network_Clock_Tick & tick_value, NetworkClockEvt * & p_next_evt_to_process );
+
+ void displayListOfEvts ( ) const;
+
+ // public attribute accessor methods
+ //
+
+ // private attribute accessor methods
+ //
+
+ /**
+ * Set the value of mListOfEvts
+ * @param list_of_evts the new value of mListOfEvts
+ */
+ bool setListOfEvts ( EvtsList & list_of_evts );
+
+ /**
+ * Get the value of mListOfEvts
+ * @return the value of mListOfEvts
+ */
+ EvtsList & getListOfEvts ( );
+
+ // protected attribute accessor methods
+ //
+
+private:
+
+ // private methods
+ //
+
+ void initAttributes ( ) ;
+
+ void displayListOfEvts ( const Network_Clock_Tick tick_value ) const;
+
+ /**
+ * Remove elements whose key equals the input tick value
+ * @return bool
+ * @param tick_value
+ */
+ bool removePreviousElements ( const Network_Clock_Tick tick_value );
+
+protected:
+
+ // protected methods
+ //
+
+};
+
+
+#endif // NETWORKCLOCKEVTLIST_H
diff --git a/cesar/maximus/networkclock/inc/NetworkClockEvtListTest.h b/cesar/maximus/networkclock/inc/NetworkClockEvtListTest.h
new file mode 100644
index 0000000000..e8bea172e2
--- /dev/null
+++ b/cesar/maximus/networkclock/inc/NetworkClockEvtListTest.h
@@ -0,0 +1,40 @@
+
+#ifndef NETWORKCLOCKEVTLISTTEST_H
+#define NETWORKCLOCKEVTLISTTEST_H
+
+#include <cppunit/TestFixture.h>
+#include <cppunit/extensions/HelperMacros.h>
+
+class NetworkClockEvtList;
+class NetworkClockEvt;
+
+
+class NetworkClockEvtListTest : public CPPUNIT_NS::TestFixture
+{
+
+ CPPUNIT_TEST_SUITE (NetworkClockEvtListTest);
+ CPPUNIT_TEST (insertElementTest);
+ CPPUNIT_TEST (removeElementTest);
+ CPPUNIT_TEST (getNextElementTest);
+ CPPUNIT_TEST_SUITE_END ();
+
+public:
+
+ void setUp (void);
+ void tearDown (void);
+
+protected:
+
+ void insertElementTest (void);
+ void removeElementTest (void);
+ void getNextElementTest (void);
+
+private:
+
+ NetworkClockEvtList * mpNetworkClockEvtList;
+ NetworkClockEvt * mpNetworkClockEvt;
+
+};
+
+
+#endif // NETWORKCLOCKEVTLISTTEST_H
diff --git a/cesar/maximus/networkclock/inc/NetworkClockEvtTest.h b/cesar/maximus/networkclock/inc/NetworkClockEvtTest.h
new file mode 100644
index 0000000000..f56ab62781
--- /dev/null
+++ b/cesar/maximus/networkclock/inc/NetworkClockEvtTest.h
@@ -0,0 +1,34 @@
+
+#ifndef NETWORKCLOCKEVTTEST_H
+#define NETWORKCLOCKEVTTEST_H
+
+#include <cppunit/TestFixture.h>
+#include <cppunit/extensions/HelperMacros.h>
+
+class NetworkClockEvt;
+
+
+class NetworkClockEvtTest : public CPPUNIT_NS::TestFixture
+{
+
+ CPPUNIT_TEST_SUITE (NetworkClockEvtTest);
+ CPPUNIT_TEST (simpleTest);
+ CPPUNIT_TEST_SUITE_END ();
+
+public:
+
+ void setUp (void);
+ void tearDown (void);
+
+protected:
+
+ void simpleTest (void);
+
+private:
+
+ NetworkClockEvt * mpNetworkClockEvt;
+
+};
+
+
+#endif // NETWORKCLOCKEVTTEST_H
diff --git a/cesar/maximus/networkclock/inc/NetworkClockProcessor.h b/cesar/maximus/networkclock/inc/NetworkClockProcessor.h
new file mode 100644
index 0000000000..d242105190
--- /dev/null
+++ b/cesar/maximus/networkclock/inc/NetworkClockProcessor.h
@@ -0,0 +1,238 @@
+/************************************************************************
+ NetworkClockProcessor.h - Copyright buret
+
+Here you can write a license for your code, some comments or any other
+information you want to have in your generated code. To to this simply
+configure the "headings" directory in uml to point to a directory
+where you have your heading files.
+
+or you can just replace the contents of this file with your own.
+If you want to do this, this file is located at
+
+/usr/share/apps/umbrello/headings/heading.h
+
+-->Code Generators searches for heading files based on the file extension
+ i.e. it will look for a file name ending in ".h" to include in C++ header
+ files, and for a file name ending in ".java" to include in all generated
+ java code.
+ If you name the file "heading.<extension>", Code Generator will always
+ choose this file even if there are other files with the same extension in the
+ directory. If you name the file something else, it must be the only one with that
+ extension in the directory to guarantee that Code Generator will choose it.
+
+you can use variables in your heading files which are replaced at generation
+time. possible variables are : author, date, time, filename and filepath.
+just write %variable_name%
+
+This file was generated on %date% at %time%
+The original location of this file is /home/buret/eclipse/maximus/networkclock/inc/NetworkClockProcessor.h
+**************************************************************************/
+
+#ifndef NETWORKCLOCKPROCESSOR_H
+#define NETWORKCLOCKPROCESSOR_H
+
+#include "INetworkClock.h"
+
+#include "networkclock_types.h"
+
+class NetworkClockEvtList;
+class NetworkClockEvt;
+class ClockSciMsg;
+class ISci;
+class ISystem;
+class IFunctionCall;
+class IPhy;
+class IEthernet;
+
+
+/**
+ * class NetworkClockProcessor
+ */
+
+class NetworkClockProcessor : public INetworkClock
+{
+
+public:
+
+ // public attributes
+ //
+
+private:
+
+ // private attributes
+ //
+
+ Network_Clock_Tick mCurrentTickValue;
+ NetworkClockEvtList * mpNetworkClockEvtList;
+ ISci * mpSciServer;
+ ISystem * mpSystemManager;
+ IFunctionCall * mpFunctionCallManager;
+ IPhy * mpPhyProcessor;
+ IEthernet * mpEthernet;
+
+protected:
+
+ // protected attributes
+ //
+
+public:
+
+ // Constructors/Destructors
+ //
+
+ /**
+ * Empty Constructor
+ */
+ NetworkClockProcessor ( );
+
+ /**
+ * Constructor
+ */
+ NetworkClockProcessor ( ISci * p_sci_server,
+ ISystem * p_system_manager,
+ IFunctionCall * p_function_call_manager,
+ IPhy * p_phy_processor,
+ IEthernet * p_ethernet );
+
+ /**
+ * Empty Destructor
+ */
+ virtual ~NetworkClockProcessor ( );
+
+ // public methods
+ //
+
+ /**
+ * @param evt_to_send
+ * @param tick_value
+ */
+ void createEvt ( const Network_Clock_Tick tick_value, const NetworkClockEvt & evt_to_send );
+
+ /**
+ * @return bool
+ * @param evt_to_insert
+ * @param tick_value
+ */
+ bool insertEvt ( const Network_Clock_Tick tick_value, const NetworkClockEvt & evt_to_insert );
+
+ /**
+ * @return bool
+ * @param evt_to_remove
+ * @param tick_value
+ */
+ bool removeEvt ( const Network_Clock_Tick tick_value, const NetworkClockEvt & evt_to_remove );
+
+ /**
+ * @return bool
+ * @param station_id
+ */
+ bool removeEvts ( const Sci_Msg_Station_Id station_id );
+
+ /**
+ * @return bool
+ */
+ bool processNextEvt ( const Network_Clock_Tick max_tick_value = 0 );
+
+ /**
+ * @return bool
+ * @param evt_to_process
+ */
+ bool processEvtNone ( NetworkClockEvt & evt_to_process );
+
+ /**
+ * @return bool
+ * @param evt_to_process
+ */
+ bool processEvtRemove ( NetworkClockEvt & evt_to_process );
+
+ /**
+ * @return bool
+ * @param evt_to_process
+ */
+ bool processEvtStation ( NetworkClockEvt & evt_to_process );
+
+ /**
+ * @return bool
+ * @param evt_to_process
+ */
+ bool processEvtFunctionCall ( NetworkClockEvt & evt_to_process );
+
+ /**
+ * @return bool
+ * @param evt_to_process
+ */
+ bool processEvtPhy ( NetworkClockEvt & evt_to_process );
+
+ /**
+ * @return bool
+ * @param evt_to_process
+ */
+ bool processEvtSystem ( NetworkClockEvt & evt_to_process );
+
+ /**
+ * Processes an event of type ETHERNET.
+ * @param evt_to_process
+ * @return bool
+ */
+ bool processEvtEthernet ( NetworkClockEvt & evt_to_process );
+
+ // public attribute accessor methods
+ //
+
+ // private attribute accessor methods
+ //
+
+ /**
+ * @return Network_Clock_Tick
+ */
+ Network_Clock_Tick getCurrentTickValue ( ) const;
+
+ /**
+ * @return bool
+ */
+ bool setCurrentTickValue ( const Network_Clock_Tick tick_value );
+
+ /**
+ * @return the value of mpNetworkClockEvtList
+ */
+ NetworkClockEvtList * getNetworkClockEvtList ( );
+
+ // protected attribute accessor methods
+ //
+
+private:
+
+ // private methods
+ //
+
+ /**
+ * @return bool
+ * @param clock_sci_msg_to_send
+ */
+ bool sendEvtMsg ( ClockSciMsg & clock_sci_msg_to_send );
+
+ void initAttributes ( ) ;
+
+ void registerClockSciMsg ( );
+
+ /**
+ * Gets a pointer to the PHY processor.
+ * @return IPhy *
+ */
+ IPhy * getPhy ( ) const;
+
+ /**
+ * Gets a pointer to Ethernet.
+ * @return mpEthernet
+ */
+ IEthernet * getEthernet ( ) const;
+
+protected:
+
+ // protected methods
+ //
+
+};
+
+
+#endif // NETWORKCLOCKPROCESSOR_H
diff --git a/cesar/maximus/networkclock/inc/NetworkClockProcessorTest.h b/cesar/maximus/networkclock/inc/NetworkClockProcessorTest.h
new file mode 100644
index 0000000000..1b9cb8227e
--- /dev/null
+++ b/cesar/maximus/networkclock/inc/NetworkClockProcessorTest.h
@@ -0,0 +1,64 @@
+
+#ifndef NETWORKCLOCKPROCESSORTEST_H
+#define NETWORKCLOCKPROCESSORTEST_H
+
+#include <cppunit/TestFixture.h>
+#include <cppunit/extensions/HelperMacros.h>
+
+class NetworkClockProcessor;
+class SciServer;
+class SystemManager;
+class FunctionCallManager;
+class PhyProcessor;
+class IEthernet;
+
+
+class NetworkClockProcessorTest : public CPPUNIT_NS::TestFixture
+{
+
+ CPPUNIT_TEST_SUITE (NetworkClockProcessorTest);
+ CPPUNIT_TEST (createEvtTest);
+ CPPUNIT_TEST (removeEvtTest);
+ CPPUNIT_TEST (removeEvtsTest);
+ CPPUNIT_TEST (processNextEvtTest);
+ CPPUNIT_TEST (processEvtNoneTest);
+ CPPUNIT_TEST (processEvtRemoveTest);
+ CPPUNIT_TEST (processEvtStationTest);
+ CPPUNIT_TEST (processEvtFunctionCallTest);
+ CPPUNIT_TEST (processEvtPhyTest);
+ CPPUNIT_TEST (processEvtSystemTest);
+ CPPUNIT_TEST (processEvtEthernetTest);
+ CPPUNIT_TEST_SUITE_END ();
+
+public:
+
+ void setUp (void);
+ void tearDown (void);
+
+protected:
+
+ void createEvtTest (void);
+ void removeEvtTest (void);
+ void removeEvtsTest (void);
+ void processNextEvtTest (void);
+ void processEvtNoneTest (void);
+ void processEvtRemoveTest (void);
+ void processEvtStationTest (void);
+ void processEvtFunctionCallTest (void);
+ void processEvtPhyTest (void);
+ void processEvtSystemTest (void);
+ void processEvtEthernetTest (void);
+
+private:
+
+ NetworkClockProcessor * mpNetworkClockProcessor;
+ SciServer * mpSciServer;
+ SystemManager * mpSystemManager;
+ FunctionCallManager * mpFunctionCallManager;
+ PhyProcessor * mpPhyProcessor;
+ IEthernet * mpEthernet;
+
+};
+
+
+#endif // NETWORKCLOCKPROCESSORTEST_H