I am trying to finish Example Module Class- The Snow Processor (SDK-Documentation).
I create a new module named " TheSnowProcessor" and follow the Documentation steps.
But the steps in Documentation is still use the "Adding FlexSim Object Variables Wizards" which has been removed. I must add bound members to a ObjectDataType sub-class manually. I am not sure it is correct.
When I drag a SnowProcessor into model, it seems not work.The value in " flakes" goes correct while the model view with a big black triangle:
Snowflake.h/Snowflake.cpp/ SnowProcessor.h/SnowProcessor.cpp is copyed from the Examples folder.
In Snowflake.cpp, YourModuleNameGoesHere (about line 41) has been replaced with my module name (TheSnowProcessor).
TheSnowProcessor.cpp (module cpp):
#include "TheSnowProcessor.h" #include "SnowProcessor.h" #include "Snowflake.h" visible ObjectDataType* createodtderivative(char* classname) { if (strcmp(classname, "SnowProcessor") == 0) return new SnowProcessor; return NULL; } visible SimpleDataType* createsdtderivative(char* classname) { if (strcmp(classname, "Snowflake") == 0) return new Snowflake; return NULL; } visible void dllinitialize() { } visible void dllcleanup() { }
What's wrong?
__________________________________________________________________________
I have asking two questions before:
https://answers.flexsim.com/questions/37302/beginoffset-member-function-not-declared-in-mytask.html
https://answers.flexsim.com/questions/37364/how-to-add-bound-members-to-a-objectdatatype-sub-c.html
Would you mind updating the SDK Documentation?