Changeset 6205

Show
Ignore:
Timestamp:
01/21/08 16:56:00 (5 years ago)
Author:
balister
Message:

Start adding support for reading binary files.

Location:
components/FileInput/trunk/FileInput
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • components/FileInput/trunk/FileInput/FileInput.cpp

    r6171 r6205  
    168168void FileInput_i::process_data() 
    169169{ 
    170     DEBUG(3, FileInput, "FileInput process_data thread started") 
     170    DEBUG(3, FileInput, "FileInput process_data thread started"); 
     171 
     172    if (fileType == "LE_Binary") 
     173        process_binary_file(); 
     174    else if (fileType == "BE_Binary") 
     175        process_binary_file(); 
     176 
     177    process_text_file(); //default to text file 
     178 
     179    processing_thread->exit(); 
     180 
     181} 
     182 
     183void FileInput_i::process_binary_file() 
     184{ 
     185    DEBUG(3, FileInput, "Process binary data with type: " << fileType); 
     186 
     187     
     188} 
     189 
     190void FileInput_i::process_text_file() 
     191{ 
     192    DEBUG(3, FileInput, "Process text data."); 
    171193 
    172194    // read data from file 
     
    269291    } 
    270292 
    271     processing_thread->exit(); 
    272  
    273293} 
    274294 
  • components/FileInput/trunk/FileInput/FileInput.h

    r6171 r6205  
    6565    
    6666        void process_data(); 
     67        void process_text_file(); 
     68        void process_binary_file(); 
    6769 
    6870        void delay(struct timespec waitTime);