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

Public Member Functions

 Ieee80211ConfigureRadioCommandDescriptor ()
 
virtual ~Ieee80211ConfigureRadioCommandDescriptor ()
 
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::Ieee80211ConfigureRadioCommandDescriptor::Ieee80211ConfigureRadioCommandDescriptor ( )
inet::physicallayer::Ieee80211ConfigureRadioCommandDescriptor::~Ieee80211ConfigureRadioCommandDescriptor ( )
virtual
218 {
219  delete[] propertynames;
220 }
const char ** propertynames
Definition: Ieee80211ControlInfoDescr.cc:185

Member Function Documentation

bool inet::physicallayer::Ieee80211ConfigureRadioCommandDescriptor::doesSupport ( omnetpp::cObject *  obj) const
overridevirtual
223 {
224  return dynamic_cast<Ieee80211ConfigureRadioCommand *>(obj)!=nullptr;
225 }
int inet::physicallayer::Ieee80211ConfigureRadioCommandDescriptor::findField ( const char *  fieldName) const
overridevirtual
290 {
291  omnetpp::cClassDescriptor *basedesc = getBaseClassDescriptor();
292  int base = basedesc ? basedesc->getFieldCount() : 0;
293  if (fieldName[0]=='o' && strcmp(fieldName, "opMode")==0) return base+0;
294  if (fieldName[0]=='m' && strcmp(fieldName, "modeSet")==0) return base+1;
295  if (fieldName[0]=='m' && strcmp(fieldName, "mode")==0) return base+2;
296  if (fieldName[0]=='b' && strcmp(fieldName, "band")==0) return base+3;
297  if (fieldName[0]=='c' && strcmp(fieldName, "channel")==0) return base+4;
298  if (fieldName[0]=='c' && strcmp(fieldName, "channelNumber")==0) return base+5;
299  return basedesc ? basedesc->findField(fieldName) : -1;
300 }
int inet::physicallayer::Ieee80211ConfigureRadioCommandDescriptor::getFieldArraySize ( void *  object,
int  field 
) const
overridevirtual
356 {
357  omnetpp::cClassDescriptor *basedesc = getBaseClassDescriptor();
358  if (basedesc) {
359  if (field < basedesc->getFieldCount())
360  return basedesc->getFieldArraySize(object, field);
361  field -= basedesc->getFieldCount();
362  }
363  Ieee80211ConfigureRadioCommand *pp = (Ieee80211ConfigureRadioCommand *)object; (void)pp;
364  switch (field) {
365  default: return 0;
366  }
367 }
virtual int getFieldCount() const override
Definition: Ieee80211ControlInfoDescr.cc:245
int inet::physicallayer::Ieee80211ConfigureRadioCommandDescriptor::getFieldCount ( ) const
overridevirtual
246 {
247  omnetpp::cClassDescriptor *basedesc = getBaseClassDescriptor();
248  return basedesc ? 6+basedesc->getFieldCount() : 6;
249 }
const char * inet::physicallayer::Ieee80211ConfigureRadioCommandDescriptor::getFieldDynamicTypeString ( void *  object,
int  field,
int  i 
) const
overridevirtual
370 {
371  omnetpp::cClassDescriptor *basedesc = getBaseClassDescriptor();
372  if (basedesc) {
373  if (field < basedesc->getFieldCount())
374  return basedesc->getFieldDynamicTypeString(object,field,i);
375  field -= basedesc->getFieldCount();
376  }
377  Ieee80211ConfigureRadioCommand *pp = (Ieee80211ConfigureRadioCommand *)object; (void)pp;
378  switch (field) {
379  default: return nullptr;
380  }
381 }
virtual int getFieldCount() const override
Definition: Ieee80211ControlInfoDescr.cc:245
const char * inet::physicallayer::Ieee80211ConfigureRadioCommandDescriptor::getFieldName ( int  field) const
overridevirtual
271 {
272  omnetpp::cClassDescriptor *basedesc = getBaseClassDescriptor();
273  if (basedesc) {
274  if (field < basedesc->getFieldCount())
275  return basedesc->getFieldName(field);
276  field -= basedesc->getFieldCount();
277  }
278  static const char *fieldNames[] = {
279  "opMode",
280  "modeSet",
281  "mode",
282  "band",
283  "channel",
284  "channelNumber",
285  };
286  return (field>=0 && field<6) ? fieldNames[field] : nullptr;
287 }
virtual int getFieldCount() const override
Definition: Ieee80211ControlInfoDescr.cc:245
const char * inet::physicallayer::Ieee80211ConfigureRadioCommandDescriptor::getFieldProperty ( int  field,
const char *  propertyname 
) const
overridevirtual
339 {
340  omnetpp::cClassDescriptor *basedesc = getBaseClassDescriptor();
341  if (basedesc) {
342  if (field < basedesc->getFieldCount())
343  return basedesc->getFieldProperty(field, propertyname);
344  field -= basedesc->getFieldCount();
345  }
346  switch (field) {
347  case 4:
348  if (!strcmp(propertyname,"opaque")) return "";
349  if (!strcmp(propertyname,"tostring")) return "$ ? $->getCompleteStringRepresentation() : std::string(\"<nullptr>\")";
350  return nullptr;
351  default: return nullptr;
352  }
353 }
virtual int getFieldCount() const override
Definition: Ieee80211ControlInfoDescr.cc:245
const char ** inet::physicallayer::Ieee80211ConfigureRadioCommandDescriptor::getFieldPropertyNames ( int  field) const
overridevirtual
322 {
323  omnetpp::cClassDescriptor *basedesc = getBaseClassDescriptor();
324  if (basedesc) {
325  if (field < basedesc->getFieldCount())
326  return basedesc->getFieldPropertyNames(field);
327  field -= basedesc->getFieldCount();
328  }
329  switch (field) {
330  case 4: {
331  static const char *names[] = { "opaque", "tostring", nullptr };
332  return names;
333  }
334  default: return nullptr;
335  }
336 }
virtual int getFieldCount() const override
Definition: Ieee80211ControlInfoDescr.cc:245
const char * inet::physicallayer::Ieee80211ConfigureRadioCommandDescriptor::getFieldStructName ( int  field) const
overridevirtual
420 {
421  omnetpp::cClassDescriptor *basedesc = getBaseClassDescriptor();
422  if (basedesc) {
423  if (field < basedesc->getFieldCount())
424  return basedesc->getFieldStructName(field);
425  field -= basedesc->getFieldCount();
426  }
427  switch (field) {
428  case 1: return omnetpp::opp_typename(typeid(Ieee80211ModeSet));
429  case 2: return omnetpp::opp_typename(typeid(IIeee80211Mode));
430  case 3: return omnetpp::opp_typename(typeid(IIeee80211Band));
431  default: return nullptr;
432  };
433 }
virtual int getFieldCount() const override
Definition: Ieee80211ControlInfoDescr.cc:245
void * inet::physicallayer::Ieee80211ConfigureRadioCommandDescriptor::getFieldStructValuePointer ( void *  object,
int  field,
int  i 
) const
overridevirtual
436 {
437  omnetpp::cClassDescriptor *basedesc = getBaseClassDescriptor();
438  if (basedesc) {
439  if (field < basedesc->getFieldCount())
440  return basedesc->getFieldStructValuePointer(object, field, i);
441  field -= basedesc->getFieldCount();
442  }
443  Ieee80211ConfigureRadioCommand *pp = (Ieee80211ConfigureRadioCommand *)object; (void)pp;
444  switch (field) {
445  case 1: return (void *)static_cast<const omnetpp::cObject *>(pp->getModeSet()); break;
446  case 2: return (void *)static_cast<const omnetpp::cObject *>(pp->getMode()); break;
447  case 3: return (void *)static_cast<const omnetpp::cObject *>(pp->getBand()); break;
448  default: return nullptr;
449  }
450 }
virtual int getFieldCount() const override
Definition: Ieee80211ControlInfoDescr.cc:245
unsigned int inet::physicallayer::Ieee80211ConfigureRadioCommandDescriptor::getFieldTypeFlags ( int  field) const
overridevirtual
252 {
253  omnetpp::cClassDescriptor *basedesc = getBaseClassDescriptor();
254  if (basedesc) {
255  if (field < basedesc->getFieldCount())
256  return basedesc->getFieldTypeFlags(field);
257  field -= basedesc->getFieldCount();
258  }
259  static unsigned int fieldTypeFlags[] = {
260  FD_ISEDITABLE,
261  FD_ISCOMPOUND | FD_ISPOINTER | FD_ISCOBJECT,
262  FD_ISCOMPOUND | FD_ISPOINTER | FD_ISCOBJECT,
263  FD_ISCOMPOUND | FD_ISPOINTER | FD_ISCOBJECT,
264  FD_ISCOMPOUND,
265  FD_ISEDITABLE,
266  };
267  return (field>=0 && field<6) ? fieldTypeFlags[field] : 0;
268 }
virtual int getFieldCount() const override
Definition: Ieee80211ControlInfoDescr.cc:245
const char * inet::physicallayer::Ieee80211ConfigureRadioCommandDescriptor::getFieldTypeString ( int  field) const
overridevirtual
303 {
304  omnetpp::cClassDescriptor *basedesc = getBaseClassDescriptor();
305  if (basedesc) {
306  if (field < basedesc->getFieldCount())
307  return basedesc->getFieldTypeString(field);
308  field -= basedesc->getFieldCount();
309  }
310  static const char *fieldTypeStrings[] = {
311  "string",
312  "Ieee80211ModeSet",
313  "IIeee80211Mode",
314  "IIeee80211Band",
315  "Ieee80211ChannelPtr",
316  "int",
317  };
318  return (field>=0 && field<6) ? fieldTypeStrings[field] : nullptr;
319 }
virtual int getFieldCount() const override
Definition: Ieee80211ControlInfoDescr.cc:245
std::string inet::physicallayer::Ieee80211ConfigureRadioCommandDescriptor::getFieldValueAsString ( void *  object,
int  field,
int  i 
) const
overridevirtual
384 {
385  omnetpp::cClassDescriptor *basedesc = getBaseClassDescriptor();
386  if (basedesc) {
387  if (field < basedesc->getFieldCount())
388  return basedesc->getFieldValueAsString(object,field,i);
389  field -= basedesc->getFieldCount();
390  }
391  Ieee80211ConfigureRadioCommand *pp = (Ieee80211ConfigureRadioCommand *)object; (void)pp;
392  switch (field) {
393  case 0: return oppstring2string(pp->getOpMode());
394  case 1: {std::stringstream out; out << pp->getModeSet(); return out.str();}
395  case 2: {std::stringstream out; out << pp->getMode(); return out.str();}
396  case 3: {std::stringstream out; out << pp->getBand(); return out.str();}
397  case 4: return pp->getChannel() ? pp->getChannel()->getCompleteStringRepresentation() : std::string("<nullptr>");
398  case 5: return long2string(pp->getChannelNumber());
399  default: return "";
400  }
401 }
virtual int getFieldCount() const override
Definition: Ieee80211ControlInfoDescr.cc:245
const char * inet::physicallayer::Ieee80211ConfigureRadioCommandDescriptor::getProperty ( const char *  propertyname) const
overridevirtual
239 {
240  if (!strcmp(propertyname,"existingClass")) return "";
241  omnetpp::cClassDescriptor *basedesc = getBaseClassDescriptor();
242  return basedesc ? basedesc->getProperty(propertyname) : nullptr;
243 }
const char ** inet::physicallayer::Ieee80211ConfigureRadioCommandDescriptor::getPropertyNames ( ) const
overridevirtual
228 {
229  if (!propertynames) {
230  static const char *names[] = { "existingClass", nullptr };
231  omnetpp::cClassDescriptor *basedesc = getBaseClassDescriptor();
232  const char **basenames = basedesc ? basedesc->getPropertyNames() : nullptr;
233  propertynames = mergeLists(basenames, names);
234  }
235  return propertynames;
236 }
const char ** propertynames
Definition: Ieee80211ControlInfoDescr.cc:185
bool inet::physicallayer::Ieee80211ConfigureRadioCommandDescriptor::setFieldValueAsString ( void *  object,
int  field,
int  i,
const char *  value 
) const
overridevirtual
404 {
405  omnetpp::cClassDescriptor *basedesc = getBaseClassDescriptor();
406  if (basedesc) {
407  if (field < basedesc->getFieldCount())
408  return basedesc->setFieldValueAsString(object,field,i,value);
409  field -= basedesc->getFieldCount();
410  }
411  Ieee80211ConfigureRadioCommand *pp = (Ieee80211ConfigureRadioCommand *)object; (void)pp;
412  switch (field) {
413  case 0: pp->setOpMode((value)); return true;
414  case 5: pp->setChannelNumber(string2long(value)); return true;
415  default: return false;
416  }
417 }
virtual int getFieldCount() const override
Definition: Ieee80211ControlInfoDescr.cc:245

Member Data Documentation

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

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