Design consulting

Hi all,

I would like to get a consulting in the following design senario , how to do it in the right way.

I'm trying to develope a reusable component of communication between the PC and field devices. The devices have special communication protocol and a special way to make the physical comm.

The are many devices kinds (Display , microcontrollers,...).

I'm looking for the right way to write a global component. I'll use this component in many .Net projects.

I thonk to do that with interface, and classes implement the interface, the reason because the devices are from different inheretane trees.

The schema I thaught about is:

IDevice : The interface all the classes will imlement.

DClass : a base class of the Display devices.

DPLC : a base class of the controllers devices.

AClass : DClass implements IDevice , a special kind of DClass

BClass : DClass implements IDevice , a special kind of DClass

APLC : DPLC implemtnrs IDevice ...

is this the write way to do that I'll implement the interface function differently in the varios class.

Please help me.

Best regards...



Answer this question

Design consulting

  • fishmeister

    From the few details you give it sounds like a plausible direction

    few things to think about

    • What are the common behaviors of different devices
    • Do you have situations where the same device can be connected in multiple ways (for example in one application I architect we can have sensors connected directly or remotely through a mediator) - if this is possible you may want to abstract the physical communication from the logical one.
    • Another layer you can consider is one that deals with the devices state
    • Do you have composite devices (a platform that holds more than one device)
    • Do you have cross device capabilities (e.g. built-in-tests, calibration ) - each capability should probably get its own interface

    Hope this helps,

    Arnon



  • erdogancemevin1989

    Wasim wrote:

    I'm new in OOD world. So please help me , if you also have recommended links to read .

    I recently posted a presentation on OO principles you may want to look at see http://www.rgoarchitects.com/blog/PermaLink,guid,69ef2a86-2d59-4500-b328-0db29d8d0655.aspx

    Arnon



  • ydurt

    Thanks allot,

    All the things you mentioned are right, but how I can implement your nots in my design. Is there tools for checking design construction if you know.

    I'm new in OOD world. So please help me , if you also have recommended links to read .

    Best regards...


  • Design consulting