INET Framework for OMNeT++/OMNEST
inet::physicallayer::Ieee80211ReceptionIndicationDescriptor Class Reference
Inheritance diagram for inet::physicallayer::Ieee80211ReceptionIndicationDescriptor:

Public Member Functions

 Ieee80211ReceptionIndicationDescriptor ()
 
virtual ~Ieee80211ReceptionIndicationDescriptor ()
 
virtual bool doesSupport (omnetpp::cObject *obj) const override
 
virtual const char ** getPropertyNames () const override
 
virtual const char * getProperty (const char *propertyname) const override
 
virtual int getFieldCount () const override
 
virtual const char * getFieldName (int field) const override
 
virtual int findField (const char *fieldName) const override
 
virtual unsigned int getFieldTypeFlags (int field) const override
 
virtual const char * getFieldTypeString (int field) const override
 
virtual const char ** getFieldPropertyNames (int field) const override
 
virtual const char * getFieldProperty (int field, const char *propertyname) const override
 
virtual int getFieldArraySize (void *object, int field) const override
 
virtual const char * getFieldDynamicTypeString (void *object, int field, int i) const override
 
virtual std::string getFieldValueAsString (void *object, int field, int i) const override
 
virtual bool setFieldValueAsString (void *object, int field, int i, const char *value) const override
 
virtual const char * getFieldStructName (int field) const override
 
virtual void * getFieldStructValuePointer (void *object, int field, int i) const override
 

Private Attributes

const char ** propertynames
 

Constructor & Destructor Documentation

inet::physicallayer::Ieee80211ReceptionIndicationDescriptor::Ieee80211ReceptionIndicationDescriptor ( )
inet::physicallayer::Ieee80211ReceptionIndicationDescriptor::~Ieee80211ReceptionIndicationDescriptor ( )
virtual
738 {
739  delete[] propertynames;
740 }
const char ** propertynames
Definition: Ieee80211ControlInfoDescr.cc:705

Member Function Documentation

