First open the "CSON-Examples\Use of a existing deviceclass in the net" folder.

The class you can see here (ON Example DeviceClass) is a device class, which is given Object Net functionallity.

  • class which gets ON-functionallity: Class A
  • Class which inherits from the CSON-BaseClass: Class B

If you also have a class, which needŽs object Net functionallity, simply take advice to the following steps:

  • Inherit from "CSON-BaseClass" and choose a name for your ON-class (Class B).
  • Place the construktor of class A into the construktor from class B, (you may replace the BaseProcess construktor in Class B)
  • Do the same with the destruktor.
  • In the default Case of the ProcCases (Class B), the BaseProcess-ProcCases are called; replace the BP-ProcCases with the ones of Class A.
  • Inside the Proc-Periodic (Class B) simply place the Proc Periodic of Class A and connect all controls
  • Prepare the Launch.vi from class B. Write in all services that were published by your class, and all selectors, which should be triggered
  • If needet, you can create a own observer.vi for class B, if you want to display others, than the DIM-Standart Data types
  • If you want to re-use all commands/answers of your deviceclass (Class A), you have the possibility to cast the ON-Services to commands, inside the ProcCases. Therefore look into the ProcCases of the "ON Example DeviceClass" and follow the hints and the examples given there.

ThatŽs it. If there still are questions, simply look at the Example Class

-- AlexanderSchwinn - 16 Apr 2007
Edit | Attach | Print version |  PDF | History: r3 < r2 < r1 | Backlinks | View wiki text | Edit WikiText | More topic actions...
Topic revision: r2 - 2007-04-17, AlexanderSchwinn
 
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding GSI Wiki? Send feedback
Imprint (in German)
Privacy Policy (in German)