Commit 49292e05 authored by Sergio Poppi's avatar Sergio Poppi
Browse files

WeathersStationComponent connection when the component is started

parent 9de73a8d
Loading
Loading
Loading
Loading
+12 −4
Original line number Diff line number Diff line
@@ -67,6 +67,7 @@ public:
			CString rdata="";
			CSecAreaResourceWrapper<MeteoSocket> sock=m_socket->Get();
			m_val=sock->getHumidity();
                        timestamp=getTimeStamp();  //complition time
                        return m_val;


@@ -76,9 +77,17 @@ public:
			dummy.setPropertyName("systemTemperature");
			dummy.setReason("Property could not be read");
			//_IRA_LOGGUARD_LOG_EXCEPTION(m_logGuard,dummy,LM_DEBUG);
                  
			throw dummy;
                        return m_val;

		} catch (...)
                {
                  cout << "Devio humididy unexpected exc"  << endl;
                  			
                  }
		timestamp=getTimeStamp();  //complition time
       return m_val;
                  
	}
	/**
	 * It writes values into controller. Unused because the properties are read-only.
@@ -91,7 +100,6 @@ public:
	
private:
	CSecureArea<MeteoSocket>* m_socket;

	CORBA::Double m_val;
	bool m_initparser;
 };
+18 −5
Original line number Diff line number Diff line
@@ -62,9 +62,15 @@ public:
		// get the CommandLine .......
		try {
                        CError err;
			CString rdata="";
			CSecAreaResourceWrapper<MeteoSocket> sock=m_socket->Get();
/*                        err=sock->connection();*/
                        
                        cout <<"SOCK" << sock->isConnected()  <<endl;
  			m_val=sock->getPressure();
                        timestamp=getTimeStamp();
/*                        err=sock->disconnection();  //complition time*/
                       return m_val;

		}
		catch (ACSErr::ACSbaseExImpl& E) {
			_ADD_BACKTRACE(ComponentErrors::PropertyErrorExImpl,dummy,E,"DevIOPressure::read()");
@@ -72,9 +78,16 @@ public:
			dummy.setReason("Property could not be read");
			//_IRA_LOGGUARD_LOG_EXCEPTION(m_logGuard,dummy,LM_DEBUG);
			throw dummy;
                            return m_val;
                    
		} catch (...)
                  {
                   cout << "unexpected exc Devio pressure" << endl;
                  
                  
                  }
		timestamp=getTimeStamp();  //complition time
        return m_val;
                   				
	}
	/**
	 * It writes values into controller. Unused because the properties are read-only.
+16 −5
Original line number Diff line number Diff line
@@ -64,6 +64,7 @@ public:
		try {
			CSecAreaResourceWrapper<MeteoSocket> sock=m_socket->Get();
 			m_val=sock->getTemperature();
                        timestamp=getTimeStamp();  //complition time
                        return m_val;

		}
@@ -73,9 +74,19 @@ public:
			dummy.setReason("Property could not be read");
			//_IRA_LOGGUARD_LOG_EXCEPTION(m_logGuard,dummy,LM_DEBUG);
			throw dummy;
                        return m_val;
		
                  } catch (...)
                  		
                  {
                  
                     cout << "Devio temp unexpected except" << endl;
                  
                  
                  }
		timestamp=getTimeStamp();  //complition time

                                          return m_val;
	
        }
	/**
	 * It writes values into controller. Unused because the properties are read-only.
+12 −3
Original line number Diff line number Diff line
@@ -66,6 +66,8 @@ public:
			CString rdata="";
			CSecAreaResourceWrapper<MeteoSocket> sock=m_socket->Get();
 			m_val=sock->getWindDir();
                timestamp=getTimeStamp();  //complition time
                return m_val;

		
		}
@@ -75,9 +77,16 @@ public:
			dummy.setReason("Property could not be read");
			//_IRA_LOGGUARD_LOG_EXCEPTION(m_logGuard,dummy,LM_DEBUG);
			throw dummy;
                        return m_val;
		
                  } catch (...)
                 {
                      cout << "unexpected exc windir" << endl;
                      
                  
                  }
		timestamp=getTimeStamp();  //complition time
                                          return m_val;
                  				
	}
	/**
	 * It writes values into controller. Unused because the properties are read-only.
+10 −1
Original line number Diff line number Diff line
@@ -83,9 +83,18 @@ public:
			dummy.setReason("Property could not be read");
			//_IRA_LOGGUARD_LOG_EXCEPTION(m_logGuard,dummy,LM_DEBUG);
			throw dummy;
                        return m_val;
		
                  } 	catch (...)
                  {
                  
                  cout << "unexpected exc windspeed " << endl;
                  
                  }
                  			

                                          return m_val;

	}
	/**
	 * It writes values into controller. Unused because the properties are read-only.
Loading