Serial Studio 1.1.6
A dashboard software for your embedded projects
CSV::Export Class Reference

#include <Export.h>

Inheritance diagram for CSV::Export:
Inheritance graph
Collaboration diagram for CSV::Export:
Collaboration graph

Public Slots

void closeFile ()
 
void openCurrentCsv ()
 
void setExportEnabled (const bool enabled)
 

Signals

void openChanged ()
 
void enabledChanged ()
 

Public Member Functions

bool isOpen () const
 
bool exportEnabled () const
 

Static Public Member Functions

static Exportinstance ()
 

Properties

bool isOpen
 
bool exportEnabled
 

Private Slots

void writeValues ()
 
void registerFrame (const QByteArray &data)
 
void createCsvFile (const CSV::RawFrame &frame)
 

Private Member Functions

 Export ()
 
 Export (Export &&)=delete
 
 Export (const Export &)=delete
 
Exportoperator= (Export &&)=delete
 
Exportoperator= (const Export &)=delete
 
 ~Export ()
 

Private Attributes

QFile m_csvFile
 
int m_fieldCount
 
bool m_exportEnabled
 
QTextStream m_textStream
 
QVector< RawFramem_frames
 

Constructor & Destructor Documentation

◆ Export() [1/3]

CSV::Export::Export ( )
explicitprivate

Connect JSON Parser & Serial Manager signals to begin registering JSON dataframes into JSON list.

◆ Export() [2/3]

CSV::Export::Export ( Export &&  )
privatedelete

◆ Export() [3/3]

CSV::Export::Export ( const Export )
privatedelete

◆ ~Export()

CSV::Export::~Export ( )
private

Close file & finnish write-operations before destroying the class

Member Function Documentation

◆ closeFile

void CSV::Export::closeFile ( )
slot

Write all remaining JSON frames & close the CSV file

◆ createCsvFile

void CSV::Export::createCsvFile ( const CSV::RawFrame frame)
privateslot

Creates a new CSV file corresponding to the current project title & field count

◆ enabledChanged

void CSV::Export::enabledChanged ( )
signal

◆ exportEnabled()

bool CSV::Export::exportEnabled ( ) const

Returns true if CSV export is enabled

◆ instance()

CSV::Export & CSV::Export::instance ( )
static

Returns a pointer to the only instance of this class

◆ isOpen()

bool CSV::Export::isOpen ( ) const

Returns true if the CSV output file is open

◆ openChanged

void CSV::Export::openChanged ( )
signal

◆ openCurrentCsv

void CSV::Export::openCurrentCsv ( )
slot

Open the current CSV file in the Explorer/Finder window

◆ operator=() [1/2]

Export & CSV::Export::operator= ( const Export )
privatedelete

◆ operator=() [2/2]

Export & CSV::Export::operator= ( Export &&  )
privatedelete

◆ registerFrame

void CSV::Export::registerFrame ( const QByteArray &  data)
privateslot

Appends the latest data from the device to the output buffer

◆ setExportEnabled

void CSV::Export::setExportEnabled ( const bool  enabled)
slot

Enables or disables data export

◆ writeValues

void CSV::Export::writeValues ( )
privateslot

Creates a CSV file based on the JSON frames contained in the JSON list.

Note
This function is called periodically every 1 second.

Member Data Documentation

◆ m_csvFile

QFile CSV::Export::m_csvFile
private

◆ m_exportEnabled

bool CSV::Export::m_exportEnabled
private

◆ m_fieldCount

int CSV::Export::m_fieldCount
private

◆ m_frames

QVector<RawFrame> CSV::Export::m_frames
private

◆ m_textStream

QTextStream CSV::Export::m_textStream
private

Property Documentation

◆ exportEnabled

bool CSV::Export::exportEnabled
readwrite

◆ isOpen

bool CSV::Export::isOpen
read

The documentation for this class was generated from the following files: