Skip to content

Commit

Permalink
allow hasP25Space() to be overriden by derived classes [for possible …
Browse files Browse the repository at this point in the history
…future use];
  • Loading branch information
gatekeep committed Aug 14, 2024
1 parent 849d549 commit e81e775
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/host/modem/Modem.h
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ namespace modem
* @brief Helper to test if the P25 ring buffer has free space.
* @returns bool True, if the P25 ring buffer has free space, otherwise false.
*/
bool hasP25Space(uint32_t length) const;
virtual bool hasP25Space(uint32_t length) const;
/**
* @brief Helper to test if the NXDN ring buffer has free space.
* @returns bool True, if the NXDN ring buffer has free space, otherwise false.
Expand Down
7 changes: 7 additions & 0 deletions src/host/modem/ModemV24.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,13 @@ void ModemV24::close()
}
}

/* Helper to test if the P25 ring buffer has free space. */

bool ModemV24::hasP25Space(uint32_t length) const
{
return Modem::hasP25Space(length);
}

/* Writes raw data to the air interface modem. */

int ModemV24::write(const uint8_t* data, uint32_t length)
Expand Down
6 changes: 6 additions & 0 deletions src/host/modem/ModemV24.h
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,12 @@ namespace modem
*/
void close() override;

/**
* @brief Helper to test if the P25 ring buffer has free space.
* @returns bool True, if the P25 ring buffer has free space, otherwise false.
*/
bool hasP25Space(uint32_t length) const override;

/**
* @brief Writes raw data to the air interface modem.
* @param data Data to write to modem.
Expand Down

0 comments on commit e81e775

Please sign in to comment.