In the case of Process Flow, we do share a bunch of header files. They are in your FlexSim install directory, at /modules/ProcessFlow/include. If you include those (and probably link against ProcessFlow.dll), you can access the Token class directly. Like the module SDK, be sure to use the files from the version of FlexSim you are targeting.
For AGV, I don't think we share those header files, so I don't think you can access AGV methods directly in another module's dll.
The module SDK provides access to the widest range of types and functions available to 3rd-party developers, but it doesn't provide access to most of the other modules.
There are many cases where you need to keep some secret in a module, compiled into the dll. In these cases, you can use the following approach:
- Use the Module to add a set of FlexScript functions that you can use to query the model.
- In the module dll, you can call those functions. Or you can call the dll at certain points in the model. But you can shove all kinds of data into an Array or Map (which can contain Arrays and Maps), and get any data structure you need.
- Now that the module dll has the data, you can run the secret algorithm. Perhaps the algorithm makes a decision, such as which job should be done next, or creates kinematics for objects to move. Maybe it just generates additional data.
- You can pass the result of the secret algorithm into a FlexScript node, and from there, do anything you want (create tokens, give AGVs directions, etc.)
This kind of approach works well. An attacker can tell that you are getting information out of the model, and that somehow, you use that information to make decisions, or to drive model behavior. But the dll is a black box; the attacker doesn't know the key part, which is how you made those decisions.
.
Jordan Johnson
Principal Software Engineer
>