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

Public Member Functions

 Ieee80211TransmissionRequestDescriptor ()
 
virtual ~Ieee80211TransmissionRequestDescriptor ()
 
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::Ieee80211TransmissionRequestDescriptor::Ieee80211TransmissionRequestDescriptor ( )
inet::physicallayer::Ieee80211TransmissionRequestDescriptor::~Ieee80211TransmissionRequestDescriptor ( )
virtual
488 {
489  delete[] propertynames;
490 }
const char ** propertynames
Definition: Ieee80211ControlInfoDescr.cc:455

Member Function Documentation

bool inet::physicallayer::Ieee80211TransmissionRequestDescriptor::doesSupport ( omnetpp::cObject *  obj) const
overridevirtual
493 {
494  return dynamic_cast<Ieee80211TransmissionRequest *>(obj)!=nullptr;
495 }
int inet::physicallayer::Ieee80211TransmissionRequestDescriptor::findField ( const char *  fieldName) const
overridevirtual
554 {
555  omnetpp::cClassDescriptor *basedesc = getBaseClassDescriptor();
556  int base = basedesc ? basedesc->getFieldCount() : 0;
557  if (fieldName[0]=='m' && strcmp(fieldName, "mode")==0) return base+0;
558  if (fieldName[0]=='c' && strcmp(fieldName, "channelNumber")==0) return base+1;
559  if (fieldName[0]=='c' && strcmp(fieldName, "channel")==0) return base+2;
560  return basedesc ? basedesc->findField(fieldName) : -1;
561 }
int inet::physicallayer::Ieee80211TransmissionRequestDescriptor::getFieldArraySize ( void *  object,
int  field 
) const
overridevirtual
614 {
615  omnetpp::cClassDescriptor *basedesc = getBaseClassDescriptor();
616  if (basedesc) {
617  if (field < basedesc->getFieldCount())
618  return basedesc->getFieldArraySize(object, field);
619  field -= basedesc->getFieldCount();
620  }
621  Ieee80211TransmissionRequest *pp = (Ieee80211TransmissionRequest *)object; (void)pp;
622  switch (field) {
623  default: return 0;
624  }
625 }
virtual int getFieldCount() const override
Definition: Ieee80211ControlInfoDescr.cc:515
int inet::physicallayer::Ieee80211TransmissionRequestDescriptor::getFieldCount ( ) const
overridevirtual
516 {
517  omnetpp::cClassDescriptor *basedesc = getBaseClassDescriptor();
518  return basedesc ? 3+basedesc->getFieldCount() : 3;
519 }
const char * inet::physicallayer::Ieee80211TransmissionRequestDescriptor::getFieldDynamicTypeString ( void *  object,
int  field,
int  i 
) const
overridevirtual
628 {
629  omnetpp::cClassDescriptor *basedesc = getBaseClassDescriptor();
630  if (basedesc) {
631  if (field < basedesc->getFieldCount())
632  return basedesc->getFieldDynamicTypeString(object,field,i);
633  field -= basedesc->getFieldCount();
634  }
635  Ieee80211TransmissionRequest *pp = (Ieee80211TransmissionRequest *)object; (void)pp;
636  switch (field) {
637  default: return nullptr;
638  }
639 }
virtual int getFieldCount() const override
Definition: Ieee80211ControlInfoDescr.cc:515
const char * inet::physicallayer::Ieee80211TransmissionRequestDescriptor::getFieldName ( int  field) const
overridevirtual
538 {
539  omnetpp::cClassDescriptor *basedesc = getBaseClassDescriptor();
540  if (basedesc) {
541  if (field < basedesc->getFieldCount())
542  return basedesc->getFieldName(field);
543  field -= basedesc->getFieldCount();
544  }
545  static const char *fieldNames[] = {
546  "mode",
547  "channelNumber",
548  "channel",
549  };
550  return (field>=0 && field<3) ? fieldNames[field] : nullptr;
551 }
virtual int getFieldCount() const override
Definition: Ieee80211ControlInfoDescr.cc:515
const char * inet::physicallayer::Ieee80211TransmissionRequestDescriptor::getFieldProperty ( int  field,
const char *  propertyname 
) const
overridevirtual
597 {
598  omnetpp::cClassDescriptor *basedesc = getBaseClassDescriptor();
599  if (basedesc) {
600  if (field < basedesc->getFieldCount())
601  return basedesc->getFieldProperty(field, propertyname);
602  field -= basedesc->getFieldCount();
603  }
604  switch (field) {
605  case 2:
606  if (!strcmp(propertyname,"opaque")) return "";
607  if (!strcmp(propertyname,"tostring")) return "$ ? $->getCompleteStringRepresentation() : std::string(\"<nullptr>\")";
608  return nullptr;
609  default: return nullptr;
610  }
611 }
virtual int getFieldCount() const override
Definition: Ieee80211ControlInfoDescr.cc:515
const char ** inet::physicallayer::Ieee80211TransmissionRequestDescriptor::getFieldPropertyNames ( int  field) const
overridevirtual
580 {
581  omnetpp::cClassDescriptor *basedesc = getBaseClassDescriptor();
582  if (basedesc) {
583  if (field < basedesc->getFieldCount())
584  return basedesc->getFieldPropertyNames(field);
585  field -= basedesc->getFieldCount();
586  }
587  switch (field) {
588  case 2: {
589  static const char *names[] = { "opaque", "tostring", nullptr };
590  return names;
591  }
592  default: return nullptr;
593  }
594 }
virtual int getFieldCount() const override
Definition: Ieee80211ControlInfoDescr.cc:515
const char * inet::physicallayer::Ieee80211TransmissionRequestDescriptor::getFieldStructName ( int  field) const
overridevirtual
674 {
675  omnetpp::cClassDescriptor *basedesc = getBaseClassDescriptor();
676  if (basedesc) {
677  if (field < basedesc->getFieldCount())
678  return basedesc->getFieldStructName(field);
679  field -= basedesc->getFieldCount();
680  }
681  switch (field) {
682  case 0: return omnetpp::opp_typename(typeid(IIeee80211Mode));
683  default: return nullptr;
684  };
685 }
virtual int getFieldCount() const override
Definition: Ieee80211ControlInfoDescr.cc:515
void * inet::physicallayer::Ieee80211TransmissionRequestDescriptor::getFieldStructValuePointer ( void *  object,
int  field,
int  i 
) const
overridevirtual
688 {
689  omnetpp::cClassDescriptor *basedesc = getBaseClassDescriptor();
690  if (basedesc) {
691  if (field < basedesc->getFieldCount())
692  return basedesc->getFieldStructValuePointer(object, field, i);
693  field -= basedesc->getFieldCount();
694  }
695  Ieee80211TransmissionRequest *pp = (Ieee80211TransmissionRequest *)object; (void)pp;
696  switch (field) {
697  case 0: return (void *)static_cast<const omnetpp::cObject *>(pp->getMode()); break;
698  default: return nullptr;
699  }
700 }
virtual int getFieldCount() const override
Definition: Ieee80211ControlInfoDescr.cc:515
unsigned int inet::physicallayer::Ieee80211TransmissionRequestDescriptor::getFieldTypeFlags ( int  field) const
overridevirtual
522 {
523  omnetpp::cClassDescriptor *basedesc = getBaseClassDescriptor();
524  if (basedesc) {
525  if (field < basedesc->getFieldCount())
526  return basedesc->getFieldTypeFlags(field);
527  field -= basedesc->getFieldCount();
528  }
529  static unsigned int fieldTypeFlags[] = {
530  FD_ISCOMPOUND | FD_ISPOINTER | FD_ISCOBJECT,
531  FD_ISEDITABLE,
532  FD_ISCOMPOUND,
533  };
534  return (field>=0 && field<3) ? fieldTypeFlags[field] : 0;
535 }
virtual int getFieldCount() const override
Definition: Ieee80211ControlInfoDescr.cc:515
const char * inet::physicallayer::Ieee80211TransmissionRequestDescriptor::getFieldTypeString ( int  field) const
overridevirtual
564 {
565  omnetpp::cClassDescriptor *basedesc = getBaseClassDescriptor();
566  if (basedesc) {
567  if (field < basedesc->getFieldCount())
568  return basedesc->getFieldTypeString(field);
569  field -= basedesc->getFieldCount();
570  }
571  static const char *fieldTypeStrings[] = {
572  "IIeee80211Mode",
573  "int",
574  "Ieee80211ChannelPtr",
575  };
576  return (field>=0 && field<3) ? fieldTypeStrings[field] : nullptr;
577 }
virtual int getFieldCount() const override
Definition: Ieee80211ControlInfoDescr.cc:515
std::string inet::physicallayer::Ieee80211TransmissionRequestDescriptor::getFieldValueAsString ( void *  object,
int  field,
int  i 
) const
overridevirtual
642 {
643  omnetpp::cClassDescriptor *basedesc = getBaseClassDescriptor();
644  if (basedesc) {
645  if (field < basedesc->getFieldCount())
646  return basedesc->getFieldValueAsString(object,field,i);
647  field -= basedesc->getFieldCount();
648  }
649  Ieee80211TransmissionRequest *pp = (Ieee80211TransmissionRequest *)object; (void)pp;
650  switch (field) {
651  case 0: {std::stringstream out; out << pp->getMode(); return out.str();}
652  case 1: return long2string(pp->getChannelNumber());
653  case 2: return pp->getChannel() ? pp->getChannel()->getCompleteStringRepresentation() : std::string("<nullptr>");
654  default: return "";
655  }
656 }
virtual int getFieldCount() const override
Definition: Ieee80211ControlInfoDescr.cc:515
const char * inet::physicallayer::Ieee80211TransmissionRequestDescriptor::getProperty ( const char *  propertyname) const
overridevirtual
509 {
510  if (!strcmp(propertyname,"existingClass")) return "";
511  omnetpp::cClassDescriptor *basedesc = getBaseClassDescriptor();
512  return basedesc ? basedesc->getProperty(propertyname) : nullptr;
513 }
const char ** inet::physicallayer::Ieee80211TransmissionRequestDescriptor::getPropertyNames ( ) const
overridevirtual
498 {
499  if (!propertynames) {
500  static const char *names[] = { "existingClass", nullptr };
501  omnetpp::cClassDescriptor *basedesc = getBaseClassDescriptor();
502  const char **basenames = basedesc ? basedesc->getPropertyNames() : nullptr;
503  propertynames = mergeLists(basenames, names);
504  }
505  return propertynames;
506 }
const char ** propertynames
Definition: Ieee80211ControlInfoDescr.cc:455
bool inet::physicallayer::Ieee80211TransmissionRequestDescriptor::setFieldValueAsString ( void *  object,
int  field,
int  i,
const char *  value 
) const
overridevirtual
659 {
660  omnetpp::cClassDescriptor *basedesc = getBaseClassDescriptor();
661  if (basedesc) {
662  if (field < basedesc->getFieldCount())
663  return basedesc->setFieldValueAsString(object,field,i,value);
664  field -= basedesc->getFieldCount();
665  }
666  Ieee80211TransmissionRequest *pp = (Ieee80211TransmissionRequest *)object; (void)pp;
667  switch (field) {
668  case 1: pp->setChannelNumber(string2long(value)); return true;
669  default: return false;
670  }
671 }
virtual int getFieldCount() const override
Definition: Ieee80211ControlInfoDescr.cc:515

Member Data Documentation

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

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