|
LRAUV
revA
|
Handles data that is sent to the vehicle. More...
#include <DataReceiver.h>
Public Types | |
| enum | BinaryTransferFlags { FILE_START = 0x00, FILE_PART = 0x01, FILE_MEDIUM_OFFSET = 0x02, FILE_LARGE_OFFSET = 0x04, FILE_FLAG = 0x80 } |
Static Public Member Functions | |
| static bool | ReceiveSbd (const char *data, size_t dataLen, const char *keyText, Logger &logger) |
| static void | Receive (const char *data, size_t dataLen, Logger &logger) |
Static Protected Member Functions | |
| static void | FileStart (const char *data, size_t dataLen, unsigned int flags, unsigned int stamp, char *infoFilename, char *partFilename, unsigned int &crc, size_t &size, char *streamCmd, char *targetPath, Logger &logger) |
| Write data to start of file, and set informational parameters Data contains stamp, size, path, data Sets streamCmd. More... | |
| static void | FilePart (const char *data, size_t dataLen, unsigned int flags, unsigned int stamp, char *infoFilename, char *partFilename, unsigned int &crc, size_t &size, char *streamCmd, char *targetPath, Logger &logger) |
| Write data to middle of file Data contains stamp, offset, data Sets streamCmd if possible Returns true if file CAN BE COMPLETE. More... | |
| static bool | FileDone (char *partFilename, unsigned int crc, size_t size, char *targetPath, Logger &logger) |
| Returns true if file is completely written and there are no long stringstrailZ of zeroes in the data. More... | |
Private Member Functions | |
| DataReceiver () | |
| Private constructor for singleton class. More... | |
Static Private Attributes | |
| static AES | Crypt_ |
Handles data that is sent to the vehicle.
Assumes that data that starts with a valid ASCII character is a command. Otherwise binary.
|
private |
Private constructor for singleton class.
|
staticprotected |
Returns true if file is completely written and there are no long stringstrailZ of zeroes in the data.
Returns true if file is completely written and there are no long strings of zeroes in the data.
References Syslog::FAULT, Syslog::IMPORTANT, MAX_ZEROES, and Logger::syslog().
Referenced by Receive().
|
staticprotected |
Write data to middle of file Data contains stamp, offset, data Sets streamCmd if possible Returns true if file CAN BE COMPLETE.
References FILE_LARGE_OFFSET, FILE_MEDIUM_OFFSET, Syslog::IMPORTANT, and Logger::syslog().
Referenced by Receive().
|
staticprotected |
Write data to start of file, and set informational parameters Data contains stamp, size, path, data Sets streamCmd.
References FILE_LARGE_OFFSET, FILE_MEDIUM_OFFSET, Syslog::IMPORTANT, and Logger::syslog().
Referenced by Receive().
|
static |
References CommandLine::CommandBang(), CommandLine::DoCommand(), Syslog::FAULT, FILE_FLAG, FILE_PART, FileDone(), FilePart(), FileStart(), Syslog::IMPORTANT, Syslog::INFO, MAX_STREAM_CMD, MAX_TARGET, ParsedCommand::setStringArg(), and Logger::syslog().
Referenced by CommandLine::getLines(), and ReceiveSbd().
|
static |
References BLOCKLEN, BLOCKMODE, Syslog::CRITICAL, Crypt_, Receive(), and Logger::syslog().
Referenced by DataOverHttps::dataWriting(), CommandLine::getLines(), and NAL9602::retrieveAndQueueIncoming().
|
staticprivate |
Referenced by ReceiveSbd().