summaryrefslogtreecommitdiff
path: root/maximus/sci/src/SciServerTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'maximus/sci/src/SciServerTest.cpp')
-rw-r--r--maximus/sci/src/SciServerTest.cpp39
1 files changed, 28 insertions, 11 deletions
diff --git a/maximus/sci/src/SciServerTest.cpp b/maximus/sci/src/SciServerTest.cpp
index e6d6601ea6..f69a7c8fc7 100644
--- a/maximus/sci/src/SciServerTest.cpp
+++ b/maximus/sci/src/SciServerTest.cpp
@@ -147,6 +147,9 @@ void SciServerTest::receiveMsgTest (void)
0xFFFF, //uint16_t flags
0xFFFF }; // uint16_t reserved
+ clog << "\tSciServerTest -> SystemManager::updateStationStatus" << endl;
+ mpSystemManager->updateStationStatus ( stationId, MAXIMUS_STATION_STATUS_IDLE );
+
try
{
receiveClockSciMsgTest (msgHeader);
@@ -333,23 +336,37 @@ void SciServerTest::receivePhySciMsgTest ( Sci_Msg_Header & msg_header )
//
msg_header.type = SCI_MSG_TYPE_PHY; // uint8_t type = 0x03
- Phy_Header phyHeader = { PHY_VERSION, // uint8_t version = 0x01
- PHY_TYPE_AV_DATA, // uint8_t type = 0x01
- 0x0000, // uint16_t nek
- MAXIMUS_PHY_MPDU_FORMAT_NONE, // uint8_t mpdu_format = 0x00
- MAXIMUS_PHY_DATA_TYPE_NONE, // uint8_t data_type = 0x00
- 0x0000, // uint16_t nb_of_pbs
- MAXIMUS_PHY_PB_SIZE_NONE, // uint8_t pb_size = 0x00
- 0xFFFF, // uint16_t reserved
- 0xFFFF }; // uint16_t flags
-
- unsigned long dataLength = sizeof(struct Phy_Header);
+ uint32_t nek[4];
+ memset(nek, 'a', 4*sizeof(uint32_t));
+ uint32_t pbMeasurement [PHY_PB_MAX_NB];
+ memset(pbMeasurement, 'b', PHY_PB_MAX_NB*sizeof(uint32_t));
+ uint32_t pbHeader [PHY_PB_MAX_NB];
+ memset(pbHeader, 'c', PHY_PB_MAX_NB*sizeof(uint32_t));
+
+ Phy_Header phyHeader;
+ phyHeader.version = PHY_VERSION;
+ phyHeader.type = PHY_TYPE_MPDU_PAYLOAD;
+ phyHeader.mpdu_format = PHY_MPDU_FORMAT_BEACON;
+ phyHeader.pb_nb = 1;
+ phyHeader.tonemap_index = 2;
+ phyHeader.flags = PHY_FLAG_CRC_OK;
+ phyHeader.reserved = 0xFFFF;
+ memcpy(phyHeader.nek, nek, 4*sizeof(uint32_t));
+ memcpy(phyHeader.pb_measurement, pbMeasurement, PHY_PB_MAX_NB*sizeof(uint32_t));
+ memcpy(phyHeader.pb_header, pbHeader, PHY_PB_MAX_NB*sizeof(uint32_t));
+
+ unsigned long pbDataLength = 128;
+ unsigned char pbData [pbDataLength];
+ memset (pbData, '9', pbDataLength);
+
+ unsigned long dataLength = sizeof(struct Phy_Header)+pbDataLength;
msg_header.length = (uint16_t)dataLength;
unsigned char * pData = new unsigned char [dataLength];
if (NULL != pData)
{
memcpy(pData, (unsigned char *)&phyHeader, sizeof(struct Phy_Header));
+ memcpy(pData+sizeof(struct Phy_Header), pbData, pbDataLength);
}
//Test the receiveMsg method