07-10-2013 07:15 AM - edited 07-10-2013 07:16 AM
Hello All,
Just trying to come up with some ideas for architecture implementation. I am needing to communicate to multiple cRIO modules and typical use TCP in the past to communicate with each cRIO module. I now have the problem of having multiple cRIO modules running and I want to be able to split the command set into generic and specific commands. i.e a Generic command is received and handled in the same way for each cRIO chassis from the host controlling PC. This allows me to have a generic type def command set and several specific type def command sets within a project. I was hoping to use a poly on the cRIO side (and the host) in order to adapt to which command set it has received and use a different state machine (Which will all be similar) depending on which type def command it has received. This should avoid me having one large type def CMD enum which contains all of the generic commands, all the commands for cRIO A, all the commands for cRIO B etc.
Essentially I know this isn't going to work but is there any other ways of doing this? Is this touching on the realms of dynamic dispatch by selecting which vi is run at runtime? Is it time to bite the bullet and use classes? Etc etc
If anyone can shed some light it would be appreciated.
I have thought of workarounds but that is not what I am after really, just if there is a way of doing it properly and if so where to go read up next.
Many Thanks in advance
Craig
07-15-2013 07:56 AM
Hi Craig,
If it was me building this program I would go down the dynamic dispatch/ classes route as it will allow the architecture to be very scalable as the system needs to expand. I think any other method of implimenting this will have limitations which can be avoided by using the dynamic dispatch/ classes design.
In terms or where to read up on this and how to get started ni.com has a lot of documentation on this subject a simple search will find many results but I have included a few below that may help to get you started.
If you have any more questions then please feel free to post back an I will be happy to help you further.
Best Regards