CARVIEW |
Select Language
HTTP/2 200
date: Sun, 12 Oct 2025 00:46:12 GMT
content-type: text/html; charset=UTF-8
server: cloudflare
x-frame-options: DENY
x-content-type-options: nosniff
x-xss-protection: 1;mode=block
vary: accept-encoding
cf-cache-status: DYNAMIC
content-encoding: gzip
set-cookie: _csrf-frontend=ffda17e4ef4c85d54ef8ef5dfe771f318fad3ea5d8fcf559cb0c30d54bcda5c5a%3A2%3A%7Bi%3A0%3Bs%3A14%3A%22_csrf-frontend%22%3Bi%3A1%3Bs%3A32%3A%22-S9ELwA5EGKqudJLL1sIy_r-WFF2VyCC%22%3B%7D; HttpOnly; Path=/
cf-ray: 98d2942eccc15917-BLR
void Packet::Execute(){ active_ = true; if (active_ == true) { T - Pastebin.com
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void Packet::Execute()
- {
- active_ = true;
- if (active_ == true)
- {
- TX* CurrentTX = this->network_->GetTX(this->devices_id_);
- RX* CurrentRX = this->network_->GetRX(this->devices_id_);
- std::string pid = std::to_string(this->packet_id_);
- switch (state_)
- {
- case State::CREATED:
- {
- logger_->Info("Packet of ID : " + pid + "has been created.");
- state_ = State::WAITING;
- if (network_->GetTX(this->devices_id_)->BufferEmpty())
- {
- logger_->Info("Buffer of TX of ID : " + std::to_string(CurrentTX->GetTXID()) + "is empty. Packet passed.");
- network_->GetTX(this->devices_id_)->SetTXPacket(this);
- }
- else
- {
- logger_->Info("Buffer of TX of ID : " + std::to_string(CurrentTX->GetTXID()) + "not empty. Packet put in the buffer.");
- network_->GetTX(this->devices_id_)->PushToBuffer(this);
- }
- }
- case State::WAITING:
- {
- ++this->t_;
- if (network_->channel_->ChannelBusy() == true)
- {
- logger_->Info("Channel busy, packet of ID : " + pid + "is still waiting.");
- this->WaitCP();
- }
- else
- {
- logger_->Info("Channel free, packet of ID : " + pid + "passed to channel.");
- this->t_ = 0;
- state_ = State::SENT;
- }
- }
- case State::SENT:
- {
- network_->channel_->PushPacketToChannel(this);
- state_ = State::IN_CHANNEL;
- }
- case State::IN_CHANNEL:
- {
- this->WaitCTP();
- if (this->CheckForErrors(network_->channel_))
- this->error_ = true;
- if (this->CheckForCollision(network_->channel_))
- this->collision_ = true;
- network_->channel_->RemovePacketFromChannel();
- state_ = State::RECEIVED;
- }
- case State::RECEIVED:
- {
- CurrentRX->SetRXPacket(this);
- logger_->Info("Packet of ID : " + pid + "received by RX of ID : " + std::to_string(CurrentRX->GetRXID()));
- if ((this->error_ == true) || (this->collision_ == true))
- {
- logger_->Info("Packet of ID : " + pid + "contains errors. ACK FALSE.");
- ack_ = false;
- retransmission_ = true;
- }
- else
- {
- logger_->Info("Packet of ID : " + pid + "contains errors. ACK FALSE.");
- ack_ = true;
- }
- state_ = State::SENT_BACK;
- }
- case State::SENT_BACK:
- {
- network_->channel_->PushPacketToChannel(this);
- this->WaitCTIZ();
- logger_->Info("Packet of ID : " + pid + "returning with ACK flag set through the channel.");
- network_->channel_->RemovePacketFromChannel();
- state_ = State::CHECK;
- }
- case State::CHECK:
- {
- CurrentTX->SetTXPacket(this);
- if ((this->ack_ == false) && (this->retransmission_ == true))
- {
- logger_->Info("Transmission of packet of ID : " + pid + " failed. Necessary retransmission.");
- ++this->r_;
- if (this->r_ < network_->kMaxRetransmissions)
- {
- WaitCRP();
- state_ = State::WAITING;
- }
- else
- delete this;
- }
- else
- {
- logger_->Info("Packet of ID : " + pid + "transmitted successfully");
- delete this;
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
-
π Instant BTC Profit Method β
Working
JavaScript | 4 sec ago | 0.24 KB
-
ββ
Swapzone Glitch β
Working ββ L
JavaScript | 6 sec ago | 0.25 KB
-
π MAKE $2500 IN 15 MIN β
Working
JavaScript | 13 sec ago | 0.24 KB
-
β
Make $2500 in 20 minutesβββ 7
JavaScript | 15 sec ago | 0.25 KB
-
π΅ Make 3000$ in 20 minutes π΅
JavaScript | 22 sec ago | 0.24 KB
-
π Swapzone +37% glitch β 6
JavaScript | 24 sec ago | 0.25 KB
-
π Swapzone +37% glitch
JavaScript | 31 sec ago | 0.24 KB
-
ββ
Marketplace Glitch β
Working β
NEVER SEEN...
JavaScript | 38 sec ago | 0.25 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand