25         BufferLogger& bufferLogger
 
   27       bufferLogger(bufferLogger),
 
   49   void BufferLogger::File ::
 
   51         const char *
const logFilePrefix,
 
   52         const char *
const logFileSuffix,
 
   53         const U32 maxFileSize,
 
   60       this->prefix = logFilePrefix;
 
   61       this->suffix = logFileSuffix;
 
   62       this->maxSize = maxFileSize;
 
   63       this->sizeOfSize = sizeOfSize;
 
   65       FW_ASSERT(sizeOfSize <= 
sizeof(U32), sizeOfSize);
 
   69   void BufferLogger::File ::
 
   75           this->closeAndEmitEvent();
 
   77       this->baseName = baseName;
 
   78       this->fileCounter = 0;
 
   82   void BufferLogger::File ::
 
   90       const U32 projectedByteCount =
 
   91         this->bytesWritten + this->sizeOfSize + size;
 
   92       if (projectedByteCount > this->maxSize) {
 
   93         this->closeAndEmitEvent();
 
  102       (void) this->writeBuffer(data, size);
 
  106   void BufferLogger::File ::
 
  112       this->bufferLogger.log_DIAGNOSTIC_BL_LogFileClosed(logStringArg);
 
  120   void BufferLogger::File ::
 
  126     if ((this->baseName.
toChar()[0] == 
'\0') ||
 
  127         (this->sizeOfSize > 
sizeof(U32)) ||
 
  128         (this->maxSize <= this->sizeOfSize)) {
 
  129         this->bufferLogger.log_WARNING_HI_BL_NoLogFileOpenInitError();
 
  133     if (this->fileCounter == 0) {
 
  136             this->prefix.toChar(),
 
  137             this->baseName.toChar(),
 
  138             this->suffix.toChar()
 
  144             this->prefix.toChar(),
 
  145             this->baseName.toChar(),
 
  147             this->suffix.toChar()
 
  158       this->bytesWritten = 0;
 
  164       this->bufferLogger.log_WARNING_HI_BL_LogFileOpenError(status, 
string);
 
  168   bool BufferLogger::File ::
 
  170         const U8 *
const data,
 
  174     bool status = this->writeSize(size);
 
  176       status = this->writeBytes(data, size);
 
  181   bool BufferLogger::File ::
 
  182     writeSize(
const U32 size)
 
  184     FW_ASSERT(this->sizeOfSize <= 
sizeof(U32));
 
  185     U8 sizeBuffer[
sizeof(U32)];
 
  186     U32 sizeRegister = size;
 
  187     for (
U8 i = 0; i < this->sizeOfSize; ++i) {
 
  188       sizeBuffer[this->sizeOfSize - i - 1] = sizeRegister & 0xFF;
 
  191     const bool status = this->writeBytes(
 
  198   bool BufferLogger::File ::
 
  200         const void *
const data,
 
  209       this->bytesWritten += length;
 
  215       this->bufferLogger.log_WARNING_HI_BL_LogFileWriteError(fileStatus, size, length, 
string);
 
  221   void BufferLogger::File ::
 
  226       validatedFile.createHashFile();
 
  228       const Fw::String &hashFileName = validatedFile.getHashFileName();
 
  230       this->bufferLogger.log_WARNING_HI_BL_LogFileValidationError(
 
  237   bool BufferLogger::File ::
 
  258   void BufferLogger::File ::
 
  263       this->osFile.close();
 
  265       this->writeHashFile();