##// END OF EJS Templates
Function added to the plugin to store packets in CSV format.
Function added to the plugin to store packets in CSV format.

File last commit:

r45:bff3fdf42776 default
r55:4ea52012da18 default
Show More
spectrapacket.cpp
33 lines | 678 B | text/x-c | CppLexer
#include "spectrapacket.h"
SpectraPacket::SpectraPacket(QObject *parent, unsigned int size) :
QObject(parent)
{
unsigned int i;
this->nbSamples = size;
//
s11 = (float*) malloc(sizeof(float) * size);
s22 = (float*) malloc(sizeof(float) * size);
s33 = (float*) malloc(sizeof(float) * size);
s44 = (float*) malloc(sizeof(float) * size);
s55 = (float*) malloc(sizeof(float) * size);
for (i=0; i< size; i++)
{
s11[i] = 0.;
s22[i] = 0.;
s33[i] = 0.;
s44[i] = 0.;
s55[i] = 0.;
}
}
SpectraPacket::~SpectraPacket()
{
free(s11);
free(s22);
free(s33);
free(s44);
free(s55);
}