|
|
@ -319,10 +319,11 @@ void CWiresX::createReply(const unsigned char* data, unsigned int length)
|
|
|
|
unsigned char ft = calculateFT(length);
|
|
|
|
unsigned char ft = calculateFT(length);
|
|
|
|
unsigned char bt = length / 260U;
|
|
|
|
unsigned char bt = length / 260U;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
unsigned char seqNo = 0U;
|
|
|
|
|
|
|
|
|
|
|
|
// Write the header
|
|
|
|
// Write the header
|
|
|
|
unsigned char buffer[200U];
|
|
|
|
unsigned char buffer[200U];
|
|
|
|
::memcpy(buffer, m_header, 34U);
|
|
|
|
::memcpy(buffer, m_header, 34U);
|
|
|
|
buffer[34U] = 0x00U;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CSync::add(buffer + 35U);
|
|
|
|
CSync::add(buffer + 35U);
|
|
|
|
|
|
|
|
|
|
|
@ -337,6 +338,8 @@ void CWiresX::createReply(const unsigned char* data, unsigned int length)
|
|
|
|
payload.writeDataFRModeData1(m_csd1, buffer + 35U);
|
|
|
|
payload.writeDataFRModeData1(m_csd1, buffer + 35U);
|
|
|
|
payload.writeDataFRModeData2(m_csd2, buffer + 35U);
|
|
|
|
payload.writeDataFRModeData2(m_csd2, buffer + 35U);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
buffer[34U] = seqNo++;
|
|
|
|
|
|
|
|
|
|
|
|
m_network->write(buffer);
|
|
|
|
m_network->write(buffer);
|
|
|
|
|
|
|
|
|
|
|
|
fich.setFI(YSF_FI_COMMUNICATIONS);
|
|
|
|
fich.setFI(YSF_FI_COMMUNICATIONS);
|
|
|
@ -382,6 +385,8 @@ void CWiresX::createReply(const unsigned char* data, unsigned int length)
|
|
|
|
fich.setBN(bn);
|
|
|
|
fich.setBN(bn);
|
|
|
|
fich.encode(buffer + 35U);
|
|
|
|
fich.encode(buffer + 35U);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
buffer[34U] = seqNo++;
|
|
|
|
|
|
|
|
|
|
|
|
m_network->write(buffer);
|
|
|
|
m_network->write(buffer);
|
|
|
|
|
|
|
|
|
|
|
|
fn++;
|
|
|
|
fn++;
|
|
|
@ -392,8 +397,6 @@ void CWiresX::createReply(const unsigned char* data, unsigned int length)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Write the trailer
|
|
|
|
// Write the trailer
|
|
|
|
buffer[34U] = 0x01U;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fich.setFI(YSF_FI_TERMINATOR);
|
|
|
|
fich.setFI(YSF_FI_TERMINATOR);
|
|
|
|
fich.setFN(fn);
|
|
|
|
fich.setFN(fn);
|
|
|
|
fich.setBN(bn);
|
|
|
|
fich.setBN(bn);
|
|
|
@ -402,6 +405,8 @@ void CWiresX::createReply(const unsigned char* data, unsigned int length)
|
|
|
|
payload.writeDataFRModeData1(m_csd1, buffer + 35U);
|
|
|
|
payload.writeDataFRModeData1(m_csd1, buffer + 35U);
|
|
|
|
payload.writeDataFRModeData2(m_csd2, buffer + 35U);
|
|
|
|
payload.writeDataFRModeData2(m_csd2, buffer + 35U);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
buffer[34U] = seqNo | 0x01U;
|
|
|
|
|
|
|
|
|
|
|
|
m_network->write(buffer);
|
|
|
|
m_network->write(buffer);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|