Ignore:
Timestamp:
11/13/14 15:09:14 (10 years ago)
Author:
mhnguyen
Message:

Implementing buffer size auto-detection for mode client -server

+) Process xml tree in client side then send all the information to server
+) Only information enabled fields in enabled files are sent to server
+) Some important change in structure of code which must be refactored

Test
+) On Curie
+) Only mode client-server
+) Passed for all tests

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/src/node/field.hpp

    r501 r509  
    1818 
    1919namespace xios { 
    20     
     20 
    2121   /// ////////////////////// Déclarations ////////////////////// /// 
    2222 
     
    5656           EVENT_ID_UPDATE_DATA, EVENT_ID_ADD_VARIABLE, EVENT_ID_ADD_VARIABLE_GROUP 
    5757         } ; 
    58           
     58 
    5959         /// Constructeurs /// 
    6060         CField(void); 
     
    8383 
    8484         boost::shared_ptr<func::CFunctor> getFieldOperation(void) const; 
    85           
     85 
    8686         CArray<double, 1> getData(void) const; 
    8787 
     
    9595         template <int N> bool updateData(const CArray<double, N>&   data); 
    9696         bool updateDataFromExpression(const CArray<double, 1>&   data); 
    97          void setDataFromExpression(const CArray<double, 1>& _data) ;          
    98           
     97         void setDataFromExpression(const CArray<double, 1>& _data) ; 
     98 
    9999         bool updateDataServer 
    100100               (const CDate & currDate, 
    101101                const std::deque< CArray<double, 1>* > storedClient); 
    102   
     102 
     103         std::map<int, StdSize> getGridDataSize(); 
     104 
    103105       public : 
    104106 
     
    116118         void solveGridReference(void); 
    117119         void solveOperation(void); 
     120         void solveCheckMaskIndex(bool doSendingIndex); 
     121         void solveAllReferenceEnabledField(bool doSending2Sever); 
     122         void buildAllExpressionEnabledField(); 
     123         void solveGridDomainAxisRef(bool checkAtt); 
     124         void removeRefInheritance();  // Remove all reference of current field (it refers to itself) 
    118125 
    119126//         virtual void fromBinary(StdIStream & is); 
     
    125132         static StdString GetName(void); 
    126133         static StdString GetDefName(void); 
    127           
     134 
    128135         static ENodeType GetType(void); 
    129           
     136 
    130137        template <int N> void setData(const CArray<double, N>& _data) ; 
    131138        static bool dispatchEvent(CEventServer& event) ; 
     
    139146        void parse(xml::CXMLNode & node) ; 
    140147        CArray<double,1>* getInstantData(void)  ; 
    141          
     148 
    142149        void setVirtualVariableGroup(CVariableGroup* newVVariableGroup); 
    143150        void setVirtualVariableGroup(void); 
     
    145152        vector<CVariable*> getAllVariables(void) const; 
    146153        virtual void solveDescInheritance(bool apply, const CAttributeMap * const parent = 0); 
    147   
     154 
    148155        CVariable* addVariable(const string& id="") ; 
    149156        CVariableGroup* addVariableGroup(const string& id="") ; 
     
    154161        static void recvAddVariableGroup(CEventServer& event) ; 
    155162        void recvAddVariableGroup(CBufferIn& buffer) ; 
    156         
     163        void sendAddAllVariables(); 
     164 
     165 
     166        const std::pair<StdString, StdString>& getDomainAxisIds(); 
    157167      public : 
    158168 
    159169         /// Propriétés privées /// 
    160170         CVariableGroup* vVariableGroup ; 
    161                   
     171 
    162172         std::vector<CField*> refObject; 
    163173         CField* baseRefObject; 
     
    172182         boost::shared_ptr<CDate>    last_Write, last_operation; 
    173183         boost::shared_ptr<CDate>    lastlast_Write_srv,last_Write_srv, last_operation_srv; 
    174           
     184 
    175185         boost::shared_ptr<func::CFunctor> foperation; 
    176186         map<int,boost::shared_ptr<func::CFunctor> > foperation_srv; 
    177           
     187 
    178188         CArray<double, 1> data; 
    179189         CArray<double, 1> instantData; 
     
    183193         bool isFirstOperation ; 
    184194         string content ; 
    185           
     195 
    186196         list< pair<CField *,int> > fieldDependency ; 
    187197         void buildExpression(void) ; 
     
    195205         void setSlot(int slotId); 
    196206         bool processed ; 
     207         bool areAllReferenceSolved; 
     208         bool areAllExpressionBuilt; 
     209         std::pair<StdString,StdString> domAxisIds_; 
    197210 
    198211   }; // class CField 
Note: See TracChangeset for help on using the changeset viewer.