Cleaning up C++ slave.
[iot2.git] / iotjava / iotruntime / cpp / iotslave / IoTSlave.hpp
index 6c966047672ab9199cab9826655c70083cc9e9c3..bbac3988c813df24718e913d20b95b1ad8eda889 100644 (file)
@@ -16,7 +16,7 @@
 
 /** Class IoTSlave is a communication class
  *  that interacts with IoTSlave.java to set up C++
- *  objects in Sentinel.
+ *  objects in Vigilia.
  *
  * @author      Rahmadi Trimananda <rtrimana @ uci.edu>
  * @version     1.0
@@ -54,13 +54,14 @@ typedef void destroy_t(void*);
 typedef void init_t(void*);
 
 
-class IoTSlave {
+class IoTSlave final {
 
        private:
                // Constants
                const static int RCVBUFSIZE = 1024;                     // Size of receive buffer
                const static int SKELPARAMSIZE = 3;                     // Number of params for skeleton
-               const static int STUBPARAMSIZE = 6;                     // Number of params for stub
+               const static int STUBPARAMSIZE = 5;                     // Number of params for stub
+               const static string LOGFILEPATH;                        // Log file path
                const static string FILEPATH;                           // File path
                const static string FILEEXT;                            // File extension
                const static string SOEXT;                              // Shared object (.so) extension
@@ -84,7 +85,6 @@ class IoTSlave {
                string objectStubClass;         // Need to send from Java IoTSlave: sMessage.getObjectStubInterfaceName() + STUB_CLASS_SUFFIX
                int objectRegPort;
                int objectStubPort;
-               vector<int>* ports;                     // Now used to contain callback ports
                string objectFieldName;                                         // Field name that is going to be initialized with IoTSet or IoTRelation
                unordered_set<void*>* isetObject;                       // Set of object
                IoTSet<void*>* iotsetObject;                            // IoTSet of object
@@ -162,6 +162,7 @@ class IoTSlave {
 };
 
 // Constant initialization
+const string IoTSlave::LOGFILEPATH = "../log/";
 const string IoTSlave::FILEPATH = "./";
 const string IoTSlave::FILEEXT = "_cpp.log";
 const string IoTSlave::SOEXT = ".so";