13 #include <vlutil/vlString.h>
15 #include <vl/objClassDesc.h>
16 #include <vl/hlaStateEncoder.h>
19 namespace makVrfVrlinkExtToolkit
21 template <
typename StateRepType>
30 RTI::AttributeHandleValuePairSet* attrs,
31 RTI::AttributeHandle attrHandle)
33 const StateRepType* extSR =
static_cast<const StateRepType*
>(&rep);
34 unsigned srLength = 0;
35 const char* srValue = extSR->getAttributeByHandle(attrHandle, srLength);
36 attrs->add(attrHandle, (
char*)srValue, srLength);
43 RTI::AttributeHandle attrHandle)
45 const StateRepType* extSR =
static_cast<const StateRepType*
>(&stateRep);
46 const StateRepType* extASBR =
static_cast<const StateRepType*
>(&asSeenByRemote);
48 unsigned srLength = 0;
49 unsigned asbrLength = 0;
50 const char* srValue = extSR->getAttributeByHandle(attrHandle, srLength);
51 const char* asbrValue = extASBR->getAttributeByHandle(attrHandle, asbrLength);
53 return (srLength != asbrLength ||
54 memcmp(srValue, asbrValue, srLength) != 0);