user14025: I am trying to compile my project, but unfortunately get errors. 
I created class and separated implementation and declaration (cpp file and h file)
Here they are 
sensor.h
#ifndef SENSOR_H
#define SENSOR_H
#include <stdint.h>
#include "Arduino.h"
// Sensor types
enum SensorType {
  ANY_SENSOR,
  UNKNOWN_SENSOR,
  WATER_SENSOR,
  TEMPERATURE_SENSOR,
  VIBRATION_SENSOR,
  INTERCOM_SENSOR,
  HUMIDITY_SENSOR,
  PIR_SENSOR,
  SOUND_SENSOR,
  LIGHT_SENSOR
};
class Sensor {
  public:
  // Variables declaration
    uint32_t sensorId;
    SensorType sensorType;
    float currentValue;
    bool isEnabled;
    float criticalLowerLevel;
    float criticalUpperLevel;
   // Methods declaration
    Sensor();
    Sensor(uint32_t id,SensorType type,long currentValue,bool isEnabled,long lower,long upper);
    String toString();
    bool isCriticalLevelRised() {
      return (this->currentValue >= this->criticalUpperLevel || this->currentValue <= this->criticalLowerLevel);
    };
    void enable(bool enable);
    void toggle();
    static String convertSensorTypeToString(SensorType sensorType);
};


#endif

And cpp file 
#include "sensor.h"
Sensor::Sensor()
{
  this->sensorId = 0;
  this->sensorType = UNKNOWN_SENSOR;
  this->currentValue = 0;
  this->isEnabled = false;
  this->criticalLowerLevel = 0;
  this->criticalUpperLevel = 0;
}
Sensor::Sensor(uint32_t id,SensorType type,long currentValue,bool isEnabled,long lower,long upper) {
  this->sensorId = id;
  this->sensorType = type;
  this->currentValue = currentValue;
  this->isEnabled = isEnabled;
  this->criticalLowerLevel = lower;
  this->criticalUpperLevel = upper;
}
void Sensor::enable(bool enable) { 
   this->isEnabled = enable;
}
void Sensor::toggle() {
  this->enable(!this->isEnabled);
}
String Sensor::toString()
{
  String response = "";
  response += F("Sensor id is ");
  response += this->sensorId;
  response += '\n';
  response += F("Sensor type is ");
  response += convertSensorTypeToString(this->sensorType);
  response += '\n';
  response += F("Sensor current value is ");
  response += this->currentValue;
  response += '\n';
  response += F("Sensor isEnabled is ");
  response += this->isEnabled;
  response += '\n';
  response += F("Sensor criticalLowerLevel is ");
  response += this->criticalLowerLevel;
  response += '\n';
  response += F("Sensor criticalLowerLevel is ");
  response += this->criticalUpperLevel;
  response += '\n';
  return response;
}
String Sensor::convertSensorTypeToString(SensorType sensorType) {
  switch (sensorType) {
    case UNKNOWN_SENSOR:
      return F("UNKNOWN SENSOR");
    case ANY_SENSOR:
      return F("ANY_SENSOR");
    case WATER_SENSOR:
      return F("WATER_SENSOR");
    case TEMPERATURE_SENSOR:
      return F("TEMPERATURE_SENSOR");
    case VIBRATION_SENSOR:
      return F("VIBRATION_SENSOR");
    case HUMIDITY_SENSOR:
      return F("HUMIDITY_SENSOR");
    case PIR_SENSOR:
      return F("PIR_SENSOR");
    case SOUND_SENSOR:
      return F("SOUND_SENSOR");
    case LIGHT_SENSOR:
      return F("LIGHT_SENSOR");
    default:
      return F("UNKNOWN TYPE");
  }
}

And I got following errors 
ketch/NodeIntercom.ino.cpp.o: In function `sendSensorMessageToMaster(RF24Mesh*, SensorDataMessage*, char, unsigned int, bool)':
/home/iron/Arduino/What'sHappening/NetworkMaster/additional_functions.h:48: undefined reference to `Sensor::toString()'
sketch/NodeIntercom.ino.cpp.o: In function `handleSetSensorDataRequest(RF24NetworkHeader*)':
/home/iron/Arduino/What'sHappening/NodeIntercom/NodeIntercom.ino:97: undefined reference to `Sensor::toggle()'
/home/iron/Arduino/What'sHappening/NodeIntercom/NodeIntercom.ino:89: undefined reference to `Sensor::enable(bool)'
sketch/NodeIntercom.ino.cpp.o: In function `SensorDataMessage':
/home/iron/Arduino/What'sHappening/NetworkMaster/common.h:40: undefined reference to `Sensor::Sensor()'
sketch/NodeIntercom.ino.cpp.o: In function `__static_initialization_and_destruction_0':
/home/iron/Arduino/What'sHappening/NodeIntercom/NodeIntercom.ino:35: undefined reference to `Sensor::Sensor(unsigned long, SensorType, long, bool, long, long)'
collect2: error: ld returned 1 exit status

