oaModBusNetDef.h

Go to the documentation of this file.
00001 // *****************************************************************************
00002 // *****************************************************************************
00003 // oaModBusNetDef.h
00004 //
00005 // This file contains the definition for the oaModBusNetDef class and its public
00006 // supporting classes. The oaModBusNetDef class implements the definition of a
00007 // logical busNet, including its name and bit-range. Since multiple busNets can
00008 // refer to different members of the same busNet definition, the busNetDef
00009 // represents the super-set of all members of the busNets.
00010 //
00011 // A logical busNetDef is automatically created if necessary whenever
00012 // applications create logical busNets. These implicit logical busNet
00013 // definitions will have no bitOrder. Applications may explicitly create a
00014 // logical busNet definition in order to specify that it has a specific
00015 // bitOrder.
00016 //
00017 // Implicitly created logical busNet definitions are automatically destroyed
00018 // when the last busNet with the same name is destroyed. Explicitly created
00019 // logical busNet definitions must be explicitly destroyed. An exception will
00020 // be thrown if an attempt is made to destroy an implicitly created logical
00021 // busNet definition. An exception will also be thrown if an attempt is made to
00022 // destroy an explicitly created logical busNet definition that still has
00023 // logical busNets associated with it.
00024 //
00025 // *****************************************************************************
00026 // Except as specified in the OpenAccess terms of use of Cadence or Silicon
00027 // Integration Initiative, this material may not be copied, modified,
00028 // re-published, uploaded, executed, or distributed in any way, in any medium,
00029 // in whole or in part, without prior written permission from Cadence.
00030 //
00031 //                Copyright 2003-2005 Cadence Design Systems, Inc.
00032 //                           All Rights Reserved.
00033 //
00034 //  $Author: icftcm $
00035 //  $Revision: #1 $
00036 //  $Date: 2010/08/09 $
00037 //  $State: Exp $
00038 // *****************************************************************************
00039 // *****************************************************************************
00040 
00041 
00042 
00043 #if !defined(oaModBusNetDef_P)
00044 #define oaModBusNetDef_P
00045 
00046 
00047 
00048 // *****************************************************************************
00049 // Nested includes
00050 // *****************************************************************************
00051 #include "oaBusNetDef.h"
00052 #include "oaModule.h"
00053 
00054 
00055 
00056 // *****************************************************************************
00057 // Declare and define types in the OpenAccess namespace.
00058 // *****************************************************************************
00059 BEGIN_OA_NAMESPACE
00060 
00061 
00062 
00063 // *****************************************************************************
00064 // oaModBusNetDef
00065 // *****************************************************************************
00066 class OA_DESIGN_DLL_API oaModBusNetDef : public oaModObject {
00067 public:
00068     static oaModBusNetDef                           *create(const oaModule      *module,
00069                                                             const oaScalarName  &name,
00070                                                             oaBitOrder          order);
00071 
00072     static oaModBusNetDef                           *find(const oaModule        *module,
00073                                                           const oaScalarName    &name);
00074 
00075     void                                            destroy();
00076 
00077     oaUInt4                                         getMinIndex() const;
00078     oaUInt4                                         getMaxIndex() const;
00079     oaUInt4                                         getNumBits() const;
00080     void                                            getName(oaScalarName &name) const;
00081     void                                            getName(const oaNameSpace   &ns,
00082                                                             oaString            &name) const;
00083     oaBitOrder                                      getBitOrder() const;
00084 
00085     oaBoolean                                       isImplicit() const;
00086 
00087     void                                            setBitOrder(oaBitOrder order);
00088 
00089     oaCollection<oaModBusNet, oaModBusNetDef>       getBusNets() const;
00090     oaCollection<oaModBusNetBit, oaModBusNetDef>    getBusNetBits() const;
00091 
00092     enum {dtIndex = oacBusNetDefDataType};
00093 };
00094 
00095 
00096 
00097 // *****************************************************************************
00098 // Design Traits.
00099 // *****************************************************************************
00100 template<>
00101 class oaTraits<oaModBusNetDef> {
00102 public:
00103     typedef oaModObject             parentType;
00104     typedef oaBusNetDefModTypeEnum  modTypeType;
00105     enum {domain = oacModDomain};
00106     enum {isMultiDomain = true};
00107     enum {dbType = oacDesignDBType};
00108     enum {dtIndex = oacBusNetDefDataType};
00109     enum {isConcrete = true};
00110     enum {objectTypeEnumVal = oacModBusNetDefType};
00111     enum {dataTypeEnumVal = oacBusNetDefDataType};
00112 };
00113 
00114 
00115 
00116 END_OA_NAMESPACE
00117 
00118 #endif

Return to top of page