vehicleEnc encodes vehicle objects.
#if DtHLA
#ifndef VehicleEncoder_H_
#define VehicleEncoder_H_
#define DtDECLARE_TEST_ATTR_CHECKER(attrName) \
DtDECLARE_ATTR_CHECKER(DtEntityStateRepository, attrName)
#define DtDECLARE_TEST_ATTR_ENCODER(attrName) \
DtDECLARE_ATTR_ENCODER(DtEntityStateRepository, attrName)
{
public:
virtual ~VehicleEncoder();
protected:
DtDECLARE_TEST_ATTR_ENCODER(VehicleType);
DtDECLARE_TEST_ATTR_ENCODER(GeocLoc);
DtDECLARE_TEST_ATTR_CHECKER(VehicleType);
DtDECLARE_TEST_ATTR_CHECKER(GeocLoc);
};
#endif
#endif
#if DtHLA
VehicleEncoder::VehicleEncoder(
DtObjClassDesc* classDesc) :
DtHlaStateEncoder(exConn, classDesc)
{
DtADD_ATTR_ENCODER(VehicleType);
DtADD_ATTR_ENCODER(GeocLoc);
DtADD_ATTR_CHECKER(VehicleType);
DtADD_ATTR_CHECKER(GeocLoc);
}
VehicleEncoder::~VehicleEncoder()
{
}
bool VehicleEncoder::needVehicleType(
{
}
bool VehicleEncoder::needGeocLoc(
{
}
RTI::AttributeHandleValuePairSet* attrs,
RTI::AttributeHandle attrHandle)
{
{
netVal = 0;
}
{
netVal = 1;
}
attrs->add(attrHandle, (char*) &netVal, sizeof(netVal));
}
RTI::AttributeHandleValuePairSet* attrs,
RTI::AttributeHandle attrHandle)
{
attrs->add(attrHandle, (char*) &netVal, sizeof(netVal));
}
#endif