Beispiel #1
0
String LightProperty::getElementValue( size_t i ) const
{
   ILightVectorProperty* lvp = m_property->getLight();
   CHECK_INDEX_THROWS( lvp->nlp );
   switch ( lvp->lp[i].s )
   {
   case IPS_IDLE:
      return "IDLE";
   case IPS_OK:
      return "OK";
   case IPS_BUSY:
      return "BUSY";
   case IPS_ALERT:
      return "ALERT";
   default:
      return "UNSUPPORTED";
   }
}
Beispiel #2
0
String LightProperty::getElementValue(size_t i) {
	CHECK_INDEX_THROWS(((ILightVectorProperty*) m_property->getProperty())->nlp);

	switch (m_property->getLight()->lp[i].s) {
	case IPS_IDLE:
		return String("IDLE");
		break;
	case IPS_OK:
		return String("OK");
		break;
	case IPS_BUSY:
		return String("BUSY");
		break;
	case IPS_ALERT:
		return String("ALERT");
		break;
	default:
		return String("UNSUPPORTED");
	}
}
Beispiel #3
0
String LightProperty::getElementLabel(size_t i) {
	CHECK_INDEX_THROWS(((ILightVectorProperty*) m_property->getProperty())->nlp);

	return String(m_property->getLight()->lp[i].label);
}
Beispiel #4
0
String TextProperty::getElementValue(size_t i) {
	CHECK_INDEX_THROWS(
			((ITextVectorProperty*) m_property->getProperty())->ntp);

	return String(m_property->getText()->tp[i].text);
}
Beispiel #5
0
String NumberProperty::getNumberFormat(size_t i){
	CHECK_INDEX_THROWS(
			((INumberVectorProperty*) m_property->getProperty())->nnp);

	return String(m_property->getNumber()->np[i].format);
}
Beispiel #6
0
String NumberProperty::getElementValue(size_t i) {
	CHECK_INDEX_THROWS(
			((INumberVectorProperty*) m_property->getProperty())->nnp);

	return String(m_property->getNumber()->np[i].value);
}
Beispiel #7
0
String SwitchProperty::getElementValue(size_t i) {
	CHECK_INDEX_THROWS(
			((ISwitchVectorProperty*) m_property->getProperty())->nsp);

	return String(m_property->getSwitch()->sp[i].s == ISS_ON  ? "ON" : "OFF");
}
Beispiel #8
0
String SwitchProperty::getElementLabel(size_t i) {
	CHECK_INDEX_THROWS(
			((ISwitchVectorProperty*) m_property->getProperty())->nsp);

	return String(m_property->getSwitch()->sp[i].label);
}
Beispiel #9
0
String TextProperty::getElementValue( size_t i ) const
{
   ITextVectorProperty* tvp = m_property->getText();
   CHECK_INDEX_THROWS( tvp->ntp );
   return tvp->tp[i].text;
}
Beispiel #10
0
String LightProperty::getElementLabel( size_t i ) const
{
   ILightVectorProperty* lvp = m_property->getLight();
   CHECK_INDEX_THROWS( lvp->nlp );
   return lvp->lp[i].label;
}
Beispiel #11
0
String NumberProperty::getNumberFormat( size_t i ) const
{
   INumberVectorProperty* nvp = m_property->getNumber();
   CHECK_INDEX_THROWS( nvp->nnp );
   return nvp->np[i].format;
}
Beispiel #12
0
String NumberProperty::getElementValue( size_t i ) const
{
   INumberVectorProperty* nvp = m_property->getNumber();
   CHECK_INDEX_THROWS( nvp->nnp );
   return String( nvp->np[i].value ); // ### N.B. All String::String( <number> ) constructors are explicit.
}
Beispiel #13
0
String NumberProperty::getElementLabel( size_t i ) const
{
   INumberVectorProperty* nvp = m_property->getNumber();
   CHECK_INDEX_THROWS( nvp->nnp );
   return nvp->np[i].label;
}
Beispiel #14
0
String SwitchProperty::getElementValue( size_t i ) const
{
   ISwitchVectorProperty* svp = m_property->getSwitch();
   CHECK_INDEX_THROWS( svp->nsp );
   return svp->sp[i].s == ISS_ON  ? "ON" : "OFF";
}
Beispiel #15
0
String SwitchProperty::getElementLabel( size_t i ) const
{
   ISwitchVectorProperty* svp = m_property->getSwitch();
   CHECK_INDEX_THROWS( svp->nsp );
   return svp->sp[i].label;
}