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 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 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, or contact

-- AlexanderSchwinn - 02 May 2007
Topic revision: r3 - 2007-05-02, AlexanderSchwinn - This page was cached on 2024-06-14 - 14:36.

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 | Legal notice | Privacy Policy (german)