#include <DataSample.h>
Public Member Functions | |
DataSample (const JString &type="Raw", const JString &samplename="") | |
DataSample (XMLNode *node) | |
virtual | ~DataSample () |
virtual Object * | clone () const |
virtual DataSample * | cloneWithoutData () |
virtual unsigned long | getPayloadSize () const |
Get total size of payload. | |
virtual JString | print () |
virtual bool | unitTest () |
virtual JString | toHTML () |
virtual HTMLPage * | toHTMLBitmap () |
virtual JString | toXML () |
virtual bool | fromXML (XMLNode *node) |
JString | getType () |
bool | setType (const JString &type) |
bool | isInUse () |
bool | isLocked () |
bool | setInUseBy (const JString &user, int timeout=0) |
bool | removeInUseBy (const JString &user) |
bool | lockBy (const JString &locker) |
bool | setTimestamp (const JTime &time) |
bool | setParameters (Dictionary &dict) |
bool | setDuration (long durationMS) |
bool | giveData (char *sampledata, long datasize, long durationMS=0) |
bool | setDataCopy (char *sampledata, long datasize, long durationMS=0) |
bool | setDataLink (char *sampledata, long datasize, long durationMS=0) |
JString | getName () |
JTime | getTimestamp () |
JTime | getStartTime () |
JTime | getEndTime () |
long | getDuration () |
Dictionary | getAllParameters () |
long | getDataSize () |
long | getDataMemUse () |
char * | getDataCopy () |
char * | getDataLink () |
bool | clearDataFields () |
bool | equals (const Object *o2) const |
bool | equals (const DataSample &s2) const |
int | compare (const Object *o2) const |
int | compareTo (const DataSample &s2) const |
JString | getParam (const JString ¶m) |
int | getParamInt (const JString ¶m) |
double | getParamFloat (const JString ¶m) |
bool | setParam (const JString ¶m, const JString &value) |
bool | setParamInt (const JString ¶m, int value) |
bool | setParamFloat (const JString ¶m, double value) |
int | getWidth () |
int | getHeight () |
bool | setWidth (int w) |
bool | setHeight (int h) |
Object * | getObject () |
bool | setObject (Object *obj) |
bool | readFromFile (const JString &filename) |
bool | writeToFile (const JString &filename) |
long | getBinarySize (int chunk) |
Get the size of binary data chunk, -1 for all chunks. | |
int | getBinaryChunkCount () |
Get the number of data chunks. | |
char * | getBinaryDataPointer (int chunk) |
Get a pointer to the binary data at chunk number 'chunk'. | |
bool | setBinaryChunk (int chunk, long binsize, char *data) |
Set the data after separate reception. | |
long | toBinaryBuffer (int chunk, char *buffer, int maxlen) |
Write binary data to buffer at chunk number 'chunk'. | |
bool | fromBinaryBuffer (int chunk, char *buffer, long len) |
Set the data after separate reception. | |
long | getLongFromBytes (char *buffer) |
bool | writeLongToBytes (char *buffer, long val) |
bool | markForDeletion () |
bool | isMarkedForDeletion () |
Public Attributes | |
JString | id |
JString | name |
JString | type |
JTime | timestamp |
Dictionary | params |
char * | data |
char * | link |
long | size |
long | duration |
int | width |
int | height |
bool | markedForDeletion |
double | sortfield |
ObjectDictionary * | channels |
Object * | object |
Object * | aux |
Protected Attributes | |
ObjectDictionary | users |
JString | lockedBy |
Definition at line 46 of file DataSample.h.
Definition at line 34 of file DataSample.cpp.
cmlabs::DataSample::DataSample | ( | XMLNode * | node | ) |
Definition at line 49 of file DataSample.cpp.
cmlabs::DataSample::~DataSample | ( | ) | [virtual] |
Definition at line 63 of file DataSample.cpp.
Object * cmlabs::DataSample::clone | ( | ) | const [virtual] |
Implements cmlabs::Object.
Reimplemented in cmlabs::Bitmap.
Definition at line 129 of file DataSample.cpp.
DataSample * cmlabs::DataSample::cloneWithoutData | ( | ) | [virtual] |
Definition at line 147 of file DataSample.cpp.
unsigned long cmlabs::DataSample::getPayloadSize | ( | ) | const [virtual] |
Get total size of payload.
Reimplemented from cmlabs::Object.
Definition at line 118 of file DataSample.cpp.
JString cmlabs::DataSample::print | ( | ) | [virtual] |
bool cmlabs::DataSample::unitTest | ( | ) | [virtual] |
JString cmlabs::DataSample::toHTML | ( | ) | [virtual] |
Reimplemented from cmlabs::Object.
Reimplemented in cmlabs::Bitmap.
Definition at line 643 of file DataSample.cpp.
HTMLPage * cmlabs::DataSample::toHTMLBitmap | ( | ) | [virtual] |
Reimplemented in cmlabs::Bitmap, and cmlabs::BitmapUpdate.
Definition at line 639 of file DataSample.cpp.
JString cmlabs::DataSample::toXML | ( | ) | [virtual] |
Reimplemented from cmlabs::Object.
Reimplemented in cmlabs::Bitmap.
Definition at line 648 of file DataSample.cpp.
bool cmlabs::DataSample::fromXML | ( | XMLNode * | node | ) | [virtual] |
Reimplemented from cmlabs::Object.
Reimplemented in cmlabs::Bitmap.
Definition at line 654 of file DataSample.cpp.
JString cmlabs::DataSample::getType | ( | ) |
Definition at line 108 of file DataSample.cpp.
bool cmlabs::DataSample::setType | ( | const JString & | type | ) |
Definition at line 112 of file DataSample.cpp.
bool cmlabs::DataSample::isInUse | ( | ) |
Definition at line 187 of file DataSample.cpp.
bool cmlabs::DataSample::isLocked | ( | ) |
Definition at line 176 of file DataSample.cpp.
bool cmlabs::DataSample::setInUseBy | ( | const JString & | user, | |
int | timeout = 0 | |||
) |
Definition at line 216 of file DataSample.cpp.
bool cmlabs::DataSample::removeInUseBy | ( | const JString & | user | ) |
Definition at line 229 of file DataSample.cpp.
bool cmlabs::DataSample::lockBy | ( | const JString & | locker | ) |
Definition at line 180 of file DataSample.cpp.
bool cmlabs::DataSample::setTimestamp | ( | const JTime & | time | ) |
Definition at line 320 of file DataSample.cpp.
bool cmlabs::DataSample::setParameters | ( | Dictionary & | dict | ) |
Definition at line 325 of file DataSample.cpp.
bool cmlabs::DataSample::setDuration | ( | long | durationMS | ) |
Definition at line 385 of file DataSample.cpp.
bool cmlabs::DataSample::giveData | ( | char * | sampledata, | |
long | datasize, | |||
long | durationMS = 0 | |||
) |
Definition at line 329 of file DataSample.cpp.
bool cmlabs::DataSample::setDataCopy | ( | char * | sampledata, | |
long | datasize, | |||
long | durationMS = 0 | |||
) |
Definition at line 347 of file DataSample.cpp.
bool cmlabs::DataSample::setDataLink | ( | char * | sampledata, | |
long | datasize, | |||
long | durationMS = 0 | |||
) |
Definition at line 363 of file DataSample.cpp.
JString cmlabs::DataSample::getName | ( | ) |
Definition at line 234 of file DataSample.cpp.
JTime cmlabs::DataSample::getTimestamp | ( | ) |
Definition at line 238 of file DataSample.cpp.
JTime cmlabs::DataSample::getStartTime | ( | ) |
Definition at line 242 of file DataSample.cpp.
JTime cmlabs::DataSample::getEndTime | ( | ) |
Definition at line 246 of file DataSample.cpp.
long cmlabs::DataSample::getDuration | ( | ) |
Definition at line 381 of file DataSample.cpp.
Dictionary cmlabs::DataSample::getAllParameters | ( | ) |
Definition at line 250 of file DataSample.cpp.
long cmlabs::DataSample::getDataSize | ( | ) |
Definition at line 261 of file DataSample.cpp.
long cmlabs::DataSample::getDataMemUse | ( | ) |
Definition at line 254 of file DataSample.cpp.
char * cmlabs::DataSample::getDataCopy | ( | ) |
Definition at line 274 of file DataSample.cpp.
char * cmlabs::DataSample::getDataLink | ( | ) |
Definition at line 265 of file DataSample.cpp.
bool cmlabs::DataSample::clearDataFields | ( | ) |
Definition at line 167 of file DataSample.cpp.
bool cmlabs::DataSample::equals | ( | const Object * | o2 | ) | const [virtual] |
bool cmlabs::DataSample::equals | ( | const DataSample & | s2 | ) | const |
Definition at line 92 of file DataSample.cpp.
int cmlabs::DataSample::compare | ( | const Object * | o2 | ) | const [virtual] |
int cmlabs::DataSample::compareTo | ( | const DataSample & | s2 | ) | const |
Definition at line 102 of file DataSample.cpp.
Definition at line 284 of file DataSample.cpp.
int cmlabs::DataSample::getParamInt | ( | const JString & | param | ) |
Definition at line 289 of file DataSample.cpp.
double cmlabs::DataSample::getParamFloat | ( | const JString & | param | ) |
Definition at line 293 of file DataSample.cpp.
Definition at line 308 of file DataSample.cpp.
bool cmlabs::DataSample::setParamInt | ( | const JString & | param, | |
int | value | |||
) |
Definition at line 312 of file DataSample.cpp.
bool cmlabs::DataSample::setParamFloat | ( | const JString & | param, | |
double | value | |||
) |
Definition at line 316 of file DataSample.cpp.
int cmlabs::DataSample::getWidth | ( | ) |
Definition at line 390 of file DataSample.cpp.
int cmlabs::DataSample::getHeight | ( | ) |
Definition at line 394 of file DataSample.cpp.
bool cmlabs::DataSample::setWidth | ( | int | w | ) |
Definition at line 398 of file DataSample.cpp.
bool cmlabs::DataSample::setHeight | ( | int | h | ) |
Definition at line 403 of file DataSample.cpp.
Object * cmlabs::DataSample::getObject | ( | ) |
Definition at line 409 of file DataSample.cpp.
bool cmlabs::DataSample::setObject | ( | Object * | obj | ) |
Definition at line 413 of file DataSample.cpp.
bool cmlabs::DataSample::readFromFile | ( | const JString & | filename | ) |
bool cmlabs::DataSample::writeToFile | ( | const JString & | filename | ) |
Definition at line 597 of file DataSample.cpp.
long cmlabs::DataSample::getBinarySize | ( | int | chunk | ) | [virtual] |
Get the size of binary data chunk, -1 for all chunks.
Get the size of any binary data.
Reimplemented from cmlabs::Object.
Definition at line 433 of file DataSample.cpp.
int cmlabs::DataSample::getBinaryChunkCount | ( | ) | [virtual] |
Get the number of data chunks.
Reimplemented from cmlabs::Object.
Definition at line 464 of file DataSample.cpp.
char* cmlabs::DataSample::getBinaryDataPointer | ( | int | chunk | ) |
Get a pointer to the binary data at chunk number 'chunk'.
bool cmlabs::DataSample::setBinaryChunk | ( | int | chunk, | |
long | binsize, | |||
char * | data | |||
) |
Set the data after separate reception.
long cmlabs::DataSample::toBinaryBuffer | ( | int | chunk, | |
char * | buffer, | |||
int | maxlen | |||
) | [virtual] |
Write binary data to buffer at chunk number 'chunk'.
Get a pointer to the binary data at chunk number 'chunk'.
Reimplemented from cmlabs::Object.
Definition at line 471 of file DataSample.cpp.
bool cmlabs::DataSample::fromBinaryBuffer | ( | int | chunk, | |
char * | buffer, | |||
long | len | |||
) | [virtual] |
Set the data after separate reception.
Reimplemented from cmlabs::Object.
Definition at line 517 of file DataSample.cpp.
long cmlabs::DataSample::getLongFromBytes | ( | char * | buffer | ) |
Definition at line 570 of file DataSample.cpp.
bool cmlabs::DataSample::writeLongToBytes | ( | char * | buffer, | |
long | val | |||
) |
Definition at line 577 of file DataSample.cpp.
bool cmlabs::DataSample::markForDeletion | ( | ) |
Definition at line 605 of file DataSample.cpp.
bool cmlabs::DataSample::isMarkedForDeletion | ( | ) |
Definition at line 615 of file DataSample.cpp.
Definition at line 140 of file DataSample.h.
Definition at line 141 of file DataSample.h.
Definition at line 142 of file DataSample.h.
Definition at line 143 of file DataSample.h.
Definition at line 144 of file DataSample.h.
char* cmlabs::DataSample::data |
Definition at line 145 of file DataSample.h.
char* cmlabs::DataSample::link |
Definition at line 146 of file DataSample.h.
Definition at line 147 of file DataSample.h.
Definition at line 148 of file DataSample.h.
Definition at line 149 of file DataSample.h.
Definition at line 150 of file DataSample.h.
Definition at line 151 of file DataSample.h.
Definition at line 152 of file DataSample.h.
Definition at line 153 of file DataSample.h.
Definition at line 155 of file DataSample.h.
Definition at line 156 of file DataSample.h.
ObjectDictionary cmlabs::DataSample::users [protected] |
Definition at line 160 of file DataSample.h.
JString cmlabs::DataSample::lockedBy [protected] |
Definition at line 161 of file DataSample.h.