enum IoTCommCode {
ACKNOWLEDGED,
+ CREATE_DRIVER_OBJECT,
CREATE_OBJECT,
CREATE_MAIN_OBJECT,
CREATE_NEW_IOTSET,
REINITIALIZE_IOTSET_FIELD,
REINITIALIZE_IOTRELATION_FIELD,
TRANSFER_FILE,
-
+
};
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 FILEPATH; // File path
const static string FILEEXT; // File extension
const static string SOEXT; // Shared object (.so) extension
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
ofstream log; // Log the messages
vector<string> args; // Hold the arguments for constructor (in string format)
vector<string> argClasses; // Hold the argument classes
- bool isDriverObject; // Set to true if this is IoTSlave instance for a driver object
+ //bool isDriverObject; // Set to true if this is IoTSlave instance for a driver object
void* objMainCls; // Main class handler, i.e. driver or controller object
void* objSkelCls; // Skeleton handler
void* objStubCls; // Stub handler
void reinitializeIoTRelationField();
void getIoTSetObject();
void invokeInitMethod();
+ void createDriverObject();
void transferFile();
private: