36 #include <sys/types.h>
67 silent_cerr(
"invalid FG data structure "
75 silent_cout(
"Flight Gear options correctly printed on files." << std::endl);
86 std::vector<BufCast *> data(fieldsDescriptionFGInUse->size());
88 size_t minsize = data[data.size() - 1]->offset() + data[data.size() - 1]->size();
89 size_t size = minsize;
96 silent_cerr(
"FlightGearFileDriveReader::buildFGStreamDriveModifier internal error: unknown fieldsDescriptionFGInUse " << std::endl);
107 std::string FGStructureName;
113 if(pMod != 0 && dynamic_cast<const FGNetFDMStreamDriveCopyCast*>(pMod) != 0){
116 FGStructureName =
"NetFDM";
117 }
else if(pMod != 0 && dynamic_cast<const FGNetCtrlsStreamDriveCopyCast*>(pMod) != 0){
120 FGStructureName =
"NetCtrls";
122 silent_cerr(
"error: specified FileDrive does not receive Flight Gear data structure. Please check it out. "
123 "error at line " << HP.
GetLineData() << std::endl);
127 if((s = HP.
IsWord(*FGWordSetInUse)) != NULL){
128 FieldsDescriptionFG::iterator it = fieldsDescriptionFGInUse->find(std::string(s));
129 return it->second.position;
131 silent_cerr(
"FlightGearFileDriveCallerTypeReader: unknown FG field of " << FGStructureName
#define MBDYN_EXCEPT_ARGS
FGNetCtrlsStreamDriveCopyCast(size_t size, const std::vector< BufCast * > &data)
virtual const char * IsWord(const HighParser::WordSet &ws)
void printOptionsOnTextFile(const char *fileName, FieldsDescriptionFG &fieldsDescriptionFG)
void buildFGBufCast(std::vector< BufCast * > &data, FieldsDescriptionFG &fieldsDescriptionFGInUse)
~FGNetCtrlsStreamDriveCopyCast(void)
FGNetCtrlsWordSet fGNetCtrlsWordSet
StreamDrive::Modifier * buildFGStreamDriveModifier(FieldsDescriptionFG *fieldsDescriptionFGInUse)
virtual bool IsKeyWord(const char *sKeyWord)
const StreamDrive::Modifier * pGetModifier(void) const
virtual integer Read(const DataManager *pDM, MBDynParser &HP, FileDrive *pDrv)
FieldsDescriptionFG fieldsDescriptionFGNetCtrls
virtual StreamDrive::Modifier * Read(std::vector< doublereal > &v0, MBDynParser &HP, int &idrives)
static const std::vector< doublereal > v0
FGNetFDMWordSet fGNetFDMWordSet
FieldsDescriptionFG fieldsDescriptionFGNetFDM
virtual HighParser::ErrOut GetLineData(void) const
~FGNetFDMStreamDriveCopyCast(void)
FGNetFDMStreamDriveCopyCast(size_t size, const std::vector< BufCast * > &data)
std::map< std::string, FieldInfo > FieldsDescriptionFG