ptme access wip
This commit is contained in:
@ -56,6 +56,7 @@ ReturnValue_t CCSDSIPCoreBridge::handleTm() {
|
||||
ReturnValue_t CCSDSIPCoreBridge::sendTm(const uint8_t * data, size_t dataLen) {
|
||||
|
||||
if(pollPapbSignal() == RETURN_OK) {
|
||||
ptmeBufferEmpty();
|
||||
startPacketTransfer();
|
||||
}
|
||||
|
||||
@ -72,6 +73,7 @@ ReturnValue_t CCSDSIPCoreBridge::sendTm(const uint8_t * data, size_t dataLen) {
|
||||
}
|
||||
|
||||
if(pollPapbSignal() == RETURN_OK) {
|
||||
ptmeBufferEmpty();
|
||||
endPacketTransfer();
|
||||
}
|
||||
return RETURN_OK;
|
||||
@ -103,3 +105,24 @@ ReturnValue_t CCSDSIPCoreBridge::pollPapbSignal() {
|
||||
|
||||
return RETURN_OK;
|
||||
}
|
||||
|
||||
void CCSDSIPCoreBridge::ptmeBufferEmpty() {
|
||||
ReturnValue_t result = RETURN_OK;
|
||||
int papbEmptyState = 1;
|
||||
|
||||
result = gpioComIF->readGpio(papbEmptyId, &papbEmptyState);
|
||||
|
||||
if (result != RETURN_OK) {
|
||||
sif::debug << "CCSDSIPCoreBridge::ptmeBufferEmpty: Failed to read papb empty signal"
|
||||
<< std::endl;
|
||||
return;
|
||||
}
|
||||
|
||||
if (papbEmptyState == 1) {
|
||||
sif::debug << "CCSDSIPCoreBridge::ptmeBufferEmpty: Buffer is empty" << std::endl;
|
||||
}
|
||||
else {
|
||||
sif::debug << "CCSDSIPCoreBridge::ptmeBufferEmpty: Buffer is not empty" << std::endl;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
Reference in New Issue
Block a user