binary master attributes done, hdf5 WIP

This commit is contained in:
2020-07-31 13:59:06 +02:00
parent 68c0f76bd9
commit ea2e7839d0
5 changed files with 75 additions and 66 deletions

View File

@@ -166,17 +166,8 @@ void BinaryFile::CreateMasterFile(bool masterFileWriteEnable,
"(with overwrite enable) " +
masterFileName);
}
// create master file data
std::string strAttributes = attr->GetBinaryMasterAttributes();
char message[maxMasterFileSize];
memset(message, 0, maxMasterFileSize);
sls::strcpy_safe(message, strAttributes.c_str());
// write and close file
if (fwrite((void *)message, 1, strlen(message), masterfd) !=
strlen(message)) {
throw sls::RuntimeError(
"Master binary file incorrect number of bytes written to file");
}
attr->WriteMasterBinaryAttributes(masterfd);
if (masterfd)
fclose(masterfd);
masterfd = nullptr;