| 1883 | } |
| 1884 | |
| 1885 | void SbcInterface::EventOccurred(bool timeCritical) noexcept |
| 1886 | { |
| 1887 | if (!IsConnected()) |
| 1888 | { |
| 1889 | return; |
| 1890 | } |
| 1891 | |
| 1892 | // Increment the number of events |
| 1893 | if (timeCritical) |
| 1894 | { |
| 1895 | numEvents = numMaxEvents; |
| 1896 | } |
| 1897 | else |
| 1898 | { |
| 1899 | numEvents++; |
| 1900 | } |
| 1901 | |
| 1902 | // Stop delaying if the next transfer is time-critical |
| 1903 | if (numEvents >= numMaxEvents) |
| 1904 | { |
| 1905 | const bool isDelaying = delaying.exchange(false); |
| 1906 | if (isDelaying) |
| 1907 | { |
| 1908 | sbcTask->Give(NotifyIndices::SbcInterface); |
| 1909 | } |
| 1910 | } |
| 1911 | } |
| 1912 | |
| 1913 | void SbcInterface::DefragmentBufferedCodes() noexcept |
| 1914 | { |
no test coverage detected