bool inet::physicallayer::Ieee80211ReceptionIndicationDescriptor::doesSupport ( omnetpp::cObject *  obj) const
overridevirtual
743 {
744  return dynamic_cast<Ieee80211ReceptionIndication *>(obj)!=nullptr;
745 }
int inet::physicallayer::Ieee80211ReceptionIndicationDescriptor::findField ( const char *  fieldName) const
overridevirtual
816 {
817  omnetpp::cClassDescriptor *basedesc = getBaseClassDescriptor();
818  int base = basedesc ? basedesc->getFieldCount() : 0;
819  if (fieldName[0]=='m' && strcmp(fieldName, "mode")==0) return base+0;
820  if (fieldName[0]=='c' && strcmp(fieldName, "channel")==0) return base+1;
821  if (fieldName[0]=='s' && strcmp(fieldName, "snr")==0) return base+2;
822  if (fieldName[0]=='l' && strcmp(fieldName, "lossRate")==0) return base+3;
823  if (fieldName[0]=='r' && strcmp(fieldName, "recPow")==0) return base+4;
824  if (fieldName[0]=='a' && strcmp(fieldName, "airtimeMetric")==0) return base+5;
825  if (fieldName[0]=='t' && strcmp(fieldName, "testFrameDuration")==0) return base+6;
826  if (fieldName[0]=='t' && strcmp(fieldName, "testFrameError")==0) return base+7;
827  if (fieldName[0]=='t' && strcmp(fieldName, "testFrameSize")==0) return base+8;
828  return basedesc ? basedesc->findField(fieldName) : -1;
829 }
int inet::physicallayer::Ieee80211ReceptionIndicationDescriptor::getFieldArraySize ( void *  object,
int  field 
) const
overridevirtual
888 {
889  omnetpp::cClassDescriptor *basedesc = getBaseClassDescriptor();
890  if (basedesc) {
891  if (field < basedesc->getFieldCount())
892  return basedesc->getFieldArraySize(object, field);
893  field -= basedesc->getFieldCount();
894  }
895  Ieee80211ReceptionIndication *pp = (Ieee80211ReceptionIndication *)object; (void)pp;
896  switch (field) {
897  default: return 0;
898  }
899 }
virtual int getFieldCount() const override
Definition: Ieee80211ControlInfoDescr.cc:765
int inet::physicallayer::Ieee80211ReceptionIndicationDescriptor::getFieldCount ( ) const
overridevirtual
766 {
767  omnetpp::cClassDescriptor *basedesc = getBaseClassDescriptor();
768  return basedesc ? 9+basedesc->getFieldCount() : 9;
769 }
const char * inet::physicallayer::Ieee80211ReceptionIndicationDescriptor::getFieldDynamicTypeString ( void *  object,
int  field,
int  i 
) const
overridevirtual
902 {
903  omnetpp::cClassDescriptor *basedesc = getBaseClassDescriptor();
904  if (basedesc) {
905  if (field < basedesc->getFieldCount())
906  return basedesc->getFieldDynamicTypeString(object,field,i);
907  field -= basedesc->getFieldCount();
908  }
909  Ieee80211ReceptionIndication *pp = (Ieee80211ReceptionIndication *)object; (void)pp;
910  switch (field) {
911  default: return nullptr;
912  }
913 }
virtual int getFieldCount() const override
Definition: Ieee80211ControlInfoDescr.cc:765
const char * inet::physicallayer::Ieee80211ReceptionIndicationDescriptor::getFieldName ( int  field) const
overridevirtual
794 {
795  omnetpp::cClassDescriptor *basedesc = getBaseClassDescriptor();
796  if (basedesc) {
797  if (field < basedesc->getFieldCount())
798  return basedesc->getFieldName(field);
799  field -= basedesc->getFieldCount();
800  }
801  static const char *fieldNames[] = {
802  "mode",
803  "channel",
804  "snr",
805  "lossRate",
806  "recPow",
807  "airtimeMetric",
808  "testFrameDuration",
809  "testFrameError",
810  "testFrameSize",
811  };
812  return (field>=0 && field<9) ? fieldNames[field] : nullptr;
813 }
virtual int getFieldCount() const override
Definition: Ieee80211ControlInfoDescr.cc:765
const char * inet::physicallayer::Ieee80211ReceptionIndicationDescriptor::getFieldProperty ( int  field,
const char *  propertyname 
) const
overridevirtual
871 {
872  omnetpp::cClassDescriptor *basedesc = getBaseClassDescriptor();
873  if (basedesc) {
874  if (field < basedesc->getFieldCount())
875  return basedesc->getFieldProperty(field, propertyname);
876  field -= basedesc->getFieldCount();
877  }
878  switch (field) {
879  case 1:
880  if (!strcmp(propertyname,"opaque")) return "";
881  if (!strcmp(propertyname,"tostring")) return "$ ? $->getCompleteStringRepresentation() : std::string(\"<nullptr>\")";
882  return nullptr;
883  default: return nullptr;
884  }
885 }
virtual int getFieldCount() const override
Definition: Ieee80211ControlInfoDescr.cc:765
const char ** inet::physicallayer::Ieee80211ReceptionIndicationDescriptor::getFieldPropertyNames ( int  field) const
overridevirtual
854 {
855  omnetpp::cClassDescriptor *basedesc = getBaseClassDescriptor();
856  if (basedesc) {
857  if (field < basedesc->getFieldCount())
858  return basedesc->getFieldPropertyNames(field);
859  field -= basedesc->getFieldCount();
860  }
861  switch (field) {
862  case 1: {
863  static const char *names[] = { "opaque", "tostring", nullptr };
864  return names;
865  }
866  default: return nullptr;
867  }
868 }
virtual int getFieldCount() const override
Definition: Ieee80211ControlInfoDescr.cc:765
const char * inet::physicallayer::Ieee80211ReceptionIndicationDescriptor::getFieldStructName ( int  field) const
overridevirtual
960 {
961  omnetpp::cClassDescriptor *basedesc = getBaseClassDescriptor();
962  if (basedesc) {
963  if (field < basedesc->getFieldCount())
964  return basedesc->getFieldStructName(field);
965  field -= basedesc->getFieldCount();
966  }
967  switch (field) {
968  case 0: return omnetpp::opp_typename(typeid(IIeee80211Mode));
969  default: return nullptr;
970  };
971 }
virtual int getFieldCount() const override
Definition: Ieee80211ControlInfoDescr.cc:765
void * inet::physicallayer::Ieee80211ReceptionIndicationDescriptor::getFieldStructValuePointer ( void *  object,
int  field,
int  i 
) const
overridevirtual
974 {
975  omnetpp::cClassDescriptor *basedesc = getBaseClassDescriptor();
976  if (basedesc) {
977  if (field < basedesc->getFieldCount())
978  return basedesc->getFieldStructValuePointer(object, field, i);
979  field -= basedesc->getFieldCount();
980  }
981  Ieee80211ReceptionIndication *pp = (Ieee80211ReceptionIndication *)object; (void)pp;
982  switch (field) {
983  case 0: return (void *)static_cast<const omnetpp::cObject *>(pp->getMode()); break;
984  default: return nullptr;
985  }
986 }
virtual int getFieldCount() const override
Definition: Ieee80211ControlInfoDescr.cc:765
unsigned int inet::physicallayer::Ieee80211ReceptionIndicationDescriptor::getFieldTypeFlags ( int  field) const
overridevirtual
772 {
773  omnetpp::cClassDescriptor *basedesc = getBaseClassDescriptor();
774  if (basedesc) {
775  if (field < basedesc->getFieldCount())
776  return basedesc->getFieldTypeFlags(field);
777  field -= basedesc->getFieldCount();
778  }
779  static unsigned int fieldTypeFlags[] = {
780  FD_ISCOMPOUND | FD_ISPOINTER | FD_ISCOBJECT,
781  FD_ISCOMPOUND,
782  FD_ISEDITABLE,
783  FD_ISEDITABLE,
784  FD_ISEDITABLE,
785  FD_ISEDITABLE,
786  FD_ISEDITABLE,
787  FD_ISEDITABLE,
788  FD_ISEDITABLE,
789  };
790  return (field>=0 && field<9) ? fieldTypeFlags[field] : 0;
791 }
virtual int getFieldCount() const override
Definition: Ieee80211ControlInfoDescr.cc:765
const char * inet::physicallayer::Ieee80211ReceptionIndicationDescriptor::getFieldTypeString ( int  field) const
overridevirtual
832 {
833  omnetpp::cClassDescriptor *basedesc = getBaseClassDescriptor();
834  if (basedesc) {
835  if (field < basedesc->getFieldCount())
836  return basedesc->getFieldTypeString(field);
837  field -= basedesc->getFieldCount();
838  }
839  static const char *fieldTypeStrings[] = {
840  "IIeee80211Mode",
841  "Ieee80211ChannelPtr",
842  "double",
843  "double",
844  "double",
845  "bool",
846  "double",
847  "double",
848  "int",
849  };
850  return (field>=0 && field<9) ? fieldTypeStrings[field] : nullptr;
851 }
virtual int getFieldCount() const override
Definition: Ieee80211ControlInfoDescr.cc:765
std::string inet::physicallayer::Ieee80211ReceptionIndicationDescriptor::getFieldValueAsString ( void *  object,
int  field,
int  i 
) const
overridevirtual
916 {
917  omnetpp::cClassDescriptor *basedesc = getBaseClassDescriptor();
918  if (basedesc) {
919  if (field < basedesc->getFieldCount())
920  return basedesc->getFieldValueAsString(object,field,i);
921  field -= basedesc->getFieldCount();
922  }
923  Ieee80211ReceptionIndication *pp = (Ieee80211ReceptionIndication *)object; (void)pp;
924  switch (field) {
925  case 0: {std::stringstream out; out << pp->getMode(); return out.str();}
926  case 1: return pp->getChannel() ? pp->getChannel()->getCompleteStringRepresentation() : std::string("<nullptr>");
927  case 2: return double2string(pp->getSnr());
928  case 3: return double2string(pp->getLossRate());
929  case 4: return double2string(pp->getRecPow());
930  case 5: return bool2string(pp->getAirtimeMetric());
931  case 6: return double2string(pp->getTestFrameDuration());
932  case 7: return double2string(pp->getTestFrameError());
933  case 8: return long2string(pp->getTestFrameSize());
934  default: return "";
935  }
936 }
virtual int getFieldCount() const override
Definition: Ieee80211ControlInfoDescr.cc:765
const char * inet::physicallayer::Ieee80211ReceptionIndicationDescriptor::getProperty ( const char *  propertyname) const
overridevirtual
759 {
760  if (!strcmp(propertyname,"existingClass")) return "";
761  omnetpp::cClassDescriptor *basedesc = getBaseClassDescriptor();
762  return basedesc ? basedesc->getProperty(propertyname) : nullptr;
763 }
const char ** inet::physicallayer::Ieee80211ReceptionIndicationDescriptor::getPropertyNames ( ) const
overridevirtual
748 {
749  if (!propertynames) {
750  static const char *names[] = { "existingClass", nullptr };
751  omnetpp::cClassDescriptor *basedesc = getBaseClassDescriptor();
752  const char **basenames = basedesc ? basedesc->getPropertyNames() : nullptr;
753  propertynames = mergeLists(basenames, names);
754  }
755  return propertynames;
756 }
const char ** propertynames
Definition: Ieee80211ControlInfoDescr.cc:705
bool inet::physicallayer::Ieee80211ReceptionIndicationDescriptor::setFieldValueAsString ( void *  object,
int  field,
int  i,
const char *  value 
) const
overridevirtual
939 {
940  omnetpp::cClassDescriptor *basedesc = getBaseClassDescriptor();
941  if (basedesc) {
942  if (field < basedesc->getFieldCount())
943  return basedesc->setFieldValueAsString(object,field,i,value);
944  field -= basedesc->getFieldCount();
945  }
946  Ieee80211ReceptionIndication *pp = (Ieee80211ReceptionIndication *)object; (void)pp;
947  switch (field) {
948  case 2: pp->setSnr(string2double(value)); return true;
949  case 3: pp->setLossRate(string2double(value)); return true;
950  case 4: pp->setRecPow(string2double(value)); return true;
951  case 5: pp->setAirtimeMetric(string2bool(value)); return true;
952  case 6: pp->setTestFrameDuration(string2double(value)); return true;
953  case 7: pp->setTestFrameError(string2double(value)); return true;
954  case 8: pp->setTestFrameSize(string2long(value)); return true;
955  default: return false;
956  }
957 }
virtual int getFieldCount() const override
Definition: Ieee80211ControlInfoDescr.cc:765

Member Data Documentation

const char** inet::physicallayer::Ieee80211ReceptionIndicationDescriptor::propertynames
mutableprivate

The documentation for this class was generated from the following file: