2
« on: September 28, 2018, 12:48:08 PM »
Building a basic application with drag-and-drop controls and property edits went pretty smoothly, but to get real work done I wanted to be able to do that programmatically. After some digging into the control code, I eventually found that it was calling ethernetIPforCLXCom.Write(). A bit of common sense (with the help of Intellisense) gave me .Read(), and that was enough to get some basic boolean and integer tags moving...but soon I wanted to look at strings and arrays and UDTs and so on.
I found the source file AdvancedHMIDrivers/AllenBradley/EthernetIPforCLXCom.vb but was briefly confused to find that this is not the file that contains the source for these methods. Instead, read and write are in MfgControl.AdvancedHMI.Drivers.EthernetIPforCLX....which is a DLL. Using Visual Studio's "Go To Definition" takes me to a view of this file generated from metadata (attached), with a lot of juicy methods to call:
public static int GetByteCount(int AbreviatedType);
public int BeginGetAttributesAll(int classID, int instanceID);
public int BeginGetAttributeSingle(int classID, int instanceID, int attribute);
public override int BeginRead(string startAddress, int numberOfElements);
public int BeginRead(CLXAddressRead address, int numberOfElements);
public int BeginReadMultiple(Collection<CLXAddressRead> addresses);
public int BeginReadMultiple(string[] addresses);
...
...but, being generated from metadata, this has no method bodies, no comments, and no clues as to how to use these other than the method and parameter names plus whatever trial-and-error can produce.
Am I missing something? Where's the source for this file? I understand how time-consuming it can be to generate and maintain documentation, but if I had to read the source I'd have a better chance of getting this to work than if I'm just guessing.
Thanks in advance...