25 FileUplinkComponentBase(name),
29 packetsReceived(this),
41 FileUplinkComponentBase::init(queueDepth, instance);
63 this->log_WARNING_HI_DecodeError(status);
66 switch (header.
type) {
77 this->handleCancelPacket();
84 this->bufferSendOut_out(0, buffer);
94 this->pingOut_out(0,key);
105 this->log_WARNING_HI_FileWriteError_ThrottleClear();
106 this->log_WARNING_HI_InvalidReceiveMode_ThrottleClear();
107 this->log_WARNING_HI_PacketOutOfBounds_ThrottleClear();
108 this->log_WARNING_HI_PacketOutOfOrder_ThrottleClear();
109 this->packetsReceived.packetReceived();
110 if (this->receiveMode != START) {
111 this->file.osFile.close();
116 this->goToDataMode();
119 this->warnings.fileOpen(this->file.name);
120 this->goToStartMode();
127 this->packetsReceived.packetReceived();
128 if (this->receiveMode != DATA) {
133 this->checkSequenceIndex(sequenceIndex);
135 const U32 dataSize = dataPacket.
dataSize;
136 if (byteOffset + dataSize > this->file.size) {
137 this->warnings.packetOutOfBounds(sequenceIndex, this->file.name);
146 this->warnings.fileWrite(this->file.name);
153 this->packetsReceived.packetReceived();
154 if (this->receiveMode == DATA) {
155 this->filesReceived.fileReceived();
157 this->compareChecksums(endPacket);
158 this->log_ACTIVITY_HI_FileReceived(this->file.name);
163 this->goToStartMode();
167 handleCancelPacket(
void)
169 this->packetsReceived.packetReceived();
170 this->log_ACTIVITY_HI_UplinkCanceled();
171 this->goToStartMode();
175 checkSequenceIndex(
const U32 sequenceIndex)
177 if (sequenceIndex != this->lastSequenceIndex + 1) {
178 this->warnings.packetOutOfOrder(
180 this->lastSequenceIndex
183 this->lastSequenceIndex = sequenceIndex;
190 this->file.getChecksum(computed);
192 if (computed != stored) {
193 this->warnings.badChecksum(
203 this->file.osFile.close();
204 this->receiveMode = START;
205 this->lastSequenceIndex = 0;
211 this->receiveMode = DATA;
212 this->lastSequenceIndex = 0;