What I am doing wrong ? 
Please help.
EDIT
Yes main sketch compiles perfectly where this files are located.
But I don't want to duplicate common files in my all my arduino sketches withing the project, they are the same for whole project. Here my files location 
--ArduinoProjects
---NodeIntercom
----NodeIntercom.ino
---MasterNode
----MasterNode.ino
----sensor.h
----sensor.cpp
----common.h

So this files are only located in MasterNode directory 
And I tried to include them like this 
#include "/home/iron/Arduino/What'sHappening/NetworkMaster/common.h"
#include "/home/iron/Arduino/What'sHappening/NetworkMaster/additional_functions.h"

And in common.h I include sensor.h 
Also tried to include directly, but still the same
But headers files included as above works perfectly. 
What is the right way to solve this problem, I don't want to duplicate this class in each folder whenever I change it. 
If there is no way, maybe create symbolic link (I am using linux) ?
PARTIAL SOLUTION
Just use symbolic links in the sketch directory and this works perfectly

user4143: There is nothing wrong with that class and its code (as far as I can tell) - it compiles perfectly fine.
What is probably wrong is that the IDE isn't picking up the code and compiling it in to your project.
Is this class part of the sketch, or is it a separate library that you are writing?  If the latter you have to ensure that the IDE knows about it, and it can only look for it when you load the IDE, so if you haven't restarted the IDE since creating the library you must do that so it can find the new library.

user13432: The Arduino build preprocessing cannot locate the sensor source and header files if they are located in another sketch directory. The files needs to be moved to separate directory if shared (as a library).
--Sketchbook
---NodeIntercom
----NodeIntercom.ino
---MasterNode
----MasterNode.ino
---libraries
----Sensor
-----Sensor.h
-----Sensor.cpp

The Sensor header is included with
#include <Sensor.h>

in the sketches that needs to use it. 

14025: <p>I am trying to compile my project, but unfortunately get errors. </p>

<p>I created class and separated implementation and declaration (cpp file and h file)</p>

<p>Here they are </p>

<p><strong>sensor.h</strong></p>

<pre><code>#ifndef SENSOR_H
#define SENSOR_H
#include &lt;stdint.h&gt;
#include "Arduino.h"
// Sensor types
enum SensorType {
  ANY_SENSOR,
  UNKNOWN_SENSOR,
  WATER_SENSOR,
  TEMPERATURE_SENSOR,
  VIBRATION_SENSOR,
  INTERCOM_SENSOR,
  HUMIDITY_SENSOR,
  PIR_SENSOR,
  SOUND_SENSOR,
  LIGHT_SENSOR
};
class Sensor {
  public:
  // Variables declaration
    uint32_t sensorId;
    SensorType sensorType;
    float currentValue;
    bool isEnabled;
    float criticalLowerLevel;
    float criticalUpperLevel;
   // Methods declaration
    Sensor();
    Sensor(uint32_t id,SensorType type,long currentValue,bool isEnabled,long lower,long upper);
    String toString();
    bool isCriticalLevelRised() {
      return (this-&gt;currentValue &gt;= this-&gt;criticalUpperLevel || this-&gt;currentValue &lt;= this-&gt;criticalLowerLevel);
    };
    void enable(bool enable);
    void toggle();
    static String convertSensorTypeToString(SensorType sensorType);
};


#endif
</code></pre>

<p>And cpp file </p>

<pre><code>#include "sensor.h"
Sensor::Sensor()
{
  this-&gt;sensorId = 0;
  this-&gt;sensorType = UNKNOWN_SENSOR;
  this-&gt;currentValue = 0;
  this-&gt;isEnabled = false;
  this-&gt;criticalLowerLevel = 0;
  this-&gt;criticalUpperLevel = 0;
}
Sensor::Sensor(uint32_t id,SensorType type,long currentValue,bool isEnabled,long lower,long upper) {
  this-&gt;sensorId = id;
  this-&gt;sensorType = type;
  this-&gt;currentValue = currentValue;
  this-&gt;isEnabled = isEnabled;
  this-&gt;criticalLowerLevel = lower;
  this-&gt;criticalUpperLevel = upper;
}
void Sensor::enable(bool enable) { 
   this-&gt;isEnabled = enable;
}
void Sensor::toggle() {
  this-&gt;enable(!this-&gt;isEnabled);
}
String Sensor::toString()
{
  String response = "";
  response += F("Sensor id is ");
  response += this-&gt;sensorId;
  response += '\n';
  response += F("Sensor type is ");
  response += convertSensorTypeToString(this-&gt;sensorType);
  response += '\n';
  response += F("Sensor current value is ");
  response += this-&gt;currentValue;
  response += '\n';
  response += F("Sensor isEnabled is ");
  response += this-&gt;isEnabled;
  response += '\n';
  response += F("Sensor criticalLowerLevel is ");
  response += this-&gt;criticalLowerLevel;
  response += '\n';
  response += F("Sensor criticalLowerLevel is ");
  response += this-&gt;criticalUpperLevel;
  response += '\n';
  return response;
}
String Sensor::convertSensorTypeToString(SensorType sensorType) {
  switch (sensorType) {
    case UNKNOWN_SENSOR:
      return F("UNKNOWN SENSOR");
    case ANY_SENSOR:
      return F("ANY_SENSOR");
    case WATER_SENSOR:
      return F("WATER_SENSOR");
    case TEMPERATURE_SENSOR:
      return F("TEMPERATURE_SENSOR");
    case VIBRATION_SENSOR:
      return F("VIBRATION_SENSOR");
    case HUMIDITY_SENSOR:
      return F("HUMIDITY_SENSOR");
    case PIR_SENSOR:
      return F("PIR_SENSOR");
    case SOUND_SENSOR:
      return F("SOUND_SENSOR");
    case LIGHT_SENSOR:
      return F("LIGHT_SENSOR");
    default:
      return F("UNKNOWN TYPE");
  }
}
</code></pre>

<p>And I got following errors </p>

<pre><code>ketch/NodeIntercom.ino.cpp.o: In function `sendSensorMessageToMaster(RF24Mesh*, SensorDataMessage*, char, unsigned int, bool)':
/home/iron/Arduino/What'sHappening/NetworkMaster/additional_functions.h:48: undefined reference to `Sensor::toString()'
sketch/NodeIntercom.ino.cpp.o: In function `handleSetSensorDataRequest(RF24NetworkHeader*)':
/home/iron/Arduino/What'sHappening/NodeIntercom/NodeIntercom.ino:97: undefined reference to `Sensor::toggle()'
/home/iron/Arduino/What'sHappening/NodeIntercom/NodeIntercom.ino:89: undefined reference to `Sensor::enable(bool)'
sketch/NodeIntercom.ino.cpp.o: In function `SensorDataMessage':
/home/iron/Arduino/What'sHappening/NetworkMaster/common.h:40: undefined reference to `Sensor::Sensor()'
sketch/NodeIntercom.ino.cpp.o: In function `__static_initialization_and_destruction_0':
/home/iron/Arduino/What'sHappening/NodeIntercom/NodeIntercom.ino:35: undefined reference to `Sensor::Sensor(unsigned long, SensorType, long, bool, long, long)'
collect2: error: ld returned 1 exit status
</code></pre>

<p>What I am doing wrong ? 
Please help.</p>

<p><strong>EDIT</strong></p>

<p>Yes main sketch compiles perfectly where this files are located.</p>

<p>But I don't want to duplicate common files in my all my arduino sketches withing the project, they are the same for whole project. Here my files location </p>

<pre><code>--ArduinoProjects
---NodeIntercom
----NodeIntercom.ino
---MasterNode
----MasterNode.ino
----sensor.h
----sensor.cpp
----common.h
</code></pre>

<p>So this files are only located in MasterNode directory </p>

<p>And I tried to include them like this </p>

<pre><code>#include "/home/iron/Arduino/What'sHappening/NetworkMaster/common.h"
#include "/home/iron/Arduino/What'sHappening/NetworkMaster/additional_functions.h"
</code></pre>

<p>And in common.h I include sensor.h 
Also tried to include directly, but still the same</p>

<p>But headers files included as above works perfectly. </p>

<p>What is the right way to solve this problem, I don't want to duplicate this class in each folder whenever I change it. </p>

<p>If there is no way, maybe create symbolic link (I am using linux) ?</p>

<p><strong>PARTIAL SOLUTION</strong></p>

<p>Just use symbolic links in the sketch directory and this works perfectly</p>
 4143: <p>There is nothing wrong with that class and its code (as far as I can tell) - it compiles perfectly fine.</p>

<p>What is probably wrong is that the IDE isn't picking up the code and compiling it in to your project.</p>

<p>Is this class part of the sketch, or is it a separate library that you are writing?  If the latter you have to ensure that the IDE knows about it, and it can only look for it when you load the IDE, so if you haven't restarted the IDE since creating the library you must do that so it can find the new library.</p>
 13432: <p>The Arduino build preprocessing cannot locate the sensor source and header files if they are located in another sketch directory. The files needs to be moved to separate directory if shared (as a library).</p>

<pre><code>--Sketchbook
---NodeIntercom
----NodeIntercom.ino
---MasterNode
----MasterNode.ino
---libraries
----Sensor
-----Sensor.h
-----Sensor.cpp
</code></pre>

<p>The Sensor header is included with</p>

<pre><code>#include &lt;Sensor.h&gt;
</code></pre>

<p>in the sketches that needs to use it. </p>
