private string sPosition = null; // Sparql command for generate the position information /// Constructor of the RobotSmell class. The objective is to create a instance for a odor perception. /// The instant parameter represens the exact moment of the odor capture. /// The idObject parameter represents an unique identifier associated the object responsible to produce the the smell. /// The odor parameter identifies the odor. /// /// public RobotSmell(DateTime instant, long idObject, OdorComposition odor) { long countEv = getEventCount(); // get a unique identifier for position and color // to create a Sparql command for generate the olfatory information sSmell = string.Format(SparqlAccess.INSERT_SMELL, countEv, instant.ToString(SparqlAccess.XSD_DATETIME), idObject, odor.chemicalLevel, odor.decayedLevel, odor.fragrantLevel, odor.fruityLevel, odor.lemonLevel, odor.mintyLevel, odor.popcornLevel, odor.pungentLevel, odor.sweetLevel, odor.woodyLevel); }
/// Constructor of the RobotSmell class. The objective is to create a instance for a odor perception. /// The instant parameter represens the exact moment of the odor capture. /// The pos parameter represents the position of an unknow object responsible to produce the the smell. /// The odor parameter identifies the odor. public RobotSmell(DateTime instant, CartesianPos pos, OdorComposition odor) { long countEv = getEventCount(); // get a unique identifier for position and color // to create a Sparql command for generate the position information // sPosition = string.Format(SparqlAccess.INSERT_POSITION_LOCAL, countEv, pos.cartesianX, pos.cartesianY, pos.cartesianZ); // to create a Sparql command for generate the olfatory information sSmell = string.Format(SparqlAccess.INSERT_SMELL_POS, countEv, instant.ToString(SparqlAccess.XSD_DATETIME), odor.chemicalLevel, odor.decayedLevel, odor.fragrantLevel, odor.fruityLevel, odor.lemonLevel, odor.mintyLevel, odor.popcornLevel, odor.pungentLevel, odor.sweetLevel, odor.woodyLevel); }