Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
Signed-off-by: Ludovic Le Brun <[email protected]>
  • Loading branch information
ludovic-smile committed Jun 5, 2024
1 parent 63404cd commit 6f53b01
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,5 @@
*.exe
*.out
*.app

.vscode/
7 changes: 7 additions & 0 deletions include/enhanced_hnz_server.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,13 @@ class EnhancedHNZServer
*/
void sendRR(bool repetition, int ns, int nr);

/**
* Sends information frame with the specified message.
* @param message The message to be sent.
* @param repeat Whether to repeat the frame.
*/
void sendInformation(std::vector<unsigned char> message, bool repeat);

/**
* Sends a frame with the specified message.
* @param message The message to be sent.
Expand Down
1 change: 1 addition & 0 deletions include/pa_hnz_data.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#pragma once

#include <array>
#include <vector>

/**
* @class PaHnzData
Expand Down
8 changes: 7 additions & 1 deletion src/enhanced_hnz_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -419,13 +419,19 @@ void EnhancedHNZServer::sendUA()
createAndSendFrame(m_state_machine->getAAddress(), message, sizeof(message));
}

void EnhancedHNZServer::sendInformation(std::vector<unsigned char> message, bool repeat)
{
sendFrame(message,repeat);
m_state_machine->sendInformation();
}

void EnhancedHNZServer::sendFrame(std::vector<unsigned char> message, bool repeat)
{
char num = m_state_machine->getControlInformation(repeat);
message.insert(message.begin(), num);
int len = message.size();
createAndSendFrame(m_state_machine->getBAddress(), message.data(), len);
m_state_machine->sendInformation();


}

Expand Down
2 changes: 1 addition & 1 deletion src/hnz.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ void HNZ::managerServer(const std::shared_ptr<EnhancedHNZServer> &server)
if (frame->usLgBuffer > 3 && frame->aubTrame[2] == 0x13)
{
HnzUtility::log_info("%s Send CG", beforeLog.c_str());
server->sendFrame(server->getStateMachine()->getHnzData().tsValueToTSCG(),
server->sendInformation(server->getStateMachine()->getHnzData().tsValueToTSCG(),
false);
}
// tc
Expand Down

0 comments on commit 6f53b01

Please sign in to comment.